You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.3.2
PHP version: 8.0.17
PHP binary path: /usr/bin/php8.0
OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021
cURL version: 7.74.0 libz 1.2.11 ssl OpenSSL/1.1.1k
zip: extension present, unzip present, 7-Zip not available
Reading ./composer.json (/srv/www/scratch-1.local/htdocs/composer.json)
Loading config file ./composer.json (/srv/www/scratch-1.local/htdocs/composer.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/srv/www/scratch-1.local/htdocs): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/srv/www/scratch-1.local/htdocs): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/srv/www/scratch-1.local/htdocs): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/srv/www/scratch-1.local/htdocs): hg branch
Executing command (/srv/www/scratch-1.local/htdocs): fossil branch list
Executing command (/srv/www/scratch-1.local/htdocs): fossil tag list
Executing command (/srv/www/scratch-1.local/htdocs): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /home/gsartorelli/.config/composer/composer.json
Reading /srv/www/scratch-1.local/htdocs/vendor/composer/installed.json
Loading plugin Composer\Installers\Plugin (from composer/installers)
Loading plugin SilverStripe\VendorPlugin\VendorPlugin (from silverstripe/vendor-plugin)
Loading plugin SilverStripe\RecipePlugin\RecipePlugin (from silverstripe/recipe-plugin)
PHP Fatal error: Declaration of Composer\Command\BaseCommand::getComposer(bool $required = true, ?bool $disablePlugins = null, ?bool $disableScripts = null) must be compatible with SilverStripe\RecipePlugin\RecipeCommandBehaviour::getComposer($required = true, $disablePlugins = null) in /srv/www/scratch-1.local/htdocs/vendor/silverstripe/recipe-plugin/src/RequireRecipeCommand.php on line 73
Fatal error: Declaration of Composer\Command\BaseCommand::getComposer(bool $required = true, ?bool $disablePlugins = null, ?bool $disableScripts = null) must be compatible with SilverStripe\RecipePlugin\RecipeCommandBehaviour::getComposer($required = true, $disablePlugins = null) in /srv/www/scratch-1.local/htdocs/vendor/silverstripe/recipe-plugin/src/RequireRecipeCommand.php on line 73
And I expected this to happen:
There should be no fatal error - instead, the output should indicate the changes made to composer.json, and which packages were added or removed as a result of the command.
This has been caused by the addition of typehints to the $required and $disabledPlugins parameters in Composer\Command\BaseCommand::getComposer() in #10561
BC Break: added native parameter & return types to many internal APIs, we explicitly left the most extended/implemented symbols untouched but if this causes problems nonetheless please report it ASAP (#10547, #10561)
The text was updated successfully, but these errors were encountered:
GuySartorelli
changed the title
BC breaking changes in 2.3.0 cause silverstripe/vendor-plugin to break.
BC breaking changes in 2.3.0 cause silverstripe/recipe-plugin to break.
Mar 31, 2022
Note that I did not add return types here explicitly to avoid breaking extensions/overrides of those methods. But the way you redefined them in the trait here creates an incompatibility. That's something I did not think of tbh, but it also wasn't very needed in the first place.
My
composer.json
(generated using the latest stable release of silverstripe/silverstripe-installer:Output of
composer diagnose
:When I run this command:
I get the following output:
And I expected this to happen:
There should be no fatal error - instead, the output should indicate the changes made to composer.json, and which packages were added or removed as a result of the command.
Related issues:
This has been caused by the addition of typehints to the
$required
and$disabledPlugins
parameters inComposer\Command\BaseCommand::getComposer()
in #10561composer/src/Composer/Command/BaseCommand.php
Line 73 in 89ce532
This is noted as a BC breaking change in the release notes for 2.3.0:
The text was updated successfully, but these errors were encountered: