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

[bug] typedecl caused /api/ routes 500 on php7.4 #49

Open
frankli0324 opened this issue Jul 11, 2023 · 0 comments
Open

[bug] typedecl caused /api/ routes 500 on php7.4 #49

frankli0324 opened this issue Jul 11, 2023 · 0 comments

Comments

@frankli0324
Copy link

frankli0324 commented Jul 11, 2023

6e7a6dc#diff-7103e37e54fed89a50121abe7350a677a5c3e2d2ba79cde5e06f6d11fb052d1cL40

the type "mixed" is added in 8.0.0, therefore caused php 7.4 to believe that PWASettingsSerializer doesn't implement AbstractSerializer by assuming "mixed" a namespaced custom type.

PHP Fatal error: Declaration of Askvortsov\FlarumPWA\Api\Serializer\PWASettingsSerializer::getId(Askvortsov\FlarumPWA\Api\Serializer\mixed $model): string must be compatible with Tobscure\JsonApi\AbstractSerializer::getId($model) in /srv/bbs/vendor/askvortsov/flarum-pwa/src/Api/Serializer/PWASettingsSerializer.php on line 40

fyi the base class: https://github.com/tobyzerner/json-api-php/blob/master/src/AbstractSerializer.php#L36-L39C6

removing the "mixed" type declaration adds compatibility for 7.4 for me. currently no other issues observed.

@frankli0324 frankli0324 changed the title [bug] typehint caused /api/ routes 500 on php7.4 [bug] typedecl caused /api/ routes 500 on php7.4 Jul 11, 2023
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

No branches or pull requests

1 participant