From 3ab69b2ab953408f3058aacc4ff7a95f39ed6f2f Mon Sep 17 00:00:00 2001 From: wagnert Date: Tue, 6 Jun 2017 16:01:33 +0200 Subject: [PATCH 1/3] Remove AbstractMessageListener::__constructor() method and inject Application it with @Resource annotation --- CHANGELOG.md | 10 ++++++++++ build.default.properties | 2 +- .../Messaging/AbstractMessageListener.php | 17 +++-------------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a8961..91e19b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# Version 3.0.0 + +## Bugfixes + +* None + +## Features + +* Remove AbstractMessageListener::__constructor() method and inject Application it with @Resource annotation + # Version 2.0.1 ## Bugfixes diff --git a/build.default.properties b/build.default.properties index 96aa66c..0896acf 100644 --- a/build.default.properties +++ b/build.default.properties @@ -8,4 +8,4 @@ #-------------------------------------------------------------------------------- # ---- Module Release Settings -------------------------------------------------- -release.version = 2.0.1 \ No newline at end of file +release.version = 3.0.0 \ No newline at end of file diff --git a/src/AppserverIo/Messaging/AbstractMessageListener.php b/src/AppserverIo/Messaging/AbstractMessageListener.php index 70036b7..60da5c7 100755 --- a/src/AppserverIo/Messaging/AbstractMessageListener.php +++ b/src/AppserverIo/Messaging/AbstractMessageListener.php @@ -24,6 +24,7 @@ use AppserverIo\Psr\Pms\MessageListenerInterface; use AppserverIo\Psr\Pms\MessageQueueException; use AppserverIo\Psr\Application\ApplicationInterface; +use AppserverIo\Psr\Pms\QueueContextInterface; /** * An abstract implementation for a message listener. @@ -41,22 +42,10 @@ abstract class AbstractMessageListener implements MessageListenerInterface * The application instance that provides the entity manager. * * @var \AppserverIo\Psr\Application\ApplicationInterface + * @Resource(name="ApplicationInterface") */ protected $application; - /** - * Initializes the session bean with the Application instance. - * - * Checks on every start if the database already exists, if not - * the database will be created immediately. - * - * @param \AppserverIo\Psr\Application\ApplicationInterface $application The application instance - */ - public function __construct(ApplicationInterface $application) - { - $this->application = $application; - } - /** * Returns the application instance. * @@ -79,7 +68,7 @@ protected function updateMonitor(MessageInterface $message) { // check if a application instance is available - $queueManager = $this->getApplication()->search('QueueContextInterface'); + $queueManager = $this->getApplication()->search(QueueContextInterface::IDENTIFIER); if ($queueManager == null) { throw new MessageQueueException( sprintf('Can\'t find queue manager instance in application %s', $this->getApplication()->getName()) From c0df0462254099e11d69c75d5aeae7c165afb4e5 Mon Sep 17 00:00:00 2001 From: wagnert Date: Tue, 6 Jun 2017 16:09:22 +0200 Subject: [PATCH 2/3] Fixed typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e19b8..ae96b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ## Features -* Remove AbstractMessageListener::__constructor() method and inject Application it with @Resource annotation +* Remove AbstractMessageListener::__construct() method and inject Application it with @Resource annotation # Version 2.0.1 From 3e2c4a83373c6e5d4084e5ddba83a99447769a49 Mon Sep 17 00:00:00 2001 From: Tim Wagner Date: Wed, 11 Apr 2018 21:29:54 +0200 Subject: [PATCH 3/3] Fixed Travis-CI configuration file --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe980fa..24103f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,21 +4,18 @@ php: - 7.0 - 5.6 - 5.5 - - 5.4 matrix: allow_failures: - php: 7.0 before_install: - - pecl install pthreads-2.0.10 - - pecl install xdebug + - if [[ "$TRAVIS_PHP_VERSION" < "7.0" ]]; then pecl install pthreads-2.0.10; fi + - if [[ "$TRAVIS_PHP_VERSION" = "7.0" ]] || [[ "$TRAVIS_PHP_VERSION" > "7.0" ]]; then pecl install pthreads-3.1.6; fi + - pecl install xdebug-2.5.5 - phpenv rehash - wget https://scrutinizer-ci.com/ocular.phar -before_script: - - composer selfupdate - script: - ant composer-init - ant build @@ -26,4 +23,4 @@ script: notifications: email: info@appserver.io - hipchat: 95d47a72c5372d4a0fef20048c3200@Appserver \ No newline at end of file + hipchat: 95d47a72c5372d4a0fef20048c3200@Appserver