Repository navigation
Conversation
Several 5.0 changes need an entry in the update guide; adding the page first keeps those pull requests from conflicting over creating it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ControllerResolver resolved any existing class name to [$instance, 'execute'], although it is meant to resolve ControllerInterface implementations. 4.x deprecates resolving other classes; 5.0 now throws an InvalidArgumentException for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
ControllerResolverresolves a controller given as a class name to[$instance, 'execute']for any existing class, although it is meant to resolveJoomla\Controller\ControllerInterfaceimplementations. #163 deprecates resolving other classes in 4.x; in 5.0 they now raise anInvalidArgumentException(ControllerXdoes not implementJoomla\Controller\ControllerInterface, …). Other classes can still be used with an explicit[SomeClass::class, 'method']route.Testing Instructions
testResolvingAClassWithoutControllerInterfaceFails(new stubTests/Stubs/PlainController.php, the same as in #163) fails without the change insrc/. The other resolver tests are unchanged.Documentation Changes Required
docs/routing-and-controllers.md(resolution table) and a new section indocs/v4-to-v5-update.md.Depends on #169 (adds
docs/v4-to-v5-update.md; its commit is included here until it is merged) and on #163 (the 4.x deprecation). When 4.x-dev is merged into 5.x-dev after #163,ControllerResolver::resolve()andControllerResolverTestconflict: keep the 4.x structure (non-string check, class before function,is_callable()check), replace itstrigger_deprecation()block with the exception from this PR, and replace the 4.x deprecation test withtestResolvingAClassWithoutControllerInterfaceFails. The deprecation note indocs/routing-and-controllers.mdfrom #163 must be dropped.🤖 Generated with Claude Code