#[Parameter]: throw if not set without default value#357
Open
vrana wants to merge 20 commits into
Open
Conversation
- inteface Nette\Application\IRouter replaced by Nette\Routing\Router
…e() for persistent parameters. [Closes nette/nette#703][Closes nette/nette#703][Closes nette#69]" (possible BC break) This reverts commit cda17f4. See https://forum.nette.org/cs/35528-stejne-pojmenovany-parametr-akce-presenteru-a-persistentni-odlisne-chovani-v-nette-2-0-oproti-aktualnimu#p221742 BC break: Property must be nullable, ie: #[Persistent] public ?int $foo
…ame>() methods (BC break)
…rs dynamically (BC break) TODO: scanDir must be active
vrana
force-pushed
the
require-parameter
branch
from
August 28, 2025 12:45
0459dc6 to
f96d45c
Compare
dg
force-pushed
the
master
branch
8 times, most recently
from
November 29, 2025 23:22
ecf286d to
168d814
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
December 1, 2025 19:45
e72b735 to
14989d2
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
December 23, 2025 22:32
f536135 to
4e8f41d
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
December 28, 2025 23:56
c478b71 to
44181e2
Compare
dg
force-pushed
the
master
branch
2 times, most recently
from
June 1, 2026 21:02
b55f309 to
bceeafa
Compare
dg
force-pushed
the
master
branch
3 times, most recently
from
June 29, 2026 19:09
340942f to
b670493
Compare
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.
I have this property:
If there's no
?code=in URL and I access$this->codethen PHP dies with this fatal error:I would prefer to behave it the same way as if there's a missing parameter with
render(int $code)which is to throwInvalidArgumentException.