-
-
Notifications
You must be signed in to change notification settings - Fork 49
Add validation for non-string keys in ViewTrait::withRenderers() #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 289-double-extensions
Are you sure you want to change the base?
Conversation
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds validation to ensure renderer extensions use string keys rather than numeric indices in ViewTrait::withRenderers(). The validation now explicitly checks for non-string keys before other validations, providing a clear error message using get_debug_type().
Changes:
- Added type validation for extension keys to reject numeric indices
- Introduced two test cases covering both implicit and explicit numeric key scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ViewTrait.php | Added string type check for extension keys with descriptive error message |
| tests/ViewTest.php | Added test coverage for implicit and explicit numeric key validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
|
@copilot fix tests. |
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Fixed the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.