Flow 9.2
This release of Flow comes with some great new features, bugfixes and a lot of modernisation of the existing code base.
As usual, we worked hard to keep this release as backwards compatible as possible but, since it’s a major release, some of the changes might require manual adjustments. So please make sure to carefully read the upgrade instructions below.
New Features
FEATURE: Runtime Constructor Injection
This changes constructor injection to happen at runtime by the ObjectManager. That means the constructor no longer needs to be proxied and loose it’s signature (Any other proxying happening, eg. AOP or other injection types will retain the signature now). It therefore also reduces the amount of proxies necessary in a project. Additionally to proof how this works some of the core classes now use exclusively constructor injection. The change also includes refactorings for type safety around the object configuration and proxy building.
NOTE
This obviously breaks instantiating classes with constructor injection via new MyClass() omitting any arguments. IMHO that is very bad practice anyhow. As can be seen in this change (and I didn’t see anything in Neos either), it was only used in tests as of now. I think therefore we can relatively safely change this in a minor release?
FEATURE: Enable Xdebug Path Mapping in Development context per default
Enables the Xdebug Path Mapping per default in Development context.
See: https://github.com/neos/flow-development-collection/pull/3535
Upgrade Instructions
This section contains instructions for upgrading your Flow 9.1 based applications to Flow 9.2.
In general just make sure to run the following commands:
To clear all file caches:
./flow flow:cache:flush --force
If you have additional cache backends configured, make sure to flush them too.
To apply core migrations:
./flow flow:core:migrate <Package-Key>
For every package you have control over (see Upgrading existing code below).
To validate/fix the database encoding, apply pending migrations and to (re)publish file resources:
./flow database:setcharset
./flow doctrine:migrate
./flow resource:publish
If you are upgrading from a lower version than 9.1, be sure to read the upgrade instructions from the previous Release Notes first.
Upgrading existing code
There have been major API changes in Flow 9.2 which require your code to be adjusted. As with earlier changes to Flow that required code changes on the user side we provide a code migration tool.
Given you have a Flow system with your (outdated) package in place you should run the following before attempting to fix anything by hand:
./flow core:migrate Acme.Demo
This will adjust the package code automatically and/or output further information. Read the output carefully and manually adjust the code if needed.
To see all the other helpful options this command provides, make sure to run:
./flow help core:migrate
Also make sure to read about the `Potentially breaking changes`_ below.
Inside core:migrate
The tool roughly works like this:
Collect all code migrations from packages
Collect all files from the specified package
For each migration
Check for clean git working copy (otherwise skip it)
Check if migration is needed (looks for Migration footers in commit messages)
Apply migration and commit the changes
Afterwards you probably get a list of warnings and notes from the migrations, check those to see if anything needs to be done manually.
Check the created commits and feel free to amend as needed, should
things be missing or wrong. The only thing you must keep in place from
the generated commits is the migration data in composer.json. It is
used to detect if a migration has been applied already, so if you drop
it, things might get out of hands in the future.