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

wpackagist.org wordpress plugins are not installed with composer 2.7.2 #11886

Open
jjrdevspace01 opened this issue Mar 14, 2024 · 5 comments
Open
Labels

Comments

@jjrdevspace01
Copy link

jjrdevspace01 commented Mar 14, 2024

My composer.json:

{
    "name": "test/composer2.7.2",
    "authors": [
    ],
    "repositories": [
        {
          "type": "composer",
          "url": "https://wpackagist.org"
        }
    ],
    "require": {
        "wpackagist-plugin/classic-editor": "*"
    },
    "extra": {
        "installer-paths": {
            "plugins/{$name}/": ["type:wordpress-plugin"]
        }
    }
}

Output of composer diagnose:

Composer could not detect the root package (test/composer2.7.2) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
require.wpackagist-plugin/classic-editor : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK git version 2.39.2
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
Checking Composer and its dependencies for vulnerabilities: OK
Composer version: 2.7.2
PHP version: 8.3.3
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 3.0.11 19 Sep 2023
cURL version: 7.88.1 libz 1.2.13 ssl OpenSSL/3.0.11
zip: extension not loaded, unzip present, 7-Zip not available

When I run this command:

php composer.phar install -vvv

I get the following output:

Running 2.7.2 (2024-03-11 17:12:18) with PHP 8.3.3 on Linux / 5.15.49-linuxkit
Reading ./composer.json (/var/www/html/wp-content/composer.json)
Loading config file ./composer.json (/var/www/html/wp-content/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 (/var/www/html/wp-content): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/var/www/html/wp-content): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/var/www/html/wp-content): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/var/www/html/wp-content): hg branch
Executing command (/var/www/html/wp-content): fossil branch list
Executing command (/var/www/html/wp-content): fossil tag list
Executing command (/var/www/html/wp-content): svn info --xml
Composer could not detect the root package (test/composer2.7.2) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Failed to initialize global composer: Composer could not find the config file: /root/.composer/composer.json

Reading ./composer.lock (/var/www/html/wp-content/composer.lock)
Reading /var/www/html/wp-content/vendor/composer/installed.json
composer/installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
Loading plugin Composer\Installers\Plugin (from composer/installers)
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Reading ./composer.lock (/var/www/html/wp-content/composer.lock)
Built pool.
Generating rules
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.000 seconds
Package operations: 1 install, 0 updates, 0 removals
Installs: wpackagist-plugin/classic-editor:1.6.3
Reading /root/.composer/cache/files/wpackagist-plugin/classic-editor/4c5c664e6c725a8125432af1efa0354c353e2425.zip from cache
  - Loading wpackagist-plugin/classic-editor (1.6.3) from cache
  - Installing wpackagist-plugin/classic-editor (1.6.3): Extracting archive
Executing async command (CWD): '/usr/bin/unzip' -qq '/var/www/html/wp-content/vendor/composer/tmp-e94b19795de004919e382a9a8492b8fa.zip' -d '/var/www/html/wp-content/vendor/composer/8939f30b'
Executing async command (CWD): rm -rf '/var/www/html/wp-content/vendor/composer/8939f30b'
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!

And I expected this to happen:

Composer appears to work as i would expect but no plugins are installed in wordpress. If i revert to composer 2.6.6 everything works as expected and plugins are installed

@stof
Copy link
Contributor

stof commented Mar 14, 2024

Please fill the template completely. You left out some sections which are important to be able to help you.

@jjrdevspace01
Copy link
Author

@stof i have updated as requested

@stof
Copy link
Contributor

stof commented Mar 14, 2024

Can you fix the markup ? I suspect that you removed the backticks ending the code block about diagnose block, which then means that the following code blocks are totally weird.

@jjrdevspace01
Copy link
Author

@stof done

@Seldaek
Copy link
Member

Seldaek commented Mar 19, 2024

I don't quite get the problem, how does it fail to install it to wordpress? If I try this in an empty dir with your composer.json I end up with a plugins/classic-editor/ directory with the package contents in there so it looks to me like it worked?

Do you install things as root somehow and ignored some warnings? If so it could be related to #11839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants