execWithResult(BUILD_ROOT_PATH . '/bin/php -n -r "assert(defined(\'PASSWORD_ARGON2I\'));"'); if ($ret !== 0) { throw new ValidationException('extension ' . $this->getName() . ' failed sanity check', validation_module: 'password_argon2 function check'); } } #[CustomPhpConfigureArg('Linux')] #[CustomPhpConfigureArg('Darwin')] public function getConfigureArg(PackageInstaller $installer, PackageBuilder $builder): string { if ($installer->getPhpExtensionPackage('openssl')?->isBuildStatic()) { if (php::getPHPVersionID() >= 80500 || (php::getPHPVersionID() >= 80400 && !$builder->getOption('enable-zts'))) { return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead } } return '--with-password-argon2'; } }