-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rules not exported after non-static rule #278
Milestone
Comments
jtojnar
added a commit
to jtojnar/entries
that referenced
this issue
Oct 3, 2021
Due to this extremely confusing change, client side validation for custom rules on category field got broken: nette/forms@1592cf6 Let’s apply the hack from the commit. Opened an issue: nette/forms#278
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 3.1.3
Bug Description
Since 1592cf6, no rules after a callback rule are passed to the frontend.
I understand that this is to prevent conflict between filters (which are just impure rules) and other rules but it leads to confusing behaviour, where rules suddenly terminate from frontend point of view, even if the callback is just a pure function.
Steps To Reproduce
Expected Behavior
I think we should give callbacks passed to
addRule
a benefit of a doubt (that they might be pure) and not terminate the rule export.But yeah, I understand the paranoid point of view (all functions are potentially effectful/impure and we cannot trust them not to modify the control) since PHP cannot distinguish pure and effectful functions.
Possible Solutions
isFilter
/impure
property toRule
, set it totrue
inaddFilter
, and terminate export only for impure rules.forms/src/Forms/Controls/UploadControl.php
Line 36 in 1592cf6
The text was updated successfully, but these errors were encountered: