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]: Creation of dynamic property TestTask::$db is deprecated #16308

Closed
Jeckerson opened this issue Mar 9, 2023 · 3 comments · Fixed by #16376 or #16375
Closed

[BUG]: Creation of dynamic property TestTask::$db is deprecated #16308

Jeckerson opened this issue Mar 9, 2023 · 3 comments · Fixed by #16376 or #16375
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@Jeckerson
Copy link
Member

Describe the bug
Inside task, by calling registered dependency injection service like $this->db will throw ErrorException.

To Reproduce

class TestTask extends Task
{
    public function mainAction(): void
    {
        $this->db->fetchAll('...');
    }
}

Details

  • Phalcon version: 5.2.1
  • PHP Version: 8.2
  • Operating System: any
  • Installation type: PECL
  • Zephir version (if any): 0.17.0
  • Server: Other
@Jeckerson Jeckerson added bug A bug report status: unverified Unverified labels Mar 9, 2023
@Jeckerson Jeckerson self-assigned this Mar 9, 2023
@Jeckerson Jeckerson added 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels Mar 9, 2023
@noone-silent
Copy link
Contributor

This bug appears everywhere on php8.2, for example in Class Row too:

PHP Deprecated:  Creation of dynamic property Phalcon\Mvc\Model\Row::$label is deprecated in ...

@joepsyko
Copy link

I have a similar problem

E_DEPRECATED: Creation of dynamic property Phalcon\Mvc\Micro::$request is deprecated {"code":8192,"message":"Creation of dynamic property Phalcon\\Mvc\\Micro::$request is deprecated","file":"/var/www/html....

@niden niden added the status: medium Medium label Jul 17, 2023
@niden niden added this to Phalcon v5 Jul 17, 2023
@niden niden moved this to In Progress in Phalcon v5 Jul 17, 2023
@niden niden linked a pull request Jul 17, 2023 that will close this issue
5 tasks
@niden
Copy link
Member

niden commented Jul 17, 2023

Resolved in #16376

@niden niden closed this as completed Jul 17, 2023
@niden niden moved this from In Progress to Implemented in Phalcon v5 Jul 17, 2023
@niden niden linked a pull request Jul 17, 2023 that will close this issue
5 tasks
@niden niden moved this from Implemented to Released in Phalcon v5 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Status: Released
4 participants