You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PIE checksum fails with Ubuntu PHP 8.1.2 package #757
This checksum failure was reproduced with Ubuntu's 8.1.2-1ubuntu2.26 PHP package in the original test container. That binary exposes a hash_file() signature with only three parameters. This should not be generalized to all PHP 8.1 builds.
PHP 8.1 API verification
The fourth array $options = [] parameter was added to native hash_file() in PHP 8.1 (PHP.Watch). The official php:8.1-cli-bookworm image (PHP 8.1.34) reflects four parameters and accepts the four-argument call.
PIE 1.5.1 also successfully built, installed, checksum-verified, and loaded the extension from a local source repository under PHP 8.1.34 with CUDA enabled. PHP 8.4.26 and 8.5.11 installs passed as well.
Follow-up
The proposed Safe PR #757 was closed because its PHP < 8.5 branch would drop a documented argument on PHP 8.1-8.4. If this Ubuntu package mismatch needs continued tracking, it should be investigated as a distribution-specific PHP build issue, potentially with runtime feature detection. Checksum verification must not be disabled.
Correction after end-to-end validation: PHP.Watch documents the fourth hash_file()$options parameter as added in PHP 8.1. I verified the official php:8.1-cli-bookworm image (PHP 8.1.34): Reflection reports four parameters, the native four-argument call succeeds, and PIE 1.5.1 successfully installs and loads this extension from source with CUDA enabled.
The earlier failure reproduces only with the Ubuntu package 8.1.2-1ubuntu2.26 used in the original test container; that binary reports only three parameters. This is not a general PHP 8.1–8.4 or pre-8.5 incompatibility. The README has been corrected. Please keep this only if we want to track that specific distribution build mismatch; checksum verification should remain enabled.
changed the title [-]PHP 8.1 install fails while checksumming extension binary with Safe 3.4.0[/-][+]PIE checksum fails with Ubuntu PHP 8.1.2 package[/+]on Oct 2, 2026
@lcmialichi sorry, I'm really not sure what you're reporting here. This looks written by an LLM, and really is lacking any context (e.g. it refers to the original test container ??) Can you (a human) please respond to this with clarification?
@lcmialichi sorry, I'm really not sure what you're reporting here. This looks written by an LLM, and really is lacking any context (e.g. it refers to the original test container ??) Can you (a human) please respond to this with clarification?
I ran into a minor issue while installing an extension with PHP 8.1. The thecodingmachine/safe dependency was throwing an error that appeared to be related to the PHP version since hash_file didn't accept four parameters prior to version 8.1 even though I was actually running a version later than 8.1. I opened an issue but confirmed that PHP does support four parameters starting with version 8.1, so the problem likely lies with the container version.
I'll leave the error here in case it helps. If not, feel free to close this issue.
php --version
PHP 8.1.2-1ubuntu2.26 (cli) (built: Sep 2 2026 12:42:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.26, Copyright (c), by Zend Technologies
pie install apcu/apcu
🥧 PHP Installer for Extensions (PIE) 1.5.1, from The PHP Foundation
You are running PHP 8.1.2-1ubuntu2.26
Target PHP installation: 8.1.2 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.1)
Found package: apcu/apcu:v5.1.28 which provides ext-apcu
Extracted apcu/apcu:v5.1.28 source to: /root/.config/pie/php8.1_b3143496657e069b789f6a0704c0227e/vendor/apcu/apcu
phpize complete.
Configure complete with options: --with-php-config=/usr/bin/php-config
Build complete: /root/.config/pie/php8.1_b3143496657e069b789f6a0704c0227e/vendor/apcu/apcu/modules/apcu.so
PHP Fatal error: Uncaught ArgumentCountError: hash_file() expects at most 3 arguments, 4 given in phar:///usr/local/bin/pie/vendor/thecodingmachine/safe/lib/special_cases.php:456
Stack trace:
#0 phar:///usr/local/bin/pie/vendor/thecodingmachine/safe/lib/special_cases.php(456): hash_file()#1 phar:///usr/local/bin/pie/src/File/BinaryFile.php(38): Safe\hash_file()#2 phar:///usr/local/bin/pie/src/Building/UnixBuild.php(126): Php\Pie\File\BinaryFile::fromFileWithSha256Checksum()#3 phar:///usr/local/bin/pie/src/Building/UnixBuild.php(46): Php\Pie\Building\UnixBuild->buildFromSource()#4 phar:///usr/local/bin/pie/src/ComposerIntegration/InstallAndBuildProcess.php(62): Php\Pie\Building\UnixBuild->__invoke()#5 phar:///usr/local/bin/pie/src/ComposerIntegration/PiePackageInstaller.php(51): Php\Pie\ComposerIntegration\InstallAndBuildProcess->__invoke()#6 phar:///usr/local/bin/pie/src/ComposerIntegration/PiePackageInstaller.php(137): Php\Pie\ComposerIntegration\PiePackageInstaller->Php\Pie\ComposerIntegration\{closure}()#7 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): Php\Pie\ComposerIntegration\PiePackageInstaller->Php\Pie\ComposerIntegration\{closure}()#8 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(174): React\Promise\Internal\FulfilledPromise->then()#9 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#10 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#11 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): React\Promise\Promise::React\Promise\{closure}()#12 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(181): React\Promise\Internal\FulfilledPromise->then()#13 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#14 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#15 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): React\Promise\Promise::React\Promise\{closure}()#16 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(178): React\Promise\Internal\FulfilledPromise->then()#17 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#18 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#19 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): React\Promise\Promise::React\Promise\{closure}()#20 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(181): React\Promise\Internal\FulfilledPromise->then()#21 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#22 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#23 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): React\Promise\Promise::React\Promise\{closure}()#24 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(181): React\Promise\Internal\FulfilledPromise->then()#25 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#26 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#27 phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php(47): React\Promise\Promise::React\Promise\{closure}()#28 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(181): React\Promise\Internal\FulfilledPromise->then()#29 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(222): React\Promise\Promise::React\Promise\{closure}()#30 phar:///usr/local/bin/pie/vendor/react/promise/src/Promise.php(287): React\Promise\Promise->settle()#31 [internal function]: React\Promise\Promise::React\Promise\{closure}()#32 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/ProcessExecutor.php(395): call_user_func()#33 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/Loop.php(88): Composer\Util\ProcessExecutor->countActiveJobs()#34 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(434): Composer\Util\Loop->wait()#35 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(409): Composer\Installer\InstallationManager->waitOnPromises()#36 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(323): Composer\Installer\InstallationManager->executeBatch()#37 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php(221): Composer\Installer\InstallationManager->downloadAndExecuteBatch()#38 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php(876): Composer\Installer\InstallationManager->execute()#39 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php(686): Composer\Installer->doInstall()#40 phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php(325): Composer\Installer->doUpdate()#41 phar:///usr/local/bin/pie/src/ComposerIntegration/ComposerIntegrationHandler.php(225): Composer\Installer->run()#42 phar:///usr/local/bin/pie/src/Command/InstallCommand.php(205): Php\Pie\ComposerIntegration\ComposerIntegrationHandler->runInstall()#43 phar:///usr/local/bin/pie/vendor/symfony/console/Command/Command.php(326): Php\Pie\Command\InstallCommand->execute()#44 phar:///usr/local/bin/pie/vendor/symfony/console/Application.php(1121): Symfony\Component\Console\Command\Command->run()#45 phar:///usr/local/bin/pie/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()#46 phar:///usr/local/bin/pie/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()#47 phar:///usr/local/bin/pie/bin/pie(68): Symfony\Component\Console\Application->run()#48 /usr/local/bin/pie(16): require('...')#49 {main}
thrown in phar:///usr/local/bin/pie/vendor/thecodingmachine/safe/lib/special_cases.php on line 456
Looks like this was a bug in PHP - php/php-src#11180 which was fixed in PHP 8.1.20+ and 8.2.7+
I can skip the Safe wrapper for this, until we drop support for 8.1/8.2, but I'd recommend using a newer PHP version than 8.1.2 (from 8.1.2-1ubuntu2.26) anyway, if possible.
Activity
lcmialichi commentedon Oct 2, 2026
Correction after end-to-end validation: PHP.Watch documents the fourth
hash_file()$optionsparameter as added in PHP 8.1. I verified the officialphp:8.1-cli-bookwormimage (PHP 8.1.34): Reflection reports four parameters, the native four-argument call succeeds, and PIE 1.5.1 successfully installs and loads this extension from source with CUDA enabled.The earlier failure reproduces only with the Ubuntu package
8.1.2-1ubuntu2.26used in the original test container; that binary reports only three parameters. This is not a general PHP 8.1–8.4 or pre-8.5 incompatibility. The README has been corrected. Please keep this only if we want to track that specific distribution build mismatch; checksum verification should remain enabled.[-]PHP 8.1 install fails while checksumming extension binary with Safe 3.4.0[/-][+]PIE checksum fails with Ubuntu PHP 8.1.2 package[/+]asgrim commentedon Oct 6, 2026
@lcmialichi sorry, I'm really not sure what you're reporting here. This looks written by an LLM, and really is lacking any context (e.g. it refers to
the original test container??) Can you (a human) please respond to this with clarification?lcmialichi commentedon Oct 6, 2026
I ran into a minor issue while installing an extension with PHP 8.1. The
thecodingmachine/safedependency was throwing an error that appeared to be related to the PHP version sincehash_filedidn't accept four parameters prior to version 8.1 even though I was actually running a version later than 8.1. I opened an issue but confirmed that PHP does support four parameters starting with version 8.1, so the problem likely lies with the container version.I'll leave the error here in case it helps. If not, feel free to close this issue.
php --version
PHP 8.1.2-1ubuntu2.26 (cli) (built: Sep 2 2026 12:42:10) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.2, Copyright (c) Zend Technologies with Zend OPcache v8.1.2-1ubuntu2.26, Copyright (c), by Zend Technologiespie install apcu/apcu
asgrim commentedon Oct 7, 2026
Thanks, will try to look into this.
asgrim commentedon Oct 7, 2026
Looks like this was a bug in PHP - php/php-src#11180 which was fixed in PHP 8.1.20+ and 8.2.7+
I can skip the Safe wrapper for this, until we drop support for 8.1/8.2, but I'd recommend using a newer PHP version than 8.1.2 (from
8.1.2-1ubuntu2.26) anyway, if possible.