Skip to content

Add Symfony 8 support#581

Open
Rafikooo wants to merge 7 commits intoPayum:masterfrom
Rafikooo:feature/symfony-8-support
Open

Add Symfony 8 support#581
Rafikooo wants to merge 7 commits intoPayum:masterfrom
Rafikooo:feature/symfony-8-support

Conversation

@Rafikooo
Copy link

@Rafikooo Rafikooo commented Feb 5, 2026

Summary

This PR adds support for Symfony 8 to PayumBundle.

Changes

Breaking changes:

  • Dropped PHP 7.4 support (now requires PHP 8.0+)
  • Dropped Symfony 4.4 support (now requires SF 5.4+)
  • Dropped Symfony 6.0 from CI matrix (non-LTS, has PHPUnit compatibility issues)

Symfony 8 compatibility:

  • Converted all XML service configs to PHP (SF8 removed XML config support)
  • Converted all XML routing files to YAML (SF8 removed XML routing support)
  • Updated CreditCardDate constraint constructor for SF8 named parameter syntax
  • Fixed NotifyController to use $request->attributes->get() instead of deprecated $request->get()
  • Fixed HttpRequestVerifier to use explicit parameter bag access

Test fixes:

  • Updated PHPUnit mock class name assertions (Mock_MockObject_)
  • Fixed NotifyControllerTest to use route attributes instead of query params
  • Updated phpunit.xml.dist for PHPUnit 10+ compatibility
  • Excluded abstract test class from test suite

CI Matrix

Now tests against:

  • PHP 8.0-8.5
  • Symfony 5.4, 6.4, 7.0, 8.0

@TheMilek TheMilek mentioned this pull request Feb 6, 2026
@Rafikooo Rafikooo force-pushed the feature/symfony-8-support branch from 36208b0 to 625edfb Compare February 6, 2026 08:55
- Require PHP ^8.0
- Require Symfony ^5.4 || ^6.0 || ^7.0 || ^8.0
- Remove symfony/polyfill-php80 dependency
Symfony 8 removed XmlFileLoader, requiring PHP-based service
configuration. This converts all XML configs to PHP format using
ContainerBuilder API.
Symfony 8 removed XML routing support. This converts all routing
configuration from XML to YAML format.
- Replace deprecated Request::get() with explicit parameter bag access
- Add nullable return type to FormType::getParent() methods
- Update CreditCardDate constraint for SF8 named parameter syntax
- Add config_sf8.yml for SF8-specific session configuration
- Fix mock class name assertions (Mock_ -> MockObject_)
- Update NotifyControllerTest to use request attributes
- Exclude abstract test class from phpunit.xml.dist
- Remove deprecated PHPUnit config attributes
- Add PHP 8.4, 8.5 with Symfony 7.0 and 8.0
- Remove PHP 7.4 and Symfony 4.4 combinations
- Remove Symfony 6.0 (non-LTS, has PHPUnit compatibility issues)
- Use --prefer-source for payum/core test classes
- Use getString() instead of get() for typed parameter access
- Use dirname(__DIR__, N) instead of __DIR__.'/..' concatenation
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