Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.4' into 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Dec 16, 2024
2 parents 6dffd2c + 62a5149 commit 239036f
Show file tree
Hide file tree
Showing 45 changed files with 512 additions and 345 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
working-directory: .

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.FLOW_FOLDER }}

Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
mysql root password: 'neos'

- name: Checkout development distribution
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: neos/flow-development-distribution
ref: ${{ env.FLOW_TARGET_VERSION }}
Expand All @@ -123,7 +123,7 @@ jobs:
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cache/composer
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
working-directory: .

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.FLOW_FOLDER }}

Expand All @@ -99,7 +99,7 @@ jobs:
ini-values: date.timezone="Africa/Tunis", opcache.fast_shutdown=0, apc.enable_cli=on

- name: Checkout development distribution
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: neos/flow-development-distribution
ref: ${{ env.FLOW_TARGET_VERSION }}
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cache/composer
Expand Down
13 changes: 9 additions & 4 deletions Neos.Cache/Classes/Backend/RedisBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,15 @@ public function flush(): void
{
// language=lua
$script = "
local keys = redis.call('KEYS', ARGV[1] .. '*')
for k1,key in ipairs(keys) do
redis.call('DEL', key)
end
local cursor = '0'
repeat
local result = redis.call('SCAN', cursor, 'MATCH', ARGV[1] .. '*')
cursor = result[1]
local keys = result[2]
for _, key in ipairs(keys) do
redis.call('DEL', key)
end
until cursor == '0'
";
$this->redis->eval($script, [$this->getPrefixedIdentifier('')], 0);

Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow.Log/Classes/Backend/FileBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat
} else {
$processId = ' ' . str_pad((string)getmypid(), 10);
}
$ipAddress = ($this->logIpAddress === true) ? str_pad(($_SERVER['REMOTE_ADDR'] ?? ''), 15) : '';
$ipAddress = ($this->logIpAddress === true) ? str_pad(($_SERVER['REMOTE_ADDR'] ?? ''), 15) . ' ' : '';
$severityLabel = $this->severityLabels[$severity] ?? 'UNKNOWN ';
$output = (new \DateTime())->format('y-m-d H:i:s') . $processId . ' ' . $ipAddress . $severityLabel . ' ' . str_pad((string)$packageKey, 20) . ' ' . $message;

Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow.Log/Tests/Unit/Backend/FileBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function appendRendersALogEntryWithRemoteIpAddressAndAppendsItToTheLogfil
$backend->append('foo');

$pidOffset = function_exists('posix_getpid') ? 10 : 0;
self::assertSame(68 + $pidOffset + strlen(PHP_EOL), vfsStreamWrapper::getRoot()->getChild('test.log')->size());
self::assertSame(69 + $pidOffset + strlen(PHP_EOL), vfsStreamWrapper::getRoot()->getChild('test.log')->size());
}

/**
Expand Down
7 changes: 7 additions & 0 deletions Neos.Flow/Classes/Core/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ protected function defineConstants()
$expectedPath = Files::getUnixStylePath(realpath(FLOW_PATH_FLOW)) . '/';
if ($testPath !== $expectedPath) {
echo('Flow: Invalid root path. (Error #1248964375)' . PHP_EOL . '"' . $testPath . '" does not lead to' . PHP_EOL . '"' . $expectedPath . '"' . PHP_EOL);
http_response_code(500);
exit(1);
}
define('FLOW_PATH_ROOT', $rootPath);
Expand Down Expand Up @@ -547,15 +548,18 @@ protected function ensureRequiredEnvironment()
{
if (DIRECTORY_SEPARATOR !== '/' && PHP_WINDOWS_VERSION_MAJOR < 6) {
echo('Flow does not support Windows versions older than Windows Vista or Windows Server 2008 (Error #1312463704)' . PHP_EOL);
http_response_code(500);
exit(1);
}
if (!extension_loaded('Reflection')) {
echo('The PHP extension "Reflection" is required by Flow.' . PHP_EOL);
http_response_code(500);
exit(1);
}
$method = new \ReflectionMethod(__CLASS__, __FUNCTION__);
if ($method->getDocComment() === false || $method->getDocComment() === '') {
echo('Reflection of doc comments is not supported by your PHP setup. Please check if you have installed an accelerator which removes doc comments.' . PHP_EOL);
http_response_code(500);
exit(1);
}

Expand All @@ -568,12 +572,14 @@ protected function ensureRequiredEnvironment()
if (!is_dir(FLOW_PATH_DATA) && !is_link(FLOW_PATH_DATA)) {
if (!@mkdir(FLOW_PATH_DATA)) {
echo('Flow could not create the directory "' . FLOW_PATH_DATA . '". Please check the file permissions manually or run "sudo ./flow flow:core:setfilepermissions" to fix the problem. (Error #1347526552)');
http_response_code(500);
exit(1);
}
}
if (!is_dir(FLOW_PATH_DATA . 'Persistent') && !is_link(FLOW_PATH_DATA . 'Persistent')) {
if (!@mkdir(FLOW_PATH_DATA . 'Persistent')) {
echo('Flow could not create the directory "' . FLOW_PATH_DATA . 'Persistent". Please check the file permissions manually or run "sudo ./flow flow:core:setfilepermissions" to fix the problem. (Error #1347526553)');
http_response_code(500);
exit(1);
}
}
Expand All @@ -582,6 +588,7 @@ protected function ensureRequiredEnvironment()
$oldMask = umask(000);
if (!@mkdir(FLOW_PATH_TEMPORARY, 0777, true)) {
echo('Flow could not create the directory "' . FLOW_PATH_TEMPORARY . '". Please check the file permissions manually or run "sudo ./flow flow:core:setfilepermissions" to fix the problem. (Error #1441354578)');
http_response_code(500);
exit(1);
}
umask($oldMask);
Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Persistence/Doctrine/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
use Doctrine\Migrations\Metadata\ExecutedMigration;
use Doctrine\Migrations\Metadata\ExecutedMigrationsList;
use Doctrine\Migrations\MigratorConfiguration;
use Doctrine\Migrations\Tools\Console\ConsoleLogger;
use Doctrine\Migrations\Tools\Console\Exception\InvalidOptionUsage;
use Doctrine\Migrations\Tools\Console\Exception\VersionAlreadyExists;
use Doctrine\Migrations\Tools\Console\Exception\VersionDoesNotExist;
Expand All @@ -56,6 +55,7 @@
use Neos\Utility\ObjectAccess;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;

Expand Down
4 changes: 2 additions & 2 deletions Neos.Flow/Classes/Validation/Validator/FileSizeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ protected function isValid($value)
return;
}
if ($this->options['minimum'] && $filesize < $this->options['minimum']) {
$this->addError('The file is larger than allowed.', 1677934908);
$this->addError('The file is smaller than allowed.', 1677934908);
return;
}
if ($this->options['maximum'] && $filesize > $this->options['maximum']) {
$this->addError('The file is smaller than allowed.', 1677934903);
$this->addError('The file is larger than allowed.', 1677934903);
return;
}
}
Expand Down
1 change: 0 additions & 1 deletion Neos.Flow/Configuration/Settings.Resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Neos:
target: 'localWebDirectoryStaticResourcesTarget'
pathPatterns:
- '*/Resources/Public/'
- '*/Resources/Public/*'

# Collection which contains all persistent resources
persistent:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
`8.3.10 (2024-08-14) <https://github.com/neos/flow-development-collection/releases/tag/8.3.10>`_
================================================================================================

Overview of merged pull requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`BUGFIX: DateTime translation for validator <https://github.com/neos/flow-development-collection/pull/3374>`_
-------------------------------------------------------------------------------------------------------------

This will close `#3323 <https://github.com/neos/flow-development-collection/issues/3323>`_

* Packages: ``Flow``

`BUGFIX: Streamline exit(1) to web response with HTTP status code 500 <https://github.com/neos/flow-development-collection/pull/3365>`_
---------------------------------------------------------------------------------------------------------------------------------------

