IBX-8190: Update REST new resource#2682
Open
adriendupuis wants to merge 35 commits into
Open
Conversation
|
Preview of modified Markdown: |
7 tasks
out of scope
out of scope
Fix the following for low coast Parameter #1 $string of function substr expects string, string|false given.
Try to avoid "Call to function is_array() with array will always evaluate to true."
adriendupuis
commented
Apr 2, 2025
Comment on lines
+16
to
+18
| if ('json' === $format) { | ||
| $data = $data[array_key_first($data)]; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Unwrap JSON.
I could even test that 'GreetingInput' === array_key_first($data)
adriendupuis
commented
Apr 2, 2025
# Conflicts: # code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php # phpstan-baseline.neon
Preview of modified filesPreview of modified Markdown: |
`Compile Error: Declaration of App\Rest\Serializer\GreetingInputDenormalizer::denormalize(mixed $data, string $type, ?string $format = null, array $context = []) must be compatible with Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed`
`Compile Error: Declaration of App\Rest\Serializer\GreetingInputDenormalizer::supportsDenormalization(mixed $data, string $type, ?string $format = null): bool must be compatible with Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool`
`Error: Class App\Rest\Serializer\GreetingInputDenormalizer contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Component\Serializer\Normalizer\DenormalizerInterface::getSupportedTypes)`
`Compile Error: Declaration of App\Rest\Serializer\GreetingNormalizer::normalize(mixed $object, ?string $format = null, array $context = []): mixed must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize(mixed $data, ?string $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null`
`Compile Error: Declaration of App\Rest\Serializer\GreetingNormalizer::supportsNormalization(mixed $data, ?string $format = null) must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool`
`Error: Class App\Rest\Serializer\GreetingNormalizer contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Component\Serializer\Normalizer\NormalizerInterface::getSupportedTypes)`
adriendupuis
commented
Jul 29, 2025
adriendupuis
left a comment
Contributor
Author
There was a problem hiding this comment.
To myself: fix error found by redocly lint.
adriendupuis
commented
Aug 7, 2025
code_samples/ change report
|
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.
GET /greetandPOST /greetto schema/doc (/api/ibexa/v2/doc#/App/api_greet_get).Preview: Creating new REST resource
Checklist