Coder Social home page Coder Social logo

pharynx's Issues

Pharynx error when compressing.

[~/Documentos/Development-PMMP]
allyson  bin/php7/bin/php pharynx.phar -i ../Plugins/LobbySystem -c -p=LobbySystem.phar
[16:30:54] Running composer install for plugin
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
10 packages you are using are looking for funding.
Use the composer fund command to find out more!
phpstan/extension-installer: Extensions installed

phpstan/phpstan-strict-rules: installed
[16:30:54] Notice: skipping non-virion dependency ../Plugins/LobbySystem/vendor/pocketmine/pocketmine-mp
"libpmquery" is not a valid class name%

Uncaught Error

✘ ⚙  allyson  php pharynx.phar -i plugins/LobbySystem -p lobbysystem.phar
PHP Fatal error: Uncaught Error: Call to undefined function yaml_parse_file() in phar:///home/allyson/Documentos/Development-PMMP/pharynx.phar/src/Args.php:149
Stack trace:
#0 phar:///home/allyson/Documentos/Development-PMMP/pharynx.phar/src/Main.php(25): SOFe\Pharynx\Args::parse()
#1 /home/allyson/Documentos/Development-PMMP/pharynx.phar(8): SOFe\Pharynx\Main::main()
#2 {main}
thrown in phar:///home/allyson/Documentos/Development-PMMP/pharynx.phar/src/Args.php on line 149

Plugins defined in "PLUGIN PATHS" being overwritten

I've been trying to use the compilation option for my plugins using the ./start.sh option but I realize that when I indicate 2 directories or more, the plugin is overwritten by the other one because of their identical names.

How to reproduce the error:

Open ./start.sh and enter two paths, start ./start.sh and see that one plugin is replaced by the other because their names are the same.

.sql files are deleted/ignored when generating the output phar

I had a db.sql file that wasn't there in the .phar output file, then i renamed it to schema.php and make it a string and the file was there.

Im not too sure if all .sql files are deleted/ignored but changing the extension worked for me

.sql files are good to have your db schema so i suggest don't removing them when generating the output phar

Parsing problems using strangely formatted but correct code

Xd-pro/safe_sql#2

Error:
Syntax error: syntax error, unexpected token "public" on dev-plugins\dev/src\Finnbar\FFA\database\Transaction.php:2

As you can see the error is incorrect. There is no token "public" on line 2 of the file. The code works correctly when formatted with intelephense. The PHP CLI and intelephense both treat this code as valid, but pharynx does not. It doesn't contain any top-level functionality or ifs

Here is an example of the code:

<?php

namespace Finnbar\FFA\database;

use Exception;
use pocketmine\thread\Thread;
use pmmp\thread\ThreadSafe;
use pmmp\thread\ThreadSafeArray;
use pocketmine\plugin\PluginBase;
use pocketmine\scheduler\ClosureTask;
use Throwable;

/*

Hi future developer. This file is used by safe_sql.exe for code generation. Don't modify it manually.

*/

abstract class TransactionBase
{

    public function __construct(public \PDO $db)
    {
        $db->beginTransaction();
    }

    public function commit(): bool
    {
        return $this->db->commit();
    }

    public function rollBack(): bool
    {
        return $this->db->rollBack();
    }
}

abstract class AsyncTransaction
{

    abstract public function run(Transaction $t);
}

class DatabaseThread extends Thread
{

    /** @var ThreadSafeArray<int, DataEntry> */
    public $data;

    public int $active = 0;

    public function __construct(private string $databaseConnector)
    {
        $this->data = new ThreadSafeArray;
    }

    public function tick()
    {
        if ($this->isTerminated()) throw new Exception("Thread died?");
        /** @var DataEntry[] */
        $toProcess = [];
        $this->synchronized(function () use (&$toProcess) {
            $toPutBack = [];
            foreach ($this->data as $data) {
                if (!$data->query) {
                    $toProcess[] = $data;
                } else {
                    $toPutBack[] = $data;
                }
            }
            $this->data = ThreadSafeArray::fromArray($toPutBack);
        });
        foreach ($toProcess as $data) {
            if ($data->callbackId !== null) {
                $deser = unserialize($data->data);
                if ($deser instanceof Throwable) {
                    throw $deser;
                }
                ClosureStore::$closures[$data->callbackId]($deser);
                unset(ClosureStore::$closures[$data->callbackId]);
            }
        }
    }

