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

Hotfix: php7 has no return type "mixed" #2856

Merged
merged 2 commits into from
Dec 27, 2022
Merged

Hotfix: php7 has no return type "mixed" #2856

merged 2 commits into from
Dec 27, 2022

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Dec 27, 2022

Description (*)

#2802 made some changes for php8, but was not tested with php7.

Problem: return type mixed was added with php8 .... https://php.watch/versions/8.0/mixed-type

This is fixed with this PR.

Reverted phpstan config to run with composer platform version (PHP7.3). Sadly phpstan does not detect that ...

Reported issue here: phpstan/phpstan#8597

Related Pull Requests

  1. Updated lib/Varien for PHP8.1 #2802
  2. Set php version for phpstan #2692

Fixed Issues (if relevant)

Fatal error: Uncaught TypeError: Return value of Varien_Object::offsetGet() must be an instance of mixed, string returned in /var/www/html/lib/Varien/Object.php:876

Manual testing scenarios (*)

  1. use php7 ... :/
  2. open frontend page ...

Questions or comments

Wonder that is not covered by code checks.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@sreichel sreichel added the PHP 8 Related to PHP8 label Dec 27, 2022
@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* phpstan labels Dec 27, 2022
@sreichel sreichel added the PHP 7 label Dec 27, 2022
@elidrissidev elidrissidev merged commit b4c70bb into OpenMage:1.9.4.x Dec 27, 2022
@fballiano
Copy link
Contributor

I’ll test and make another hotfix release

@elidrissidev
Copy link
Member

The PR that introduced mixed type was merged just 2 days ago, after the last release, so I think no need to do another one.

@fballiano
Copy link
Contributor

Oh great thank you

@sreichel sreichel deleted the hot-fix/php7-mixed-return-type branch December 27, 2022 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* PHP 8 Related to PHP8 phpstan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants