From f83de7f462b5f01623dd4d4dcf2fe8d5941b7f0b Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Tue, 3 Oct 2017 15:45:56 +0300 Subject: [PATCH 1/2] [fs] Do not throw error on deprecation notice. --- pkg/fs/FsContext.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/fs/FsContext.php b/pkg/fs/FsContext.php index 542975545..66622400c 100644 --- a/pkg/fs/FsContext.php +++ b/pkg/fs/FsContext.php @@ -2,6 +2,7 @@ namespace Enqueue\Fs; +use Doctrine\ORM\Cache\Lock; use Interop\Queue\InvalidDestinationException; use Interop\Queue\PsrContext; use Interop\Queue\PsrDestination; @@ -94,6 +95,11 @@ public function declareDestination(PsrDestination $destination) InvalidDestinationException::assertDestinationInstanceOf($destination, FsDestination::class); set_error_handler(function ($severity, $message, $file, $line) { + // do not throw on a deprecation notice. + if (E_USER_DEPRECATED === $severity && false !== strpos($message, LockHandler::class)) { + return; + } + throw new \ErrorException($message, 0, $severity, $file, $line); }); From 59f856cb5fd1044305b3a46026984f630a6c6a79 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Tue, 3 Oct 2017 15:48:20 +0300 Subject: [PATCH 2/2] [fs] remove weak instruction for phpunit. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 680d8147f..3093c2b1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,9 @@ matrix: - php: 7.0 env: SYMFONY_VERSION=2.8.* UNIT_TESTS=true - php: 5.6 - env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true SYMFONY_DEPRECATIONS_HELPER=weak + env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true - php: 7.0 - env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true SYMFONY_DEPRECATIONS_HELPER=weak + env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true - php: 7.1 services: docker env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=true