Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHPUnit deprecations #1981

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
bootstrap="src/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
executionOrder="depends,defects"
failOnDeprecation="true"
failOnEmptyTestSuite="true"
failOnNotice="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true"
requireCoverageMetadata="true">
Expand All @@ -24,7 +27,7 @@
<php>
<env name="DISABLE_PHPDI_COMPILATION" value="true" force="true" />
</php>
<coverage includeUncoveredFiles="true">
<coverage>
<report>
<clover outputFile="test/coverage/clover.xml" />
<text outputFile="php://stdout" showOnlySummary="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

namespace SmrTest\Container;

use PHPUnit\Framework\Attributes\CoversTrait;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use Smr\Container\ResettableContainer;
use Smr\Container\ResettableContainerTrait;

#[CoversTrait(ResettableContainerTrait::class)]
class ResettableContainerTraitTest extends TestCase {
#[CoversClass(ResettableContainer::class)]
class ResettableContainerTest extends TestCase {

public function test_not_initialized_by_definition(): void {
$container = new ResettableContainer([
Expand Down
Loading