Add allowExceptParamsAnywhere and disallowParamsAnywhere aliases#410
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds allowExceptParamsAnywhere and disallowParamsAnywhere as new config aliases to complete the existing *Anywhere/*InAllowed naming pattern, while keeping existing configs working unchanged.
Changes:
- Add
allowExceptParamsAnywhere/disallowParamsAnywhereparsing support as aliases ofallowExceptParams/disallowParams. - Extend config schemas/type-aliases to recognize the new keys.
- Update docs and add/adjust tests + fixtures for the new alias behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Allowed/AllowedConfigFactory.php | Adds the new *Anywhere aliases to the param-directive parsing chain. |
| extension.neon | Extends the parameters schema to accept the new config keys. |
| phpstan.neon | Updates internal type aliases so PHPStan recognizes the new directive names. |
| docs/allow-with-parameters.md | Documents the new recommended names and notes the older names are still supported. |
| tests/Calls/FunctionCallsTypeStringParamsTest.php | Adds coverage for allowExceptParamsAnywhere (but not yet disallowParamsAnywhere). |
| tests/src/Functions.php | Adds a new test helper function used by the new fixture calls. |
| tests/src/disallowed/functionCallsTypeStringParams.php | Adds fixture calls to validate the new alias behavior. |
| tests/src/disallowed-allow/functionCallsTypeStringParams.php | Adds fixture calls to validate the new alias behavior in allowed-by-path scenarios. |
| tests/Usages/NamespaceUsagesAllowInClassWithAttributesTest.php | Updates expected line numbers due to the inserted test helper function. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
`allowExceptParams` and `disallowParams` predate the `*Anywhere`/`*InAllowed` naming convention and never got the `Anywhere` aliases added retroactively. The new aliases complete the naming grid without any behavior change — existing configs keep working. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
399192b to
795a378
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
allowExceptParamsanddisallowParamspredate the*Anywhere/*InAllowednaming convention and never got theAnywherealiases added retroactively, leaving the naming grid incomplete. The newallowExceptParamsAnywhereanddisallowParamsAnywherealiases fill that gap. Existing configs keep working unchanged — this is purely additive.Closes #402