SOF3 / pharynx

A tool to recompile PHP sources into a phar in PSR-0
Apache License 2.0
17 stars 4 forks source link

0.3.2 with error #8

Closed fuyutsuki closed 1 year ago

fuyutsuki commented 1 year ago
Run SOF3/pharynx@v0.2
  with:
    plugin-dir: /home/runner/work/Texter/Texter
    composer: true
    composer-version: 2.5.5
    pharynx-version: latest
    stage-poggit: true
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
Detecting latest pharynx version
Downloading pharynx from https://github.com/SOF3/pharynx/releases/download/0.3.2/pharynx.phar
/usr/bin/php -dphar.readonly=0 /opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar -i /home/runner/work/Texter/Texter -o /tmp/9358a226cc5505b4 -p=/tmp/9358a226cc5505b4.phar -c
[17:24:17] Running `composer install` for plugin
Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 54 installs, 0 updates, 0 removals
  - Downloading composer/ca-bundle (1.3.6)
  - Downloading symfony/finder (v6.3.0)
  - Downloading composer/pcre (3.1.0)
  - Downloading composer/class-map-generator (1.1.0)
  - Downloading composer/metadata-minifier (1.0.0)
  - Downloading composer/semver (3.3.2)
  - Downloading composer/spdx-licenses (1.5.7)
  - Downloading psr/log (3.0.0)
  - Downloading composer/xdebug-handler (3.0.3)
  - Syncing dktapps-pm-pl/pmforms (dev-master master) into cache
  - Downloading justinrainbow/json-schema (5.2.12)
  - Downloading phpstan/phpstan (1.10.18)
  - Downloading symfony/polyfill-mbstring (v1.27.0)
  - Downloading symfony/polyfill-ctype (v1.27.0)
  - Downloading symfony/filesystem (v6.3.0)
  - Downloading ramsey/collection (2.0.0)
  - Downloading brick/math (0.11.0)
  - Downloading ramsey/uuid (4.7.4)
  - Downloading pocketmine/snooze (0.5.0)
  - Downloading pocketmine/log (0.4.0)
  - Downloading pocketmine/binaryutils (0.2.4)
  - Downloading pocketmine/raklib (0.15.1)
  - Downloading pocketmine/raklib-ipc (0.2.0)
  - Downloading pocketmine/netresearch-jsonmapper (v4.2.999)
  - Downloading pocketmine/nbt (0.3.4)
  - Downloading pocketmine/math (0.4.3)
  - Downloading pocketmine/locale-data (2.19.5)
  - Downloading pocketmine/errorhandler (0.6.0)
  - Downloading pocketmine/color (0.3.1)
  - Downloading pocketmine/callback-validator (1.0.3)
  - Downloading pocketmine/bedrock-protocol (22.0.0+bedrock-1.20.0)
  - Downloading pocketmine/bedrock-item-upgrade-schema (1.3.0)
  - Downloading pocketmine/bedrock-data (2.3.1+bedrock-1.20.0)
  - Downloading pocketmine/bedrock-block-upgrade-schema (2.2.0)
  - Downloading fgrosse/phpasn1 (v2.5.0)
  - Downloading adhocore/json-comment (1.2.1)
  - Downloading pocketmine/pocketmine-mp (5.1.2)
  - Downloading react/promise (v2.10.0)
  - Downloading seld/jsonlint (1.10.0)
  - Downloading seld/phar-utils (1.2.1)
  - Downloading seld/signal-handler (2.0.1)
  - Downloading symfony/process (v6.3.0)
  - Downloading symfony/polyfill-php81 (v1.27.0)
  - Downloading symfony/polyfill-php80 (v1.27.0)
  - Downloading symfony/polyfill-php73 (v1.27.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.27.0)
  - Downloading symfony/string (v6.3.0)
  - Downloading psr/container (2.0.2)
  - Downloading symfony/service-contracts (v3.3.0)
  - Downloading symfony/deprecation-contracts (v3.3.0)
  - Downloading symfony/console (v6.3.0)
  - Downloading composer/composer (2.5.8)
  - Downloading sof3/pharynx (0.3.2)
  - Installing composer/ca-bundle (1.3.6): Extracting archive
  - Installing symfony/finder (v6.3.0): Extracting archive
  - Installing composer/pcre (3.1.0): Extracting archive
  - Installing composer/class-map-generator (1.1.0): Extracting archive
  - Installing composer/metadata-minifier (1.0.0): Extracting archive
  - Installing composer/semver (3.3.2): Extracting archive
  - Installing composer/spdx-licenses (1.5.7): Extracting archive
  - Installing psr/log (3.0.0): Extracting archive
  - Installing composer/xdebug-handler (3.0.3): Extracting archive
  - Installing dktapps-pm-pl/pmforms (dev-master master): Cloning master from cache
  - Installing justinrainbow/json-schema (5.2.12): Extracting archive
  - Installing phpstan/phpstan (1.10.18): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive
  - Installing symfony/filesystem (v6.3.0): Extracting archive
  - Installing ramsey/collection (2.0.0): Extracting archive
  - Installing brick/math (0.11.0): Extracting archive
  - Installing ramsey/uuid (4.7.4): Extracting archive
  - Installing pocketmine/snooze (0.5.0): Extracting archive
  - Installing pocketmine/log (0.4.0): Extracting archive
  - Installing pocketmine/binaryutils (0.2.4): Extracting archive
  - Installing pocketmine/raklib (0.15.1): Extracting archive
  - Installing pocketmine/raklib-ipc (0.2.0): Extracting archive
  - Installing pocketmine/netresearch-jsonmapper (v4.2.999): Extracting archive
  - Installing pocketmine/nbt (0.3.4): Extracting archive
  - Installing pocketmine/math (0.4.3): Extracting archive
  - Installing pocketmine/locale-data (2.19.5): Extracting archive
  - Installing pocketmine/errorhandler (0.6.0): Extracting archive
  - Installing pocketmine/color (0.3.1): Extracting archive
  - Installing pocketmine/callback-validator (1.0.3): Extracting archive
  - Installing pocketmine/bedrock-protocol (22.0.0+bedrock-1.20.0): Extracting archive
  - Installing pocketmine/bedrock-item-upgrade-schema (1.3.0): Extracting archive
  - Installing pocketmine/bedrock-data (2.3.1+bedrock-1.20.0): Extracting archive
  - Installing pocketmine/bedrock-block-upgrade-schema (2.2.0): Extracting archive
  - Installing fgrosse/phpasn1 (v2.5.0): Extracting archive
  - Installing adhocore/json-comment (1.2.1): Extracting archive
  - Installing pocketmine/pocketmine-mp (5.1.2): Extracting archive
  - Installing react/promise (v2.10.0): Extracting archive
  - Installing seld/jsonlint (1.10.0): Extracting archive
  - Installing seld/phar-utils (1.2.1): Extracting archive
  - Installing seld/signal-handler (2.0.1): Extracting archive
  - Installing symfony/process (v6.3.0): Extracting archive
  - Installing symfony/polyfill-php81 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-php73 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
  - Installing symfony/string (v6.3.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.3.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.3.0): Extracting archive
  - Installing symfony/console (v6.3.0): Extracting archive
  - Installing composer/composer (2.5.8): Extracting archive
  - Installing sof3/pharynx (0.3.2): Extracting archive
