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

T16308 di dynamic properties 4 #16376

Merged
merged 3 commits into from Jul 17, 2023

Conversation

niden
Copy link
Sponsor Member

@niden niden commented Jul 17, 2023

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Extended Phalcon\Di\Injectable from stdClass to remove the deprecation warning (dynamic properties) for PHP 8.2

Credit: @escribiendocodigo

Thanks

@niden niden requested a review from Jeckerson July 17, 2023 16:47
@niden niden self-assigned this Jul 17, 2023
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Jul 17, 2023
@niden niden merged commit b760fd6 into phalcon:5.0.x Jul 17, 2023
38 checks passed
@niden niden deleted the T16308-di-dynamic-properties-4 branch July 17, 2023 17:06
@hakimio
Copy link

hakimio commented Jul 20, 2023

@niden does this also fix following deprecation errors?

Use of "static" in callables is deprecated
Use of "self" in callables is deprecated

@niden
Copy link
Sponsor Member Author

niden commented Jul 20, 2023

@niden does this also fix following deprecation errors?

Use of "static" in callables is deprecated
Use of "self" in callables is deprecated

Not yet. I am looking at it and it could be that it comes from Zephir than Phalcon. I will have to talk to @Jeckerson when he comes back

@fichtner
Copy link

I tried the patch but to no avail for the following... I'm seeing:

PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$request is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php on line 195
PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$session is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ControllerRoot.php on line 149
PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$security is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php on line 298

It looks to be from the Phalcon\Mvc\Controller class. Any open ticket that tracks these?

Cheers,
Franco

@hakimio
Copy link

hakimio commented Jul 21, 2023

@fichtner #16263

@fichtner
Copy link

@hakimio thanks, subscribed. though there is no collection of individual dynamic variables causing this. if the problem is wide spread it might make sense to record which ones have been reported and which ones have been addressed (by this patch). the situation is not overly transparent unfortunately.

@paulobing
Copy link

paulobing commented Oct 6, 2023

Hi @niden ! Do you have any updates on this?
I'm experiencing the same using PHP 8.2.11 + Phalcon 5.3.11

@fichtner
Copy link

fichtner commented Oct 6, 2023

Nothing changed to my knowledge. We had to disable deprecation warnings because of this so it’s not a quick check. 😉

@hakimio
Copy link

hakimio commented Oct 6, 2023

You can follow this issue to get progress updates: zephir-lang/zephir#2405

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
None yet
5 participants