Skip to content

Support Symfony 8 routing - #6

Merged
gabrielsolomon merged 1 commit into
masterfrom
copilot/symfony-8-compatibility
Nov 22, 2026
Merged

gabrielsolomon merged 1 commit into
masterfrom
copilot/symfony-8-compatibility

Conversation

@gabrielsolomon

Copy link
Copy Markdown
Contributor

Summary

  • Support Symfony Routing, Config and HttpFoundation through version 8 while retaining legacy APIs.
  • Accept native Symfony loaders and routes, and replace the obsolete Travis configuration with a Symfony compatibility matrix.
  • Declare test dependencies and document Symfony integration and version constraints.

Validation

  • Isolated Symfony 5.4, 6.4, 7.4 and 8 compatibility tests passed on PHP 8.5; dependency resolution was also checked against the PHP versions in the CI matrix.
  • The existing full suite has one pre-existing failure: custom router registration returns the default router.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@gabrielsolomon
gabrielsolomon marked this pull request as ready for review November 22, 2026 20:08
Copilot AI balanced review requested due to automatic review settings November 22, 2026 20:08
@gabrielsolomon
gabrielsolomon merged commit f04ed4f into master Nov 22, 2026
8 of 11 checks passed
@gabrielsolomon
gabrielsolomon deleted the copilot/symfony-8-compatibility branch November 22, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The dependency constraints permit Symfony Routing 5.4 with Config 8, causing a fatal ClosureLoader return-type incompatibility that the matching-major test matrix misses.

1 open issue
What changed in this PR

This PR extends the router’s Symfony compatibility through version 8 while retaining legacy Nip routing APIs.

Changes:

  • Accept native Symfony route collections and recognize Symfony routes in collection lookups.
  • Declare runtime and test dependencies, and document Symfony integration.
  • Replace Travis CI with an isolated Symfony 5.4–8 compatibility matrix.
File Description
tests/​src/​RouteCollectionTest.php Tests native Symfony route lookup and array access.
tests/​compatibility/​SymfonyCompatibilityTest.php Tests loaders, matching, URL generation, legacy routes, and caching.
tests/​compatibility/​composer.json Defines isolated compatibility-test dependencies.
src/​Router/​Traits/​HasRouteCollectionTrait.php Wraps Symfony collections in the Nip collection type.
src/​RouteCollections/​Traits/​CollectionsOperationsTrait.php Recognizes native Symfony routes in existence checks.
README.md Documents supported versions and native loader usage.
composer.json Expands Symfony constraints and declares test dependencies.
.travis.yml Removes obsolete Travis configuration.
.gitignore Excludes isolated compatibility dependencies.
.github/​workflows/​symfony-compatibility.yml Adds the PHP and Symfony compatibility matrix.

Review effort: Balanced

Comment thread composer.json
Comment on lines +40 to +42
"symfony/config": "^5.0|^6.0|^7.0|^8.0",
"symfony/http-foundation": "^5.0|^6.0|^7.0|^8.0",
"symfony/routing": "^5.0|^6.0|^7.0|^8.0"
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