Skip to content

Document optional parameters before required ones - #57

Merged
mnapoli merged 1 commit into
PHP-DI:masterfrom
Sinkleberg:codex/optional-parameter-docs
Oct 10, 2026
Merged

mnapoli merged 1 commit into
PHP-DI:masterfrom
Sinkleberg:codex/optional-parameter-docs

Conversation

@Sinkleberg

Copy link
Copy Markdown
Contributor

Refs #44. Document PHP 8.1+ behavior when an optional parameter precedes a required one, with the resulting Invoker exception and a working reordered-signature example. Also explain how to call an existing signature by supplying both values.

Verified the exact README example and native-behavior controls on PHP 8.5.11. PHPUnit: 53 passed, one existing PHP 8.1+ skip, 79 assertions; PHPCS passed. The existing suite emits a parameter deprecation and XML-schema warning; other PHP versions and hosted CI were not run.

@mnapoli

mnapoli commented Oct 10, 2026

Copy link
Copy Markdown
Member

Thanks!

@mnapoli
mnapoli merged commit c26a236 into PHP-DI:master Oct 10, 2026
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.

2 participants