Skip to content

Commit 0885d3e

Browse files
committed
MERGE: Branch '4.3' into 'master'
Not a straight merge but includes reverts of changes done for 4.3 release that should not be in master.
2 parents 43b2fec + baeae0b commit 0885d3e

File tree

6 files changed

+203
-5
lines changed

6 files changed

+203
-5
lines changed

Neos.Flow/Classes/Mvc/Routing/RouterCachingService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function storeResolvedUriConstraints(ResolveContext $resolveContext, UriC
146146
}
147147

148148
$cacheIdentifier = $this->buildResolveCacheIdentifier($resolveContext, $routeValues);
149-
$tags = $this->generateRouteTags($uriConstraints->getPathConstraint(), $resolveContext->getRouteValues());
149+
$tags = $this->generateRouteTags($uriConstraints->getPathConstraint(), $routeValues);
150150
if ($resolvedTags !== null) {
151151
$tags = array_unique(array_merge($resolvedTags->getTags(), $tags));
152152
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
========
2+
Flow 4.2
3+
========
4+
5+
Allow for dynamic label overrides
6+
=================================
7+
This replaces the previous physical file model with the file model defined by the XLIFF standard.
8+
Files IDs are no longer defined by their location in the file system but by their _product-name_ and _orginal_ XLIFF attributes. The location serves as a fallback to prevent this from being a breaking change.
9+
The XLIFF file provider therefore parses all registered packages and in addition the Data/Translations folder in search of file entries in .xlf files.
10+
11+
The translation file monitor is now also registered for said Data/Translations folder to enable automatic cache clearing.
12+
In preparation for support of XLIFF version 2, the XLIFF parser has been created in a v12 namespace and the class for holding the file data is modeled as an adapter that should be able to handle both formats.
13+
Overriding labels is now be as easy as putting a valid XLIFF file with defined _product-name_ (Package) and _orginal_ (Source) in any translation folder.
14+
15+
Add PSR-7 compatibility to HTTP stack
16+
=====================================
17+
This adds all missing methods and implementations to make our HTTP implementation PSR-7 compatible.
18+
Further adjustments to Flow are not included yet.
19+
20+
Add Date.formatCldr helper
21+
==========================
22+
This change adds CLDR formatting capability to the Date Eel helper, to match
23+
the functionality of the `format.date` Fluid ViewHelper.
24+
25+
Introduce ``ObjectAccess::instantiate``
26+
=======================================
27+
This static method allows instantiating a given class with
28+
and array of arguments in an efficient way.
29+
30+
Most of this method was previously hidden in the ``ObjectManager``
31+
of Flow but as the same code is replicated in other packages it
32+
makes sense to open it as generic method for re-use.
33+
34+
Add Eel String helper ``pregMatchAll``
35+
======================================
36+
This pull request add the Eel String helper `String.pregMatchAll`
37+
38+
Allow Nullable action params to be annotated
39+
============================================
40+
This change allows action arguments to be annotated "|null" or "null|" when they are optional with default value `null`. Before the type conversion would fail because no matching type converter would be found.
41+
42+
Add ``range`` method to Eel Array-helper
43+
========================================
44+
The range method is a wrapper around the php range function that creates a sequence of integers or characters as array. This is especially helpful to create paginations in pure fusion.
45+
46+
Allow setting the package type when kickstarting a package
47+
==========================================================
48+
You can now do `./flow kickstart:package Foo.Bar --packageType neos-plugin`, like in the PackageCommandController.
49+
A question regarding the docs: Is the "Command Reference" part of the documentation autogenerated? If so, it seems to be outdated, because there are still some mentions of typo3 in there.
50+
51+
ViewHelper compilation for increased speed
52+
==========================================
53+
Adds compilation and static rendering to a couple of ViewHelpers
54+
that were either easy to change or used quite a lot.
55+
The modified ViewHelpers should all render faster in all scenarios.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
========
2+
Flow 4.3
3+
========
4+
5+
====================
6+
Upgrade Instructions
7+
====================
8+
9+
This section contains instructions for upgrading your Flow 4.2 based applications to Flow 4.3.
10+
11+
In general just make sure to run the command::
12+
13+
./flow flow:cache:flush --force
14+
15+
If you are upgrading from a lower version than 4.2, be sure to read the upgrade instructions from
16+
the previous Release Notes first.
17+
18+
What has changed
19+
----------------
20+
21+
Flow 4.3 comes with a major change in the routing and numerous fixes. Here's a list of changes that
22+
might need special attention when upgrading.
23+
24+
`!!! FEATURE: More extensible Routing <https://github.com/neos/flow-development-collection/pull/1126>`_
25+
-------------------------------------------------------------------------------------------------------
26+
27+
The Flow-routing is improved and now allows the definition of RoutingParameters
28+
via HTTP-components that can later on be handled by custom RoutePartHandlers.
29+
That way the routing can react to influences other than the uri-path like the
30+
requested host-name or scheme or any other computable value.
31+
32+
Attention: The signature of the internal Router implementation has changed.
33+
In the unlikely case that you replaced the flow-router with a custom-router
34+
you have to adjust your code accordingly.
35+
36+
Routing Parameters
37+
^^^^^^^^^^^^^^^^^^
38+
39+
Routing `Parameters` can be defined globally (via HTTP component) in order
40+
to allow custom RoutePart handler to react to influences that are outside of
41+
the incoming URI path (example: The requested host name or scheme)
42+
43+
For a RoutePart handler to access the parameters they have to implement
44+
the new `ParameterAwareRoutePartInterface`.
45+
The `DynamicRoutePart` already implements the interface. For custom implementations
46+
extending `DynamicRoutePart` the parameters will be accessible via `$this->parameters`.
47+
48+
Extended URI matching
49+
^^^^^^^^^^^^^^^^^^^^^
50+
51+
RoutePart handlers can now return an instance of `MatchResult` when mapping
52+
incoming requests.
53+
This allows the handler to specify *Tags* to be associated with the route.
54+
55+
* Packages: ``Flow``
56+
57+
`!!! FEATURE: Allow bypassing Flow class loader for performance <https://github.com/neos/flow-development-collection/pull/925>`_
58+
--------------------------------------------------------------------------------------------------------------------------------
59+
60+
Currently the composer class loader is only used as a fallback to our own,
61+
but especially if the optimized loader is used the composer one is much
62+
faster.
63+
64+
On systems in which all packages/classes are registered correctly via
65+
autoload statements in ``composer.json`` files using our own class loader
66+
only for proxy classes can bring an substantial boost in performance for
67+
every request.
68+
69+
In order to enable this feature you need to set an environment variable
70+
``FLOW_ONLY_COMPOSER_LOADER=1``. Please test carefully if that breaks due
71+
to your autoload configuration not being fully composer ready.
72+
73+
Additionally it is recommended to use the optimized composer loader by
74+
calling ``composer dumpautoload -o``.
75+
76+
While not breaking in itself this change deprecates using our class loader
77+
for anything else than proxy classes. In practice this means you should
78+
always enable composer auto loader only by using above mentioned environment
79+
variable. At least make sure that your projects work with this
80+
enabled.
81+
82+
We will drop the variable and make this the default behavior in the next
83+
major version of Flow (version 5.0) which means only classes that are
84+
correctly added to composer (loaded) packages with autoload configuration
85+
are being loaded correctly.
86+
87+
* Packages: ``Flow``
88+
89+
90+
`TASK: Split Flow Log to separate package <https://github.com/neos/flow-development-collection/pull/216>`_
91+
----------------------------------------------------------------------------------------------------------
92+
93+
The log-package was extracted from Flow to become a separate independent
94+
composer-package neos/flow-log that can be used outside of Neos or Flow
95+
projects. This continues our long-time-effort of extracting parts of our
96+
odebase that can be used separately and making them available to the
97+
whole php-community.
98+
99+
The `SystemLoggerInterface` and `SecurityLoggerInterface` are kept
100+
in Flow as they have not much meaning in the Logger package. Additionally
101+
the `EarlyLogger` was not moved as it depends on those interfaces.
102+
103+
* Packages: ``Flow`` ``Log``
104+
105+
`FEATURE: Add cookie support on curl request <https://github.com/neos/flow-development-collection/pull/1099>`_
106+
--------------------------------------------------------------------------------------------------------------
107+
108+
`Neos\\Flow\\Http\\Client\\CurlEngine` will now attach cookies to an outgoing request.
109+
110+
* Packages: ``Flow``
111+
112+
113+
`FEATURE: PHP 7.2 compatibility`
114+
--------------------------------
115+
116+
Flow framework now supports PHP 7.2 and all tests are executed for PHP versions 7.0, 7.1 and 7.2.
117+
118+

Neos.Flow/Resources/Private/Installer/Distribution/Essentials/Upgrading.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
Upgrading instructions
22
======================
33

4-
This file contains instructions for upgrading your Flow 4.1 based
5-
applications to Neos Flow 4.2
4+
This file contains instructions for upgrading your Flow 4.2 based
5+
applications to Neos Flow 4.3
66

77
What has changed
88
----------------
99

10-
10+
- The Flow-routing is improved and now allows the definition of RoutingParameters
11+
via HTTP-components.
12+
13+
- Flow now allows bypassing the custom class loader for performance.
14+
15+
- The log-package was extracted from Flow to become a separate independent
16+
composer-package neos/flow-log.
17+
18+
For further details see the ReleaseNotes and ChangeLogs.
1119

1220
Upgrading your Packages
1321
-----------------------

Neos.Flow/Tests/Functional/Mvc/RoutingTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function setUp()
4646
$foundRoute = true;
4747
break;
4848
}
49-
var_dump($route->getName());
5049
}
5150

