Skip to content

Latest commit

 

History

History
634 lines (401 loc) · 32.1 KB

File metadata and controls

634 lines (401 loc) · 32.1 KB

Overview of merged pull requests

This change correctly maps DateTimeImmutable property types with doctrine.

Depends on #1442

Implemented map, reduce, filter, some and every according to the JavaScript specs as functional Eel helpers in ArrayHelper.

  • Packages: Eel Flow

Previously Flow sessions were stored like any other cache. Thus they were deleted whenever the cache was flushed. This lead to users being logged out after deployments if not taken special care. From now on sessions are stored in a persistent cache by default so that authentication status and other sessions related information is not lost when flushing caches. This is a breaking change because session data is stored using PHPs serialize function that could break if the underlying object implementation changed.

In those cases, the sessions can be deleted manually using

` ./flow flow:session:destroyAll`

  • Packages: Flow

A duplicate declaration of FLOW_VERSION_BRANCH slipped in while upmerging from 4.3

  • Packages: Flow FluidAdaptor ObjectHandling

Currently, a type string of DateTimeImmutable will be parsed as DateTime. This, for example, leads to any entity properties annotated as @var DateTimeImmutable to be hydrated into a DateTime class instead.

Note that this is a hotfix at most, because the real issue is, that the regex does not check for a type ending character, like whitespace, line end or another non-word character. Therefore, it eagerly parses DateTimeImmutable by matching the DateTime prefix and taking that as the parsed type, which is wrong.

  • Packages: ObjectHandling

The format for converting from JSON encoded DateTime was wrong. The format doesn't use the \T separator, but a whitespace and as it seems, v is not a valid format specifier for DateTime::createFromFormat while it is for date().

http://php.net/manual/en/datetime.createfromformat.php > In most cases, the same letters as for the [date()](http://php.net/manual/en/function.date.php) can be used.

Also, this provides a test to actually verify the functionality. Related to #1415

  • Packages: Flow

This adds the missing template pre-processor to the Neos.FluidAdaptor RenderingContext. Actually, it is not missing but gets removed upon setting the template pre-processors.

Fixes #1449

  • Packages: FluidAdaptor

In multiple permutations, we tried to fix problems with cache identifier uniqueness in cache backends that are shared like apcu or memcache. In earlier days it included the PHP_SAPI and then in more recent times the context and root path. With the refactoring of caches, these two became the hardcoded applicationIdentifier which can be used by any backend to add more specificity to cache identifiers.

It turns out that the root path doesn't work well for some environments and can result in bugs when used with eg. the PdoBackend and a deployment that changes the root path (typical Surf or Deployer).

The only backward compatible way to fix this was to make the applicationIdentifier configurable with a default that matches the previously hardcoded values. That way nothing changes in existing installations but if the bug appears it can be easily fixed.

  • Packages: Flow

When a site (or Flow Application) is locked because it is currently being parsed, a note that the service is not available will be shown. The appearance and contents of this message can now be customized using the new environment variable FLOW_LOCKHOLDINGPAG`E that overrides the path (relative to the `FLOW_PATH_PACKAGES) to the page shown when the site is locked.

Example: `bash export FLOW_LOCKHOLDINGPAGE=Application/Acme.Foo/Resources/Private/CustomLockHoldingPage.html`

  • Packages: Flow

If LogEnvironment::fromMethodName was used in a closure the given methodName does not contain :: and the explode fails.

  • Packages: Flow

The PackageManager::createPackage method now can create packages into a possibly existing DistributionPackages directory "automagically", which then triggers a composer update. While this is a good idea to push the concept of distribution packages, it also breaks tests that clearly do not want to run composer update. This can be fixed by providing a defined package path.

Related #1433

  • Packages: Eel Flow FluidAdaptor Kickstarter

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

  • Packages: Flow

When no class schema can be found in loadMetaDataForClass, a Doctrine MappingException is now thrown. This makes our code work nicely with the change in doctrine/orm#7471 that otherwise leads to errors like this as of ORM 2.6.3:

` FlowAnnotationDriver.php: No class schema found for "some-non-mapped-class". 89 …\\FlowAnnotationDriver_Original::getClassSchema("some-non-mapped-class") 88 …\\FlowAnnotationDriver_Original::loadMetadataForClass("some-non-mapped-class", Neos\\Flow\\Persistence\\Doctrine\\Mapping\\ClassMetadata)`

Fixes #1453

  • Packages: Flow

A new method has been added to the Flow Security\Context that allows sessions to be removed for a specific Account, effectively logging out the corresponding user:

`php $someAccount = $this->accountRepository->findByAccountIdentifierAndAuthenticationProviderName($accountIdentifier, $authenticationProviderName); $reason = 'just for fun'; $this->securityContext->destroySessionsForAccount($someAccount, $reason);`

