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

composer: allow symfony/service-contracts that allow PHP 8 #508

Closed
wants to merge 1 commit into from

Conversation

TomasVotruba
Copy link
Contributor

@TomasVotruba TomasVotruba commented May 6, 2021

We're trying to install src to downgrade it, but this packages blocks it on PHP 8:

image


The very next patch version luckily allows PHP 8 :)

image

@TomasVotruba TomasVotruba marked this pull request as ready for review May 6, 2021 12:08
@TomasVotruba
Copy link
Contributor Author

Btw, what do you this package for? I never saw it used only by Symfony internally

@ondrejmirtes
Copy link
Member

Hi, I thought that you're using the already prefixed phpstan/phpstan PHAR to bundle it with rector-prefixed? What do you need phpstan-src for?

The package is mentioned in composer.json only to lock it to a version that still supports 7.1.

@TomasVotruba
Copy link
Contributor Author

What do you need phpstan-src for?

To downgrade it to PHP 7.0 and bellow :)

The package is mentioned in composer.json only to lock it to a version that still supports 7.1.

I guess composer config platform version is better for that.
The proposed version supports both PHP 7.1 and 8.0.

@ondrejmirtes
Copy link
Member

Well you should use the contents of phpstan.phar in phpstan/phpstan as the base to downgrade further :) Is there any problem with that?

@TomasVotruba
Copy link
Contributor Author

That's the other way. You mean with box.phar? I haven't tried that yet

@ondrejmirtes
Copy link
Member

Yes, you can extract it with box.phar.

Alternatively, you can contribute the downgrading to PHPStan compiler process itself, so that even PHPStan users can take advantage of that :)

@TomasVotruba
Copy link
Contributor Author

I think it's chicken egg problem :)
PHP 8 native support in phpstan-src would be the first step for that. I plan to bump core to PHP 8.

We'll try the box.phar approach, just have to figure out the shared php-parser code autoloading.

@TomasVotruba TomasVotruba deleted the patch-1 branch May 6, 2021 12:57
@ondrejmirtes
Copy link
Member

I don't understand - I develop phpstan-src on PHP 8 without any tricks. See the CI.

@TomasVotruba
Copy link
Contributor Author

Yea, core repository and dependency behaves differently. Now it's not possible to install phpstan-src as dependency on PHP 8 due to this blocker.

@TomasVotruba
Copy link
Contributor Author

TomasVotruba commented May 6, 2021

I'm trying to include phpstan.phar unpacked here:
rectorphp/rector#6371

It would be great to somehow resolve including of preload.php for same php-parser in the start.

@ondrejmirtes
Copy link
Member

Yes, that's not supported by design, the package isn't published to Packagist, everyone is supposed to use phpstan/phpstan.

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.

2 participants