8000 Adding mixed return type to bean's jsonSerialize by Ngob · Pull Request #272 · thecodingmachine/tdbm · GitHub
[go: up one dir, main page]

Skip to content

Adding mixed return type to bean's jsonSerialize #272

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

Merged

Conversation

Ngob
Copy link
@Ngob Ngob commented May 6, 2022

To fully support post php7 version, jsonSerialize's signature need to be as "mixed"
See documentation at: https://www.php.net/manual/fr/jsonserializable.jsonserialize.php

This PR allow PHP8's Opcache preloading to run on symfony when using TDBM (as in https://symfony.com/doc/current/performance.html#use-the-opcache-class-preloading)

@homersimpsons
Copy link
Collaborator

mixed is only available for PHP8+, can you just wrap the setReturnType in a

if (version_compare(PHP_VERSION, '8.0.0', '>=')) { ... }

@Ngob Ngob force-pushed the fix_php8_jsonSerialize_signature branch from 3a7583f to 8d9d832 Compare May 16, 2022 08:59
@homersimpsons homersimpsons self-assigned this May 16, 2022
@homersimpsons homersimpsons merged commit fbee465 into thecodingmachine:master May 16, 2022
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
0