5251
if (!$foundRoute) {

Neos.Flow/Tests/Unit/Mvc/Routing/RouterCachingServiceTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,24 @@ public function storeResolvedUriConstraintsConvertsObjectsToHashesToGenerateCach
291291
$this->routerCachingService->storeResolvedUriConstraints(new ResolveContext($this->mockUri, $routeValues, false), $resolvedUriConstraints);
292292
}
293293

294+
/**
295+
* @test
296+
*/
297+
public function storeResolvedUriConstraintsConvertsObjectsToHashesToGenerateRouteTags()
298+
{
299+
$mockUuid = '550e8400-e29b-11d4-a716-446655440000';
300+
$mockObject = new \stdClass();
301+
$routeValues = ['b' => 'route values', 'someObject' => $mockObject];
302+
$cacheIdentifier = 'e56bffd69837730b19089d3cf1eb7af9';
303+
304+
$this->mockPersistenceManager->expects($this->once())->method('getIdentifierByObject')->with($mockObject)->will($this->returnValue($mockUuid));
305+
306+
$resolvedUriConstraints = UriConstraints::create()->withPath('path');
307+
$this->mockResolveCache->expects($this->once())->method('set')->with($cacheIdentifier, $resolvedUriConstraints, [$mockUuid, md5('path')]);
308+
309+
$this->routerCachingService->storeResolvedUriConstraints(new ResolveContext($this->mockUri, $routeValues, false), $resolvedUriConstraints);
310+
}
311+
294312
/**
295313
* @test
296314
*/

0 commit comments

Comments
 (0)