Merged
Conversation
[TriggerExtractor] init
|
Just note: in specific cases, this may be an incompatible change. |
Member
Author
|
I don't actually understand it... this is just first example. Could you provide cases to make it compatible? |
|
I mean rare cases. For example: $form->addText('name')
->addCondition($form::FILLED)
->addRule(...)
->addRule(...);
$form['name']
->addRule(...); // this rule is called regardless of whether it is filled in (Nette 2.4 triggers warning here that will force you to decide whether the field is required or not)Automatically changed code: $form->addText('name')
->setRequired(false)
->addRule(...)
->addRule(...);
$form['name']
->addRule(...); // now is this rule called only when input is filled (no warning is triggered) |
Member
Author
|
Thanks. I haven't seen such use case yet. So there should be added another refactoring, that adds |
|
Yes, when there is addRule(), there must be setRequired(). But every such changes must be checked by the programmer, because in some cases it can change the function. |
Member
Author
|
Sure, the aim is to keep programmer out of manually work and keep only checking. Something like code review. Thanks, I will look on that later |
TomasVotruba
added a commit
that referenced
this pull request
May 14, 2021
rectorphp/rector-src@15be298 [Config] update duplicate Skip fixture config (#28)
echo511
pushed a commit
to echo511/rector
that referenced
this pull request
Sep 4, 2021
* [Config] Remove duplicate Skip fixture config * uupdate to */Fixture*/*
Closed
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.
Closes #27
What is the function?
I really didn't get it from the forum, so at the moment it works like this:
Find on variable of
Nette\Application\UI\Formtype:and replace it by:
Could you confirm/help me with that @dg && @petrvacha?