Skip to content

Commit

Permalink
merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
prolic committed Feb 16, 2017
2 parents 37766ae + 844ff67 commit 7589dcf
Show file tree
Hide file tree
Showing 92 changed files with 2,729 additions and 2,820 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ nbproject
.buildpath
.DS_Store
.idea
.php_cs.cache
.project
.settings
vendor
Expand Down
46 changes: 8 additions & 38 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
<?php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in('src')
->in('config')
->in('tests')
->in('examples');
$config = Symfony\CS\Config\Config::create();
$config->level(null);
$config->fixers(
array(
'braces',
'duplicate_semicolon',
'elseif',
'empty_return',
'encoding',
'eof_ending',
'function_call_space',
'function_declaration',
'indentation',
'join_function',
'line_after_namespace',
'linefeed',
'lowercase_keywords',
'parenthesis',
'multiple_use',
'method_argument_space',
'object_operator',
'php_closing_tag',
'remove_lines_between_uses',
'short_array_syntax',
'short_tag',
'standardize_not_equal',
'trailing_spaces',
'unused_use',
'visibility',
'whitespacy_lines',
)
);
$config->finder($finder);

$config = new Prooph\CS\Config\Prooph();
$config->getFinder()->in(__DIR__);

$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;

$config->setCacheFile($cacheDir . '/.php_cs.cache');

return $config;
30 changes: 13 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,31 @@ language: php
matrix:
fast_finish: true
include:
- php: 5.5
env:
- DEPENDENCIES=""
- php: 5.5
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 5.6
env:
- DEPENDENCIES=""
- php: 5.6
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- php: 7
- php: 7.1
env:
- DEPENDENCIES=""
- EXECUTE_CS_CHECK=true
- TEST_COVERAGE=true
- php: 7
- php: 7.1
env:
- DEPENDENCIES="--prefer-lowest --prefer-stable"

cache:
directories:
- $HOME/.composer/cache
- $HOME/.php-cs-fixer
- $HOME/.local

before_script:
- mkdir -p "$HOME/.php-cs-fixer"
- phpenv config-rm xdebug.ini
- composer self-update
- composer update --prefer-dist $DEPENDENCIES

script:
- php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/php-cs-fixer fix -v --diff --dry-run
- ./vendor/bin/docheader check config/ examples/ src/ tests/
- if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check src/ tests/; fi

after_success:
- if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi
Expand Down
43 changes: 22 additions & 21 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
Copyright (c) 2013, Alexander Miertsch [email protected]
Copyright (c) 2013-2017, prooph software GmbH
Copyright (c) 2015-2017, Sascha-Oliver Prolic
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of Alexander Miertsch nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
* Neither the name of the prooph software GmbH nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PSB - ProophServiceBus

PHP 5.5+ lightweight message bus supporting CQRS and Micro Services
PHP 7.1+ lightweight message bus supporting CQRS and Micro Services

[![Build Status](https://travis-ci.org/prooph/service-bus.png?branch=master)](https://travis-ci.org/prooph/service-bus)
[![Coverage Status](https://coveralls.io/repos/prooph/service-bus/badge.svg?branch=master&service=github)](https://coveralls.io/github/prooph/service-bus?branch=master)
Expand Down Expand Up @@ -45,12 +45,12 @@ $router = new CommandRouter();

//Register a callback as CommandHandler for the EchoText command
$router->route('Prooph\ServiceBus\Example\Command\EchoText')
->to(function (EchoText $aCommand) {
->to(function (EchoText $aCommand): void {
echo $aCommand->getText();
});

//Expand command bus with the router plugin
$commandBus->utilize($router);
$router->attachToMessageBus($commandBus);

//We create a new Command
$echoText = new EchoText('It works');
Expand Down
41 changes: 26 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,30 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "~5.5 || ~7.0",
"beberlei/assert": "^2.4",
"prooph/common" : "^3.7"
"php": "^7.1",
"prooph/common" : "^4.0.0"
},
"require-dev": {
"react/promise" : "^2.2.2",
"phpunit/phpunit": "^4.8.23",
"fabpot/php-cs-fixer": "^1.7",
"react/promise" : "^2.4.1",
"phpunit/phpunit": "^6.0",
"phpspec/prophecy": "dev-patch-1 as 1.6.2",
"prooph/php-cs-fixer-config": "^0.1.1",
"satooshi/php-coveralls": "^1.0",
"container-interop/container-interop" : "^1.1",
"sandrokeil/interop-config": "^1.0",
"tobiju/bookdown-bootswatch-templates": "^1.0",
"malukenho/docheader": "^0.1.3"
"psr/container": "^1.0",
"sandrokeil/interop-config": "^2.0.1",
"prooph/bookdown-template": "^0.2.3",
"malukenho/docheader": "^0.1.4"
},
"suggest": {
"react/promise": "^2.2.2 for usage with provided QueryBus",
"prooph/event-store": "Let the EventBus dispatch persisted DomainEvents",
"react/promise": "^2.4.1 for usage with provided QueryBus",
"prooph/event-store-bus-bridge": "Let the EventBus dispatch persisted DomainEvents",
"zendframework/zend-servicemanager": "Use Zend ServiceManager to lazy load your handlers and listeners",
"prooph/service-bus-zfc-rbac-bridge": "Use ZfcRbac as authorization service for route and finalize guard",
"container-interop/container-interop": "For usage of provided factories",
"psr/container": "^1.0 for usage of provided factories",
"sandrokeil/interop-config": "For usage of provided factories"
},
"conflict": {
"sandrokeil/interop-config": "<1.0"
"sandrokeil/interop-config": "<2.0.1"
},
"autoload": {
"psr-4": {
Expand All @@ -59,6 +59,11 @@
"ProophTest\\ServiceBus\\": "tests/"
}
},
"extra": {
"branch-alias": {
"dev-develop": "6.0-dev"
}
},
"scripts": {
"check": [
"@cs",
Expand All @@ -67,5 +72,11 @@
"cs": "php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v --diff",
"test": "phpunit"
}
},
"repositories": [
{
"type": "git",
"url": "https://github.com/prolic/prophecy.git"
}
]
}
12 changes: 7 additions & 5 deletions config/prooph_service_bus.config.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2016 prooph software GmbH <[email protected]>
* (c) 2015-2016 Sascha-Oliver Prolic <[email protected]>
* (c) 2014-2017 prooph software GmbH <[email protected]>
* (c) 2015-2017 Sascha-Oliver Prolic <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

/**
* This file contains default configuration for prooph/service-bus
* It is meant to be used together with at least one of the container-aware factories
Expand Down Expand Up @@ -40,7 +42,7 @@
//the factory will pull the producer from the container and set up an AsyncSwitchMessageRouter
//using the producer AND decorating the actual configured router
//'async_switch' => 'container_id_of_async_message_producer',
]
],
],
//This section will be used by Prooph\ServiceBus\Container\EventBusFactory
'event_bus' => [
Expand All @@ -61,7 +63,7 @@
//the factory will pull the producer from the container and set up an AsyncSwitchMessageRouter
//using the producer AND decorating the actual configured router
//'async_switch' => 'container_id_of_async_message_producer',
]
],
],
//This section will be used by Prooph\ServiceBus\Container\QueryBusFactory
'query_bus' => [
Expand All @@ -82,7 +84,7 @@
//the factory will pull the producer from the container and set up an AsyncSwitchMessageRouter
//using the producer AND decorating the actual configured router
//'async_switch' => 'container_id_of_async_message_producer',
]
],
],
], //EO service_bus
], //EO prooph
Expand Down
12 changes: 7 additions & 5 deletions config/services.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2016 prooph software GmbH <[email protected]>
* (c) 2015-2016 Sascha-Oliver Prolic <[email protected]>
* (c) 2014-2017 prooph software GmbH <[email protected]>
* (c) 2015-2017 Sascha-Oliver Prolic <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Prooph\ServiceBus;

return [
Expand All @@ -21,11 +23,11 @@
// to expose message name in UnauthorizedException
Plugin\Guard\RouteGuard::class => [
Container\Plugin\Guard\RouteGuardFactory::class,
'exposeMessageName'
'exposeMessageName',
],
Plugin\Guard\FinalizeGuard::class => [
Container\Plugin\Guard\FinalizeGuardFactory::class,
'exposeMessageName'
'exposeMessageName',
],
]
],
];
Loading

0 comments on commit 7589dcf

Please sign in to comment.