"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Neos.Flow/Documentation/TheDefinitiveGuide/PartV/ReleaseNotes/720.rst" between
flow-development-collection-7.2.0.tar.gz and flow-development-collection-7.2.1.tar.gz

About: TYPO3 Flow is a web application platform enabling developers creating fast, reliable and complex web solutions ("the next level of PHP programming"; old name "FLOW3").

720.rst  (flow-development-collection-7.2.0):720.rst  (flow-development-collection-7.2.1)
======== ========
Flow 7.2 Flow 7.2
======== ========
This release of Flow comes with some new features, bugfixes and a lot of moderni This release of Flow comes with some great new features, bugfixes and a lot of m
sation of the existing code base. odernisation of the existing code base.
As usual, we worked hard to keep this release as backwards compatible as possibl
e but some of the changes might require manual As usual, we worked hard to keep this release as backwards compatible as possibl
e 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 belo w. adjustments. So please make sure to carefully read the upgrade instructions belo w.
************ ************
New Features New Features
************ ************
`!!! FEATURE: Extensible configuration loaders <https://github.com/neos/flow-dev !!! FEATURE: Extensible configuration loaders
elopment-collection/pull/2449>`_ ---------------------------------------------
This allows to implement custom ConfigurationLoader classes which replace the cu rrently rather hardcoded ConfigurationProcessor's in an OOP way. This PR allows to implement custom ConfigurationLoader classes which replace the currently rather hardcoded ConfigurationProcessor's in an OOP way.
It is then possible to load custom configurations in the ConfigurationManager wi th custom locations and custom configuration formats. E.g. it is possible to loa d json files or NodeTypes from another directory than ``Configuration``. It is then possible to load custom configurations in the ConfigurationManager wi th custom locations and custom configuration formats. E.g. it is possible to loa d json files or NodeTypes from another directory than ``Configuration``.
This is not a breaking change for most cases, but the signature of ``Configurati onManager::registerConfigurationType()`` has been changed and the usage of "conf igurationProcessingTypes" deprecated in favor of ``Neos\\Flow\\Configuration\\Lo ader\\LoaderInterface`` instances:: This is not a breaking change for most cases, but the signature of ``Configurati onManager::registerConfigurationType()`` has been changed and the usage of "conf igurationProcessingTypes" deprecated in favor of ``Neos\\Flow\\Configuration\\Lo ader\\LoaderInterface`` instances::
// legacy (and still supported) // legacy (and still supported)
$configurationManager->registerConfigurationType('SomeCustom', ConfigurationMan ager::CONFIGURATION_PROCESSING_TYPE_APPEND); $configurationManager->registerConfigurationType('SomeCustom', ConfigurationMan ager::CONFIGURATION_PROCESSING_TYPE_APPEND);
// now // now
$configurationManager->registerConfigurationType('SomeCustom', new AppendLoader ($yamlSource, 'SomeCustom')); $configurationManager->registerConfigurationType('SomeCustom', new AppendLoader ($yamlSource, 'SomeCustom'));
`FEATURE: Support PHP8 attributes <https://github.com/neos/flow-development-coll Related: https://github.com/neos/neos-development-collection/issues/3000
ection/pull/2468>`_
Related: https://github.com/neos/flow-development-collection/issues/1824
FEATURE: Preserve class and method doc blocks
---------------------------------------------
This preserves the docblocks when generating proxies in order to not accidential
ly generate invalid annotations that break the classes.
See also #2387
FEATURE: Allow validation of dynamic argument types
---------------------------------------------------
This allows correct validation of action method arguments that are not
statically typed, e.g. have a type hint of an interface.
The type override via ``__type`` or the property mapping configuration will
now take effect for building the correct validator chain, if the controller has
the property ``$enableDynamicTypeValidation`` set to ``true``.
If you enable this flag, note that the point in time when the validation
chain is built is moved until **after** calling the ``initialize*Action`` method
.
This means that validator information is not available there any more.
Related issue: `#1905 <https://github.com/neos/flow-development-collection/issue
s/1905>`_
FEATURE: CLI parse array type controller arguments
--------------------------------------------------
With this PR, a CLI command can make use of array's as an argument type.
If an argument is given multiple times and the type is an array, the argument va
lues are pushed at the end of the array.
As an example, this can be handy, if you need to process multiple language dimen
sions, nodes or urls, like::
./flow my.pckg:index --dimension en --dimension de
Maybe this can also be considered for the 7.2 release?
The CLI ``RequestBuilder`` now distinguishes between array and non-array argumen
ts. If an argument is of type ``array`` the argumentValue is appended to the arr
ay.
Create a command controller command with an array signature like::
public function indexCommand(array $dimension){
and then use the argument ``--dimension`` multiple times.
FEATURE: Update documentation for new configuration loader
----------------------------------------------------------
I've added an updated documentation for the new configuration loader implemeted
via https://github.com/neos/flow-development-collection/pull/2449
FEATURE: Support PHP8 attributes
--------------------------------
This allows to use all existing Annotations as PHP8 Attributes and makes the Ref lectionService pick up attributes like annotations. This allows to use all existing Annotations as PHP8 Attributes and makes the Ref lectionService pick up attributes like annotations.
Hence all ``is*AnnotatedWith()`` and ``*Annotation()`` methods will return attri bute classes as if they were annotations. Hence all ``is*AnnotatedWith()`` and ``*Annotation()`` methods will return attri bute classes as if they were annotations.
.. code-block:: php .. code-block:: php
#[Flow\\Scope("singleton")] #[Flow\\Scope("singleton")]
class MyClass { class MyClass {
/** /**
* @var LoggerInterface * @var LoggerInterface
*/ */
#[Flow\\Inject] #[Flow\\Inject]
protected $logger; protected $logger;
Note though, that this means a class that has both annotation and the equal attr ibute will behave as if all annotations were duplicated. Note though, that this means a class that has both annotation and the equal attr ibute will behave as if all annotations were duplicated.
Also, in case you manually instanciated an Annotation class, you need to adjust to the changed constructor, which no longer takes a named array, but the list of actual properties. Also, in case you manually instanciated an Annotation class, you need to adjust to the changed constructor, which no longer takes a named array, but the list of actual properties.
In most cases instead of ``new Flow\\Inject($args)`` you can probably do ``new F low\\Inject(...$args)`` with PHP8 and named parameters. In most cases instead of ``new Flow\\Inject($args)`` you can probably do ``new F low\\Inject(...$args)`` with PHP8 and named parameters.
For Doctrine Annotations - see https://github.com/doctrine/orm/pull/8266 which w ill be available with 2.9 For Doctrine Annotations - see https://github.com/doctrine/orm/pull/8266 which w ill be available with 2.9
`FEATURE: I18n.translate() now accept $source to contain dots instead of only a FEATURE: I18n.translate() now accept $source to contain dots instead of only a
path to the translation file <https://github.com/neos/flow-development-collecti path to the translation file
on/pull/2476>`_ --------------------------------------------------------------------------------
----------------------------
``translateByExplicitlyPassedOrderedArguments()`` and ``I18n.translate()`` now a ccept ``$source`` argument to contain dots instead of only a path to the transla tion file. ``translateByExplicitlyPassedOrderedArguments()`` and ``I18n.translate()`` now a ccept ``$source`` argument to contain dots instead of only a path to the transla tion file.
When we use translations we use for example the shorthand:: When we use translations we use for example the shorthand::
{I18n.translate('Muensmedia.DistributionPackage:NodeTypes.Content.Todo.Contain er:ui.label')} {I18n.translate('Muensmedia.DistributionPackage:NodeTypes.Content.Todo.Contain er:ui.label')}
when we want to pass arguments we had to use:: when we want to pass arguments we had to use::
${I18n.translate('progress', null, {solved: this.checkedElementsCount, total: this.checkboxCount}, 'NodeTypes/Content/Todo/Container', 'Muensmedia.Distributio nPackage')} ${I18n.translate('progress', null, {solved: this.checkedElementsCount, total: this.checkboxCount}, 'NodeTypes/Content/Todo/Container', 'Muensmedia.Distributio nPackage')}
As you can see, you have to pass the **path** to the translation file instead of the well known dot-notation. As you can see, you have to pass the **path** to the translation file instead of the well known dot-notation.
This commit enables you to use also the well known dot-notation for the source a rgument:: This commit enables you to use also the well known dot-notation for the source a rgument::
${I18n.translate('progress', null, {solved: this.checkedElementsCount, total: this.checkboxCount}, 'NodeTypes.Content.Todo.Container', 'Muensmedia.Distributio nPackage')} ${I18n.translate('progress', null, {solved: this.checkedElementsCount, total: this.checkboxCount}, 'NodeTypes.Content.Todo.Container', 'Muensmedia.Distributio nPackage')}
In the method ``translateByShortHandString()`` we already replace dots with slas
hes, so I just copied this behavior to the method ``translateByExplicitlyPassedO
rderedArguments()``
https://github.com/neos/flow-development-collection/blob/`5b7b57523ab1a3b0510522
7e0a5266ece2777038 <https://github.com/neos/flow-development-collection/commit/5
b7b57523ab1a3b05105227e0a5266ece2777038>`_/Neos.Flow/Classes/I18n/EelHelper/Tran
slationHelper.php#L140
******************** ********************
Upgrade Instructions Upgrade Instructions
******************** ********************
This section contains instructions for upgrading your Flow **7.1** This section contains instructions for upgrading your Flow **7.1**
based applications to Flow **7.2**. based applications to Flow **7.2**.
In general just make sure to run the following commands: In general just make sure to run the following commands:
To clear all file caches:: To clear all file caches::
skipping to change at line 98 skipping to change at line 154
./flow flow:core:migrate <Package-Key> ./flow flow:core:migrate <Package-Key>
For every package you have control over (see `Upgrading existing code`_ below). For every package you have control over (see `Upgrading existing code`_ below).
To validate/fix the database encoding, apply pending migrations and to (re)publi sh file resources:: To validate/fix the database encoding, apply pending migrations and to (re)publi sh file resources::
./flow database:setcharset ./flow database:setcharset
./flow doctrine:migrate ./flow doctrine:migrate
./flow resource:publish ./flow resource:publish
As usual it is a good idea to read the upgrade instructions from the previous Re If you are upgrading from a lower version than 7.1, be sure to read the
lease Notes first. upgrade instructions from the previous Release Notes first.
Upgrading existing code Upgrading existing code
----------------------- -----------------------
There could be changes in Flow 7.2 that require your attention. If you are unsur There have been major API changes in Flow 7.2 which require your code to be adju
e, it's never sted. As with earlier changes to Flow
wrong to run migrations when updating. 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 ru n the following before attempting to fix Given you have a Flow system with your (outdated) package in place you should ru n the following before attempting to fix
anything by hand:: anything by hand::
./flow core:migrate Acme.Demo ./flow core:migrate Acme.Demo
This will adjust the package code automatically and/or output further informatio n. This will adjust the package code automatically and/or output further informatio n.
Read the output carefully and manually adjust the code if needed. 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:: To see all the other helpful options this command provides, make sure to run::
skipping to change at line 147 skipping to change at line 204
Check the created commits and feel free to amend as needed, should 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 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 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 used to detect if a migration has been applied already, so if you drop
it, things might get out of hands in the future. it, things might get out of hands in the future.
**************************** ****************************
Potentially breaking changes Potentially breaking changes
**************************** ****************************
Flow 7.2 comes with one potentially breaking change, so be sure to read the Flow 7.2 comes with some breaking changes and removes several deprecated
following changes and adjust your code respectively. For a full list of changes functionalities, be sure to read the following changes and adjust
please refer to the change log. your code respectively. For a full list of changes please refer
to the change log.
`!!! FEATURE: Extensible configuration loaders <https://github.com/neos/flow-dev !!! FEATURE: Extensible configuration loaders
elopment-collection/pull/2449>`_ ---------------------------------------------
This allows to implement custom ConfigurationLoader classes which replace the cu rrently rather hardcoded ConfigurationProcessor's in an OOP way. This PR allows to implement custom ConfigurationLoader classes which replace the currently rather hardcoded ConfigurationProcessor's in an OOP way.
It is then possible to load custom configurations in the ConfigurationManager wi th custom locations and custom configuration formats. E.g. it is possible to loa d json files or NodeTypes from another directory than ``Configuration``. It is then possible to load custom configurations in the ConfigurationManager wi th custom locations and custom configuration formats. E.g. it is possible to loa d json files or NodeTypes from another directory than ``Configuration``.
This is not a breaking change for most cases, but the signature of ``Configurati onManager::registerConfigurationType()`` has been changed and the usage of "conf igurationProcessingTypes" deprecated in favor of ``Neos\\Flow\\Configuration\\Lo ader\\LoaderInterface`` instances:: This is not a breaking change for most cases, but the signature of ``Configurati onManager::registerConfigurationType()`` has been changed and the usage of "conf igurationProcessingTypes" deprecated in favor of ``Neos\\Flow\\Configuration\\Lo ader\\LoaderInterface`` instances::
// legacy (and still supported) // legacy (and still supported)
$configurationManager->registerConfigurationType('SomeCustom', ConfigurationMan $configurationManager->registerConfigurationType('SomeCustom', ConfigurationMa
ager::CONFIGURATION_PROCESSING_TYPE_APPEND); nager::CONFIGURATION_PROCESSING_TYPE_APPEND);
// now // now
$configurationManager->registerConfigurationType('SomeCustom', new AppendLoader $configurationManager->registerConfigurationType('SomeCustom', new AppendLoade
($yamlSource, 'SomeCustom')); r($yamlSource, 'SomeCustom'));
Related: https://github.com/neos/neos-development-collection/issues/3000
Related: https://github.com/neos/flow-development-collection/issues/1824
`!!! BUGFIX: Avoid broken proxy docblocks <https://github.com/neos/flow-developm ent-collection/pull/2568>`_ `!!! BUGFIX: Avoid broken proxy docblocks <https://github.com/neos/flow-developm ent-collection/pull/2568>`_
-------------------------------------------------------------------------------- ---------------------------- -------------------------------------------------------------------------------- ----------------------------
With PR #2533 docblocks are copied from the original class to the proxy class. T his breaks when using annotations With PR #2533 docblocks are copied from the original class to the proxy class. T his breaks when using annotations
without the "standard" imports Flow and ORM. One example is the ImportedAsset do main model. without the "standard" imports Flow and ORM. One example is the ImportedAsset do main model.
This fixes that by some changes to the proxy building. This fixes that by some changes to the proxy building.
Note, if you use property introduction via AOP, those properties must from now o n use fully-qualified classnames for Note, if you use property introduction via AOP, those properties must from now o n use fully-qualified classnames for
 End of changes. 14 change blocks. 
31 lines changed or deleted 106 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)