Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release 2.12.0 into 3.0.x #137

Merged
merged 52 commits into from Jul 30, 2021
Merged

Conversation

github-actions[bot]
Copy link

Release Notes for 2.12.0

Feature release (minor)

This release focuses on providing forward compatibility to the next major release of this component.
With laminas/laminas-cache v3, using static factories for the adapters won't be possible anymore as this component wont be aware of which storage adapters are around.
All storage adapters will have to populate themselves to the AdapterPluginManager.

Instead of using the StorageFactory (which is marked as deprecated in this release), the StorageAdapterFactory (StorageAdapterFactoryInterface) should be used. It provides StorageAdapterFactoryInterface#createFromArrayConfiguration which consumes the exact same (normalized¹) configuration as StorageFactory#factory.
There are also replacements for the other methods of the StorageFactory:

  • StorageAdapterFactoryInterface#create is a replacement for StorageFactory#adapterFactory
  • StoragePluginFactoryInterface is a replacement for the StorageFactory#pluginFactory

To verify that your projects configuration is compatible with the new normalized¹ configuration, you can use laminas/laminas-cli with the CLI command laminas-cache:deprecation:check-storage-factory-config.

Added

  • Added a laminas-cli command to check project configuration for deprecated storage configuration.
  • Added a StorageAdapterFactoryInterface which is retrievable via the PSR-11 container when this component is used with either laminas/laminas-mvc or mezzio/mezzio.

Fixed

  • CacheItemPoolDecorator#saveDeferred queued already expired cache items. This has been fixed and thus, the method will return false for cache items which are already expired.
  • Serializer plugin treated non-existent cache items as an error and thus did not incremented/decremented these values. Non-existent values must be treated as 0 as this is how adapters handle the increment/decrement when not used with the Serializer plugin.

Changed

  • The ExceptionInterface now extends the Throwable interface.
  • CallbackCache, ObjectCache and ClassCache simplified method calls by avoiding the usage of call_user_func* functions.
  • The PSR-16 decorator now uses the maximum key length capability to better reflect the PSR requirements. PSR-16 requires that the backend supports at least 64 characters but it may also allow more than 64 characters.

Deprecated

  • Deprecated StorageFactory in favor of StorageAdapterFactoryInterface and StoragePluginFactoryInterface.
  • Deprecated some storage configurations to normalize¹ the configuration for the StorageAdapterFactoryInterface.
  • Deprecated the usage of storage adapters which do not provide the maximum key length capability in combination with the PSR-16 decorator.

¹ Normalized array configuration example

[
    'adapter' => 'apcu',
    'options' => ['ttl' => 3600],
    'plugins' => [
        [
            'name' => 'exception_handler',
            'options' => [
                'throw_exceptions' => false,
             ], 
        ],
    ],
];

2.12.0

  • Total issues resolved: 6
  • Total pull requests resolved: 12
  • Total contributors: 4

Bug

Enhancement

Documentation,Enhancement

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing self-assigned this Jul 30, 2021
ghostwriter and others added 28 commits July 30, 2021 16:54
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Providing a deprecation check command for upstream projects. Deprecated configurations can be fixed before upgrading to the next major version.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
Signed-off-by: Marc Bennewitz <m.bennewitz@dcmn.com>
…apter max key length capability value

Signed-off-by: Ivan Ganev <iganev@cytec.bg>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
… to validate input definition

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…nt rather than increment the value

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
With laminas/laminas-cache-storage-adapter-redis#14, the maximum key length was increased for redis v3+

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Providing initial `RedisCluster` documentation

See laminas/laminas-cache-storage-adapter-redis#13 for implementation details.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…edis` product name

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Close #125

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…up complexity to 3.x later on

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This interface can be used to create storage plugins from either an configuration array (`StoragePluginFactoryInterface::createFromArrayConfiguration`) or directly ( `StoragePluginFactoryInterface::create`).

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This interface can be used to create storage adapters from either an configuration array (`StorageAdapterFactoryInterface::createFromArrayConfiguration`) or directly ( `StorageAdapterFactoryInterface::create`).

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…ctoryInterface` implementations

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…and `StoragePluginFactoryInterface`

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Since v2.10, the storage adapter have their own package. In v3.0 these, adapters have to register themselves to the `AdapterPluginManager` when the plugin manager is being instantiated and thus, this component wont be aware of which adapters are available without using a `PSR-11` container.

This commit aims to provide a proper dependency injection layer to all cache patterns while deprecating the old `storage` option for `PatternOptions`.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…ck start section

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…ipts

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
- replaced dead links from example with github release notes
- imported laminas-feed `Reader` class

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This schema is referenced within the config deprecation check command and thus is mandatory to provide migration information.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…-existent values as 0

Fixes #116

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing force-pushed the 2.12.x-merge-up-into-3.0.x_EA9JuzkK branch from 302a91e to 9fa626a Compare July 30, 2021 16:33
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing merged commit e32d121 into 3.0.x Jul 30, 2021
@boesing boesing deleted the 2.12.x-merge-up-into-3.0.x_EA9JuzkK branch July 30, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants