Bundle broken in many places because of typed properties
Closed this issue · 1 comments
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Branch? | master |
There's a lot of bugs and regressions introduced by bf3597b.
Namely, it:
- turned on strict types
- added typed properties
These changes are huge and quite unsafe to do in bulk unless backed by very strong static analysis + robust test suite. Since the bundle (currently) basically has neither, the change seems rushed.
We're seeing a lot of "access before initialization", for example
# src/DataDefinitionsBundle/Provider/ExcelProvider.php:111
Typed property Wvision\Bundle\DataDefinitionsBundle\Provider\ExcelProvider::$writer must not be accessed before initialization
This is generally caused by null
checks which need to be converted into isset()
calls for props not initialized in the constructor (which should be caught by Psalm, for example). There could be a lot of these in the bundle currently.
We'll fix some of these which we directly run into, but ideally they should be fixed across the entire bundle.
/cc @ITspirit @aarongerig
Mostly fixed in the meantime.