diff --git a/.travis.yml b/.travis.yml index 127a3b5fa3cc8..8e22e1323ff0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,8 @@ services: - redis-server before_install: + - mkdir /tmp/slapd + - slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 & # Matrix lines for intermediate PHP versions are skipped for pull requests - if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi; # A sigchild-enabled-PHP is used to test the Process component on the lowest PHP matrix line @@ -57,9 +59,6 @@ before_install: - if [[ $deps != skip && $TRAVIS_REPO_SLUG = symfony/symfony ]]; then cp .composer/* ~/.composer/; composer global install; fi; - if [[ $deps != skip ]]; then ./phpunit install; fi; - export PHPUNIT=$(readlink -f ./phpunit) - - mkdir /tmp/slapd - - slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 & - - sleep 3 - ldapadd -h localhost:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/base.ldif - ldapadd -h localhost:3389 -D cn=admin,dc=symfony,dc=com -w symfony -f src/Symfony/Component/Ldap/Tests/Fixtures/data/fixtures.ldif diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index efd17102923a7..390c4909dcc02 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -19,6 +19,7 @@ class DeprecationErrorHandler { const MODE_WEAK = 'weak'; + const MODE_DISABLED = 'disabled'; private static $isRegistered = false; @@ -67,11 +68,10 @@ public static function register($mode = 0) 'other' => array(), ); $deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) { - if (E_USER_DEPRECATED !== $type) { + if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) { return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context); } - $mode = $getMode(); $trace = debug_backtrace(true); $group = 'other'; diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt new file mode 100644 index 0000000000000..0115bbd24259a --- /dev/null +++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test DeprecationErrorHandler in weak mode +--FILE-- + +--EXPECTF-- +00 diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php index 8da1283324a44..034d07a30f67a 100644 --- a/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php +++ b/src/Symfony/Bridge/PhpUnit/Tests/DnsMockTest.php @@ -13,8 +13,6 @@ use Symfony\Bridge\PhpUnit\DnsMock; -require_once __DIR__.'/../DnsMock.php'; - class DnsMockTest extends \PHPUnit_Framework_TestCase { protected function tearDown() diff --git a/src/Symfony/Bridge/PhpUnit/bootstrap.php b/src/Symfony/Bridge/PhpUnit/bootstrap.php index 1283da08fa408..5e2ed0ca85f82 100644 --- a/src/Symfony/Bridge/PhpUnit/bootstrap.php +++ b/src/Symfony/Bridge/PhpUnit/bootstrap.php @@ -24,4 +24,6 @@ AnnotationRegistry::registerLoader('class_exists'); } -DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); +if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { + DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); +} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy