Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed Jul 27, 2017
0 parents commit e5891d3
Show file tree
Hide file tree
Showing 13 changed files with 245 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.idea/
/.vagrant/
/vendor/
/build/logs/
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: php

php:
- 7.1

branches:
only:
- master
- development
- /^feature\/.+$/
- /^refactoring\/.+$/
- /^issue\/.+$/

before_script:
- composer self-update
- mkdir -p vendor/bin
- composer install -o --prefer-dist --no-interaction
- mkdir build/logs

script:
- php vendor/bin/phpunit.phar -c build/

after_success:
- travis_retry php vendor/bin/coveralls.phar -v --exclude-no-stmt
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CHANGELOG

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com).

## [1.0.0] - YYYY-MM-DD

### Added

### Changed

### Fixed



[1.0.0]: https://github.com/php-mq/client/tree/v1.0.0
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contribution guide

Contributions are **welcome** and will be fully **credited**.

We accept contributions via pull requests on [GitHub](https://github.com/php-mq/client).

## Pull Requests

- **Add tests!** - Your patch will not be accepted if it does not have tests.

- **Document any change in behaviour** - Make sure the documentation in `README.md` is kept up-to-date.

- **Consider our release cycle** - We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create topic branches** - Do not ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, please send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.


## Running the tests

$ composer update
$ php vendor/bin/phpunit.phar -c build
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2017 Holger Woltersdorf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[![Build Status](https://travis-ci.org/php-mq/client.svg?branch=master)](https://travis-ci.org/php-mq/client)
[![Tested PHP versions](https://php-eye.com/badge/php-mq/client/tested.svg)](https://php-eye.com/package/php-mq/client)
[![Latest Stable Version](https://poser.pugx.org/php-mq/client/v/stable)](https://packagist.org/packages/php-mq/client)
[![Total Downloads](https://poser.pugx.org/php-mq/client/downloads)](https://packagist.org/packages/php-mq/client)
[![Coverage Status](https://coveralls.io/repos/github/php-mq/client/badge.svg?branch=master)](https://coveralls.io/github/php-mq/client?branch=master)

# PHPMQ\Client

## Description

## Installation

## Usage

## Contributing

Contributions are welcome and will be fully credited. Please see the [contribution guide](CONTRIBUTING.md) for details.


11 changes: 11 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.box = "DreiWolt/devops007"
config.vm.network :private_network, ip: "192.168.3.17"
config.vm.hostname = "PHPMQClient"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provision "shell", path: "env/bootstrap.sh", run: "always"

end
25 changes: 25 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<phpunit
bootstrap="../tests/bootstrap.php"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true">
<testsuites>
<testsuite name="Client">
<directory suffix="Test.php">../tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="logs/coverage"/>
<log type="coverage-clover" target="logs/clover.xml"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
</logging>
</phpunit>
50 changes: 50 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "php-mq/client",
"description": "Client",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"authors": [
{
"name": "Holger Woltersdorf",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.1"
},
"autoload": {
"psr-4": {
"PHPMQ\\Client\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PHPMQ\\Client\\Tests\\": "tests/"
}
},
"require-dev": {
"tm/tooly-composer-script": "^1.0",
"roave/security-advisories": "dev-master"
},
"scripts": {
"post-install-cmd": "Tooly\\ScriptHandler::installPharTools",
"post-update-cmd": "Tooly\\ScriptHandler::installPharTools"
},
"extra": {
"tools": {
"phpunit": {
"url": "https://phar.phpunit.de/phpunit-6.2.3.phar",
"only-dev": true
},
"coveralls": {
"url": "https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar",
"only-dev": true
},
"phpmetrics": {
"url": "https://github.com/phpmetrics/PhpMetrics/releases/download/v2.2.0/phpmetrics.phar",
"only-dev": true
}
}
}
}
13 changes: 13 additions & 0 deletions env/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

sudo apt-get update

cd /vagrant

mkdir build/logs
chmod -R 0777 build/logs

sudo composer self-update
sudo chmod -R 0777 /home/vagrant/.composer
sudo chmod -R 0777 /tmp
sudo service php7.1-fpm restart
15 changes: 15 additions & 0 deletions src/Exceptions/LogicException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);
/**
* @author hollodotme
*/

namespace PHPMQ\Client\Exceptions;

/**
* Class RepoTemplateException
* @package PHPMQ\Client\Exceptions
*/
class LogicException extends \LogicException
{

}
15 changes: 15 additions & 0 deletions src/Exceptions/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php declare(strict_types=1);
/**
* @author hollodotme
*/

namespace PHPMQ\Client\Exceptions;

/**
* Class RuntimeException
* @package PHPMQ\Client\Exceptions
*/
class RuntimeException extends \RuntimeException
{

}
6 changes: 6 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php declare(strict_types=1);
/**
* @author hollodotme
*/

require_once __DIR__ . '/../vendor/autoload.php';

0 comments on commit e5891d3

Please sign in to comment.