Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"

This reverts commit 41509a2dcf, reversing
changes made to 3e3e74c3fa.
This commit is contained in:
Nicolas Grekas 2017-10-25 18:54:16 +02:00
parent 41509a2dcf
commit ea3a9a9f96
7 changed files with 13 additions and 37 deletions

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
@trigger_error('root deprecation', E_USER_DEPRECATED);

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
echo (int) set_error_handler('var_dump');

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
@trigger_error('root deprecation', E_USER_DEPRECATED);

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
@trigger_error('root deprecation', E_USER_DEPRECATED);

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
@trigger_error('root deprecation', E_USER_DEPRECATED);

View File

@ -12,12 +12,8 @@ $vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
$vendor = dirname($vendor);
}
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
class PHPUnit_TextUI_Command
{
}
require $vendor.'/vendor/autoload.php';
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
require __DIR__.'/fake_vendor/autoload.php';
require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php';

View File

@ -13,7 +13,7 @@ use Doctrine\Common\Annotations\AnnotationRegistry;
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
// Detect if we're loaded by an actual run of phpunit
if (!class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) {
if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) {
if ($ser = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) {
DeprecationErrorHandler::collectDeprecations($ser);
}