fix: add missing methods to RendererInterface and RouteCollectionInterface#10212
Open
jalexiscv wants to merge 1 commit into
Open
fix: add missing methods to RendererInterface and RouteCollectionInterface#10212jalexiscv wants to merge 1 commit into
jalexiscv wants to merge 1 commit into
Conversation
…rface Refs codeigniter4#6814 PHPStan reports errors when methods are called on interfaces but not declared in the interface definition. This adds missing methods: RendererInterface: - getData(): array - getPerformanceData(): array RouteCollectionInterface: - getRegisteredControllers(?string $verb = '*'): array The implementing classes (View, RouteCollection) already have these methods with matching signatures. Note: Several items from the original codeigniter4#6814 report were already fixed since v4.3 (QueryInterface::getOriginalQuery, ConnectionInterface @Property tags, RouteCollectionInterface::setHTTPVerb/isFiltered/ getFiltersForRoute/getRoutesOptions). Ref: codeigniter4#6814
|
Hi there, jalexiscv! 👋 Thank you for sending this PR! We expect the following in all Pull Requests (PRs).
Important We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md Sincerely, the mergeable bot 🤖 |
paulbalandan
requested changes
May 18, 2026
Member
paulbalandan
left a comment
There was a problem hiding this comment.
This is a breaking change.
- Should target
4.8 - Add to the documentation/changelog
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.
Description
Addresses #6814 - Missing Interfaces (PHPStan errors)
Problem
PHPStan reports 22 errors when the baseline suppressions for interface-related issues are removed. These occur because methods/properties are called on interfaces but not declared in the interface definition.
Analysis of current state
Of the 22 original errors reported in #6814 (v4.3), several were already fixed:
Remaining issues fixed
getData()getPerformanceData()getRegisteredControllers()Changes
system/View/RendererInterface.php- add getData(), getPerformanceData()system/Router/RouteCollectionInterface.php- add getRegisteredControllers()Ref: #6814