Problem/Motivation
In working on #3336243: Update Package Manager event documentation in package_manager.api.php I realized that a badly written validator could call stopPropagation() with actually adding an error
This may be would happen if the developer didn't realize that other validators still need to run to provide their own validation
while stopPropagation() should be used carefully or the user will not get all the validation messages if a subscribed called stopPropagation() without adding its own error or checking that \Drupal\package_manager\Event\PreOperationStageEvent::getResults had at least 1 error it could effectively be letting an operation proceed without running all the validation
Proposed resolution
Override stopPropagation() in \Drupal\package_manager\Event\PreOperationStageEvent to check for this
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork automatic_updates-3336247
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tedbowComment #4
wim leersTriggered by #3335766-8: Harden LockFileValidator, add stopPropagation() at failures 😊
Comment #5
tedbowComment #6
yash.rode commentedComment #7
yash.rode commentedComment #8
wim leersOnly nits — looking good! 👍
Comment #9
yash.rode commentedComment #10
wim leers👍
Comment #11
wim leersI meant to do this 🙈😄
Comment #12
tedbowLooks good will merge when green
Comment #14
tedbowGreat!