This method is automatically invoked whenever an account is deleted!

  • Packages: Flow

After switching from FileSystemSymlinkTarget to FileSystemTarget the symlinks are still present in the targetPath and therefore Flow tries to copy the stream content in the symlink (original file, same stream) which results in a 0-byte file.

We handle this issue by removing the symlinks if present.

  • Packages: Flow

Adds the functions chr(), ord(), sha1() and nl2br() to the StringHelper, all simple wrappers for the corresponding PHP functions.

  • Packages: Eel

This allows to set keys which are calculated at runtime in Eel. A possible use case for this is the Neos.Fusion:Reduce prototype that can be used for grouping with set.

  • Packages: Cache Eel Flow

Fix description for select method and return type an therefore tests for askAndValidate.

  • Packages: Flow

This fixes the instantiation and configuration of ThrowableStorage implementations and also fixes stack traces and HTTP request information in stored throwables.

This change is not breaking but as pre notice that in the next major the ThrowableStorageInterface will have an additional method that is currently commented and already used to instantiate throwable storages. If you implement the interface you must already implement that additional method despite it being not part of the interface. As the object configuration for throwable storage doesn't work without this change there cannot be a working alternative implementation yet, so this shouldn't break any project.

  • Packages: Flow

If the composer file has a local distribution folder identified by type path and a local folder reference in the url new packages are created in the distributionFolder and are required via composer require ... @dev.

  • Packages: Flow FluidAdaptor

The XSD file generator is now set to neos.io

Resolves: #1186

  • Packages: FluidAdaptor

Introduces two new interfaces WithSetupInterface and WithStatusInterface that can be implemented by cache backends to allow them to be set up / investigated via CLI.

For this the following commands have been added:

  • cache:list
  • cache:show
  • cache:setup
  • cache:setupall

Resolves: #1383

  • Packages: Cache

Allows implementing Exceptions that provide an HTTP status and/or a reference code for Flow exception handling without extending from the Flow base Exception implementation.

  • Packages: Flow

This contains a break up of the cross-dependency between AuthenticationProviderManager and Security context.

First, a new TokenAndProviderFactory (with an interface) is introduced to serve both the constructed tokens and providers from the configuration. Additionally the session persistent data was moved from the Context to the new SessionDataContainer (marked internal). This makes the context a simple singleton to the outside, avoiding duplication (security context injected before the session was started would create a duplicate instance without the session data (most notably some SQL security could have that).

Additionally, it fixes ONE_PER_REQUEST CSRF protection tokens which wouldn't correctly behave.

  • Packages: Flow

The abstract doctrine migration class changed, the generated classes used the deprecated abstract class.

The actual change is in https://github.com/neos/flow-development-collection/commit/`572d63a38198d35ef68a9e6e0a2473e55bd5006d <https://github.com/neos/flow-development-collection/commit/572d63a38198d35ef68a9e6e0a2473e55bd5006d>`_

Code cleanup is in https://github.com/neos/flow-development-collection/commit/`32420b7fe34d1801178f4e7a2722842b040b50bf <https://github.com/neos/flow-development-collection/commit/32420b7fe34d1801178f4e7a2722842b040b50bf>`_

  • Packages: Flow

This is a comprehensive refactoring of internal code, nothing should change on the outside.

Mostly reducing nested structures and complexity, breaking up larger methods and avoiding complicated structures.

  • Packages: Flow

At least when running unit tests for the MultiBackend the connect() call raises an error that circumvents exception handling and breaks correct execution.

  • Packages: Cache Flow

Nullable paramters (type prepended with ?) were introduced with PHP 7.1 see https://secure.php.net/manual/en/migration71.new-features.php#migration71.new-features.nullable-types

We need to support a syntax like functionName(?string $param). Without this fix, this function will get extended as functionName(string $param), which is incompatible.

Starting with PHP 7.1 functionName(string $param = null) can also be written as functionName(?string $param = null) (but not as ~~`functionName(?string $param)`~~).

For the upmerge with Flow >= 5.0, the PHP version check in line 275 can be removed since at least PHP 7.1 is required there.

  • Packages: Flow

This removes Readme.rst and Upgrading.rst from the "installer essentials" in Neos.Flow. The information contained here is available in the documentation and/or redundant.

Removing them "frees" those files up for use by developers, no longer overriding those files in the project root.

Fixes neos/neos-development-collection#1856

  • Packages: Flow
  • Packages: Flow FluidAdaptor
  • Packages: Flow FluidAdaptor

This change adds support for converting values that are received from serializing a DateTimeInterface object with json_serialize. If the source array contains a property 'timezone_type' the source date string is assumed to be in the internal serialization format, which is "Y-m-d\TH:i:s.v" without timezone information, since the timezone is provided in the additional 'timezone' property.

Related to neos/Neos.EventSourcing#181

  • Packages: Flow

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

  • Packages: Cache Eel Flow FluidAdaptor
  • Packages: Flow

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

  • Packages: Cache Files Flow FluidAdaptor Kickstarter ObjectHandling Schema Unicode

Enriches log messages of severity > debug with log environment.

  • Packages: Flow

Removes settings injection when the settings are actually not used and keep the only necessary subset of settings and not all of it.

  • Packages: Flow

Update to support 'dialog' method used in HTML5 <dialog> element eg. <form method="dialog" ...>

[See form submission point 20.](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-2)

  • Packages: FluidAdaptor

Bugfix because it is possible to configure a maxlength in the form framework, but this leads to an exception. I didn't realize there was no maxlength when I put it in form framework and the reviewers didn't notice either, so now it is required to have it in the viewhelper.

maxlength in textarea is possible since html5 and is supported by all major browsers including IE since 10 ;)

