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

PHP 8.2 compatibility #690

Open
thedotedge opened this issue Oct 13, 2023 · 1 comment
Open

PHP 8.2 compatibility #690

thedotedge opened this issue Oct 13, 2023 · 1 comment

Comments

@thedotedge
Copy link

Running on 8.2 yields deprecation:

Deprecated: Creation of dynamic property Luracast\Restler\Data\Validator::$restler is deprecated in /application/vendor/luracast/restler/src/Scope.php

https://php.watch/versions/8.2/dynamic-properties-deprecated#AllowDynamicProperties

@tups
Copy link

tups commented Oct 18, 2023

You can just add the property publicly to your class

class Device
{

    public $restler; // here
    
    public function index() {
        return [
            'success' => [
                'code' => 200,
                'message' => 'Restler is up and running!',
            ],
        ];
    }

}

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

2 participants