Conversation
| Let's bump to v12? |
c4f6dac to e4f52db Compare | @nicolas-grekas PHPUnit 12 requires PHP 8.3, so I had to allow older versions for lower PHP versions. |
| I did the bump to PHP >= 8.1 in #1067 |
1454da1 to aac4804 Compare
@nicolas-grekas Done |
aac4804 to ce7c02f Compare | I forced-pushed a rebase, then realized that while tests are green, they have things to fix (one risky, and |
| @nicolas-grekas Oh, the N test are because of PHPUnit 12.5-dev, guess that's something new, I'll have to check it out. |
0080b52 to 4dc8127 Compare | @nicolas-grekas Should be good now, see 4dc8127. The main issue was:
Also, using $repository = $this->createMock(InstalledRepositoryInterface::class); $repository->expects($this->any()); |
| /** @var Recipe|\PHPUnit\Framework\MockObject\MockObject $recipe */ | ||
| $recipe = $this->getMockBuilder(Recipe::class)->disableOriginalConstructor()->getMock(); | ||
| $recipe->method('getName')->willReturn('symfony/messenger'); | ||
| |
phpunit.xml.dist Outdated
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
| <coverage> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" colors="true" failOnNotice="true" failOnWarning="true" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" cacheDirectory=".phpunit.cache"> |
There was a problem hiding this comment.
We should use failOnDeprecation to match the behavior of the PHPUnit bridge
| }, | ||
| "require-dev": { | ||
| "composer/composer": "^2.1", | ||
| "phpunit/phpunit": "^12.4", |
There was a problem hiding this comment.
should we use ^10.5 || ^11.5 || ^12.4 to make it easier for contributors running things locally, instead of relying on the CI replacing the requirement ?
There was a problem hiding this comment.
The ignoreIndirectDeprecations would still be a problem. I guess we could have two xml files.
There was a problem hiding this comment.
it will indeed be an issue for PHPUnit 10 (used on PHP 8.1 only). Maybe we should bump our PHP requirement to 8.2 instead of the bump to 8.1 done in #1067
/cc @nicolas-grekas
There was a problem hiding this comment.
I wouldn't until 6.4 is maintained.
| "phpunit/phpunit": "^12.4", | ||
| "symfony/dotenv": "^6.4|^7.4|^8.0", | ||
| "symfony/filesystem": "^6.4|^7.4|^8.0", | ||
| "symfony/phpunit-bridge": "^6.4|^7.4|^8.0", |
There was a problem hiding this comment.
the SymfonyExtension defined in the bridge still does the automatic registration of the DebugClassLoader to report deprecations triggered by this autoloader. If the bridge is not used anymore, it might still make sense to depend on error-handler and to register that autoloader in the PHPUnit bootstrap file.
There was a problem hiding this comment.
@stof I just double-checked, the DebugClassLoader is registered only if the error-handler component is installed, which was never the case. So removing the bridge doesn't change this behavior.
There was a problem hiding this comment.
ah, I thought the phpunit-bridge was depending on error-handler in newer version. So this is indeed a separate improvement idea.
Resolves #1051