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
* [#62](https://github.com/cleverage/rest-process-bundle/issues/62) Define the public API (Symfony BC promise, as [cleverage/process-bundle#279](https://github.com/cleverage/process-bundle/issues/279)): `RequestTask`, `ClientRegistry` and `CleverAgeRestProcessBundle` are marked `@final since 3.3`, they will be `final` in 4.0: extending them triggers a deprecation with the Symfony `DebugClassLoader`. `Client` (extended by the applications) and the exceptions stay open. `CleverAgeRestProcessExtension` and `RegisterClientsPass` are marked `@internal`.
* [#61](https://github.com/cleverage/rest-process-bundle/issues/61) `CleverAgeRestProcessExtension::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.
* [#58](https://github.com/cleverage/rest-process-bundle/issues/58) ClientRegistry: the clients are loaded lazily from a service locator indexed by code: a client is only instantiated when a task uses it (an error in a client that a process does not use no longer makes it fail). The code is given by the new `code` attribute of the `cleverage.rest.client` tag, or by the new `#[AsRestClient(code: '...')]` attribute (autoconfiguration); it must be the one returned by `getCode()`. Duplicate or empty codes fail the container compilation. A client tagged without `code` is still registered eagerly, with `ClientRegistry::addClient()`, which is deprecated (the `code` will be required in 4.0). New optional `ClientRegistry` constructor argument (the locator); `ClientRegistry` is autowirable by its class name. Require `symfony/service-contracts`. Update documentation, add tests.
* [#56](https://github.com/cleverage/rest-process-bundle/issues/56) Require `symfony/polyfill-php83`, `symfony/polyfill-php84` and `symfony/polyfill-php85` ([cleverage/process-bundle#299](https://github.com/cleverage/process-bundle/issues/299)): the functions of PHP 8.3 to 8.5 can be used while supporting PHP 8.2. Rector targets PHP 8.2 (`withPhpVersion()`, `withPhpSets()` read from `composer.json`) and applies the rules using a newer function when its polyfill is required (no change needed in the current code).
Expand Down
3 changes: 3 additions & 0 deletions src/CleverAgeRestProcessBundle.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 3.3
*/
class CleverAgeRestProcessBundle extends Bundle
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/DependencyInjection/CleverAgeRestProcessExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

/**
* @internal
*/
class CleverAgeRestProcessExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Compiler/RegisterClientsPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
/**
* Registers the `cleverage.rest.client` tagged services in the client registry: in a service locator indexed by the
* `code` attribute of the tag (lazy), or, without `code` (deprecated), with an addClient() call (eager).
*
* @internal
*/
class RegisterClientsPass implements CompilerPassInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Registry/ClientRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* The client services are fetched lazily from a service locator indexed by code (`code` attribute of the
* `cleverage.rest.client` tag, or `#[AsRestClient]`, see RegisterClientsPass): a client is only instantiated when it
* is used.
*
* @final since 3.3
*/
class ClientRegistry
{
Expand Down
2 changes: 2 additions & 0 deletions src/Task/RequestTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
* 'expects': string,
* 'data': array<mixed>|string|null
* }
*
* @final since 3.3
*/
class RequestTask extends AbstractConfigurableTask
{
Expand Down
Loading