Skip to content

Conversation

@Rafikooo
Copy link

@Rafikooo Rafikooo commented Nov 20, 2025

Summary

  • Added ^12.0 to phpunit/phpunit version constraint in composer.json
  • Migrated @dataProvider annotation to #[DataProvider] attribute
  • Replaced @before/@beforeClass/@afterClass annotations with standard setUp() method
    • Removed shared kernel approach ($sharedKernel, createSharedKernel, ensureSharedKernelShutdown)
    • Consolidated setUpClient(), createMatcher(), setUpDatabase() into single setUp() method
    • Fixed "Booting the kernel before calling createClient() is not supported" error
  • Fixed JsonApiTestCase and XmlApiTestCase to use setServerParameter() instead of recreating client
  • Fixed SampleController to handle null Accept header (test fixture)
  • Added Composer audit ignore for Symfony security advisories blocking CI
  • Dropped PHPUnit 9 from CI matrix (no attribute support)
  • Dropped PHP 8.1 and 8.2 from CI matrix (PHPUnit 12 requires PHP >= 8.3)

@Rafikooo Rafikooo force-pushed the feature/phpunit-12-support branch 10 times, most recently from 8142bad to 68ea82f Compare November 24, 2025 15:12
@Rafikooo Rafikooo force-pushed the feature/phpunit-12-support branch 2 times, most recently from d5d094a to 9b6364c Compare November 28, 2025 23:53
@Rafikooo Rafikooo force-pushed the feature/phpunit-12-support branch from 9b6364c to 36fd034 Compare November 29, 2025 00:09
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
php: [8.3]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHPUnit 10 supports PHP ^8.1, so we should leave it in the matrix. For PHP <8.3 we should add an exclude in combination with PHPUnit 12.

* @before
*/
public function setUpClient(): void
protected function setUp(): void
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need to replace the before and after class? As we extend the ApiTestCase we need to remember about calling the parent's setUp once we override in a deriving class.

"nelmio/alice": "^3.6",
"phpspec/php-diff": "^1.1",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0 || ^12.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory you dropped ^9.0, but you left it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants