self-update does update, but displays class not found error and PHP output due to PHAR content changing
@asgrim ya está trabajando en esto.
Desde el 8/5/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 2k
- Forks
- 73
- Merge medio
- 3 h 37 min
- PR fusionados (30 d)
- 11
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de php/pie
-
Improve --with-libdir handling Abiertoenhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
-
enhancement maintainer investigating
Issues similares
-
tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Automattic/static-site-importer#1829 ·