8000 Merge branch '3.3' into 3.4 · symfony/symfony@78426b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 78426b7

Browse files
Merge branch '3.3' into 3.4
* 3.3: Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"
2 parents 8203281 + ea3a9a9 commit 78426b7

File tree

7 files changed

+13
-37
lines changed

7 files changed

+13
-37
lines changed

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218

2319
@trigger_error('root deprecation', E_USER_DEPRECATED);

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/disabled.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218

2319
echo (int) set_error_handler('var_dump');

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/regexp.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218

2319
@trigger_error('root deprecation', E_USER_DEPRECATED);

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218

2319
@trigger_error('root deprecation', E_USER_DEPRECATED);

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_non_vendor.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218

2319
@trigger_error('root deprecation', E_USER_DEPRECATED);

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak_vendors_on_vendor.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ $vendor = __DIR__;
1212
while (!file_exists($vendor.'/vendor')) {
1313
$vendor = dirname($vendor);
1414
}
15-
// Fake class to ensure bootstrap.php calls DeprecationErrorHandler::register().
16-
class PHPUnit_TextUI_Command
17-
{
18-
19-
}
20-
require $vendor.'/vendor/autoload.php';
15+
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
16+
require PHPUNIT_COMPOSER_INSTALL;
2117
require_once __DIR__.'/../../bootstrap.php';
2218
require __DIR__.'/fake_vendor/autoload.php';
2319
require __DIR__.'/fake_vendor/acme/lib/deprecation_riddled.php';

src/Symfony/Bridge/PhpUnit/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
1414

1515
// Detect if we're loaded by an actual run of phpunit
16-
if (!class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) {
16+
if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false) && !class_exists('PHPUnit\TextUI\Command', false)) {
1717
if ($ser = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) {
1818
DeprecationErrorHandler::collectDeprecations($ser);
1919
}

0 commit comments

Comments
 (0)
0