With this critical error messages like the following now sends the HTTP status code 500 instead 200 in order to state something is not okay on the server side:

``Flow could not create the directory "/var/www/html/Data/Persistent". Please check the file permissions manually or run "sudo ./flow flow:core:setfilepermissions" to fix the problem. (Error #1347526553)``

Resolved: `#3364 <https://github.com/neos/flow-development-collection/issues/3364>`_


* Packages: ``Flow``

`BUGFIX: Avoid insecure composer/composer versions <https://github.com/neos/flow-development-collection/pull/3366>`_
--------------------------------------------------------------------------------------------------------------------

This adjusts the dependency to ``~2.2.24 || ^2.7.7`` to avoid versions vulnerable to multiple command injections via malicious branch names.

More details in:

- https://blog.packagist.com/composer-2-7-7/
- https://github.com/advisories/GHSA-v9qv-c7wm-wgmf
- https://github.com/advisories/GHSA-47f6-5gq3-vx9c


* Packages: ``Flow``

`BUGFIX: First exception cannot be written in subcontext when booting <https://github.com/neos/flow-development-collection/pull/3362>`_
---------------------------------------------------------------------------------------------------------------------------------------

**Upgrade instructions**


* Packages: ``Flow``

`BUGFIX: ReflectionService must always initialize <https://github.com/neos/flow-development-collection/pull/3360>`_
-------------------------------------------------------------------------------------------------------------------

The ReflectionService lazy loads reflection data from cache, but every method making use of the data needs to call initialize.
This change adds missing calls that seem to never happen first in regular flow applications. Still better to prevent broken reflection in case we optimize other uses in the future.

* Packages: ``Flow``

`TASK: Update "egulias/email-validator" version constraints <https://github.com/neos/flow-development-collection/pull/3356>`_
------------------------------------------------------------------------------------------------------------------------------

Updates the version constraints of "egulias/email-validator" and allows to use 4.x versions.
Also removes the support of the 2.x versions

* Packages: ``Flow``

`Detailed log <https://github.com/neos/flow-development-collection/compare/8.3.9...8.3.10>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
`8.3.11 (2024-09-17) <https://github.com/neos/flow-development-collection/releases/tag/8.3.11>`_
================================================================================================

Overview of merged pull requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


`Detailed log <https://github.com/neos/flow-development-collection/compare/8.3.10...8.3.11>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
`8.3.12 (2024-11-18) <https://github.com/neos/flow-development-collection/releases/tag/8.3.12>`_
================================================================================================

Overview of merged pull requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`BUGFIX: Fix unit test for changed logging <https://github.com/neos/flow-development-collection/pull/3409>`_
------------------------------------------------------------------------------------------------------------

* See: `#3408 <https://github.com/neos/flow-development-collection/issues/3408>`_

* Packages: ``Flow`` ``Flow.Log``

`BUGFIX: Always add space between IP and severity in file logs <https://github.com/neos/flow-development-collection/pull/3408>`_
--------------------------------------------------------------------------------------------------------------------------------

For all IP addresses of length 15 or longer (most ipv6 addresses) no space was added between the IP address and the Severity.

This bugfix always adds a space character between IP and severity.

**Review instructions**

Check if IPv6 addresses are separated with a space in log files.


* Packages: ``Flow`` ``Flow.Log``

`TASK: Use `SCAN` for redis flush <https://github.com/neos/flow-development-collection/pull/3387>`_
---------------------------------------------------------------------------------------------------

This should speed up flush operations and lower the load on Redis.

**Review instructions**

The functional tests run ``flush()``…


* Packages: ``Cache``

`TASK: Drop code for PHP < 8 <https://github.com/neos/flow-development-collection/pull/3412>`_
----------------------------------------------------------------------------------------------

This drops code that was only executed on PHP < 8.0, and thus will never ever be run again.

* Packages: ``Flow``

`Detailed log <https://github.com/neos/flow-development-collection/compare/8.3.11...8.3.12>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 changes: 6 additions & 6 deletions Neos.Flow/Resources/Private/Translations/ar/ValidationErrors.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
<target state="translated">القيمة المعطاة ليست تاريخاً صحيحاً</target>
</trans-unit>
<trans-unit id="1325615630" xml:space="preserve">
<source>The given date must be between {0,datetime,datetime} and {1,datetime,datetime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى بين {0,datetime,datetime} و {1,datetime,datetime}</target>
<source>The given date must be between {0,datetime,dateTime} and {1,datetime,dateTime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى بين {0,datetime,dateTime} و {1,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315107" xml:space="preserve">
<source>The given date must be after {0,datetime,datetime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى بعد {0,datetime,datetime}</target>
<source>The given date must be after {0,datetime,dateTime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى بعد {0,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315115" xml:space="preserve">
<source>The given date must be before {0,datetime,datetime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى قبل {0,datetime,datetime}</target>
<source>The given date must be before {0,datetime,dateTime}</source>
<target state="translated">يجب أن يكون التاريخ المعطى قبل {0,datetime,dateTime}</target>
</trans-unit>
<!-- DateTimeValidator -->
<trans-unit id="1281454676" xml:space="preserve">
Expand Down
12 changes: 6 additions & 6 deletions Neos.Flow/Resources/Private/Translations/cs/ValidationErrors.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
<target state="translated">Zadaná hodnota není platné datum</target>
</trans-unit>
<trans-unit id="1325615630" xml:space="preserve">
<source>The given date must be between {0,datetime,datetime} and {1,datetime,datetime}</source>
<target state="translated">The given date must be between {0,datetime,datetime} and {1,datetime,datetime}</target>
<source>The given date must be between {0,datetime,dateTime} and {1,datetime,dateTime}</source>
<target state="translated">The given date must be between {0,datetime,dateTime} and {1,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315107" xml:space="preserve">
<source>The given date must be after {0,datetime,datetime}</source>
<target state="translated">The given date must be after {0,datetime,datetime}</target>
<source>The given date must be after {0,datetime,dateTime}</source>
<target state="translated">The given date must be after {0,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315115" xml:space="preserve">
<source>The given date must be before {0,datetime,datetime}</source>
<target state="translated">The given date must be before {0,datetime,datetime}</target>
<source>The given date must be before {0,datetime,dateTime}</source>
<target state="translated">The given date must be before {0,datetime,dateTime}</target>
</trans-unit>
<!-- DateTimeValidator -->
<trans-unit id="1281454676" xml:space="preserve">
Expand Down
12 changes: 6 additions & 6 deletions Neos.Flow/Resources/Private/Translations/da/ValidationErrors.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
<target state="final">Den angivne værdi er ikke en gyldig dato</target>
</trans-unit>
<trans-unit id="1325615630" xml:space="preserve">
<source>The given date must be between {0,datetime,datetime} and {1,datetime,datetime}</source>
<target state="translated">The given date must be between {0,datetime,datetime} and {1,datetime,datetime}</target>
<source>The given date must be between {0,datetime,dateTime} and {1,datetime,dateTime}</source>
<target state="translated">The given date must be between {0,datetime,dateTime} and {1,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315107" xml:space="preserve">
<source>The given date must be after {0,datetime,datetime}</source>
<target state="translated">The given date must be after {0,datetime,datetime}</target>
<source>The given date must be after {0,datetime,dateTime}</source>
<target state="translated">The given date must be after {0,datetime,dateTime}</target>
</trans-unit>
<trans-unit id="1324315115" xml:space="preserve">
<source>The given date must be before {0,datetime,datetime}</source>
<target state="translated">The given date must be before {0,datetime,datetime}</target>
<source>The given date must be before {0,datetime,dateTime}</source>
<target state="translated">The given date must be before {0,datetime,dateTime}</target>
</trans-unit>
<!-- DateTimeValidator -->
<trans-unit id="1281454676" xml:space="preserve" approved="yes">
Expand Down
Loading

0 comments on commit 239036f

Please sign in to comment.