Skip to content

Preserve private property scopes and add advice property accessors - #94

Merged
WalterWoshid merged 3 commits into
okapi-web:masterfrom
WalterWoshid:fix/private-property-collisions
Sep 5, 2026
Merged

Preserve private property scopes and add advice property accessors#94
WalterWoshid merged 3 commits into
okapi-web:masterfrom
WalterWoshid:fix/private-property-collisions

Conversation

@WalterWoshid

Copy link
Copy Markdown
Contributor

Weaving previously made private properties public. A parent and child with independent same-name properties could then fail with incompatible types or silently share values. This preserves private declaring scopes and removes duplicate property promotion from generated forwarding constructors.

Adds $invocation->properties() for reads, writes, array mutation, references, isset/unset, and static property access. Pass the original declaring class when a name is ambiguous, for example $invocation->properties(ArgvInput::class)->tokens. The accessor operates on the actual subject and does not replace it or alter method interception.

Compatibility: advice accessing private properties directly must migrate to the accessor. PROPERTY_ACCESS.md documents the migration, cache regeneration, ambiguity rules, and native unset behavior. The database-modifier advice example is migrated.

Fixes #6.

Validation:

@WalterWoshid
WalterWoshid merged commit 0c32b5a into okapi-web:master Sep 5, 2026
5 checks passed
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.

Type of CompletionInput__AopProxied::$tokens must be array (as in class ArgvInput__AopProxied)

1 participant