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

Added PHP 8.2 support #12071

Closed
wants to merge 2 commits into from
Closed

Added PHP 8.2 support #12071

wants to merge 2 commits into from

Conversation

mhcwebdesign
Copy link
Collaborator

Update of several classes so as to solve errors about deprecated creation of dynamic properties.

@TheCartpenter
Copy link
Contributor

By using namespaces to declare instanced variables is not good practice. Besides, if one states that modifying each constructor is better than modifying the proxy class (which I still don't agree on), then adding namespaces on instanced variables wouldn't provide better experience especially for extension developers.

@danielkerr
Copy link
Member

i will do the fixes myself

@danielkerr danielkerr closed this Dec 7, 2022
@mhcwebdesign
Copy link
Collaborator Author

i will do the fixes myself

No problem. But at least take a look at it, we need support for PHP 8.2 as soon as possible.

@danielkerr
Copy link
Member

By using namespaces to declare instanced variables is not good practice. Besides, if one states that modifying each constructor is better than modifying the proxy class (which I still don't agree on), then adding namespaces on instanced variables wouldn't provide better experience especially for extension developers.

agreed

@mhcwebdesign
Copy link
Collaborator Author

I think using object as a type is very generic, though it works, too.

Anyway, please add all the needed fixes for PHP 8.2 support, you still missed out on a few.

It still complains about these:

Opencart\System\Library\Mail::$parameter
Opencart\System\Library\Mail::$smtp_hostname
Opencart\System\Library\Mail::$smtp_username
Opencart\System\Library\Mail::$smtp_password
Opencart\System\Library\Mail::$smtp_port
Opencart\System\Library\Mail::$smtp_timeout

with Creation of dynamic property deprecated errors, caused by the lines 135 to 140 at

catalog/controller/information/contact.php

Also, the call to the str_split function needs to be fixed in system/library/mail/smtp.php

For a complete list, see my pull request.

@danielkerr
Copy link
Member

U block the ability to interchange the objects when u force namespaces

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

Successfully merging this pull request may close these issues.

None yet

3 participants