Compile time step detector #252
janbarasek
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The compilation of extensions follows different stages. Within ContainerBuilder, there should be a
getStep()
method that returns the name of the current state (or the sequence number of the state or constant).As an extension designer, I often deal with connections to other packages, where I want to give compile time the ability to influence how my services are written. For example, at the latest in the
beforeCompile()
method, I can add anotheraddSetup()
method to my service.Is it easy to detect what stage of compilation we are in? For calls from some of my static methods, I need to throw an exception when it's too late to call and let the author know to fix his code.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions