Skip to content

Dynamic property deprecation warning #192

@geoidesic

Description

@geoidesic
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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions