Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/missing error normalizer trait #6853

Merged

Conversation

mladencosa
Copy link
Contributor

Q A
Branch? main for features / current stable version branch for bug fixes
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...

This PR:

  • Adds missing jsonapi error normalizer trait
  • Removes usage of deprecated ErrorCodeSerializableInterface from ErrorNormalizerTrait

Without this fix, it is not possible to install api-platform/json-api as a standalone composer package due to the missing trait dependency.

Note: This issue only affects the api-platform/json-api sub-split repository. The main api-platform/core repository contains the correct code.

@mladencosa mladencosa changed the base branch from main to 3.4 December 8, 2024 23:07
@soyuka
Copy link
Member

soyuka commented Dec 9, 2024

Awesome thanks, note that error handling is a little different in 4.x so this class will likely not exist anymore after updating.

@soyuka soyuka merged commit a209dd4 into api-platform:3.4 Dec 9, 2024
soyuka added a commit that referenced this pull request Dec 13, 2024
* fix(jsonschema): hashmaps produces invalid openapi schema (#6830)

* fix(jsonschema): hashmaps produces invalid openapi schema

* fix

---------

Co-authored-by: soyuka <soyuka@users.noreply.github.com>

* fix: add missing error normalizer trait and remove deprecated interface (#6853)

* fix: test empty parameter against null (#6852)

fixes #6844

* Fix deprecation symfony/dependency-injection

* cs: run php-cs-fixer

* ci: use problem error normalizer trait

* fix(metadata): various parameter improvements (#6867)


- `Parameter::getValue()` now takes a default value as argument `getValue(mixed $default = new ParameterNotFound()): mixed`
- `Parametes::get(string $key, string $parameterClass = QueryParameter::class)` (but also `has` and `remove`) now has a default value as second argument to `QueryParameter::class`
- Constraint violation had the wrong message when using `property`, fixed by using the `key` instead:

---------

Co-authored-by: Vincent Amstoutz <vincent.amstoutz@les-tilleuls.coop>
Co-authored-by: mladencosa <39300405+mladencosa@users.noreply.github.com>
Co-authored-by: Michiel Kalle <michielkalle@users.noreply.github.com>
vinceAmstoutz pushed a commit to vinceAmstoutz/api-platform-core that referenced this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants