Skip to content

Commit

Permalink
Merge pull request #76 from greg0ire/drop-old-phpunit
Browse files Browse the repository at this point in the history
Drop support for old PHPUnit versions
  • Loading branch information
greg0ire authored Dec 30, 2024
2 parents 7014f6c + 6a47164 commit 09f812f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ jobs:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]'
composer-options: '--ignore-platform-req=php+'
php-versions: '["8.1", "8.2", "8.3"]'
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
"type": "library",
"homepage": "https://www.doctrine-project.org/",
"require": {
"php": "^7.1 || ^8.0"
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^12",
"phpstan/phpstan": "1.4.10 || 2.0.3",
"phpstan/phpstan-phpunit": "^1.0 || ^2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5",
"phpunit/phpunit": "^10.5 || ^11.5",
"psr/log": "^1 || ^2 || ^3"
},
"conflict": {
"phpunit/phpunit": "<=10.5 || >=12"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
Expand Down
6 changes: 4 additions & 2 deletions src/PHPUnit/VerifyDeprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Doctrine\Deprecations\PHPUnit;

use Doctrine\Deprecations\Deprecation;
use PHPUnit\Framework\Attributes\After;
use PHPUnit\Framework\Attributes\Before;

use function sprintf;

Expand All @@ -26,13 +28,13 @@ public function expectNoDeprecationWithIdentifier(string $identifier): void
$this->doctrineNoDeprecationsExpectations[$identifier] = Deprecation::getTriggeredDeprecations()[$identifier] ?? 0;
}

/** @before */
#[Before]
public function enableDeprecationTracking(): void
{
Deprecation::enableTrackingDeprecations();
}

/** @after */
#[After]
public function verifyDeprecationsAreTriggered(): void
{
foreach ($this->doctrineDeprecationsExpectations as $identifier => $expectation) {
Expand Down

0 comments on commit 09f812f

Please sign in to comment.