    public bool $stop = false;

    public function onRun(): void
    {
        $conn = new \PDO($this->databaseConnector);
        while (true) {
            $t = false;
            /** @var DataEntry[] */
            $toProcess = [];
            $this->synchronized(function () use (&$toProcess, &$t) {
                $toPutBack = [];
                foreach ($this->data as $data) {
                    if ($data->query) {
                        $toProcess[] = $data;
                    } else {
                        $toPutBack[] = $data;
                    }
                }
                $this->data = ThreadSafeArray::fromArray($toPutBack);
                $this->active = count($toProcess);
                if ($this->stop && $this->active === 0) {
                    $t = true;
                }
            });

            if ($t) break;

            /** @var DataEntry[] */
            $toAdd = [];

            foreach ($toProcess as $data) {
                /** @var AsyncTransaction */
                $at = unserialize($data->data);
                try {
                    $toAdd[] = new DataEntry(false, serialize($at->run(new Transaction($conn))), $data->callbackId);
                    if ($conn->inTransaction()) $conn->commit();
                } catch (Exception $e) {
                    throw $e;
                    exit;
                    $toAdd[] = new DataEntry(false, serialize($e), $data->callbackId);
                    if ($conn->inTransaction()) $conn->rollBack();
                }
                $this->synchronized(function () {
                    $this->active--;
                });
            }
            $this->synchronized(function () use (&$toAdd) {
                foreach ($toAdd as $ta) {
                    $this->data[] = $ta;
                }
            });
            usleep(100);
        }
    }
}

class DatabasePool
{

    /** @var DatabaseThread[] $threads */
    private array $threads = [];

    public function run(AsyncTransaction $query, \Closure $onDone = null)
    {
        if ($onDone === null) {
            $onDone = function (mixed $data) {
                if ($data instanceof Exception) throw $data;
            };
        }
        $id = 0;
        while (isset(ClosureStore::$closures[$id])) {
            $id++;
        }
        ClosureStore::$closures[$id] = $onDone;
        $thread = $this->strongest_thread();
        $thread->synchronized(function () use (&$query, &$id, &$thread) {
            $thread->data[] = new DataEntry(true, \serialize($query), $id);
        });
    }

    public function stopThreads() {
        foreach ($this->threads as $thread) {
            $thread->synchronized(function () use (&$thread) {
                $thread->stop = true;
            });
            if ($thread->isRunning()) {
                $thread->join();
            }
        }
    }

    public function tick()
    {
        foreach ($this->threads as $thread) {
            $thread->tick();
        }
    }

    private function strongest_thread(): DatabaseThread
    {
        $lowest = \PHP_INT_MAX;
        $lowestThread = null;
        foreach ($this->threads as $thread) {
            if ($thread->active < $lowest) {
                $lowest = $thread->active;
                $lowestThread = $thread;
            }
        }
        if ($lowestThread === null) throw new \Exception("No threads available to process asynchronous query");
        return $lowestThread;
    }

    public function __construct(string $connectionString, int $workers = 1)
    {
        while ($workers > 0) {
            $workers--;
            $thread = new DatabaseThread($connectionString);
            $thread->start();
            $this->threads[] = $thread;
        }
    }
}

class DataEntry extends ThreadSafe
{

    public function __construct(public bool $query, public $data, public ?string $callbackId = null)
    {
    }
}

class ClosureStore
{
    public static array $closures = [];
}

class SafeSql
{
    private function __construct()
    {
    }

    public static function bootstrapPocketmine(PluginBase $plugin, string $connectionString, int $pollTicks = 4, int $workers = 1): DatabasePool
    {
        $p = new DatabasePool($connectionString, $workers);
        $plugin->getScheduler()->scheduleRepeatingTask(new ClosureTask(function () use (&$p) {
            $p->tick();
        }), $pollTicks);
        return $p;
    }
}
class Transaction extends TransactionBase {/** @return int */public function kit_create_table() {$statement = $this->db->prepare("create table if not exists PracticeKits (    OwnerUUID VARCHAR(36),    FOREIGN KEY (OwnerUUID) REFERENCES PracticePlayers(UUID),    KitType VARCHAR(25) NOT NULL,    PRIMARY KEY (OwnerUUID, KitType),    Inventory JSON NOT NULL) ");$statement->execute([]);return $statement->rowCount();}/** @return int */public function practice_set_player(string $uuid,string $name,int $kills,int $deaths,int $elo,int $cps,int $ownDeathMessages,int $otherDeathMessages,int $arenaRespawn,int $scoreboard,int $autosprint,int $seenRules,) {$statement = $this->db->prepare("insert into PracticePlayers (UUID, LastName, Kills, Deaths, Elo, CPS, OwnDeathMessages, OtherDeathMessages, ArenaRespawn, Scoreboard, Autosprint, SeenRules)values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) on duplicate key update    LastName = ?,    Kills = ?,     Deaths = ?,     Elo = ?,     CPS = ?,     OwnDeathMessages = ?,     OtherDeathMessages = ?,     ArenaRespawn = ?,     Scoreboard = ?,    Autosprint = ?,    SeenRules = ? ");$statement->execute([$uuid,$name,$kills,$deaths,$elo,$cps,$ownDeathMessages,$otherDeathMessages,$arenaRespawn,$scoreboard,$autosprint,$seenRules,$name,$kills,$deaths,$elo,$cps,$ownDeathMessages,$otherDeathMessages,$arenaRespawn,$scoreboard,$autosprint,$seenRules,]);return $statement->rowCount();}/** @return practice_top_kdr[]|\Generator */public function practice_top_kdr() {$statement = $this->db->prepare("SELECT LastName,       Deaths,       (Kills / NULLIF(Deaths, 0)) AS Kdr FROM PracticePlayers WHERE Deaths >= 20 ORDER BY kdr DESC LIMIT 20 "); $statement->execute([]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new practice_top_kdr(...$res);}}/** @return int */public function kit_set_kit(string $OwnerUUID,string $KitType,string $Inventory,) {$statement = $this->db->prepare("insert into PracticeKits (OwnerUUID, KitType, Inventory) values (?, ?, ?) on duplicate key update Inventory = ? ");$statement->execute([$OwnerUUID,$KitType,$Inventory,$Inventory,]);return $statement->rowCount();}/** @return kit_get_kit[]|\Generator */public function kit_get_kit(string $OwnerUUID,) {$statement = $this->db->prepare("select Inventory, KitType from PracticeKits where OwnerUUID = ? "); $statement->execute([$OwnerUUID,]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new kit_get_kit(...$res);}}/** @return practice_top_deaths[]|\Generator */public function practice_top_deaths() {$statement = $this->db->prepare("select LastName, Deaths from PracticePlayers order by Deaths desc limit 0,20 "); $statement->execute([]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new practice_top_deaths(...$res);}}/** @return practice_get_player[]|\Generator */public function practice_get_player(string $uuid,) {$statement = $this->db->prepare("select UUID, LastName, Kills, Deaths, Elo, CPS, OwnDeathMessages, OtherDeathMessages, ArenaRespawn, Scoreboard, Autosprint, SeenRules from PracticePlayers where UUID = ? "); $statement->execute([$uuid,]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new practice_get_player(...$res);}}/** @return int */public function practice_create_table_players() {$statement = $this->db->prepare("create table if not exists PracticePlayers (    UUID varchar(36) primary key,    LastName varchar(16) not null,    Kills int unsigned not null default 0,    Deaths int unsigned not null default 0,    Elo int unsigned not null default 1000,    CPS boolean not null default true,    OwnDeathMessages boolean not null default true,    OtherDeathMessages boolean not null default true,    ArenaRespawn boolean not null default false,    Scoreboard boolean not null default true,    Autosprint boolean not null default false,    SeenRules boolean not null default false) ");$statement->execute([]);return $statement->rowCount();}/** @return practice_top_elo[]|\Generator */public function practice_top_elo() {$statement = $this->db->prepare("select LastName, Elo from PracticePlayers order by Elo desc limit 0,20 "); $statement->execute([]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new practice_top_elo(...$res);}}/** @return practice_top_kills[]|\Generator */public function practice_top_kills() {$statement = $this->db->prepare("select LastName, Kills from PracticePlayers order by Kills desc limit 0,20 "); $statement->execute([]); while ($res = $statement->fetch(\PDO::FETCH_NUM)) { yield new practice_top_kills(...$res);}}}class practice_top_kdr {public function __construct(public string $LastName,public float $Kdr,) {}}class kit_get_kit {public function __construct(public string $Inventory,public string $KitType,) {}}class practice_top_deaths {public function __construct(public string $LastName,public int $Deaths,) {}}class practice_get_player {public function __construct(public string $UUID,public string $LastName,public int $Kills,public int $Deaths,public int $Elo,public bool $CPS,public bool $OwnDeathMessages,public bool $OtherDeathMessages,public bool $ArenaRespawn,public bool $Scoreboard,public bool $Autosprint,public bool $SeenRules,) {}}class practice_top_elo {public function __construct(public string $LastName,public int $Elo,) {}}class practice_top_kills {public function __construct(public string $LastName,public int $Kills,) {}}class AT_kit_create_table extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->kit_create_table();return $out;}}class AT_practice_set_player extends AsyncTransaction {public function __construct(private string $uuid,private string $name,private int $kills,private int $deaths,private int $elo,private int $cps,private int $ownDeathMessages,private int $otherDeathMessages,private int $arenaRespawn,private int $scoreboard,private int $autosprint,private int $seenRules,) {}public function run(Transaction $t,) {$out = $t->practice_set_player($this->uuid,$this->name,$this->kills,$this->deaths,$this->elo,$this->cps,$this->ownDeathMessages,$this->otherDeathMessages,$this->arenaRespawn,$this->scoreboard,$this->autosprint,$this->seenRules,);return $out;}}class AT_practice_top_kdr extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->practice_top_kdr();
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}class AT_kit_set_kit extends AsyncTransaction {public function __construct(private string $OwnerUUID,private string $KitType,private string $Inventory,) {}public function run(Transaction $t,) {$out = $t->kit_set_kit($this->OwnerUUID,$this->KitType,$this->Inventory,);return $out;}}class AT_kit_get_kit extends AsyncTransaction {public function __construct(private string $OwnerUUID,) {}public function run(Transaction $t,) {$out = $t->kit_get_kit($this->OwnerUUID,);
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}class AT_practice_top_deaths extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->practice_top_deaths();
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}class AT_practice_get_player extends AsyncTransaction {public function __construct(private string $uuid,) {}public function run(Transaction $t,) {$out = $t->practice_get_player($this->uuid,);
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}class AT_practice_create_table_players extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->practice_create_table_players();return $out;}}class AT_practice_top_elo extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->practice_top_elo();
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}class AT_practice_top_kills extends AsyncTransaction {public function __construct() {}public function run(Transaction $t,) {$out = $t->practice_top_kills();
            $rv = [];
            foreach ($out as $out) {
                $rv[]=$out;
            }
            return $rv;}}

