Skip to content

Unable to execute phar in vendor/bin #11555

@Wulfheart

Description

@Wulfheart

My composer.json:

{
    "name": "aw/tmp",
    "require": {
        "wulfheart/phpunit-shim": "^10.2"
    }
}

Output of composer diagnose:

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 git version 2.34.1
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.5.8
PHP version: 8.2.6
PHP binary path: /usr/bin/php8.2
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022
cURL version: 7.81.0 libz 1.2.11 ssl OpenSSL/3.0.2
zip: extension present, unzip present, 7-Zip not available

When I run this command: composer update -vvv

I get the following output:

Running 2.5.8 (2023-06-09 17:13:21) with PHP 8.2.6 on Linux / 6.2.6-76060206-generic
Reading ./composer.json (/home/aw/Code/priv/tmp/composer.json)
Loading config file /home/aw/.config/composer/config.json
Loading config file /home/aw/.config/composer/auth.json
Loading config file ./composer.json (/home/aw/Code/priv/tmp/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 (/home/aw/Code/priv/tmp): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/home/aw/Code/priv/tmp): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/home/aw/Code/priv/tmp): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/home/aw/Code/priv/tmp): hg branch
Executing command (/home/aw/Code/priv/tmp): fossil branch list
Executing command (/home/aw/Code/priv/tmp): fossil tag list
Executing command (/home/aw/Code/priv/tmp): svn info --xml
Reading /home/aw/.config/composer/composer.json
Loading config file /home/aw/.config/composer/config.json
Loading config file /home/aw/.config/composer/auth.json
Loading config file /home/aw/.config/composer/composer.json (/home/aw/.config/composer/composer.json)
Loading config file /home/aw/.config/composer/auth.json
Reading /home/aw/.config/composer/auth.json
Reading ./composer.lock (/home/aw/Code/priv/tmp/composer.lock)
Reading /home/aw/.config/composer/vendor/composer/installed.json
Loading composer repositories with package information
Reading /home/aw/.cache/composer/repo/https---repo.packagist.org/packages.json from cache
Downloading https://repo.packagist.org/packages.json if modified
[304] https://repo.packagist.org/packages.json
Reading /home/aw/.cache/composer/repo/https---repo.packagist.org/provider-wulfheart~phpunit-shim.json from cache
Downloading https://repo.packagist.org/p2/wulfheart/phpunit-shim.json if modified
[304] https://repo.packagist.org/p2/wulfheart/phpunit-shim.json
Built pool.
Running pool optimizer.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.000 seconds
Analyzed 83 packages to resolve dependencies
Analyzed 83 rules to resolve dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Installs: wulfheart/phpunit-shim:10.2.5
Reading /home/aw/.cache/composer/files/wulfheart/phpunit-shim/7e7ae3aa78251be83da6b4c8bf95531b05ec11c6.zip from cache
  - Loading wulfheart/phpunit-shim (10.2.5) from cache
  - Installing wulfheart/phpunit-shim (10.2.5): Extracting archive
Executing async command (CWD): '/usr/bin/unzip' -qq '/home/aw/Code/priv/tmp/vendor/composer/tmp-5848924b7f3779c7844f08311365dda2' -d '/home/aw/Code/priv/tmp/vendor/composer/3fbd7ea9'
Executing async command (CWD): rm -rf '/home/aw/Code/priv/tmp/vendor/composer/3fbd7ea9'
Downloading https://packagist.org/downloads/
[201] https://packagist.org/downloads/
Generating autoload files
Reading /home/aw/.cache/composer/repo/https---repo.packagist.org/provider-wulfheart~phpunit-shim.json from cache
No security vulnerability advisories found

Now the vendor/bin folder has a phpunit.phar file. I would expect to be able to run the phpunit.phar but I get no output. However, when running it from vendor/wulfheart/phpunit-shim/bin/phpunit.phar then it works fine. The permissions are set correctly (-rwxrwxr-x).

The package repo can be found here.

How can I execute vendor/bin/phpunit.phar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions