Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: neos/flow-development-collection
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 22cc90919633c86ae53b8467df9f2dc761693d0f
Choose a base ref
..
head repository: neos/flow-development-collection
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 100c5f3789432cbb0f9f6c30314e91383104b240
Choose a head ref
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -120,8 +120,6 @@ jobs:
git -C ../${{ env.FLOW_FOLDER }} checkout -b build
composer config repositories.flow '{ "type": "path", "url": "../${{ env.FLOW_FOLDER }}", "options": { "symlink": false } }'
composer require --no-update neos/flow-development-collection:"dev-build as ${{ env.FLOW_BRANCH_ALIAS }}"
# todo remove temporary hack ;) (sorry - if i forget)
composer require --no-update --dev "phpstan/phpstan:^1.10.0"
- name: Cache Composer packages
id: composer-cache
6 changes: 3 additions & 3 deletions Neos.Eel/Classes/CompilingEvaluator.php
Original file line number Diff line number Diff line change
@@ -97,15 +97,15 @@ protected function evaluateAndUnwrap(\closure $expressionFunction, Context $cont
*/
protected function generateEvaluatorCode($expression)
{
/** @phpstan-ignore-next-line */
/** @phpstan-ignore-next-line `CompilingEelParser` has been explicitly excluded from analysis, because it contains generated code that is impossible to fix */
$parser = new CompilingEelParser($expression);
$result = $parser->match_Expression();

if ($result === false) {
throw new ParserException(sprintf('Expression "%s" could not be parsed.', $expression), 1344513194);
/** @phpstan-ignore-next-line */
/** @phpstan-ignore-next-line $parser->pos appears to be undeclared, because instantiation of $parser is hidden as well */
} elseif ($parser->pos !== strlen($expression)) {
/** @phpstan-ignore-next-line */
/** @phpstan-ignore-next-line $parser->pos appears to be undeclared, because instantiation of $parser is hidden as well */
throw new ParserException(sprintf('Expression "%s" could not be parsed. Error starting at character %d: "%s".', $expression, $parser->pos, substr($expression, $parser->pos)), 1327682383);
} elseif (!array_key_exists('code', $result)) {
throw new ParserException(sprintf('Parser error, no code in result %s ', json_encode($result)), 1334491498);
7 changes: 5 additions & 2 deletions Neos.Eel/Classes/InterpretedEvaluator.php
Original file line number Diff line number Diff line change
@@ -35,9 +35,12 @@ public function evaluate($expression, Context $context)

if ($res === false) {
throw new ParserException(sprintf('Expression "%s" could not be parsed.', $expression), 1344514198);
/** @phpstan-ignore-next-line */
/**
* @phpstan-ignore-next-line $parser->pos appears to be undeclared, because it is declared up in the parent class chain of `InterpretedEelParser`,
* wherein multiple classes (e.g. `EelParser` and `AbstractEelParser`) are explicitly excluded from analysis, because they contain generated code that is impossible to fix
*/
} elseif ($parser->pos !== strlen($expression)) {
/** @phpstan-ignore-next-line */
/** @phpstan-ignore-next-line $parser->pos appears to be undeclared see comment above. */
throw new ParserException(sprintf('Expression "%s" could not be parsed. Error starting at character %d: "%s".', $expression, $parser->pos, substr($expression, $parser->pos)), 1344514188);
} elseif (!array_key_exists('val', $res)) {
throw new ParserException(sprintf('Parser error, no val in result %s ', json_encode($res)), 1344514204);
4 changes: 2 additions & 2 deletions Neos.Flow/Classes/Aop/Advice/AdviceChain.php
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
* source code.
*/
use Neos\Flow\Aop\JoinPointInterface;
use Neos\Flow\Aop\ProxyInterface;
use Neos\Flow\Aop\ProxyInterface as InternalAopProxyInterface;

/**
* The advice chain holds a number of subsequent advices that
@@ -57,7 +57,7 @@ public function proceed(JoinPointInterface &$joinPoint)
if ($this->adviceIndex < count($this->advices)) {
$result = $this->advices[$this->adviceIndex]->invoke($joinPoint);
} else {
/** @var ProxyInterface $proxy */
/** @var InternalAopProxyInterface $proxy */
$proxy = $joinPoint->getProxy();
$result = $proxy->Flow_Aop_Proxy_invokeJoinpoint($joinPoint);
}
4 changes: 2 additions & 2 deletions Neos.Flow/Classes/Command/ResourceCommandController.php
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ public function cleanCommand()
foreach ($brokenResources as $key => $resourceIdentifier) {
$resource = $this->resourceRepository->findByIdentifier($resourceIdentifier);
$brokenResources[$key] = $resource;
if ($mediaPackagePresent && class_exists(AssetRepository::class) && class_exists(ThumbnailRepository::class)) {
if ($mediaPackagePresent && $assetRepository !== null && $thumbnailRepository !== null) {
$assets = $assetRepository->findByResource($resource);
if ($assets !== null) {
$relatedAssets[$resource] = $assets;
@@ -293,7 +293,7 @@ public function cleanCommand()
]);
$resource->disableLifecycleEvents();
$this->resourceRepository->remove($resource);
if ($mediaPackagePresent && class_exists(AssetRepository::class) && class_exists(ThumbnailRepository::class)) {
if ($mediaPackagePresent && $assetRepository !== null && $thumbnailRepository !== null) {
if (isset($relatedAssets[$resource])) {
foreach ($relatedAssets[$resource] as $asset) {
$assetRepository->removeWithoutUsageChecks($asset);
4 changes: 2 additions & 2 deletions Neos.Flow/Classes/I18n/Xliff/Service/XliffReader.php
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public function readFiles($sourcePath, callable $iterator)
$reader->open($sourcePath);
$reader->read();

/** @phpstan-ignore-next-line https://github.com/phpstan/phpstan/issues/8629 */
/** @phpstan-ignore-next-line the stubs for XMLReader are wrong https://github.com/phpstan/phpstan/issues/8629 */
if ($reader->nodeType == \XMLReader::ELEMENT && $reader->name === 'xliff') {
$version = $reader->getAttribute('version');
$result = true;
@@ -67,7 +67,7 @@ public function readFiles($sourcePath, callable $iterator)
*/
protected function isFileNode(\XMLReader $reader)
{
/** @phpstan-ignore-next-line https://github.com/phpstan/phpstan/issues/8629 */
/** @phpstan-ignore-next-line the stubs for XMLReader are wrong https://github.com/phpstan/phpstan/issues/8629 */
return $reader->nodeType === \XMLReader::ELEMENT && $reader->name === 'file';
}
}
1 change: 0 additions & 1 deletion Neos.Flow/Classes/Log/ThrowableStorage/FileStorage.php
Original file line number Diff line number Diff line change
@@ -267,7 +267,6 @@ protected function cleanupThrowableDumps(): void
$cutoffTime = time() - $this->maximumThrowableDumpAge;

$iterator = new \DirectoryIterator($this->storagePath);
/** @var \DirectoryIterator $directoryEntry */
foreach ($iterator as $directoryEntry) {
if ($directoryEntry->isFile() && $directoryEntry->getCTime() < $cutoffTime) {
unlink($directoryEntry->getRealPath());
3 changes: 2 additions & 1 deletion Neos.FluidAdaptor/Classes/Core/Cache/CacheAdaptor.php
Original file line number Diff line number Diff line change
@@ -61,14 +61,15 @@ public function set($name, $value)
* the entire cache if no entry is provided.
*
* @param string|null $name
* @return bool|void
* @return bool|null
*/
public function flush($name = null)
{
if ($name !== null) {
return $this->flowCache->remove($name);
} else {
$this->flowCache->flush();
return null;
}
}

1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ parameters:
excludePaths:
analyse:
- Neos.Flow/.phpstorm.meta.php
# The parsers are autogenerated / extending autogenerated code and not analysable
- Neos.Eel/Classes/FlowQuery/FizzleParser.php
- Neos.Eel/Classes/AbstractParser.php
- Neos.Eel/Classes/EelParser.php