You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, it mentions "This is painful when you have more than 5 dependencies, and your constructor is 15 lines of boilerplate code". This is no longer true using CPP because it keeps it only 5 lines long.
Also, the services example can be simplified by using CPP for its constructor.
The text was updated successfully, but these errors were encountered:
I think now that v7 requires PHP 8.0+, the https://github.com/PHP-DI/PHP-DI/blob/master/doc/best-practices.md doc should be updated to cover recommending Constructor Property Promotion.
For example, it mentions "This is painful when you have more than 5 dependencies, and your constructor is 15 lines of boilerplate code". This is no longer true using CPP because it keeps it only 5 lines long.
Also, the services example can be simplified by using CPP for its constructor.
The text was updated successfully, but these errors were encountered: