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

BUGFIX: Fix PhpAnalyzer to support PHP 8 #2640

Merged
merged 2 commits into from
Mar 25, 2022
Merged

Conversation

gerdemann
Copy link
Contributor

@gerdemann gerdemann commented Dec 1, 2021

When running composer with PHP 8, the PhpAnalyzer did not work properly.

Fixes: #2639

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch

@gerdemann gerdemann changed the base branch from master to 5.3 December 1, 2021 12:32
@gerdemann gerdemann closed this Dec 1, 2021
@gerdemann gerdemann reopened this Dec 1, 2021
@gerdemann gerdemann force-pushed the bugfix/composer-php8 branch from 019d90c to b3ef1cb Compare December 1, 2021 12:35
@sorenmalling sorenmalling requested a review from kitsunet December 1, 2021 12:56
@sorenmalling
Copy link
Contributor

@kitsunet You gave a comment about this in Slack, will you give some more details on it here, and comment on, whether or not this is a possible fix to the issue described?

@kitsunet
Copy link
Member

kitsunet commented Dec 1, 2021

The issue in question is certainly easy enough to fix and fine by me to do so.

My concern is that we haven't tested these versions with PHP 8 at all and regardless if you define php 8 as platform requirement in your project our third party dependencies in older versions might not work well with php 8 (and won't upgrade due to the restrictions we set on them because of breaking changes). @albe did quite a lot in regards to PHP 8 and might say something about compatibility for those older versions.

@gerdemann
Copy link
Contributor Author

I only run composer with PHP 8 on my local machine and the platform config says PHP 7:

"config": {
    "platform": {
        "php": "7.3"
    }
}

Flow also runs in the Docker container with PHP 7, so there should be no problems.

@sorenmalling sorenmalling requested a review from albe December 2, 2021 09:13
@sorenmalling
Copy link
Contributor

@albe I've added you as a reviewer due to your work on PHP8 - can you perhaps say something about compatibility, this issue and corresponding PR? :)

@albe
Copy link
Member

albe commented Dec 2, 2021

This is basically a backport of the change here https://github.com/neos/flow-development-collection/pull/2287/files#diff-1cd00214dc173a34516d6f0aa372b178fc74317426c648d9487e9a28e15c9963 and it should be fully backwards compatible (with the defined() checks). The PhpAnalyzer afais is only used for package scanning and cache flushing. So this should not cause an issue and I don't see a problem with targeting it lower. However, is this targeting 5.3 on purpose, since that is security-only?

@gerdemann
Copy link
Contributor Author

I need it for a 5.3 project, but you're right, it's not a security fix 😅
I change the target tomorrow to 6.3.

@gerdemann gerdemann changed the base branch from 5.3 to 6.3 December 3, 2021 07:44
When running composer with PHP 8, the PhpAnalyzer did not work properly.

Fixes: neos#2639
@gerdemann gerdemann force-pushed the bugfix/composer-php8 branch from b3ef1cb to 7dd591e Compare December 3, 2021 07:46
Copy link
Member

@albe albe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, okay for me :)

@albe albe enabled auto-merge March 25, 2022 12:38
@albe albe merged commit fabbcd7 into neos:6.3 Mar 25, 2022
Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by reading

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.

Error after composer install/update with PHP 8 and Flow < 7
5 participants