Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Simpler scopes: one less Composer dependency and better performances #252
The internal implementation of scopes has been simplified: this results in one less Composer dependency and better performances. Backward compatibility is kept (static methods still work).
return [ 'MyClass' => DI\object() ->scope(Scope::PROTOTYPE()), // static method ];
return [ 'MyClass' => DI\object() ->scope(Scope::PROTOTYPE), // constant ];
This is more inline with PSR-1/PSR-2, more natural (the concept of enum was a bit forced here) and more efficient.