Throw exception if PackageStates.php is not writeable
The Package Manager writes package states to PackageStates.php file using
together with the error control operator @ to suppress errors.
This leads to unpredictable behavior when PackageStates.php file is not writeable.
I suggest to verify if the file is writable and otherwise throw an exception.
TYPO3 CMS team has already a draft at https://review.typo3.org/#/c/24975/ - would you please comment there or here, since we aim to streamline with upstream Flow.