Context needs to be a dreaded singleton in order for it to work inside of a DSL. It is used sparingly in the codebase, but even that is too much.
It's singleton access should only be used in the DSL file, and possibly the top level of the application (Application?).
The current situation may cause problems (rarely) if a global composer version of Peridot is installed, as well as a local one - both having different versions. The problem would arise if both versions of the Context do not match. So the problem would arise if there is a global/local version mismatch AND the Context has been changed - a pretty rare case, but one that exists from the 1.14.0 jump to the 1.15.0 jump.
A goal for 2.0 should be to limit singleton access to only the points where necessary.
Context
needs to be a dreaded singleton in order for it to work inside of a DSL. It is used sparingly in the codebase, but even that is too much.It's singleton access should only be used in the DSL file, and possibly the top level of the application (
Application
?).The current situation may cause problems (rarely) if a global composer version of Peridot is installed, as well as a local one - both having different versions. The problem would arise if both versions of the Context do not match. So the problem would arise if there is a global/local version mismatch AND the Context has been changed - a pretty rare case, but one that exists from the 1.14.0 jump to the 1.15.0 jump.
A goal for 2.0 should be to limit singleton access to only the points where necessary.