Repository navigation
feat: adds Symfony 8 support - #2
Merged
Merged
Conversation
The package could not be installed in a Symfony 8 app: symfony/clock was capped at ^7.2 and psr/http-message at ^1.0, while Guzzle 8 and guzzlehttp/psr7 3.x require PSR-7 v2. guzzlehttp/psr7 is raised to 2.12.3 because earlier releases have published security advisories.
Only \DateTime was recognised, so immutable dates (as returned by Symfony Clock) were sent as an object of their internal properties.
…ason Wrong credentials surfaced as a vague "missing access token" error and network failures leaked client-specific exceptions. Tokens are now renewed a minute before expiry so requests don't reach the API with a dead token.
The existing generated tests are empty placeholders, so nothing guarded the hand-patched code or the Symfony HttpClient integration.
The Travis config targeted PHP 7.4 and no longer ran. The new workflow tests PHP 8.2-8.5 with highest dependencies and PHP 8.2 with lowest. Hand-maintained files are excluded from SDK regeneration so they aren't overwritten.
The package name and the getting-started example were wrong, and seven Peppol endpoints and six models were missing from the reference.
Contributor
Author
|
@faizanakram99 please merge this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
guzzlehttp/psr7to 2.12.3 because earlier releases have security advisories, and changes the Composer license fromunlicensetoMITto match the LICENSE file.DateTimeImmutablevalues, such as those from Symfony Clock, as ISO 8601 dates instead of objects.ApiExceptionwith the server's reason, and renews the token a minute before it expires.Test plan
composer testpasses on PHP 8.2 with lowest dependencies (Symfony 6.4), on PHP 8.2 and 8.3 (Symfony 7.4), and on PHP 8.4 and 8.5 (Symfony 8.1, Guzzle 8).MeApi::getUsercalls work.Subscription-KeyandBearerheaders.Deferred (separate tickets needed)
Async calls with emulated async clients: the generated
*Async()methods fail when the client only wraps synchronous responses in httplug promises (e.g.php-http/mock-client). Symfony'sHttplugClientand the Guzzle adapter work. The bug is in code produced by OpenAPI Generator.Code style in generated files: 33 generated files don't pass the PHP-CS-Fixer ruleset, as before this change, so CI does not run a style check yet.