-
Notifications
You must be signed in to change notification settings - Fork 110
Improve comment about View\ModelTrait::$model DI in View::init() #2290
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
Conversation
Currently one demo relies on this: demos/_unit-test/scope-builder.php. Easy to fix. However, what is the motivation of this change? Clean OOP? I am very worried about migration path. I am fine with BC-break, but the main BC-breaks should be at least easily detectable using PHPStan l6 or higher. This is not the case here. We can move this into |
If DI with Wdyt? |
Hi, motivation for this PR - clearly clean code. However, I looked at the code in
|
Here you landed several good points and I think the only solution is to move the code into As long as the code can be put directly after parent init, it can be coded quite easily, let me to check this later. |
I really do not know how to fix this. 08bfb91 is not good solution as then traits with multiple init could not be combined. And So maybe the updated comment seems to be fine fo "clearly clean code" motivation. Situation when user adds |
We would need phpstan/phpstan#13010 first. |
fix #2284
This PR removes some logic inside
View::init()
that was maybe kept for backwards compatibility, asView
used to have amodel
property until v6.As
View
now does not have amodel
property any more, it also shouldn't include the logic to callsetModel()
method if a model property exists. This should be handled by classes extendingView
which add amodel
property.