Repository navigation
chore: update API Platform to 4.4 - #76
Merged
Merged
Conversation
API Platform 4.4 exports OpenAPI 3.2.0 and no longer adds charset to the application/ld+json content type (api-platform/core#8226). Update the content-type assertions in the tests. Vocabulary.tags has no element type, so the spec now has no item type for it.
✅ API specificationNo changes detected on this run — previous diff resolved. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #76 +/- ##
==========================================
Coverage 74.39% 74.39%
Complexity 264 264
==========================================
Files 30 30
Lines 738 738
==========================================
Hits 549 549
Misses 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
API Platform 4.4 does not guess an item type for untyped arrays, so the spec had 'items: {}' and oasdiff reported a breaking change. The tags are keyword strings in Elasticsearch.
Open
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.
Update API Platform from 4.3 to 4.4. This is a direct minor update in the quarterly update.
Changes
api-platform/coreconstraint from~4.3.0to~4.4.0, and update it from 4.3.21 to 4.4.6. Onlyapi-platform/corechanges incomposer.lock. An update with--with-dependencieswould downgradesymfony/deprecation-contractsandsymfony/translation-contractsfrom 3.8.1 to 3.7.1 because of the 7-day cooldown, so I did not use it.config/reference.phpandpublic/spec.yaml.@param list<string> $tagstoApp\Api\Dto\Vocabulary(see below).content-typein the tests fromapplication/ld+json; charset=utf-8toapplication/ld+json(GetItemTestTrait,GetEntitiesTestTrait,ContentNegotiationContractTest).Why
The quarterly update brings the direct dependencies to the latest minor version.
API Platform 4.4 has these changes that consumers can see:
application/ld+jsonwithout; charset=utf-8. API Platform now addscharsetonly for media types that define it (fix(state): only emit Content-Type charset for media types that define it api-platform/core#8226). JSON is always UTF-8. HTTP clients that compare the full header string can be affected.public/spec.yamlchanges fromopenapi: 3.1.0toopenapi: 3.2.0. API Platform 4.4 has the version as a fixed constant (OpenApi::VERSION), and the export command cannot select 3.1.Vocabulary.tags: the property isarraywithout an element type. API Platform 4.3 guessedstring|nullfor the items. 4.4 does not guess, and writesitems: {}. oasdiff reported this as a breaking change. This PR adds@param list<string> $tagsto the constructor, so the spec hasitems: type: string. The tags arekeywordstrings in Elasticsearch.Checks
bin/console lint:container: no errors.composer audit: no advisories.