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]: Method ReflectionParameter::getClass() is deprecated #16255

Open
joepsyko opened this issue Jan 9, 2023 · 3 comments
Open

[BUG]: Method ReflectionParameter::getClass() is deprecated #16255

joepsyko opened this issue Jan 9, 2023 · 3 comments
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High

Comments

@joepsyko
Copy link

joepsyko commented Jan 9, 2023

Sorry for not using the template.

I'm upgrading my project from phalcon 4 (php 7.4) to phalcon 5 (php 8.1) and I'm getting this deprecation message
Method ReflectionParameter::getClass() is deprecated in ....

I checked my code and I'm not using the reflection, I also checked the dependencies, then I dug into phalcon code and I found the following line in phalcon/Acl/Adapter/Memory.zep:705:
let reflectionClass = reflectionParameter->getClass(),.

ReflectionParameter::getClass with some other reflection methods have been deprecated since php 8: https://www.php.net/manual/en/reflectionparameter.getclass.php

Is that something you are aware of?

I forgot, I call AclList::isAllowed at the line I have the deprecation message.

@joepsyko joepsyko added bug A bug report status: unverified Unverified labels Jan 9, 2023
@joepsyko joepsyko changed the title [BUG]: Method ReflectionParameter::getClass() is deprecated Method ReflectionParameter::getClass() is deprecated Jan 9, 2023
@niden niden changed the title Method ReflectionParameter::getClass() is deprecated [BUG]: Method ReflectionParameter::getClass() is deprecated Jan 9, 2023
@niden niden self-assigned this Jan 9, 2023
@niden niden added status: high High 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels Jan 9, 2023
@niden
Copy link
Member

niden commented Jan 9, 2023

Thanks for the report. I will take a look at this as soon as I can.

@niden niden added this to Phalcon v5 Jan 9, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Phalcon v5 Jan 9, 2023
@niden niden moved this from Backlog to In Progress in Phalcon v5 Jan 9, 2023
@niden niden mentioned this issue Jan 10, 2023
5 tasks
@niden
Copy link
Member

niden commented Jan 10, 2023

This has been resolved in #16257

@niden niden closed this as completed Jan 10, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Implemented in Phalcon v5 Jan 10, 2023
@niden
Copy link
Member

niden commented Jan 20, 2023

Hello,

Phalcon\Mvc\Model\Binder class seems to have the same problem.

let reflectionClass = methodParam->getClass();

@niden niden reopened this Jan 20, 2023
@github-project-automation github-project-automation bot moved this from Implemented to Active Sprint in Phalcon v5 Jan 20, 2023
@niden niden reopened this Jan 20, 2023
@niden niden moved this from Active Sprint to In Progress in Phalcon v5 Jan 20, 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: high High
Projects
Status: In Progress
Development

No branches or pull requests

2 participants