Bug Report
The NewInInitializer rule is changing the property from non nullable to nullable
https://getrector.com/rule-detail/new-in-initializer-rector
This is a real issue when the property is used later.
With the exemple of the rule new SomeClass(null) will create bug when $this->logger is used ; while it worked before.
| Subject |
Details |
| Rector version |
latest |
Minimal PHP Code Causing Issue
https://getrector.com/demo/54bb158c-7a82-4d59-8fd2-c66eff068eef
See https://3v4l.org/VcW9g#v8.3.30
Expected Behaviour
Bug Report
The NewInInitializer rule is changing the property from non nullable to nullable
https://getrector.com/rule-detail/new-in-initializer-rector
This is a real issue when the property is used later.
With the exemple of the rule
new SomeClass(null)will create bug when$this->loggeris used ; while it worked before.Minimal PHP Code Causing Issue
https://getrector.com/demo/54bb158c-7a82-4d59-8fd2-c66eff068eef
See https://3v4l.org/VcW9g#v8.3.30
Expected Behaviour