- #84 Documentation: working
#[AsRestClient]example, exceptions of the bundle in the reference pages.
- GHSA-fq22-3c2c-cv5p
RequestTask: mask the credentials in the logs (request sent,log_response, failure): the values of the headers,dataandurl_parameterskeys whose name containsauthorization,cookie,password,secret,token,api_key,signature,credentialorsession, and theSet-Cookieresponse headers, are replaced by***.
- Require
cleverage/process-bundle^5.4. - Please follow UPGRADE.md v3.3
- #73 Document that a client, shared, keeps its state between two process executions in a long-running worker: a base URI changed with
setUri()is not reset. - #71 The configuration key of the bundle (its extension alias) is
cleverage_rest_process, instead ofclever_age_rest_process(no option could be configured there). Configuring a key undercleverage_rest_processis deprecated: the bundle has no configuration and the keys were ignored without notice (new internalConfiguration, empty; notice when the container is compiled). They will be rejected in 4.0. Update documentation, add tests. - #69 The bundle throws exceptions implementing
ProcessExceptionInterfaceof the process bundle instead of raw SPL exceptions (as cleverage/process-bundle#317): newException\UnexpectedValueException, extending the SPL exceptions thrown before (same messages, the existingcatchkeep working).RestException(and soRestRequestExceptionandMissingClientException) implementsProcessExceptionInterface;RequestTaskthrows aRestRequestExceptioninstead of a raw\Exceptionfor an invalid response code (same message). Add tests. - #67 Composer: require PHP
^8.2instead of>=8.2(PHP 9 is no longer accepted before being tested), remove the authorization of thesymfony/flexplugin, which is not required (the CI installs it globally), as cleverage/process-bundle#319. - #62 Define the public API (Symfony BC promise, as cleverage/process-bundle#279):
RequestTask,ClientRegistryandCleverAgeRestProcessBundleare marked@final since 3.3, they will befinalin 4.0: extending them triggers a deprecation with the SymfonyDebugClassLoader.Client(extended by the applications) and the exceptions stay open.CleverAgeRestProcessExtensionandRegisterClientsPassare marked@internal. - #61
CleverAgeRestProcessExtension::findServices()loads the service definition files with a glob pattern instead of aFinder(same files, as cleverage/process-bundle#271),symfony/finderis no longer required. Add tests. - #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
codeattribute of thecleverage.rest.clienttag, or by the new#[AsRestClient(code: '...')]attribute (autoconfiguration); it must be the one returned bygetCode(). Duplicate or empty codes fail the container compilation. A client tagged withoutcodeis still registered eagerly, withClientRegistry::addClient(), which is deprecated (thecodewill be required in 4.0). New optionalClientRegistryconstructor argument (the locator);ClientRegistryis autowirable by its class name. Requiresymfony/service-contracts. Update documentation, add tests. - #56 Require
symfony/polyfill-php83,symfony/polyfill-php84andsymfony/polyfill-php85(cleverage/process-bundle#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 fromcomposer.json) and applies the rules using a newer function when its polyfill is required (no change needed in the current code). - #52 Give a code to the task (cleverage/process-bundle#91):
rest_request(task: rest_request, withcleverage/process-bundle5.4 or later, referencing it byservicebeing deprecated there). The task has its class name as service id; fetching it directly from the service container is deprecated (container.private), it will be private in 4.0. The former idcleverage_rest_process.task.requestis a deprecated alias, removed in 4.0. Update documentation, add tests. - #50 CI: test the lowest versions allowed by
composer.json(--prefer-lowest, PHP 8.2). Raisepsr/logto^2 || ^3:cleverage/process-bundleloggers and the test loggers use the typedlog()signature, a fatal error withpsr/log1. - #48
Client::geUri()(deprecated since v3.2, usegetUri()) triggers a deprecation at runtime withtrigger_deprecation()(symfony/deprecation-contracts, now required). Add tests. - #46 Add a
.gitattributes: the development files (.docker/,.github/,tests/, quality tools and PHPUnit configurations,Makefile) are no longer part of the archive installed by Composer (dist). - #44 Require
psr/log, used directly byClientandRequestTaskbut only installed throughcleverage/process-bundle.
- #31 Add missing tests: RequestTask and Client with a mocked HTTP client, MissingClientException, bundle and DI extension.
- #39 Add
Client::getUri(), deprecate the misspelledgeUri(); typeMissingClientException::create(). Update documentation, add tests. - #33 Give the ids of both services in the error on duplicate client codes: the clients are registered by a compiler pass of the bundle,
ClientRegistry::addClient()gets an optional$serviceIdargument. Update documentation, add tests.
- #35 Fix RequestTask: a
3xx/4xx/5xxstatus code listed invalid_response_codeoutputs the response body (the task still failed). Update documentation, add tests. - #36 Fix RequestTask: log transport errors (the log was lost, reading the response details threw again). Update documentation, add tests.
- #37 Fix RequestTask
log_response: log the requested URL, and the status code, headers and content of the response (instead of the configured URL and the response object). Update documentation, add tests. - #38 Fix RequestTask: throw an explicit
\UnexpectedValueExceptionon a non-array input; Client: convert scalar URL parameters to strings (aTypeErrorwas triggered). Update documentation, add tests.
- #28 Update quality stack: use Rector
withComposerBased()sets (removedSYMFONY_64/PHPUNIT_100sets), declare used Symfony packages and PHPUnit range in composer.json, apply quality tools fixes - #30 Add missing documentations: REST client reference page, complete RequestTask reference, cookbooks. Harmonize and fix existing documentation.
- #22 Add support for PHP 8.5 and Symfony 8.* Update phpunit/phpunit to version >10.0 Bump version to cleverage/process-bundle ^5.0
- #22 Remove support for PHP 8.1 and Symfony 7.3
- #20 Upgrade to Symfony 7.3 & PHP 8.4
- #17 Improve errors handling using valid_response_code. Allow ClientExceptionInterface if valid_response_code between 400 & 499 exists. Allow RedirectionExceptionInterface if valid_response_code between 300 & 399 exists.
- #16 Add missing shared: false on tasks
- #12 PUT and PATCH with send: application/json must be send as json.
- #3 Replace
nategood/httpfuldependency bysymfony/http-client - #3 Update Tasks for "symfony/http-client": "^6.4|^7.1"
- #4 Update services according to Symfony best practices.
Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
Services must be prefixed with the bundle alias instead of using fully qualified class names =>
cleverage_rest_process - RequestTask :
query_parametersoption is deprecated, usedatainstead - Remove RequestTransformer, use RequestTask instead.
- #1 Add Makefile & .docker for local standalone usage
- #1 Add rector, phpstan & php-cs-fixer configurations & apply it
- #2 Remove
sidus/base-bundledependency
- Fixed dependencies after removing sidus/base-bundle from the base process bundle
- Minor refactoring in RequestTask to allow override of options more easily
- Fixing trailing '?'/'&' in request uri
- Adding debug information in RequestTask
- Initial release