Skip to content

Commit

Permalink
Merge pull request #64 from athos-ribeiro/php83
Browse files Browse the repository at this point in the history
Adjust tests for PHP 8.3
  • Loading branch information
malarzm authored Jan 30, 2024
2 parents 4f2d4f2 + 29377e0 commit dfbaa3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ 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"]'
php-versions: '["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]'
composer-options: '--ignore-platform-req=php+'
10 changes: 5 additions & 5 deletions tests/Doctrine/Deprecations/DeprecationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function setUp(): void
// reset the global state of Deprecation class across tests
$reflectionProperty = new ReflectionProperty(Deprecation::class, 'ignoredPackages');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue([]);
$reflectionProperty->setValue(null, []);

$reflectionProperty = new ReflectionProperty(Deprecation::class, 'triggeredDeprecations');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue([]);
$reflectionProperty->setValue(null, []);

Deprecation::disable();

Expand Down Expand Up @@ -277,12 +277,12 @@ public function testDeprecationTrackByEnv(): void
{
$reflectionProperty = new ReflectionProperty(Deprecation::class, 'type');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue(null);
$reflectionProperty->setValue(null, null);

Deprecation::trigger('Foo', 'link', 'message');
$this->assertSame(0, Deprecation::getUniqueTriggeredDeprecationsCount());

$reflectionProperty->setValue(null);
$reflectionProperty->setValue(null, null);
$_SERVER['DOCTRINE_DEPRECATIONS'] = 'track';

Deprecation::trigger('Foo', __METHOD__, 'message');
Expand All @@ -293,7 +293,7 @@ public function testDeprecationTriggerByEnv(): void
{
$reflectionProperty = new ReflectionProperty(Deprecation::class, 'type');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue(null);
$reflectionProperty->setValue(null, null);
$_ENV['DOCTRINE_DEPRECATIONS'] = 'trigger';

$this->expectErrorHandler(
Expand Down

0 comments on commit dfbaa3c

Please sign in to comment.