Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler scopes: one less Composer dependency and better performances #252

merged 1 commit into from Apr 20, 2015


Copy link

@mnapoli mnapoli commented Apr 20, 2015

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.

@mnapoli mnapoli added this to the 5.0 milestone Apr 20, 2015
mnapoli added a commit that referenced this issue Apr 20, 2015
Simpler scopes: one less Composer dependency and better performances
@mnapoli mnapoli merged commit d624513 into 5.0 Apr 20, 2015
4 checks passed
@mnapoli mnapoli deleted the simpler-scopes branch Apr 20, 2015
@mnapoli mnapoli mentioned this pull request Apr 20, 2015
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant