- Issue created by @szeidler
- 🇩🇪Germany jurgenhaas Gottmadingen
Great analysis, thanks @szeidler
I really wonder why Drush uses
isSubclassOf
instead ofinstanceof
, so it may be worth asking the question. However, we may not see any short term resolution and may have to resolve it ourselves.How about subsclassing DrushCommands as you suggested, but instead of copy & paste of some code, we could move those parts, that should be common to multiple classes into a trait.
Do you want to give that a try in an MR?
- Merge request !26Issue #3479925: drd:pi:sync Drush command not working anymore → (Merged) created by szeidler
- 🇩🇪Germany szeidler Berlin
It's mainly the
prepare()
andexecute()
method and a lot of shared properties + constructor + create. For me it felt wrong to move the constructor and create function into the trait. It would lead to typehint issues.That's why I splitted up all the common properties and moved them into the trait as well. The
class DrdPiCommands
uses a reduced set of properties.class DrdCommands
declares all properties that are not shared by via the trait.What do you think?
- 🇩🇪Germany jurgenhaas Gottmadingen
This is looking great. I reviewed the code and would be RTBC, except I can't test it as we don't have PI accounts.
@szeidler if you could confirm, that it also works in your scenario, please feel free to set to RTBC and I'll merge that right away.
- 🇩🇪Germany szeidler Berlin
Yes, the platform synchronization is working fine with the patch. I also checked most of the DRD Drush commands, but only that they are throwing no errors/warnings.
-
jurgenhaas →
committed 8c2a7b9b on 4.1.x authored by
szeidler →
Issue #3479925 by szeidler, jurgenhaas: drd:pi:sync Drush command not...
-
jurgenhaas →
committed 8c2a7b9b on 4.1.x authored by
szeidler →
- 🇩🇪Germany jurgenhaas Gottmadingen
Excellent, thank you so much for your contribution.
Automatically closed - issue fixed for 2 weeks with no activity.