Checklist

This adds support for the maxlength property to TextArea.

Related to neos/form#87

  • Packages: FluidAdaptor

Resolves: #1409

Checklist

This adds a new named constructor fromContents() to the ContentStream class making it easier to instantiate it from a given string.

  • Packages: Flow

This utility can be used to easily add the logging environment to log messages using the PSR compatible logger.

Example:

` $logger->debug('Running sub process loop.', LogEnvironment::fromMethodName(__METHOD__));`

  • Packages: Flow

Both are just consequences of already existing deprecations and were overseen when the rest was deprecated. They should be removed with the rest of the legacy logging in the next major.

  • Packages: Flow

This should increase performance in cases version output is configured (which is the default) as that requires accessing the composer.lock file and parsing for the respective version.

  • Packages: Flow

Fixes: #1397

Updates the requirements on [symfony/dom-crawler](https://github.com/symfony/dom-crawler) to permit the latest version.

  • Packages: Flow

Instead of requiring the bootstrap class file and then requiring Composer autoloader in the Bootstrap constructor, we can require the autoloader early in the two entry scripts.

This makes it possible to set FLOW_CONTEXT through .env files e.g with packages like helhum/dotenv-connector

  • Packages: Flow

Fixes an issue where running doctrine:migrationgenerate would never move the migration-file to the selected package. After doctrine:migrationgenerate has generated a migration, it asks whether the migration-file should be moved to a specific package. No matter what you choose, it would assume you chose "Don't Move".

Also fixes two related issues in the ConsoleOutput's select method: - Wrong typehint on $default, breaking the default answer functionality - Wrong phpdoc typehint on $attempts, as it is an integer, not a boolean.

I added a testcase and modified a couple of other testcases for the ConsoleOutput as well.

  • Packages: Flow

The Object Management chapter contained two examples of the former Classes file structure, that included VendorName and PackageName. * Packages: Flow

This commit amends the implementation for the ^=, $= and *= fizzle operators by checking if the given property is an array and if so, checking whether the filter matches in the following way:

  • *= matches if the array contains an item that matches the filter string exactly.
  • ^= matches if the array's first item matches the filter string exactly.
  • $= matches if the array's last item matches the filter string exactly.

If the given property is not an array the filter operations behave the same way as before.

  • Packages: Eel Flow

In PropertyMapper checks if the $targetType is nullable and the given source, too. If this is true, return null. Also, in ReflectionService, the annotated type is properly expanded when annotated with ''.

Checklist

Alternative push for #1353

Fixes #1361

  • Packages: Flow

The redirect package throws exceptions on 410, but currently they are not caught, the way 404 exceptions are handled.

Checklist

Resolves #583

  • Packages: Flow FluidAdaptor

typo3fluid/fluid expects specific exceptions to be thrown to implement the feature of optional sections and partials. Neos.FluidAdaptor has to throw these exceptions or derivates of them. Otherwise the exceptions won't be catched and displayed to the user.

fixes: #1347

Follow-Up for #1348 with correct target.

  • Packages: Flow FluidAdaptor

Reverts neos/flow-development-collection#1348

  • Packages: FluidAdaptor

typo3fluid/fluid expects specific exceptions to be thrown to implement the feature of optional sections and partials. Neos.FluidAdaptor has to throw these exceptions or derivates of them. Otherwise the exceptions won't be catched and displayed to the user.

fixes: #1347

What I did

I implemented solution 1 from the issue

How I did it

I made the exceptions shipped with FluidAdaptor inherit from the expected ones from typo3fluid/fluid

How to verify it

Try to reproduce the issue after applying the patch

Checklist