Skip to content

Unable to run renamed variant of php-scoper.phar #193

@kambo-1st

Description

@kambo-1st

Hi!
I am unable to rename php-scoper.phar to php-scoper. When i do this and try to execute the renamed file following error message appers:

-bash-4.2$ ./build/tools/php-scoper
PHP Warning:  require(phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper): failed to open stream: phar error: no directory in "phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper", must have at least phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper/ for root directory (always use full path to a new phar) in /KamboDEV/workspace/phpunit/build/tools/php-scoper on line 10
PHP Stack trace:
PHP   1. {main}() /KamboDEV/workspace/phpunit/build/tools/php-scoper:0

Warning: require(phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper): failed to open stream: phar error: no directory in "phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper", must have at least phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper/ for root directory (always use full path to a new phar) in /KamboDEV/workspace/phpunit/build/tools/php-scoper on line 10

Call Stack:
    0.0007     386880   1. {main}() /KamboDEV/workspace/phpunit/build/tools/php-scoper:0

PHP Fatal error:  require(): Failed opening required 'phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper' (include_path='.:/usr/share/pear:/usr/share/php') in /KamboDEV/workspace/phpunit/build/tools/php-scoper on line 10
PHP Stack trace:
PHP   1. {main}() /KamboDEV/workspace/phpunit/build/tools/php-scoper:0

Fatal error: require(): Failed opening required 'phar:///KamboDEV/workspace/phpunit/build/tools/php-scoper/bin/php-scoper' (include_path='.:/usr/share/pear:/usr/share/php') in /KamboDEV/workspace/phpunit/build/tools/php-scoper on line 10

Call Stack:
    0.0007     386880   1. {main}() /KamboDEV/workspace/phpunit/build/tools/php-scoper:0

This happens only for the latest two releases (6.0.0 and 6.1.0) in 5.1 everything is working.

It seems, that the phar aliasing Phar::mapPhar() inside the file is missing. It's probably connected with the wrong humbug/box configuration - StubGenerator.php from humbug/box support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions