Skip to content

Add support for Symfony 8 - #100

Merged
peter-gribanov merged 4 commits into
gpslab:masterfrom
peter-gribanov:symfony8
Aug 7, 2026
Merged

peter-gribanov merged 4 commits into
gpslab:masterfrom
peter-gribanov:symfony8

Conversation

@peter-gribanov

Copy link
Copy Markdown
Member

fix #98

The bundle sources are already compatible with Symfony 8, only the constraints, the test suite and the CI matrix needed changes.

Symfony 8 requires PHP 8.4 +, which in turn requires PHPUnit 10 + and PHPStan 2. The test suite is made compatible with PHPUnit 7 - 12 at once:

  • data providers are static and declared with the #[DataProvider] attribute in addition to the @dataProvider annotation, the attribute is a plain comment on PHP 7.x;
  • withConsecutive() and at() are replaced with willReturnCallback();
  • assertMatchesRegularExpression() is final since PHPUnit 10 and can not be used as a BC shim any more.

The configuration schemas of PHPUnit 9 and 10 are incompatible, so phpunit-10.xml.dist is added next to phpunit.xml.dist.

TestReader can not redeclare the filename and the locales properties: GeoIP2 3.x declares Reader::$locales as a readonly promoted property. This also fixes the already failing "PHP 8.3 + GeoIP2 ~3.0" build.

peter-gribanov and others added 4 commits August 7, 2026 16:34
The bundle sources are already compatible with Symfony 8, only the
constraints, the test suite and the CI matrix needed changes.

Symfony 8 requires PHP 8.4 +, which in turn requires PHPUnit 10 + and
PHPStan 2. The test suite is made compatible with PHPUnit 7 - 12 at once:

 * data providers are static and declared with the #[DataProvider]
   attribute in addition to the @dataProvider annotation, the attribute
   is a plain comment on PHP 7.x;
 * withConsecutive() and at() are replaced with willReturnCallback();
 * assertMatchesRegularExpression() is final since PHPUnit 10 and can not
   be used as a BC shim any more.

The configuration schemas of PHPUnit 9 and 10 are incompatible, so
phpunit-10.xml.dist is added next to phpunit.xml.dist.

TestReader can not redeclare the filename and the locales properties:
GeoIP2 3.x declares Reader::$locales as a readonly promoted property.
This also fixes the already failing "PHP 8.3 + GeoIP2 ~3.0" build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
 * PHPStan is run from vendor/bin instead of a global install: the configs
   include the extension of the locally installed phpstan-phpunit, and a
   globally pinned PHPStan skews from it;
 * PHPStan 2 proves the Configuration BC layers dead since Symfony 4.2, not
   only on Symfony 8, so the ignores move from symfony_8.neon to symfony_5.neon;
 * symfony_7.neon is dropped: checkGenericClassInNonGenericObjectType is
   removed in PHPStan 2, which does not report the missing generic types of
   the Symfony 7.3 + node definitions at all;
 * Composer blocks the install of the out of support Symfony versions that
   the matrix tests on purpose;
 * no_unneeded_control_parentheses violations reported by PHP CS Fixer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The service does not serve ocular.phar any more, it answers 403 Forbidden,
which fails every PHP 7.2 build after the tests already passed. Coverage
keeps being uploaded to Coveralls.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The coverage upload to Scrutinizer is dropped, the service is not used
any more.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@peter-gribanov
peter-gribanov merged commit 3b701ba into gpslab:master Aug 7, 2026
26 of 27 checks passed
@peter-gribanov
peter-gribanov deleted the symfony8 branch August 7, 2026 14:17
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.

Symfony 8.0

1 participant