4.2.0 (2017-08-30)

Overview of merged pull requests

TASK: Final release related adjustments for 4.2

  • Packages: Eel Flow FluidAdaptor Kickstarter

TASK: Improve readability of Role identifier pattern

This also removes the unused check for simple role name notation.

  • Packages: Flow

BUGFIX: Make CLI subprocesses work on Windows

On Windows, the PHP_BINDIR constant will resolve to “C:\php” no matter what the actual php directory is, because this constant is decided at compile time. However, the PHP_BINARY constant will resolve to the current executable that runs the script at runtime, which at least for CLI will be the PHP executable.

This is a backport of #1010

FEATURE: Allow for dynamic label overrides

This replaces the previous physical file model with the file model defined by the XLIFF standard.

Files IDs are no longer defined by their location in the file system but by their _product-name_ and _orginal_ XLIFF attributes. The location serves as a fallback to prevent this from being a breaking change.

The XLIFF file provider therefore parses all registered packages and in addition the Data/Translations folder in search of file entries in .xlf files. The translation file monitor is now also registered for said Data/Translations folder to enable automatic cache clearing.

In preparation for support of XLIFF version 2, the XLIFF parser has been created in a v12 namespace and the class for holding the file data is modeled as an adapter that should be able to handle both formats.

Overriding labels is now be as easy as putting a valid XLIFF file with defined _product-name_ (Package) and _orginal_ (Source) in any translation folder.

I targeted Flow 4.1 since this is a breaking change for Neos, which before used the non-API XLIFF parser directly which is no longer available.

Update: Re-Added old XLIFF parser for backwards compatibility and flagged it as deprecated. We could now also target 4.0 if we wanted to

  • Packages: Flow

BUGFIX: Avoid a syntax error from hiding the intended error message

The error code for the Package Manager error on duplicate packages was a millisecond timestamp. Since this is larger than MAX_INT PHP parses this as float, which in turn is not accepted as parameter for an exception code.

TASK: Add PSR-7 compatibility to HTTP stack

This adds all missing methods and implementations to make our HTTP implementation PSR-7 compatible.

Further adjustments to Flow are not included yet.

  • Packages: Cache Flow

BUGFIX: Add password option to RedisBackend

This adds the (already documented) password option to the RedisBackend class.

TASK: Error Message accepts null as message title

Also, this allow the code of the message to be null in getCode(), since that is the more sane behaviour from an API point of view.

Fixes neos/neos-development-collection#1666

  • Packages: Messages

FEATURE: Add Date.formatCldr helper

This change adds CLDR formatting capability to the Date Eel helper, to match the functionality of the format.date Fluid ViewHelper.

P.S. This PR has taken over from https://github.com/neos/flow-development-collection/pull/920 All the history can be found the. The original code was written by @litovchenko1, I (@zaveryukha) have added the unit tests.

  • Packages: Eel

BUGFIX: Catch ConnectionExceptions in `PersistenceManager::persistAll()`

This adds a try/catch block around the $connection->ping() call that throws an exception if no database credentials are configured (which is the case when you do a fresh install of Flow or Neos).

Fixes: #1663

BUGFIX: Avoid type error with Message->getCode()

The getCode() method declares int as return type, but it can happen that the internal code is null, leading to a type error.

This adjusts the code so the internal code is always an integer.

  • Packages: Messages

TASK: Catch exceptions separately for published resource collections

Implement a separate try/catch blog for each collection so as many collections as possible get published. Fixes could then be done for just the broken collection without running the full command once again.

Extends the Issue: Catch errors while publishing invalid resources #958 (Error Handing for each Resource needs to be done in each Target Class. The native Flow Target Classes already take care about continuing to publish resources)

  • Packages: Flow

TASK: Remove use of func_get_args() in PropertyMappingConfiguration methods

This changes allowProperties(), skipProperties() and allowAllPropertiesExcept() to declare a string-typed $propertyNames argument instead of using func_get_args().

  • Packages: Flow

BUGFIX: Fix TypeError in RedisBackendTest

Some tests failed with

Return value of Neos\Cache\Backend\RedisBackend::isFrozen() must be of the type boolean, null returned

after the introduction of return type declarations.

  • Packages: Cache

TASK: Remove a “risky test” warning

A data provider named testSomething() is seen as a test, leading to a warning about a test not doing any assertions.

Don’t do that.

  • Packages: FluidAdaptor ObjectHandling