0.3.2 with error

Run SOF3/[email protected]
  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)

Unable to Build Plugins with Virions Having One Folder Paths

Code Sample

Command: %PHP_BINARY% -dphar.readonly=0 pharynx.phar -c -i %PLUGIN_PATH% -p=%PLUGIN_PATH%\out\%PLUGIN_NAME%.phar
Output:

[13:25:08] Running `composer install` for plugin
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
[13:25:09] Notice: skipping non-virion dependency C:\Users\Aboshxm2\Desktop\minecraft\pocketmine\pharynx-bug\testPlugin/vendor/pocketmine/pocketmine-mp
"test" is not a valid class name
Process finished with exit code 1

Limited information on syntax error

Once an error occurs I only receive limited information on the syntax error. For example: "Parse error: syntax error, unexpected token "{" in on line 62". Normally, you would get the pathing, file name, line number, the error, and a stack trace. However, in my case, I would only get a Line number, an error and that's it. There's no pathing to the file which makes it extremely difficult to solve the issue as you don't even know where the issue resigns.

src-namespace-prefix causes crash

It appears to fail when building psr-4 plugins. src-namespace-prefix remains apart of the plugin manifest while the folder structure is in psr-0, triggering an error on PM server startup

Pharynx workflow crashes if there is no LICENSE file

Error:

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, stat 'LICENSE'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'LICENSE'
}

According to the workflow code, the LICENSE file is supposed to be optional.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.