-
Notifications
You must be signed in to change notification settings - Fork 84
IBX-8190: Update REST new resource #2682
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
base: 5.0
Are you sure you want to change the base?
Conversation
Preview of modified Markdown: |
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."
if ('json' === $format) { | ||
$data = $data[array_key_first($data)]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unwrap JSON.
I could even test that 'GreetingInput' === array_key_first($data)
code_samples/api/rest_api/src/Rest/Serializer/GreetingInputDenormalizer.php
Show resolved
Hide resolved
# 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)`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To myself: fix error found by redocly lint
.
code_samples/api/rest_api/src/Rest/Controller/DefaultController.php
Outdated
Show resolved
Hide resolved
code_samples/api/rest_api/src/Rest/Controller/DefaultController.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code_samples/api/rest_api/src/Rest/Controller/DefaultController.php
Outdated
Show resolved
Hide resolved
code_samples/api/rest_api/src/Rest/Controller/DefaultController.php
Outdated
Show resolved
Hide resolved
code_samples/ change report
|
GET /greet
andPOST /greet
to schema/doc (/api/ibexa/v2/doc#/App/api_greet_get
).Preview: Creating new REST resource
Checklist