Package fgrosse/phpasn1 is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
30 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PHP Warning:  Array to string conversion in phar:///opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar/src/Args.php on line 270
[17:24:21] Notice: skipping non-virion dependency /home/runner/work/Texter/Texter/vendor/pocketmine/pocketmine-mp
PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/runner/work/Texter/Texter/Array): Failed to open directory: No such file or directory in phar:///opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar/src/Main.php:100
Stack trace:
#0 phar:///opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar/src/Main.php(100): RecursiveDirectoryIterator->__construct()
#1 phar:///opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar/src/Main.php(54): SOFe\Pharynx\Main::parseFiles()
#2 /opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar(8): SOFe\Pharynx\Main::main()
#3 {main}
  thrown in phar:///opt/hostedtoolcache/pharynx/0.3.2/x64/pharynx.phar/src/Main.php on line 100
/home/runner/work/_actions/SOF3/pharynx/v0.2/node_modules/@actions/exec/lib/toolrunner.js:592
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/usr/bin/php' failed with exit code 255
    at ExecState._setResult (/home/runner/work/_actions/SOF3/pharynx/v0.2/node_modules/@actions/exec/lib/toolrunner.js:592:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/SOF3/pharynx/v0.2/node_modules/@actions/exec/lib/toolrunner.js:575:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/SOF3/pharynx/v0.2/node_modules/@actions/exec/lib/toolrunner.js:469:27)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
SOF3 commented 1 year ago

Right, looks like $src should be handled as a string[] instead of a string here. https://github.com/SOF3/pharynx/blob/8c7c3116723170b3bc86b6d927cd65e82ed1e46a/src/Args.php#L266-L271

SOF3 commented 1 year ago

I am not on my personal computer right now. A quick pull request to fix this would be welcome.

SOF3 commented 1 year ago

Fixed in 0.3.3