BUGFIX: Allow array and object literals to be padded with whitespace in Eel

This change allows expressions like:

{ foo: “bar”, bar: “baz” }

or

{
foo: “bar”, bar: “baz”

}

to be parsed correctly in EEL

The change extends the EEL PEG grammar (in Eel.peg.inc) to be tolerant towards whitespace (as well as line wraps) in object and array literals.

This fixes #986

FEATURE: Introduce ``ObjectAccess::instantiate``

This static method allows instantiating a given class with and array of arguments in an efficient way.

Most of this method was previously hidden in the ObjectManager of Flow but as the same code is replicated in other packages it makes sense to open it as generic method for re-use.

  • Packages: ObjectHandling

BUGFIX: Fix RoutingTests

The functional tests for the Router haven’t been adjusted to the Package renaming TYPO3.Flow => Neos.Flow.

  • Packages: Flow

TASK: Skip symlink tests on windows when symlinking fails

On windows it is not unlikely that symlinking does not work due to missing access rights. In that case a lot of the Files tests fail without any helpful notice and eventually lead to the developer ignoring the failures, possibly overlooking real failures.

This change makes such symlink failures on Windows skip the test instead.

  • Packages: Eel Files

BUGFIX: PersistenceManager correctly checks and reattempts lost connections

This change replaces the previously put in place try/catch attempt at handling lost connections with a proper explicit call to the doctrine connection’s ping() method. As a side-effect, this will no longer trigger the AllObjectsPersisted signal if flushing fails, however this is not really breaking, since in those circumstances, the application is supposed to not do any further work anyway.

Fixes #870

This is a follow-up to #921 - see discussion there.

FEATURE: Add Eel String helper pregMatchAll

This pull request add the Eel String helper String.pregMatchAll

  • Packages: Eel

FEATURE: Allow Nullable action params to be annotated

This change allows action arguments to be annotated “|null” or “null|” when they are optional with default value null. Before the type conversion would fail because no matching type converter would be found.

Resolves #927

  • Packages: ObjectHandling

TASK: Output a single link to the exception file in CLI

This change hide the “Open Data/Logs/Exceptions/20170617104058ccd0f5.txt for a full stack trace.” link for the nexted exceptions.

  • Packages: Flow

BUGFIX: ObjectAccess should care for properties set to NULL

By using array_key_exists() instead of isset(), properties set to null will be detected as existing.

  • Packages: ObjectHandling

BUGFIX: Annotate logoutAction with SkipCsrfProtection

Sometimes (especially in Neos) on logout the CSRF token is missing (CsrfTokenMissing interceptor). No harm in ignoring it here.

FEATURE: Add `range` method to Eel Array-helper

The range method is a wrapper around the php range function that creates a sequence of integers or characters as array. This is especially helpful to create paginations in pure fusion.

  • Packages: Eel

BUGFIX: Make CLI subprocesses work on Windows

On Windows, the PHP_BINDIR constant will resolve to “C:\php” no matter what the actual php directory is, because this constant is decided at compile time. However, the PHP_BINARY constant will resolve to the current executable that runs the script at runtime, which at least for CLI will be the PHP executable.

  • Packages: Flow

BUGFIX: Integer argumentName should not result in an exception

This prevents an exception in case an argument name is evaluated to another simple type (integer) but can be converted to string easily.

Fixes: #612

FEATURE: Allow setting the package type when kickstarting a package

You can now do ./flow kickstart:package Foo.Bar –packageType neos-plugin, like in the PackageCommandController.

A question regarding the docs: Is the “Command Reference” part of the documentation autogenerated? If so, it seems to be outdated, because there are still some mentions of typo3 in there.

  • Packages: Kickstarter

BUGFIX: Keep format for URIs built in subrequests

Adds handling for the @format argument when merging arguments from the request hierarchy to keep the format when building URIs from a sub request.

Fixes neos/neos-development-collection#1596

BUGFIX: FileSystemTargetTest shouldn’t create package stub

The FileSystemTargetTest was fixed earlier to no longer create a stub of a package during test runs in the real filesystem see PR #966.)

The test still created a stub package, because the FileSystemTarget was told to publish to a vfs location - but that option is only used if initializeObject() is called, which in unit tests does not happen automagically.

BUGFIX: Add missing `PackageException` use statement

Otherwise an undefined Exception is thrown.

  • Packages: Flow

