Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Latest
------

### Changes
* [#56](https://github.com/cleverage/cache-process-bundle/issues/56) Define the public API (Symfony BC promise, as [cleverage/process-bundle#279](https://github.com/cleverage/process-bundle/issues/279)): `GetTask`, `SetTask`, `AdapterRegistry` and `CleverAgeCacheProcessBundle` are marked `@final since 2.3`, they will be `final` in 3.0: extending them triggers a deprecation with the Symfony `DebugClassLoader`. `AbstractCacheTask`, `Adapter` (extended by the applications) and `MissingAdapterException` stay open. `CleverAgeCacheProcessExtension` and `RegisterAdaptersPass` are marked `@internal`.
* [#55](https://github.com/cleverage/cache-process-bundle/issues/55) `CleverAgeCacheProcessExtension::findServices()` loads the service definition files with a glob pattern instead of a `Finder` (same files, as [cleverage/process-bundle#271](https://github.com/cleverage/process-bundle/issues/271)), `symfony/finder` is no longer required. Add tests.
* [#53](https://github.com/cleverage/cache-process-bundle/issues/53) AdapterRegistry: the adapters are loaded lazily from a service locator indexed by code: an adapter is only instantiated when a task uses it (an error in an adapter that a process does not use no longer makes it fail). The code is given by the new `code` attribute of the `cleverage.cache.adapter` tag, or by the new `#[AsCacheAdapter(code: '...')]` attribute (autoconfiguration); it must be the one returned by `getCode()`. Duplicate or empty codes fail the container compilation. An adapter tagged without `code` is still registered eagerly, with `AdapterRegistry::addAdapter()`, which is deprecated (the `code` will be required in 3.0). New optional `AdapterRegistry` constructor argument (the locator), new `hasAdapter()` and `getAdapters()` methods. Require `symfony/service-contracts`. Update documentation, add tests.
* [#51](https://github.com/cleverage/cache-process-bundle/issues/51) Use the PHP 8.3 to 8.5 functions through the Symfony polyfills ([cleverage/process-bundle#299](https://github.com/cleverage/process-bundle/issues/299)): require `symfony/polyfill-php83`, `symfony/polyfill-php84` and `symfony/polyfill-php85`. Rector is configured with the minimum supported PHP version (`withPhpVersion(PhpVersion::PHP_82)`, it used PHP 8.5 features) and `withPhpSets()` without explicit version, which applies the rules using a newer function when its polyfill is required (no change on the current code). Document it in `CONTRIBUTING.md`.
Expand Down
3 changes: 3 additions & 0 deletions src/CleverAgeCacheProcessBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* @final since 2.3
*/
class CleverAgeCacheProcessBundle extends Bundle
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/CleverAgeCacheProcessExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* This is the class that loads and manages your bundle configuration.
*
* @see https://symfony.com/doc/current/bundles/extension.html
*
* @internal
*/
class CleverAgeCacheProcessExtension extends Extension
{
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Compiler/RegisterAdaptersPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
/**
* Registers the `cleverage.cache.adapter` tagged services in the adapter registry: in a service locator indexed by the
* `code` attribute of the tag (lazy), or, without `code` (deprecated), with an addAdapter() call (eager).
*
* @internal
*/
class RegisterAdaptersPass implements CompilerPassInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Registry/AdapterRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* The adapter services are fetched lazily from a service locator indexed by code (`code` attribute of the
* `cleverage.cache.adapter` tag, or `#[AsCacheAdapter]`, see RegisterAdaptersPass): an adapter is only instantiated
* when it is used.
*
* @final since 2.3
*/
class AdapterRegistry
{
Expand Down
2 changes: 2 additions & 0 deletions src/Task/GetTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* key: string,
* on_miss: string
* }
*
* @final since 2.3
*/
class GetTask extends AbstractCacheTask
{
Expand Down
2 changes: 2 additions & 0 deletions src/Task/SetTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* value: mixed,
* expires_after: int|null
* }
*
* @final since 2.3
*/
class SetTask extends AbstractCacheTask
{
Expand Down
Loading