- Issue created by @steyep
- Status changed to Needs review
almost 2 years ago 7:35pm 3 March 2023 - πΊπΈUnited States steyep
Attaching a patch of the proposed solution
The last submitted patch, 2: 3345885-2.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
almost 2 years ago 9:00pm 3 March 2023 - πΊπΈUnited States steyep
Modifies the patch to use
KernelEvents::TERMINATE
event so that the builds are triggered when using$entity->save();
. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Seems like a good idea, but we'll probably need to manually check the state in tests and trigger.
There's also
\Drupal\Core\DestructableInterface
in core which can be used instead of the terminate event - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
+++ b/src/EventSubscriber/BuildHooksResponseSubscriber.php @@ -0,0 +1,52 @@ + $this->trigger->deployFrontendEntityUpdateEnvironments();
this should delete the state flag too right? otherwise it just keeps triggering?
- πΊπΈUnited States steyep
Using the
needs_destruction
tag is a good idea but I think that (and now that i'm thinking about it - the terminate event) occur too late in the lifecycle to invalidate the cache tag and write a message using the messenger service.The
deployFrontendEntityUpdateEnvironments
will delete the state flag which should prevent multiple runs.I've attached a revised patch
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Looks like there's some failing tests here