- Issue created by @tedbow
- Assigned to yash.rode
- Status changed to Needs work
almost 2 years ago 11:47am 16 February 2023 - @yashrode opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 3:01pm 16 February 2023 - Status changed to RTBC
almost 2 years ago 3:49pm 16 February 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I think this is what @tedbow wanted 👍
@tedbow: what do you think about just naming all of these methods
validate()
? The specifics are already captured by the class name IMHO… - 🇺🇸United States tedbow Ithaca, NY, USA
@tedbow: what do you think about just naming all of these methods validate()? The specifics are already captured by the class name IMHO…
I can see just having the same for the method. but if we are going to do that than maybe
validateStagePreOperation
is actually correct because all the event that use these methods extend `PreOperationStageEvent` or maybe justvalidatePreOperation
But maybe that is redundant we can only validate in `PreOperationStageEvent` post events don't have
addError
oraddWarning
.So yes lets go with
validate
Updated summary
- Status changed to Needs work
almost 2 years ago 7:24pm 16 February 2023 - 🇺🇸United States tedbow Ithaca, NY, USA
Sorry for changing the scope @yash.rode
- 🇮🇳India yash.rode pune
I have a doubt about the summary, correct me if I am wrong, if there is only one method and subscribed to 1 or more events then that should be renamed to
validate()
in other case(if the validator has multiple methods) it should be renamed to class specific name. - Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 6:53am 17 February 2023 - 🇮🇳India yash.rode pune
assigning to confirm my doubt in previous comment.
- Assigned to yash.rode
- Status changed to Needs work
almost 2 years ago 11:30am 17 February 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
#9: Yep, that sounds right! But I don't see any such case? What am I missing? 🙈
I was going to RTBC but then I found several cases that have not yet been updated:
ComposerJsonExistsValidator
ComposerMinimumStabilityValidator
ComposerPatchesValidator
DuplicateInfoFileValidator
LockFileValidator
StageNotInActiveValidator
SupportedReleaseValidator
- 🇮🇳India yash.rode pune
#11 📌 Rename validator methods to `validate` unless there different methods for different events Fixed :
LockFileValidator
is the case I am talking about, changed other method names. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@yash.rode the methods for that validator are:
public static function getSubscribedEvents(): array { return [ PreCreateEvent::class => 'storeHash', PreRequireEvent::class => 'validateStagePreOperation', PreApplyEvent::class => 'validateStagePreOperation', StatusCheckEvent::class => 'validateStagePreOperation', PostDestroyEvent::class => 'deleteHash', ]; }
There's only one validation method, the two others do other things than validating. So those should remain unchanged.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Thanks to the latest commit, this is 99% done — only
LockFileValidator
still needs to be updated 👍 - Assigned to wim leers
- Status changed to Needs review
almost 2 years ago 12:38pm 17 February 2023 - Issue was unassigned.
- Status changed to RTBC
almost 2 years ago 7:35am 20 February 2023 - First commit to issue fork.
-
phenaproxima →
committed 9fe72b11 on 3.0.x authored by
yash.rode →
Issue #3342137 by yash.rode, phenaproxima, Wim Leers: Rename validator...
-
phenaproxima →
committed 9fe72b11 on 3.0.x authored by
yash.rode →
- Status changed to Fixed
almost 2 years ago 8:35pm 21 February 2023 Automatically closed - issue fixed for 2 weeks with no activity.