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

Dynamic property deprecation warning #192

Open
geoidesic opened this issue Feb 2, 2025 · 0 comments
Open

Dynamic property deprecation warning #192

geoidesic opened this issue Feb 2, 2025 · 0 comments

Comments

@geoidesic
Copy link
Collaborator

geoidesic commented Feb 2, 2025

2025-02-02 21:26:18 notice: 4.5.0 - Dynamic properties will be removed in PHP 8.2. Add `public $People = null;` to your class definition or use `#[AllowDynamicProperties]` attribute.
/var/www/html/be/vendor/friendsofcake/crud-json-api/src/Listener/JsonApiListener.php, line: 884
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/friendsofcake/crud-json-api/src/Listener/JsonApiListener.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only.
Request URL: /api/people

Solution: add the AllowDynamicProperties annotation

 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 */
#[\AllowDynamicProperties]
class JsonApiListener extends ApiListener
{
    use InflectTrait;
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