Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.3' into 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Feb 2, 2024
2 parents 05ece50 + 59478f8 commit d45e946
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected function setPropertyLabels(string $nodeTypeName, array &$configuration
* Resolve help message thumbnail url
*
* @param string $nodeTypeName
* @param string $configurationThumbnail
* @param string|null $configurationThumbnail
* @return string $thumbnailUrl
*/
protected function resolveHelpMessageThumbnail($nodeTypeName, $configurationThumbnail)
Expand Down
4 changes: 2 additions & 2 deletions Neos.Diff/Classes/SequenceMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public function getGroupedOpcodes($context = 3)
];
}

if (!empty($group) && !(count($group) == 1 && $group[0][0] == 'equal')) {
if (!(count($group) == 1 && $group[0][0] == 'equal')) {
$groups[] = $group;
}

Expand Down Expand Up @@ -640,7 +640,7 @@ private function ratioReduce($sum, array $triple)
* Quickly return an upper bound ratio for the similarity of the strings.
* This is quicker to compute than Ratio().
*
* @return float The calculated ratio.
* @return float|null The calculated ratio.
* @todo throw away or make public
*/
private function quickRatio()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected static function resolveRelativePath(string $filePattern, ?string $file
*/
protected static function parseGlobPatternAndResolveFiles(string $filePattern, string $defaultFileNameEnd): array
{
$matches = [];
$matches = null;
$fileIteratorCreator = match (1) {
// We use the flag SKIP_DOTS, as it might not be allowed to access `..` and we only are interested in files
// We use the flag UNIX_PATHS, so that stream wrapper paths are always valid on windows https://github.com/neos/neos-development-collection/issues/4358
Expand Down
1 change: 1 addition & 0 deletions Neos.Fusion/Classes/Core/RuntimeConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function forPath(string $fusionPath): array

// Build configuration for the remaining path parts
$remainingPath = substr($fusionPath, $pathUntilNow === '' ? 0 : strlen($pathUntilNow) + 1);
/** @var non-empty-list<string> $pathParts */
$pathParts = explode('/', $remainingPath);
foreach ($pathParts as $pathPart) {
if ($pathUntilNow === '') {
Expand Down
6 changes: 6 additions & 0 deletions Neos.Fusion/Classes/FusionObjects/Helpers/FusionPathProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function __construct(TemplateImplementation $templateImplementation, $pat
* @param string $offset
* @return boolean
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->partialFusionTree[$offset]);
Expand All @@ -88,6 +89,7 @@ public function offsetExists($offset)
* @param string $offset
* @return mixed|FusionPathProxy
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!isset($this->partialFusionTree[$offset])) {
Expand All @@ -109,6 +111,7 @@ public function offsetGet($offset)
* @param mixed $value
* @throws UnsupportedProxyMethodException
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new UnsupportedProxyMethodException('Setting a property of a path proxy not supported. (tried to set: ' . $this->path . ' -- ' . $offset . ')', 1372667221);
Expand All @@ -120,6 +123,7 @@ public function offsetSet($offset, $value)
* @param string $offset
* @throws UnsupportedProxyMethodException
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
throw new UnsupportedProxyMethodException('Unsetting a property of a path proxy not supported. (tried to unset: ' . $this->path . ' -- ' . $offset . ')', 1372667331);
Expand Down Expand Up @@ -152,6 +156,7 @@ public function objectAccess()
*
* @return \ArrayIterator
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
$evaluatedArray = [];
Expand All @@ -172,6 +177,7 @@ public function getIterator()
/**
* @return integer
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->partialFusionTree);
Expand Down
4 changes: 2 additions & 2 deletions Neos.Fusion/Classes/FusionObjects/Helpers/LazyProps.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ public function offsetGet($path): mixed

public function offsetSet($path, $value): void
{
throw new BadMethodCallException('Lazy props can not be set.', 1588182804);
throw new \BadMethodCallException('Lazy props can not be set.', 1588182804);
}

public function offsetUnset($path): void
{
throw new BadMethodCallException('Lazy props can not be unset.', 1588182805);
throw new \BadMethodCallException('Lazy props can not be unset.', 1588182805);
}

public function current(): mixed
Expand Down
1 change: 1 addition & 0 deletions Neos.Fusion/Classes/Service/DebugStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function dump()
$this->flush();
$output = '';
foreach ($data as $debugMessage) {
/** @phpstan-ignore-next-line var_dump is not properly autoloaded */
$output .= \Neos\Flow\var_dump($debugMessage->getData(), $debugMessage->getTitle(), true, $debugMessage->isPlaintext());
}
return $output;
Expand Down
2 changes: 1 addition & 1 deletion Neos.Media.Browser/Classes/Controller/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function indexAction($view = null, $sortBy = null, $sortDirection = null,

$allCollectionsCount = $this->assetRepository->countAll();
$allCount = ($activeAssetCollection ? $this->assetRepository->countByAssetCollection($activeAssetCollection) : $allCollectionsCount);
$searchResultCount = isset($assetProxies) ? $assetProxies->count() : 0;
$searchResultCount = $assetProxies->count();
$untaggedCount = ($assetProxyRepository instanceof SupportsTaggingInterface ? $assetProxyRepository->countUntagged() : 0);
} catch (AssetSourceConnectionExceptionInterface $e) {
$this->view->assign('connectionError', $e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function current(): ?AssetProxyInterface
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->flowPersistenceQueryResult->next();
Expand All @@ -108,6 +109,7 @@ public function next()
/**
* @return AssetProxyInterface|null
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->flowPersistenceQueryResult->key();
Expand All @@ -116,6 +118,7 @@ public function key()
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
return $this->flowPersistenceQueryResult->valid();
Expand All @@ -134,6 +137,7 @@ public function rewind()
* @param mixed $offset
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->flowPersistenceQueryResult->offsetExists($offset);
Expand All @@ -143,6 +147,7 @@ public function offsetExists($offset)
* @param mixed $offset
* @return AssetProxyInterface|mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset): ?AssetProxyInterface
{
return new NeosAssetProxy($this->flowPersistenceQueryResult->offsetGet($offset), $this->assetSource);
Expand All @@ -152,6 +157,7 @@ public function offsetGet($offset): ?AssetProxyInterface
* @param mixed $offset
* @param mixed $value
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new \RuntimeException('Unsupported operation: ' . __METHOD__, 1510060444);
Expand All @@ -160,6 +166,7 @@ public function offsetSet($offset, $value)
/**
* @param mixed $offset
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
throw new \RuntimeException('Unsupported operation: ' . __METHOD__, 1510060467);
Expand Down
2 changes: 1 addition & 1 deletion Neos.Media/Classes/Domain/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public function replaceAssetResource(AssetInterface $asset, PersistentResource $
}
}

if ($redirectHandlerEnabled) {
if ($redirectHandlerEnabled && class_exists(RedirectStorageInterface::class)) {
/** @var RedirectStorageInterface $redirectStorage */
$redirectStorage = $this->objectManager->get(RedirectStorageInterface::class);
foreach ($uriMapping as $originalUri => $newUri) {
Expand Down
3 changes: 3 additions & 0 deletions Neos.Media/Classes/Imagine/Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use Imagine\Image\Point;
use Imagine\Image\PointInterface;

/**
* @phpstan-consistent-constructor
*/
class Box implements BoxInterface
{
/**
Expand Down
1 change: 1 addition & 0 deletions Neos.Media/Classes/TypeConverter/ArrayConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,6 @@ public function convertFrom($source, $targetType, array $convertedChildPropertie
'assetCollections' => $convertedChildProperties['assetCollections']
];
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class KickstartCommandController extends CommandController
*
* @param string $packageKey The packageKey for your site
* @param string $siteName The siteName of your site
* @return string
*/
public function siteCommand($packageKey, $siteName)
{
Expand Down

0 comments on commit d45e946

Please sign in to comment.