6.1.4 (2020-03-03)

Overview of merged pull requests

BUGFIX: Fix usage of SubContexts in ProxyClassLoader

Previously there were three different implementations of the composition of a temporary directory path name. The one in ProxyClassLoader didn’t use SubContexts correctly. This change unifies all implementations to a central static method composeTemporaryDirectoryName().

Previous error message: ` include(): Failed opening '/var/www/myproject/Data//Temporary/Development/Local/AvailableProxyClasses.php' for inclusion (include_path='.:/usr/share/php') `

  • Packages: Flow

BUGFIX: EntityPrivilege fails on empty IN condition

What I did Fixed the behavior of the \Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\EntityPrivilege if you execute an in operation on an empty array.

How to verify it `yaml matcher: 'isType("Neos\\Neos\\Domain\\Model\\Site") && !property("nodeName").in("context.userInformationContext.siteNodeNames")' `

If getSiteNodeNames() evaluates to [] which is possible and valid, the PropertyGenerator tries to to getParameter() on this value which can only be applied to scalar values.

This is caused by only checking on an exact null, but an empty array should also be ignored.

Rebased follow-up to #1681

  • Packages: Flow

BUGFIX: Avoid exception in findIdentifiersByTag()

When substr($metaData, 0, -self::EXPIRYTIME_LENGTH)`on `$metadata in the cache FileBackend.findIdentifiersByTag() method fails, false is passed to explode() causing:

Exception in line 253 of /…/FileBackend.php: explode() expects parameter 2 to be string, boolean given

This fixes that by casting the result to a string.

  • Packages: Cache

BUGFIX: Fix output of request and response in throwable storage

Fixed the checking for valid request and response objects. Remove superflous configuration of throwablestorage in Scripts::initializeExceptionStorage

  • Packages: Flow

BUGFIX: Browser correctly builds uploaded files from form

Backport of #1917 Fixes #1916

  • Packages: Flow

BUGFIX: Uploaded file upcasting with multiple files

When uploading multiple files (i.e. in an array), the existing files (persisted resource) would be dropped.

By modifying the $currentPath value, Flow built a wrong path: The first file would be fine - f.e. path “files.0”, but the second one will fail due to the path being “files.0.1” instead of “files.1”.

fixes #1857

  • Packages: Flow

BUGFIX: Flush classSchemataRuntimeCache before saving production data

Currently the method saveProductionData() from the ReflectionService writes to both caches reflectionDataRuntimeCache and classSchemataRuntimeCache but flushes only the former first.

Additionally the hasFrozenCacheInProduction() method only checks the first cache.

This allows a race condition where the classSchemataRuntimeCache is built and frozen but reflectionDataRuntimeCache isn’t.

This change ensures the classSchemataRuntimeCache is also flushed.

Error message:

` Exception #1323344192 in line 68 of /var/www/Packages/Libraries/neos/cache/Classes/Frontend/VariableFrontend.php: Cannot add or modify cache entry because the backend of cache "Flow_Reflection_RuntimeClassSchemata" is frozen. `

  • Packages: Flow

BUGFIX: Resolve SqlLogger when it is a dependency proxy

The SqlLogger did not log anything since Flow 6.0 due to a instanceof check, when it was a dependency proxy. This change resolves the dependency.

Resolves #1854

  • Packages: Cache Flow

BUGFIX: Prevent connection error when calling getIterator for PdoBackend

What I did

Call connect in rewind method to make sure that a connection exists.

  • Packages: Cache Flow

BUGFIX: Parse single-line docblock comments correctly

Fixes #1900

<!– Thanks for your contribution, we appreciate it!

Please read through our pull request guidelines, there are some interesting things there: https://discuss.neos.io/t/creating-a-pull-request/506

And one more thing… Don’t forget about the tests! –>

What I did Single line docblocks would break AOP compilation because the end-comment string */ would be interpreted as part of the comment.

How I did it The end-comment string */ is now removed from all lines before parsing them. This means that the previous check for the end of the comment if ($line === ‘*/)` no longer works but as far as I could determine this explicit check is not actually needed.

How to verify it There are tests

Checklist

  • Packages: Flow

BUGFIX: Correctly reflect type of aliased classes in method typehints

The namespace change introduced with doctrine/persistence 1.3.x makes use of class_alias to create a b/c layer over the old class names (see https://github.com/greg0ire/type_deprecation_experiment). However, this broke for a couple of our depending packages that still used the old Doctrine\Common\Persistence\ObjectMananger class as a method typehint. The reason is, that PHP Reflection returns different values for aliased method parameter types when using ReflectionParameter::getClass()->getName() vs. ReflectionParameter::getType()->getName(). The former returns the name of the actual class, instead of the alias, while the latter returns the actual name that was used in the typehint, regardless if it is an alias only.

In turn, this led our dependency injection to try to inject classes that it was not aware of and led to issues like https://github.com/yeebase/Yeebase.TwoFactorAuthentication/issues/3 or https://github.com/neos/Neos.EventSourcing/issues/249 It was not an issue for injections that were not typehinted via PHP, e.g. @Flow\Inject instead of setter/constructor injection.

This change fixes that retrospectively, by always reflecting the actual class name that is specified in the typehint and hence allowing usage of class_alias.

Thanks a lot @alcaeus for helping me figure this out!

  • Packages: Flow

Apply fixes from StyleCI

This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

For more information, click [here](https://github.styleci.io/analyses/1bbDR1).

  • Packages: Flow