We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I use withPhpSets without arguments on project that has in composer.json php defined only as require.php-64bit then I'll get error.
withPhpSets
composer.json
[ERROR] We could not find local "composer.json" to determine your PHP version. Please, fill the PHP version set in withPhpSets() manually.
rector.php
return RectorConfig::configure() ->withPhpSets();
{ "require": { "php-64bit": "8.1.*", } }
In \Rector\Php\PhpVersionResolver\ProjectComposerJsonPhpVersionResolver::resolve should be added read for php-64bit instead of just php.
\Rector\Php\PhpVersionResolver\ProjectComposerJsonPhpVersionResolver::resolve
That means this line should be changed for example like this
-$requirePhpVersion = $projectComposerJson['require']['php'] ?? null; +$requirePhpVersion = $projectComposerJson['require']['php'] ?? $projectComposerJson['require']['php-64bit'] ?? null;
The text was updated successfully, but these errors were encountered:
Thanks for reporting 💪
Could you send proposed fix?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Bug Report
If I use
withPhpSets
without arguments on project that has incomposer.json
php defined only as require.php-64bit then I'll get error.Minimal PHP Code Causing Issue
rector.php
composer.json
Expected Behaviour
In
\Rector\Php\PhpVersionResolver\ProjectComposerJsonPhpVersionResolver::resolve
should be added read for php-64bit instead of just php.That means this line should be changed for example like this
The text was updated successfully, but these errors were encountered: