The current PackageStates.php file has several downsides:
* It is located at a fixed place (even in composer mode)
* It does not contain any version information or composer-package name information
* It has to be recreated when the system changes
* There is no proper API to access this information with the PackageManager
A new API class called ActiveExtensions will act as an add-on / replacement
for PackageStates which is fully composer-aware.
For composer-mode this class should be generated during build-time
(via TYPO3's composer plugin).
For the non-composer mode, this class will be generated
along PackageStates.php with additional information
and placed under typo3conf/ActiveExtensions.php until
several other concepts have been re-thought (f.e. "active" vs.
"inactive" extensions).
Every time the PackageStates.php is updated, the ActiveExtensions.php
class is updated as well, and via spl_autoload loaded and always
available when PackageManager handles situations.
One of the main benefits is that TYPO3 does not need to generate
PackageStates in composer mode anymore (only for legacy reasons).
ToDo:
* Enhance PackageManager to also fetch version (from ext_emconf.php) and composer package name for ActiveExtensions.php
* Think about the API and what should be accessed
* Replace all occurrences of PackageManager with ActiveExtensions API
* Properly test Failsafe Mode, test activating / deactivating an extension
* Create a fallback when the class does not exist ("dynamically create the class and load it)
* Write RST file for it
* Adapt tests
* Adapt composer mode / composer plugin