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
dlubitz committed Jan 17, 2025
2 parents 173cbb6 + f69e400 commit f638792
Show file tree
Hide file tree
Showing 58 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']
dependencies: ['highest']
composer-arguments: [''] # to run --ignore-platform-reqs in experimental builds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function visitObjectStatement(ObjectStatement $objectStatement)
$this->isInsidePrototypeDeclaration = $wasPreviouslyInPrototypeDeclaration;
}

public function visitBlock(Block $block, array $currentPath = null)
public function visitBlock(Block $block, ?array $currentPath = null)
{
$currentPath ?? throw new \BadMethodCallException('$currentPath is required.');

Expand Down Expand Up @@ -152,7 +152,7 @@ public function visitPathSegment(PathSegment $pathSegment): array
return [$key];
}

public function visitValueAssignment(ValueAssignment $valueAssignment, array $currentPath = null)
public function visitValueAssignment(ValueAssignment $valueAssignment, ?array $currentPath = null)
{
$currentPath ?? throw new \BadMethodCallException('$currentPath is required.');

Expand Down Expand Up @@ -215,7 +215,7 @@ public function visitStringValue(StringValue $stringValue): string
return $stringValue->value;
}

public function visitValueCopy(ValueCopy $valueCopy, array $currentPath = null)
public function visitValueCopy(ValueCopy $valueCopy, ?array $currentPath = null)
{
$currentPath ?? throw new \BadMethodCallException('$currentPath is required.');

Expand Down Expand Up @@ -264,7 +264,7 @@ public function visitAssignedObjectPath(AssignedObjectPath $assignedObjectPath,
return $assignedObjectPath->objectPath->visit($this, $path);
}

public function visitValueUnset(ValueUnset $valueUnset, array $currentPath = null)
public function visitValueUnset(ValueUnset $valueUnset, ?array $currentPath = null)
{
$currentPath ?? throw new \BadMethodCallException('$currentPath is required.');

Expand Down
6 changes: 3 additions & 3 deletions Neos.Fusion/Classes/Core/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ protected function assignPropertiesToFusionObject(AbstractArrayFusionObject $fus
* @return mixed The result of the evaluated Eel expression
* @throws Exception
*/
protected function evaluateEelExpression($expression, AbstractFusionObject $contextObject = null)
protected function evaluateEelExpression($expression, ?AbstractFusionObject $contextObject = null)
{
if ($expression[0] !== '$' || $expression[1] !== '{') {
// We still assume this is an EEL expression and wrap the markers for backwards compatibility.
Expand Down Expand Up @@ -878,7 +878,7 @@ protected function evaluateApplyValues($configurationWithEventualProperties, $fu
* @param AbstractFusionObject $contextObject
* @return mixed
*/
protected function evaluateProcessors($valueToProcess, $configurationWithEventualProcessors, $fusionPath, AbstractFusionObject $contextObject = null)
protected function evaluateProcessors($valueToProcess, $configurationWithEventualProcessors, $fusionPath, ?AbstractFusionObject $contextObject = null)
{
$processorConfiguration = $configurationWithEventualProcessors['__meta']['process'];
$positionalArraySorter = new PositionalArraySorter($processorConfiguration, '__meta.position');
Expand Down Expand Up @@ -916,7 +916,7 @@ protected function evaluateProcessors($valueToProcess, $configurationWithEventua
* @param AbstractFusionObject $contextObject
* @return boolean
*/
protected function evaluateIfCondition($configurationWithEventualIf, $configurationPath, AbstractFusionObject $contextObject = null)
protected function evaluateIfCondition($configurationWithEventualIf, $configurationPath, ?AbstractFusionObject $contextObject = null)
{
foreach ($configurationWithEventualIf['__meta']['if'] as $conditionKey => $conditionValue) {
$conditionValue = $this->evaluate($configurationPath . '/__meta/if/' . $conditionKey, $contextObject, self::BEHAVIOR_EXCEPTION);
Expand Down
2 changes: 1 addition & 1 deletion Neos.Fusion/Classes/Core/RuntimeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RuntimeFactory
* @param array<int|string, mixed> $fusionConfiguration
* @deprecated with Neos 8.3 might be removed with Neos 9.0 use {@link createFromConfiguration} instead.
*/
public function create(array $fusionConfiguration, ControllerContext $controllerContext = null): Runtime
public function create(array $fusionConfiguration, ?ControllerContext $controllerContext = null): Runtime
{
$defaultContextVariables = EelUtility::getDefaultContextVariables(
$this->defaultContextConfiguration ?? []
Expand Down
2 changes: 1 addition & 1 deletion Neos.Fusion/Classes/Eel/BaseUriHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BaseUriHelper implements ProtectedContextAwareInterface
* @return UriInterface
* @throws \Exception
*/
public function getConfiguredBaseUriOrFallbackToCurrentRequest(ServerRequestInterface $fallbackRequest = null): UriInterface
public function getConfiguredBaseUriOrFallbackToCurrentRequest(?ServerRequestInterface $fallbackRequest = null): UriInterface
{
try {
$baseUri = $this->baseUriProvider->getConfiguredBaseUriOrFallbackToCurrentRequest();
Expand Down
2 changes: 1 addition & 1 deletion Neos.Fusion/Classes/FusionObjects/Helpers/FluidView.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FluidView extends StandaloneView implements FusionAwareViewInterface
* @param ActionRequest $request The current action request. If none is specified it will be created from the environment.
* @throws \Neos\FluidAdaptor\Exception
*/
public function __construct(AbstractFusionObject $fusionObject, ActionRequest $request = null)
public function __construct(AbstractFusionObject $fusionObject, ?ActionRequest $request = null)
{
parent::__construct($request);
$this->fusionObject = $fusionObject;
Expand Down
4 changes: 2 additions & 2 deletions Neos.Fusion/Classes/Service/HtmlAugmenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class HtmlAugmenter
* @param array $exclusiveAttributes A list of lowercase(!) attribute names that should be exclusive to the root element. If the existing root element contains one of these a new root element is wrapped
* @param bool $allowEmptyAttributes Allow empty attributes without a value
*/
public function addAttributes($html, array $attributes, $fallbackTagName = 'div', array $exclusiveAttributes = null, bool $allowEmptyAttributes = true)
public function addAttributes($html, array $attributes, $fallbackTagName = 'div', ?array $exclusiveAttributes = null, bool $allowEmptyAttributes = true)
{
if ($attributes === []) {
return $html;
Expand Down Expand Up @@ -129,7 +129,7 @@ protected function mergeAttributes(\DOMNode $element, array &$newAttributes)
* @param array $attributes array of attribute names to check (lowercase)
* @return boolean true if at least one of the $attributes is contained in the given $element, otherwise false
*/
protected function elementHasAttributes(\DOMNode $element, array $attributes = null)
protected function elementHasAttributes(\DOMNode $element, ?array $attributes = null)
{
if ($attributes === null) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TestModelConverter extends AbstractTypeConverter
* @param PropertyMappingConfigurationInterface $configuration
* @return boolean
*/
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
public function convertFrom($source, $targetType, array $convertedChildProperties = [], ?PropertyMappingConfigurationInterface $configuration = null)
{
// This would use the identifier of the source in reality
return unserialize($source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TestModelSerializer extends AbstractTypeConverter
* @param PropertyMappingConfigurationInterface $configuration
* @return boolean
*/
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
public function convertFrom($source, $targetType, array $convertedChildProperties = [], ?PropertyMappingConfigurationInterface $configuration = null)
{
// This would use the identifier of the source in reality
return serialize($source);
Expand Down
8 changes: 4 additions & 4 deletions Neos.Media.Browser/Classes/Controller/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function initializeView(ViewInterface $view): void
* @return void
* @throws FilesException
*/
public function indexAction($view = null, $sortBy = null, $sortDirection = null, $filter = null, $tagMode = self::TAG_GIVEN, Tag $tag = null, $searchTerm = null, $collectionMode = self::COLLECTION_GIVEN, AssetCollection $assetCollection = null, $assetSourceIdentifier = null): void
public function indexAction($view = null, $sortBy = null, $sortDirection = null, $filter = null, $tagMode = self::TAG_GIVEN, ?Tag $tag = null, $searchTerm = null, $collectionMode = self::COLLECTION_GIVEN, ?AssetCollection $assetCollection = null, $assetSourceIdentifier = null): void
{
$assetSourceIdentifier = $this->assetConstraints->applyToAssetSourceIdentifiers($assetSourceIdentifier);

Expand Down Expand Up @@ -854,7 +854,7 @@ private function getMaximumFileUploadSize(): int
* @param string $sortDirection
* @param string $filter
*/
private function applyViewOptionsToBrowserState(string $view = null, string $sortBy = null, string $sortDirection = null, string $filter = null): void
private function applyViewOptionsToBrowserState(?string $view = null, ?string $sortBy = null, ?string $sortDirection = null, ?string $filter = null): void
{
if (!empty($view)) {
$this->browserState->set('view', $view);
Expand Down Expand Up @@ -890,7 +890,7 @@ private function applyActiveAssetSourceToBrowserState($assetSourceIdentifier): v
* @param Tag $tag
* @param AssetCollection|null $activeAssetCollection
*/
private function applyTagToBrowserState(int $tagMode = null, Tag $tag = null, AssetCollection $activeAssetCollection = null): void
private function applyTagToBrowserState(?int $tagMode = null, ?Tag $tag = null, ?AssetCollection $activeAssetCollection = null): void
{
if ($tagMode === self::TAG_GIVEN && $tag !== null) {
$this->browserState->set('activeTag', $tag);
Expand Down Expand Up @@ -929,7 +929,7 @@ private function getAssetSourceFromBrowserState(): AssetSourceInterface
* @param int $collectionMode
* @param AssetCollection $assetCollection
*/
private function applyAssetCollectionOptionsToBrowserState(int $collectionMode = null, AssetCollection $assetCollection = null): void
private function applyAssetCollectionOptionsToBrowserState(?int $collectionMode = null, ?AssetCollection $assetCollection = null): void
{
if ($collectionMode === self::COLLECTION_GIVEN && $assetCollection !== null) {
$this->browserState->set('activeAssetCollection', $assetCollection);
Expand Down
4 changes: 2 additions & 2 deletions Neos.Media.Browser/Classes/Controller/ImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ImageController extends AssetController
* @return void
* @throws \Neos\Utility\Exception\FilesException
*/
public function indexAction($view = null, $sortBy = null, $sortDirection = null, $filter = null, $tagMode = self::TAG_GIVEN, Tag $tag = null, $searchTerm = null, $collectionMode = self::COLLECTION_GIVEN, AssetCollection $assetCollection = null, $assetSourceIdentifier = null): void
public function indexAction($view = null, $sortBy = null, $sortDirection = null, $filter = null, $tagMode = self::TAG_GIVEN, ?Tag $tag = null, $searchTerm = null, $collectionMode = self::COLLECTION_GIVEN, ?AssetCollection $assetCollection = null, $assetSourceIdentifier = null): void
{
$this->view->assign('filterOptions', []);
parent::indexAction($view, $sortBy, $sortDirection, 'Image', $tagMode, $tag, $searchTerm, $collectionMode, $assetCollection, $assetSourceIdentifier);
Expand All @@ -65,7 +65,7 @@ public function indexAction($view = null, $sortBy = null, $sortDirection = null,
* @return void
* @throws \Neos\Flow\Mvc\Exception\StopActionException
*/
public function editAction(string $assetSourceIdentifier = null, string $assetProxyIdentifier = null, AssetInterface $asset = null): void
public function editAction(?string $assetSourceIdentifier = null, ?string $assetProxyIdentifier = null, ?AssetInterface $asset = null): void
{
if ($assetSourceIdentifier !== null && $assetProxyIdentifier !== null) {
parent::editAction($assetSourceIdentifier, $assetProxyIdentifier);
Expand Down
12 changes: 6 additions & 6 deletions Neos.Media/Classes/Command/MediaCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function importResourcesCommand(bool $simulate = false, bool $quiet = fal
* @throws IllegalObjectTypeException
* @throws AssetServiceException
*/
public function removeUnusedCommand(string $assetSource = '', bool $quiet = false, bool $assumeYes = false, string $onlyTags = '', int $limit = null, string $onlyCollections = ''): void
public function removeUnusedCommand(string $assetSource = '', bool $quiet = false, bool $assumeYes = false, string $onlyTags = '', ?int $limit = null, string $onlyCollections = ''): void
{
$iterator = $this->assetRepository->findAllIterator();
$assetCount = $this->assetRepository->countAll();
Expand Down Expand Up @@ -315,7 +315,7 @@ public function removeUnusedCommand(string $assetSource = '', bool $quiet = fals
* @return void
* @throws ThumbnailServiceException
*/
public function createThumbnailsCommand(string $preset = null, bool $async = null, bool $quiet = false)
public function createThumbnailsCommand(?string $preset = null, ?bool $async = null, bool $quiet = false)
{
$async = $async ?? $this->asyncThumbnails;
$presets = $preset !== null ? [$preset] : array_keys($this->thumbnailService->getPresets());
Expand Down Expand Up @@ -349,7 +349,7 @@ public function createThumbnailsCommand(string $preset = null, bool $async = nul
* @throws IllegalObjectTypeException
* @throws ThumbnailServiceException
*/
public function clearThumbnailsCommand(string $preset = null, bool $quiet = false): void
public function clearThumbnailsCommand(?string $preset = null, bool $quiet = false): void
{
if ($preset !== null) {
$thumbnailConfiguration = $this->thumbnailService->getThumbnailConfigurationForPreset($preset);
Expand Down Expand Up @@ -381,7 +381,7 @@ public function clearThumbnailsCommand(string $preset = null, bool $quiet = fals
* @param bool $quiet If set, only errors will be displayed.
* @return void
*/
public function renderThumbnailsCommand(int $limit = null, bool $quiet = false)
public function renderThumbnailsCommand(?int $limit = null, bool $quiet = false)
{
$thumbnailCount = $this->thumbnailRepository->countUngenerated();
$iterator = $this->thumbnailRepository->findUngeneratedIterator();
Expand Down Expand Up @@ -467,7 +467,7 @@ public function listVariantPresetsCommand(): void
*
* @throws StopCommandException
*/
public function removeVariantsCommand(string $identifier, string $variantName, bool $quiet = false, bool $assumeYes = false, int $limit = null)
public function removeVariantsCommand(string $identifier, string $variantName, bool $quiet = false, bool $assumeYes = false, ?int $limit = null)
{
$variantsToRemove = $this->imageVariantRepository->findVariantsByIdentifierAndVariantName($identifier, $variantName, $limit);
if (empty($variantsToRemove)) {
Expand Down Expand Up @@ -531,7 +531,7 @@ public function removeVariantsCommand(string $identifier, string $variantName, b
* @throws AssetVariantGeneratorException
* @throws IllegalObjectTypeException
*/
public function renderVariantsCommand(int $limit = null, bool $quiet = false, bool $recreate = false): void
public function renderVariantsCommand(?int $limit = null, bool $quiet = false, bool $recreate = false): void
{
$resultMessage = null;
$generatedVariants = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CropImageAdjustment extends AbstractImageAdjustment
* @return void
* @api
*/
public function setHeight(int $height = null): void
public function setHeight(?int $height = null): void
{
$this->height = $height;
$this->aspectRatioAsString = null;
Expand All @@ -94,7 +94,7 @@ public function getHeight(): ?int
* @return void
* @api
*/
public function setWidth(int $width = null): void
public function setWidth(?int $width = null): void
{
$this->width = $width;
$this->aspectRatioAsString = null;
Expand All @@ -118,7 +118,7 @@ public function getWidth(): ?int
* @return void
* @api
*/
public function setX(int $x = null): void
public function setX(?int $x = null): void
{
$this->x = $x;
$this->aspectRatioAsString = null;
Expand All @@ -142,7 +142,7 @@ public function getX(): ?int
* @return void
* @api
*/
public function setY(int $y = null): void
public function setY(?int $y = null): void
{
$this->y = $y;
$this->aspectRatioAsString = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getQuality(): ?int
* @param integer $quality
* @return void
*/
public function setQuality(int $quality = null): void
public function setQuality(?int $quality = null): void
{
$this->quality = $quality;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ResizeImageAdjustment extends AbstractImageAdjustment
* @return void
* @api
*/
public function setMaximumHeight(int $maximumHeight = null): void
public function setMaximumHeight(?int $maximumHeight = null): void
{
$this->maximumHeight = $maximumHeight;
}
Expand All @@ -120,7 +120,7 @@ public function getMaximumHeight(): ?int
* @return void
* @api
*/
public function setMaximumWidth(int $maximumWidth = null): void
public function setMaximumWidth(?int $maximumWidth = null): void
{
$this->maximumWidth = $maximumWidth;
}
Expand All @@ -143,7 +143,7 @@ public function getMaximumWidth(): ?int
* @return void
* @api
*/
public function setHeight(int $height = null): void
public function setHeight(?int $height = null): void
{
$this->height = $height;
}
Expand All @@ -166,7 +166,7 @@ public function getHeight(): ?int
* @return void
* @api
*/
public function setWidth(int $width = null): void
public function setWidth(?int $width = null): void
{
$this->width = $width;
}
Expand All @@ -189,7 +189,7 @@ public function getWidth(): ?int
* @return void
* @api
*/
public function setMinimumHeight(int $minimumHeight = null): void
public function setMinimumHeight(?int $minimumHeight = null): void
{
$this->minimumHeight = $minimumHeight;
}
Expand All @@ -212,7 +212,7 @@ public function getMinimumHeight(): ?int
* @return void
* @api
*/
public function setMinimumWidth(int $minimumWidth = null): void
public function setMinimumWidth(?int $minimumWidth = null): void
{
$this->minimumWidth = $minimumWidth;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getAssetProxy(string $identifier): AssetProxyInterface;
/**
* @param AssetTypeFilter $assetType
*/
public function filterByType(AssetTypeFilter $assetType = null): void;
public function filterByType(?AssetTypeFilter $assetType = null): void;

/**
* @return AssetProxyQueryResultInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function orderBy(array $orderings):void
/**
* @param AssetTypeFilter $assetType
*/
public function filterByType(AssetTypeFilter $assetType = null): void
public function filterByType(?AssetTypeFilter $assetType = null): void
{
$this->assetTypeFilter = (string)$assetType ?: 'All';
$this->initializeObject();
Expand All @@ -125,7 +125,7 @@ public function filterByType(AssetTypeFilter $assetType = null): void
*
* @param AssetCollection $assetCollection
*/
public function filterByCollection(AssetCollection $assetCollection = null): void
public function filterByCollection(?AssetCollection $assetCollection = null): void
{
$this->activeAssetCollection = $assetCollection;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ interface SupportsCollectionsInterface
*
* @param AssetCollection $assetCollection
*/
public function filterByCollection(AssetCollection $assetCollection = null): void;
public function filterByCollection(?AssetCollection $assetCollection = null): void;
}
Loading

0 comments on commit f638792

Please sign in to comment.