BUGFIX: Add handling of HTTP HEAD-request with curl

Extended CurlEngine for request-type HEAD to set the option to not expect a body.

resolves #992

TASK: Better message on missing runtime expression

This improves the error message on missing AOP runtime expressions just a little.

TASK: Add missing documentation for trait introduction

Trait introduction is available since some time, but it was never documented. This change adds a short explanation with a code example to fix that.

TASK: Throw error if package exists two times

Without this change a package (defined by composer name eg. “neos/party”) that exists two times in the installation would be silently ignored and added with the second path found. This could still result in strange effects happening as autoload and Flow internal paths (configuration, resources) could diverge.

With this change an exception is thrown when the package states are resolved and a package is found a second time.

Fixes: #611

BUGFIX: Trait AOP works when only introduces traits to class

When introducing a trait using AOP it now works if the class only has traits introduced via AOP.

BUGFIX: Check for link in unpublishFile()

unpublishFile() in the FileSystemTarget does not remove symlinks correctly, thus the method is adjusted in the FileSystemSymlinkTarget to check using is_link() instead of file_exists().

Fixes #972

TASK: Add a distinct exception for existing, but invalid composer manifests

Since I just ran into that one and it took me a while to figure out why Flow was throwing a “Composer Manifest does not contain a “name” field”, I added a distinct exception for the case when a composer manifest does exist, but cannot be parsed from JSON.

  • Packages: Flow

TASK: Remove TYPO3 and TypoScript uses from code

Changes some package names used in a test and a comment in a class to no longer mention TYPO3, TypoScript or TYPO3CR.

  • Packages: Flow

FEATURE: ViewHelper compilation for increased speed

Adds compilation and static rendering to a couple of ViewHelpers that were either easy to change or used quite a lot. The modified ViewHelpers should all render faster in all scenarios.

  • Packages: FluidAdaptor

BUGFIX: Fix `doctrine:migrationstatus` command

This fixes a regression introduced with #857 that made the doctrine:migrationstatus CLI command fail with a PHP notice if the –show-migrations flag was used.

Fixes: #976

  • Packages: Flow

TASK: Ignore invalid cookie names instead of throwing an exception

This prevents the exception that is thrown when a cookie has an invalid name.

See the discussion here: https://discuss.neos.io/t/ignore-invalid-cookies-instead-of-throwing-an-exception/2234

TASK: Improve documentation on Configuration and Installation

Have Add a note to chapter «Installation» and change the sequence in chaper «Configuration» for better usable/find the context-part, not to skip because of note I moved this to the end and add more subtitle about context for better SERP-Result.

More Details about the reason in slack-channel «guilde-documentation»

(Second try: Sorry)

  • Packages: Flow

BUGFIX: FileSystemTargetTest shouldn’t have side effects

The test would create a Flow package in the current installation as the package manager in the test was not prepared with a virtual filesystem.

TASK: Adjust schema of routes configuration

Previously the route parts were evaluated correct regardless of the configured keys because the schema used the configuration additionalAttributes = FALSE instead of additionalProperties = FALSE. This is fixed and the schema is updated

  • validate the keys in route parts strictly
  • allow configuration of objectType and uriPattern ` instead of `handler
  • allow options and toLowerCase for all routeParts
  • [x] Code follows the PSR-2 coding style
  • [ ] Tests have been created, run and adjusted as needed
  • [x] The PR is created against the [lowest maintained branch](https://www.neos.io/features/release-roadmap.html)

BUGFIX: ConfigurationManager should never have empty configuration

Custom configuration types of processing type settings could break the compile process as the array wouldn’t have the custom configuration name as key set because it was never initialized in this processing type.

This change initializes any configuration type with an empty array in the beginning and provides a test to proof the behavior.

Fixes: #934

  • Packages: Flow

TASK: Fix error message to correctly refer to composer.json

This misleading message was introduced in a0a1453d87053e2c17b954804c61c5c03fa00c89 due to too much javascript work being done.

TASK: #899 Make Fizzle filter nested object properties

What I did Implements #899. I extended the FlowQuery grammar to filter nested object properties.

How I did it
It was not possible to just extend the Identifier rule in AbstractParser.peg.inc since that led to a lot of regressions in the Eel parser. Thus, a new rule PropertyPath was necessary.

How to verify it Unit-Tests in Neos.Eel run successfully.

  • Packages: Eel Flow