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

Allow using on PHP 7.1 with Composer 2 #8184

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jun 17, 2020

Similar to doctrine/dbal#4084

In order to support Composer 2, ocramius/package-versions requires PHP 7.4.
This effectively means that using it in "require" forces ppl on PHP 7.1 to use Composer 1.

@Seldaek created the composer/package-versions-deprecated to unlock this situation.

@beberlei
Copy link
Member

@nicolas-grekas any idea what the travis failure is? weid console undefined function thing.

Otherwise +1 for going forward with this.

@nicolas-grekas
Copy link
Member Author

any idea what the travis failure is? weid console undefined function thing

Nope, I can't reproduce locally. The call to stream_isatty is guarded by a function_exists check. That's strange.

@greg0ire
Copy link
Member

greg0ire commented Jun 17, 2020

The cron build fails with the same message, so it's not related to your changes. There was a release of phpbench 4 days ago. I think rebuilding the phar pulled in a new version of symfony/console which causes the crash.

The call to stream_isatty is guarded by a function_exists check. That's strange.

There are 2 calls in the codebase, but that one is not guarded:

https://github.com/symfony/console/blob/8b69a5eda8918373019c91663da094d167dff3fc/Output/StreamOutput.php#L95-L113

The issue was introduced in comes from symfony/symfony#33878 I think, but I don't understand why we didn't get the bug with the release of january: https://github.com/phpbench/phpbench/releases/tag/0.17.0 … Maybe there is a manual action that is performed to pull the latest deps when building a phar?

I think we should pin the version of phpbench to 0.17.0, or maybe use php 7.2 or higher in the benchmark build? Since the build uses a library (symfony/console) that requires 7.2?

The call to stream_isatty is guarded by a function_exists check. That's strange.

The guard can probably be removed now BTW

@greg0ire
Copy link
Member

Fixed in #8186

@greg0ire greg0ire closed this Jun 17, 2020
@greg0ire greg0ire reopened this Jun 17, 2020
@greg0ire greg0ire requested a review from a team June 17, 2020 20:18
@greg0ire greg0ire merged commit 6a670d7 into doctrine:2.7 Jun 18, 2020
@greg0ire
Copy link
Member

Thanks @nicolas-grekas !

@cminovici
Copy link

Hello there. Could you also create a new tag for this?

@nicolas-grekas nicolas-grekas deleted the cpv branch October 29, 2020 07:21
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.

4 participants