Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize trigger enables propagation if it was stopped #184

Merged
merged 5 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ before_script:
script:
- 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
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check config/ examples/ src/ tests/; fi

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

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions config/prooph_service_bus.config.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions config/services.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions examples/quick-start.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Async/AsyncMessage.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Async/MessageProducer.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
5 changes: 3 additions & 2 deletions src/CommandBus.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down Expand Up @@ -97,6 +97,7 @@ public function dispatch($command): void
}
} catch (\Throwable $exception) {
$actionEvent->setParam(self::EVENT_PARAM_EXCEPTION, $exception);
$actionEvent->stopPropagation(false);
} finally {
$this->triggerFinalize($actionEvent);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Container/AbstractBusFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/CommandBusFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/EventBusFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/Plugin/Guard/FinalizeGuardFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/Plugin/Guard/RouteGuardFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Container/QueryBusFactory.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
5 changes: 3 additions & 2 deletions src/EventBus.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down Expand Up @@ -107,6 +107,7 @@ public function dispatch($event): void
$actionEventEmitter->dispatch($actionEvent);
} catch (\Throwable $exception) {
$actionEvent->setParam(self::EVENT_PARAM_EXCEPTION, $exception);
$actionEvent->stopPropagation(false);
} finally {
$this->triggerFinalize($actionEvent);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/CommandDispatchException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/EventListenerException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/MessageDispatchException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/ServiceBusException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/MessageBus.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/AbstractPlugin.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Guard/AuthorizationService.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Guard/FinalizeGuard.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Guard/RouteGuard.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Guard/UnauthorizedException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/InvokeStrategy/FinderInvokeStrategy.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/InvokeStrategy/HandleCommandStrategy.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/InvokeStrategy/OnEventStrategy.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/ListenerExceptionCollectionMode.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/MessageFactoryPlugin.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/MessageProducerPlugin.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Router/AsyncSwitchMessageRouter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* This file is part of the prooph/service-bus.
* (c) 2014-2017 prooph software GmbH <contact@prooph.de>
* (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
* (c) 2014-2018 prooph software GmbH <contact@prooph.de>
* (c) 2015-2018 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand Down
Loading