self-update does update, but displays class not found error and PHP output due to PHAR content changing
オープン
@asgrim がすでに取り組んでいます。
2025年5月8日 から。
評価
この issue はまだ評価されていません。
説明
bug
maintainer investigating
We introduced the EventDispatcher in #219 to handle the banner, but this has introduced a side-effect when the PHAR is overwritten (by SelfUpdateCommand), in that the PHAR content has changed and so the subsequent class loads will fail.
Reproducer:
$ php box.phar compile && php pie.phar self-update --nightly
<box compile snipped>
🥧 PHP Installer for Extensions (PIE) 0.11.0@5d7fa4f, from The PHP Foundation
You are running PHP 8.4.6
Target PHP installation: 8.4.6 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.4)
Downloading the latest nightly release.
✅ Verified the new PIE version
✅ PIE has been upgraded to nightly
icense information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Util;
use Composer\XdebugHandler\XdebugHandler;
/**
* Provides ini file location functions that work with and without a restart.
* When the process has restarted it uses a tmp ini and stores the original
* ini locations in an environment variable.
*
* @author John Stevenson <john-stevenson@blueyonder.co.uk>
*/
class IniHelper
{
/**
* Returns an array of php.ini locations with at least one entry
*
* The equivalent of calling php_ini_loaded_file then php_ini_scanned_files.
* The loaded ini location is the first entry and may be empty.
*
* @return string[]
*/
public static function getAll(): array
{
return XdebugHandler::getAllIniFiles();
}
/**
* Describes the location of the loaded php.ini file(s)
*/
public static function getMessage(): string
{
$paths = self::getAll();
if (empty($paths[0])) {
array_shift($paths);
}
$ini = array_shift($paths);
if (empty($ini)) {
return 'A php.ini file does not exist. You will have to create one.';
}
if (!ePHP Fatal error: Uncaught Error: Class "Symfony\Component\Console\Event\ConsoleTerminateEvent" not found in phar:///home/james/workspace/phpf/pie/pie.phar/vendor/symfony/console/Application.php:1110
Stack trace:
#0 phar:///home/james/workspace/phpf/pie/pie.phar/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#1 phar:///home/james/workspace/phpf/pie/pie.phar/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#2 phar:///home/james/workspace/phpf/pie/pie.phar/bin/pie(53): Symfony\Component\Console\Application->run()
#3 /home/james/workspace/phpf/pie/pie.phar(15): require('...')
#4 {main}
thrown in phar:///home/james/workspace/phpf/pie/pie.phar/vendor/symfony/console/Application.php on line 1110
- 主要言語
- PHP
- スター
- 2k
- フォーク
- 73
- 平均マージ
- 3時間 37分
- マージ済み PR(30日)
- 11
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/pie のほかの issue
-
enhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
似ている issue
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Automattic/blocks-engine#2161 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/static-site-importer#1824 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100