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 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); });