diff --git a/Neos.Cache/Classes/Backend/ApcuBackend.php b/Neos.Cache/Classes/Backend/ApcuBackend.php
index ee36cec250..8b5524eb75 100644
--- a/Neos.Cache/Classes/Backend/ApcuBackend.php
+++ b/Neos.Cache/Classes/Backend/ApcuBackend.php
@@ -333,6 +333,7 @@ public function collectGarbage(): void
* @return mixed
* @api
*/
+ #[\ReturnTypeWillChange]
public function current()
{
if ($this->cacheEntriesIterator === null) {
@@ -347,6 +348,7 @@ public function current()
* @return void
* @api
*/
+ #[\ReturnTypeWillChange]
public function next()
{
if ($this->cacheEntriesIterator === null) {
@@ -390,6 +392,7 @@ public function valid(): bool
* @return void
* @api
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
if ($this->cacheEntriesIterator === null) {
diff --git a/Neos.Cache/Classes/Backend/SimpleFileBackend.php b/Neos.Cache/Classes/Backend/SimpleFileBackend.php
index 1c2c3c7f0a..dd91efc478 100644
--- a/Neos.Cache/Classes/Backend/SimpleFileBackend.php
+++ b/Neos.Cache/Classes/Backend/SimpleFileBackend.php
@@ -510,7 +510,7 @@ protected function readCacheFile(string $cacheEntryPathAndFilename, int $offset
$length = $maxlen !== null ? $maxlen : filesize($cacheEntryPathAndFilename) - (int)$offset;
// fread requires a positive length. If the file is empty, we just return an empty string.
- if ($length === 0) {
+ if ($length <= 0) {
$data = '';
} else {
$data = fread($file, $length);
diff --git a/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php b/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
index 729f95cb6c..c47048f0f1 100644
--- a/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
+++ b/Neos.Eel/Classes/FlowQuery/Operations/Object/FilterOperation.php
@@ -264,7 +264,7 @@ protected function evaluateOperator($value, string $operator, $operand)
}
return false;
} else {
- return strripos($value, (string)$operand) === strlen($value) - strlen($operand);
+ return strripos((string)$value, (string)$operand) === strlen((string)$value) - strlen((string)$operand);
}
// no break
case '^=':
diff --git a/Neos.Eel/Classes/Helper/MathHelper.php b/Neos.Eel/Classes/Helper/MathHelper.php
index 30a671187c..fe52948f14 100644
--- a/Neos.Eel/Classes/Helper/MathHelper.php
+++ b/Neos.Eel/Classes/Helper/MathHelper.php
@@ -99,6 +99,9 @@ public function abs($x = 'NAN')
if (!is_numeric($x) && $x !== null) {
return NAN;
}
+ if ($x === null) {
+ return 0.0;
+ }
return abs((float)$x);
}
diff --git a/Neos.Eel/Classes/Helper/StringHelper.php b/Neos.Eel/Classes/Helper/StringHelper.php
index 60b4c29eed..a1deeeb45d 100755
--- a/Neos.Eel/Classes/Helper/StringHelper.php
+++ b/Neos.Eel/Classes/Helper/StringHelper.php
@@ -306,9 +306,9 @@ public function pregReplace($string, $pattern, $replace, $limit = -1)
* @param integer $limit The maximum amount of items to return, in contrast to split() this will return all remaining characters in the last item (see example)
* @return array An array of the splitted parts, excluding the matched pattern
*/
- public function pregSplit($string, $pattern, $limit = null)
+ public function pregSplit($string, $pattern, $limit = -1)
{
- return preg_split($pattern, (string)$string, $limit);
+ return preg_split($pattern, (string)$string, (int)$limit);
}
/**
diff --git a/Neos.Flow.Log/Classes/Backend/FileBackend.php b/Neos.Flow.Log/Classes/Backend/FileBackend.php
index 83192ffd2f..3513bfa2e7 100644
--- a/Neos.Flow.Log/Classes/Backend/FileBackend.php
+++ b/Neos.Flow.Log/Classes/Backend/FileBackend.php
@@ -241,7 +241,7 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat
}
$ipAddress = ($this->logIpAddress === true) ? str_pad(($_SERVER['REMOTE_ADDR'] ?? ''), 15) : '';
$severityLabel = $this->severityLabels[$severity] ?? 'UNKNOWN ';
- $output = date('y-m-d H:i:s') . $processId . ' ' . $ipAddress . $severityLabel . ' ' . str_pad((string)$packageKey, 20) . ' ' . $message;
+ $output = (new \DateTime())->format('y-m-d H:m:i') . $processId . ' ' . $ipAddress . $severityLabel . ' ' . str_pad((string)$packageKey, 20) . ' ' . $message;
if ($this->logMessageOrigin === true && ($className !== null || $methodName !== null)) {
$output .= ' [logged in ' . $className . '::' . $methodName . '()]';
diff --git a/Neos.Flow/Classes/Configuration/ConfigurationManager.php b/Neos.Flow/Classes/Configuration/ConfigurationManager.php
index f70c5e53ce..9fcd5e3376 100644
--- a/Neos.Flow/Classes/Configuration/ConfigurationManager.php
+++ b/Neos.Flow/Classes/Configuration/ConfigurationManager.php
@@ -219,7 +219,7 @@ public function registerConfigurationType(string $configurationType, $configurat
if ($configurationLoader === null) {
$configurationLoader = new MergeLoader(new YamlSource(), $configurationType);
- // B/C layer
+ // B/C layer
} elseif (is_string($configurationLoader)) {
$configurationLoader = $this->convertLegacyProcessingType($configurationType, $configurationLoader);
}
diff --git a/Neos.Flow/Classes/Http/Headers.php b/Neos.Flow/Classes/Http/Headers.php
index 266ec32119..b3e1961590 100644
--- a/Neos.Flow/Classes/Http/Headers.php
+++ b/Neos.Flow/Classes/Http/Headers.php
@@ -440,6 +440,7 @@ public function __toString()
/**
* @return string[]|mixed
*/
+ #[\ReturnTypeWillChange]
public function current(): mixed
{
return $this->getRaw($this->key());
diff --git a/Neos.Flow/Classes/Http/RequestHandler.php b/Neos.Flow/Classes/Http/RequestHandler.php
index 9c129732a3..2a65d6ad29 100644
--- a/Neos.Flow/Classes/Http/RequestHandler.php
+++ b/Neos.Flow/Classes/Http/RequestHandler.php
@@ -161,7 +161,7 @@ protected function resolveDependencies()
*/
protected function sendResponse(ResponseInterface $response)
{
- ob_implicit_flush(1);
+ ob_implicit_flush();
foreach (ResponseInformationHelper::prepareHeaders($response) as $prepareHeader) {
header($prepareHeader, false);
}
diff --git a/Neos.Flow/Classes/Mvc/Controller/AbstractController.php b/Neos.Flow/Classes/Mvc/Controller/AbstractController.php
index 5957a476e9..2573d11418 100644
--- a/Neos.Flow/Classes/Mvc/Controller/AbstractController.php
+++ b/Neos.Flow/Classes/Mvc/Controller/AbstractController.php
@@ -13,7 +13,6 @@
use Neos\Error\Messages as Error;
use Neos\Flow\Annotations as Flow;
-use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\UriInterface;
use Neos\Flow\Http\Helper\MediaTypeHelper;
diff --git a/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php b/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php
index a3b9161b18..9e33c527f5 100644
--- a/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php
+++ b/Neos.Flow/Classes/Mvc/Routing/StaticRoutePart.php
@@ -37,6 +37,7 @@ public function getDefaultValue()
*/
public function match(&$routePath)
{
+ $routePath = (string)$routePath;
$this->value = null;
if ($this->name === null || $this->name === '') {
return false;
diff --git a/Neos.Flow/Classes/Persistence/EmptyQueryResult.php b/Neos.Flow/Classes/Persistence/EmptyQueryResult.php
index a35535cff0..17e8f59b55 100644
--- a/Neos.Flow/Classes/Persistence/EmptyQueryResult.php
+++ b/Neos.Flow/Classes/Persistence/EmptyQueryResult.php
@@ -69,6 +69,7 @@ public function toArray(): array
/**
* @return object Returns NULL in this case
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return null;
@@ -77,6 +78,7 @@ public function current()
/**
* @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
}
@@ -84,6 +86,7 @@ public function next()
/**
* @return integer Returns 0 in this case
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return 0;
@@ -100,6 +103,7 @@ public function valid()
/**
* @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
}
@@ -108,6 +112,7 @@ public function rewind()
* @param mixed $offset
* @return boolean Returns false in this case
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return false;
@@ -117,6 +122,7 @@ public function offsetExists($offset)
* @param mixed $offset
* @return mixed Returns NULL in this case
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return null;
@@ -127,6 +133,7 @@ public function offsetGet($offset)
* @param mixed $value The value is ignored in this case
* @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
}
@@ -135,6 +142,7 @@ public function offsetSet($offset, $value)
* @param mixed $offset The offset is ignored in this case
* @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
}
@@ -142,6 +150,7 @@ public function offsetUnset($offset)
/**
* @return integer Returns 0 in this case
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return 0;
diff --git a/Neos.Flow/Resources/Private/Translations/es/Main.xlf b/Neos.Flow/Resources/Private/Translations/es/Main.xlf
index a548235a4d..c0226331a0 100644
--- a/Neos.Flow/Resources/Private/Translations/es/Main.xlf
+++ b/Neos.Flow/Resources/Private/Translations/es/Main.xlf
@@ -28,7 +28,7 @@
- Actualizar
+ ActualizaciĆ³n
diff --git a/Neos.Flow/Tests/Unit/Mvc/Controller/ActionControllerTest.php b/Neos.Flow/Tests/Unit/Mvc/Controller/ActionControllerTest.php
index 1621ad8a59..523ece5c81 100644
--- a/Neos.Flow/Tests/Unit/Mvc/Controller/ActionControllerTest.php
+++ b/Neos.Flow/Tests/Unit/Mvc/Controller/ActionControllerTest.php
@@ -225,6 +225,7 @@ public function processRequestInjectsControllerContextToView()
$mockView = $this->createMock(Mvc\View\ViewInterface::class);
$mockView->expects(self::once())->method('setControllerContext')->with($this->mockControllerContext);
$this->actionController->expects(self::once())->method('resolveView')->will(self::returnValue($mockView));
+ $this->actionController->expects(self::once())->method('resolveActionMethodName')->will(self::returnValue('someAction'));
$this->actionController->processRequest($this->mockRequest, $mockResponse);
}
@@ -254,6 +255,7 @@ public function processRequestInjectsSettingsToView()
$mockView = $this->createMock(Mvc\View\ViewInterface::class);
$mockView->expects(self::once())->method('assign')->with('settings', $mockSettings);
$this->actionController->expects(self::once())->method('resolveView')->will(self::returnValue($mockView));
+ $this->actionController->expects(self::once())->method('resolveActionMethodName')->will(self::returnValue('someAction'));
$this->actionController->processRequest($this->mockRequest, $mockResponse);
}
diff --git a/Neos.Flow/Tests/Unit/Property/PropertyMappingConfigurationTest.php b/Neos.Flow/Tests/Unit/Property/PropertyMappingConfigurationTest.php
index c23304f623..142eae0fec 100644
--- a/Neos.Flow/Tests/Unit/Property/PropertyMappingConfigurationTest.php
+++ b/Neos.Flow/Tests/Unit/Property/PropertyMappingConfigurationTest.php
@@ -118,7 +118,7 @@ public function shouldSkipReturnsTrueIfConfigured()
*/
public function setTypeConverterOptionsCanBeRetrievedAgain()
{
- $mockTypeConverterClass = $this->getMockClass(TypeConverterInterface::class);
+ $mockTypeConverterClass = get_class($this->createMock(TypeConverterInterface::class));
$this->propertyMappingConfiguration->setTypeConverterOptions($mockTypeConverterClass, ['k1' => 'v1', 'k2' => 'v2']);
self::assertEquals('v1', $this->propertyMappingConfiguration->getConfigurationValue($mockTypeConverterClass, 'k1'));
@@ -138,7 +138,7 @@ public function nonexistentTypeConverterOptionsReturnNull()
*/
public function setTypeConverterOptionsShouldOverrideAlreadySetOptions()
{
- $mockTypeConverterClass = $this->getMockClass(TypeConverterInterface::class);
+ $mockTypeConverterClass = get_class($this->createMock(TypeConverterInterface::class));
$this->propertyMappingConfiguration->setTypeConverterOptions($mockTypeConverterClass, ['k1' => 'v1', 'k2' => 'v2']);
$this->propertyMappingConfiguration->setTypeConverterOptions($mockTypeConverterClass, ['k3' => 'v3']);
@@ -151,7 +151,7 @@ public function setTypeConverterOptionsShouldOverrideAlreadySetOptions()
*/
public function setTypeConverterOptionShouldOverrideAlreadySetOptions()
{
- $mockTypeConverterClass = $this->getMockClass(TypeConverterInterface::class);
+ $mockTypeConverterClass = get_class($this->createMock(TypeConverterInterface::class));
$this->propertyMappingConfiguration->setTypeConverterOptions($mockTypeConverterClass, ['k1' => 'v1', 'k2' => 'v2']);
$this->propertyMappingConfiguration->setTypeConverterOption($mockTypeConverterClass, 'k1', 'v3');
diff --git a/Neos.Flow/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php b/Neos.Flow/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
index f008293b8d..5b97516754 100644
--- a/Neos.Flow/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
+++ b/Neos.Flow/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
@@ -26,21 +26,25 @@ public function __construct(array $array)
$this->array = $array;
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return array_key_exists($offset, $this->array);
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->array[$offset];
}
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->array[$offset] = $value;
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->array[$offset]);
diff --git a/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php b/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
index 0b8e93fd46..a2dde44370 100644
--- a/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
+++ b/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
@@ -375,7 +375,7 @@ protected function renderOptionTag(mixed $value, string $label)
$output .= ' selected="selected"';
}
- $output .= '>' . htmlspecialchars($label) . '';
+ $output .= '>' . htmlspecialchars((string)$label) . '';
return $output;
}
diff --git a/Neos.Utility.Arrays/Classes/Arrays.php b/Neos.Utility.Arrays/Classes/Arrays.php
index 1a333ac6e5..d09777dba4 100644
--- a/Neos.Utility.Arrays/Classes/Arrays.php
+++ b/Neos.Utility.Arrays/Classes/Arrays.php
@@ -284,7 +284,7 @@ public static function unsetValueByPath(array $array, $path): array
* @return boolean true on success, false on failure
* @see asort()
*/
- public static function sortKeysRecursively(array &$array, int $sortFlags = SORT_REGULAR): bool
+ public static function sortKeysRecursively(array &$array, int $sortFlags = \SORT_REGULAR): bool
{
foreach ($array as &$value) {
if (is_array($value)) {
diff --git a/Neos.Utility.Files/Classes/Files.php b/Neos.Utility.Files/Classes/Files.php
index 449bb65216..f280e9e0cb 100644
--- a/Neos.Utility.Files/Classes/Files.php
+++ b/Neos.Utility.Files/Classes/Files.php
@@ -320,7 +320,7 @@ public static function copyDirectoryRecursively(string $sourceDirectory, string
* @return mixed The file content as a string or false if the file could not be opened.
* @api
*/
- public static function getFileContents(string $pathAndFilename, int $flags = 0, $context = null, int $offset = null, int $maximumLength = -1)
+ public static function getFileContents(string $pathAndFilename, int $flags = 0, $context = null, int $offset = 0, int $maximumLength = -1)
{
if ($flags === true) {
$flags = FILE_USE_INCLUDE_PATH;
diff --git a/Neos.Utility.ObjectHandling/Classes/TypeHandling.php b/Neos.Utility.ObjectHandling/Classes/TypeHandling.php
index aae93c52f6..c078b86b71 100644
--- a/Neos.Utility.ObjectHandling/Classes/TypeHandling.php
+++ b/Neos.Utility.ObjectHandling/Classes/TypeHandling.php
@@ -11,7 +11,6 @@
* source code.
*/
-use Doctrine\Common\Collections\Collection;
use Doctrine\Persistence\Proxy;
use Neos\Utility\Exception\InvalidTypeException;