Skip to content

Add allowExceptParamsAnywhere and disallowParamsAnywhere aliases#410

Merged
spaze merged 1 commit into
mainfrom
spaze/params-anywhere
Apr 25, 2026
Merged

Add allowExceptParamsAnywhere and disallowParamsAnywhere aliases#410
spaze merged 1 commit into
mainfrom
spaze/params-anywhere

Conversation

@spaze
Copy link
Copy Markdown
Owner

@spaze spaze commented Apr 25, 2026

allowExceptParams and disallowParams predate the *Anywhere/*InAllowed naming convention and never got the Anywhere aliases added retroactively, leaving the naming grid incomplete. The new allowExceptParamsAnywhere and disallowParamsAnywhere aliases fill that gap. Existing configs keep working unchanged — this is purely additive.

Closes #402

@spaze spaze self-assigned this Apr 25, 2026
Copilot AI review requested due to automatic review settings April 25, 2026 02:47
Copy link
Copy Markdown

Copilot AI left a 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 allowExceptParamsAnywhere and disallowParamsAnywhere as new config aliases to complete the existing *Anywhere/*InAllowed naming pattern, while keeping existing configs working unchanged.

Changes:

  • Add allowExceptParamsAnywhere / disallowParamsAnywhere parsing support as aliases of allowExceptParams / 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.

Comment thread tests/Calls/FunctionCallsTypeStringParamsTest.php
`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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@spaze spaze merged commit 0132edc into main Apr 25, 2026
154 checks passed
@spaze spaze deleted the spaze/params-anywhere branch April 25, 2026 03:25
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.

Add allowExceptParamsAnywhere / disallowParamsAnywhere aliases for consistency

2 participants