minor #32920 [PhpUnitBridge] fix internal annotation (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix internal annotation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This should fix tests. It may require emptying the cache on Travis.

Commits
-------

f19b0abe0d [PhpUnitBridge] fix internal annotation
This commit is contained in:
Nicolas Grekas 2019-08-04 09:02:16 +02:00
commit 884669b83b
3 changed files with 2 additions and 8 deletions

View File

@ -17,7 +17,7 @@ use PHPUnit\Framework\Constraint\StringContains;
use PHPUnit\Framework\Constraint\TraversableContains;
/**
* @internal
* This trait is @internal
*/
trait PolyfillAssertTrait
{

View File

@ -15,7 +15,7 @@ use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
/**
* @internal
* This trait is @internal
*/
trait PolyfillTestCaseTrait
{

View File

@ -156,12 +156,6 @@ if (!file_exists("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit") || $configurationH
$alteredCode = preg_replace('/abstract class (?:Assert|PHPUnit_Framework_Assert)[^\{]+\{/', '$0 '.PHP_EOL." use \Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait;", $alteredCode, 1);
file_put_contents($alteredFile, $alteredCode);
// remove internal annotation from polyfill
foreach (array('PolyfillTestCaseTrait', 'PolyfillAssertTrait') as $polyfill) {
$traitFile = "./vendor/symfony/phpunit-bridge/Legacy/$polyfill.php";
file_put_contents($traitFile, str_replace(' * @internal', '', file_get_contents($traitFile)));
}
file_put_contents('phpunit', <<<'EOPHP'
<?php