Skip to content

Commit 495dcad

Browse files
author
Jenkins
committed
TASK: Add changelog for 8.4.2 [skip ci]
See https://jenkins.neos.io/job/flow-release/481/
1 parent ade8c36 commit 495dcad

File tree

1 file changed

+101
-0
lines changed
  • Neos.Flow/Documentation/TheDefinitiveGuide/PartV/ChangeLogs

1 file changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
`8.4.2 (2025-12-12) <https://github.com/neos/flow-development-collection/releases/tag/8.4.2>`_
2+
==============================================================================================
3+
4+
Overview of merged pull requests
5+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
7+
`BUGFIX: Prevent premature connection to database before `PersistenceManager::persistAllowedObjects` <https://github.com/neos/flow-development-collection/pull/3489>`_
8+
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
9+
10+
For every simple GET request ``persistAllowedObjects`` is called via the Package.php in flow. This results in building a db connection, even if there is nothing to do.
11+
12+
We first check if the ``entityManager`` is open and if the entity manager has not been used (something is heavily cached via middle-ware or sth) flows objectmanagement retrieves the entity manger.
13+
14+
Now in this retrieval process - even though doctrines connection is lazy itself - the connection will be made forcefully see ``\\Neos\\Flow\\Persistence\\Doctrine\\EntityManagerFactory::create`` line 120 (https://github.com/neos/flow-development-collection/blob/`11e2348125dd8286ff9ccc088e5d187dc9143bf5 <https://github.com/neos/flow-development-collection/commit/11e2348125dd8286ff9ccc088e5d187dc9143bf5>``_/Neos.Flow/Classes/Persistence/Doctrine/EntityManagerFactory.php#L120) or https://github.com/neos/flow-development-collection/blob/``d93b6b09ca2071c87812a9ef4bc120201c44608a <https://github.com/neos/flow-development-collection/commit/d93b6b09ca2071c87812a9ef4bc120201c44608a>`_/Neos.Flow/Classes/Persistence/Doctrine/EntityManagerConfiguration.php#L229
15+
16+
This is ironic because if there is no connection - or no entity manager in the first place, the current process cannot have made any changes to the transaction.
17+
18+
**Upgrade instructions**
19+
20+
21+
* Packages: ``.github`` ``Eel`` ``Flow``
22+
23+
`BUGFIX: Avoid passing null to strtolower() <https://github.com/neos/flow-development-collection/pull/3525>`_
24+
-------------------------------------------------------------------------------------------------------------
25+
26+
Avoids ``Deprecated: strtolower(): Passing null to parameter ``#1 <https://github.com/neos/flow-development-collection/issues/1>``_($string) of type string is deprecated`` warnings, in case the arguments have not been set.
27+
28+
29+
* Packages: ``FluidAdaptor``
30+
31+
`BUGFIX: Fix race condition during log rotation -> the `.lock` file is not properly locked <https://github.com/neos/flow-development-collection/pull/3521>`_
32+
------------------------------------------------------------------------------------------------------------------------------------------------------------
33+
34+
See https://discuss.neos.io/t/unlink-system-development-log-10-no-such-file/7140/2
35+
36+
Multiple processes writing logs can easily run into the following error when its time to rotate the logs:
37+
38+
```
39+
Warning: rename(Data/Logs/System_Development.log.3,Data/Logs/System_Development.log.4): No such file or directory in Packages/Framework/Neos.Flow.Log/Classes/Backend/FileBackend.php line 217
40+
41+
Type: Neos\\Flow\\Error\\Exception
42+
Code: 1
43+
File: Packages/Framework/Neos.Flow/Classes/Error/ErrorHandler.php
44+
Line: 80
45+
```
46+
47+
During log rotation we attempt to use a lock via ``file_exists`` but its not an atomic operation how we use it https://github.com/neos/flow-development-collection/blob/`54cea0a2cafb9ee1475ae2fdbc1fd3a1830ddc86 <https://github.com/neos/flow-development-collection/commit/54cea0a2cafb9ee1475ae2fdbc1fd3a1830ddc86>``_/Neos.Flow.Log/Classes/Backend/FileBackend.php#L194-L198 ``file_exists`` could be true for two processes at the same time in a race condition and both processes would ``touch` (create) the lock file.
48+
49+
Instead, we need to use a atomic locking via ``flock``
50+
51+
```
52+
$lockResource = fopen($this->logFileUrl . '.lock', 'w+');
53+
54+
$exclusiveNonBlockingLockResult = flock($lockResource, LOCK_EX | LOCK_NB);
55+
if ($exclusiveNonBlockingLockResult === false) {
56+
// someone else is on it
57+
return;
58+
}
59+
60+
// do something only this process is supposed to do...
61+
62+
if (!flock($setupLockResource, LOCK_UN)) {
63+
throw new \\RuntimeException('failed to release lock');
64+
}
65+
```
66+
67+
Tested on MacOs with 3 simultaneous shells running each a flow command that writes logs in a shell while loop.
68+
69+
I hope windows supports ``flock($lockResource, LOCK_EX | LOCK_NB);`` to exclusively claim a lock without waiting for it if its claimed.
70+
71+
**Upgrade instructions**
72+
73+
74+
* Packages: ``Flow.Log``
75+
76+
`BUGFIX: Check also for SkipCsrfProtection annotation <https://github.com/neos/flow-development-collection/pull/3520>`_
77+
-----------------------------------------------------------------------------------------------------------------------
78+
79+
We currently check only for the "tag" ``@skipcsrfprotection``, any (action) method annotated with ``@Flow\\SkipCsrfProtection`` is only part of the times handled correctly.
80+
81+
Attributes ``#[Flow\\SkipCsrfProtection]`` or an annotation with comment on the same line ``@Flow\\SkipCsrfProtection Some explanation`` are not handled currently.
82+
83+
Obviously this is not intended, rather using the tag should be avoided.
84+
85+
This adds the check for reflected annotations/attributes.
86+
87+
**Review instructions**
88+
89+
The root cause for this behaviour is that we just never used ``isAnnotatedWith`` but only relied on ``isTaggedWith`` to interpret if a method is tagged. The tagging parsing is custom done via ``DocCommentParser`` and utterly broken https://github.com/neos/flow-development-collection/pull/3520#issuecomment-3518076068 in that it attempts to convert annotations to tags by dropping the namespace but only if no comments exist on that line.
90+
91+
* Packages: ``Flow``
92+
93+
`TASK: Run pipeline with PHP8.5 <https://github.com/neos/flow-development-collection/pull/3527>`_
94+
-------------------------------------------------------------------------------------------------
95+
96+
97+
98+
* Packages: ``Flow`` ``.github`` ``Eel``
99+
100+
`Detailed log <https://github.com/neos/flow-development-collection/compare/8.4.1...8.4.2>`_
101+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)