Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Remove unused extensions requirements and packages #1151

Merged
merged 5 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"ext-iconv": "*",
"ext-mbstring": "*",
"ext-phar": "*",
"ext-sodium": "*",
"composer-plugin-api": "^2.2",
"amphp/parallel-functions": "^1.1",
"composer/semver": "^3.3.2",
Expand All @@ -33,7 +32,6 @@
"laravel/serializable-closure": "^1.2.2",
"nikic/iter": "^2.2",
"nikic/php-parser": "^4.15.2",
"paragonie/constant_time_encoding": "^2.6",
"phpdocumentor/reflection-docblock": "^5.3",
"phpdocumentor/type-resolver": "^1.7",
"psr/log": "^3.0",
Expand Down Expand Up @@ -61,7 +59,6 @@
"webmozarts/strict-phpunit": "^7.6"
},
"replace": {
"paragonie/sodium_compat": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
Expand Down
84 changes: 8 additions & 76 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Console/Command/Extract.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
use KevinGH\Box\Phar\InvalidPhar;
use KevinGH\Box\Phar\PharFactory;
use KevinGH\Box\Phar\PharMeta;
use ParagonIE\ConstantTime\Hex;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Throwable;
use function bin2hex;
use function file_exists;
use function KevinGH\Box\check_php_settings;
use function realpath;
Expand Down Expand Up @@ -188,7 +188,7 @@
{
$extension = self::getExtension($file);

return Hex::encode(random_bytes(16)).$extension;
return bin2hex(random_bytes(16)).$extension;

Check warning on line 191 in src/Console/Command/Extract.php

View workflow job for this annotation

GitHub Actions / Infection (PHP 8.1)

Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ private static function generateAlias(string $file) : string { $extension = self::getExtension($file); - return bin2hex(random_bytes(16)) . $extension; + return bin2hex(random_bytes(15)) . $extension; } private static function getExtension(string $file) : string {
}

private static function getExtension(string $file): string
Expand Down
4 changes: 2 additions & 2 deletions src/Phar/PharInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
use Fidry\FileSystem\FS;
use KevinGH\Box\Console\Command\Extract;
use OutOfBoundsException;
use ParagonIE\ConstantTime\Hex;
use Phar;
use RuntimeException;
use Symfony\Component\Filesystem\Path;
Expand All @@ -55,6 +54,7 @@
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\Process;
use function bin2hex;
use function file_exists;
use function getenv;
use function is_readable;
Expand Down Expand Up @@ -280,7 +280,7 @@ private static function initAlgorithms(): void
private static function initStubFileName(): void
{
if (!isset(self::$stubfile)) {
self::$stubfile = Hex::encode(random_bytes(12)).'.pharstub';
self::$stubfile = bin2hex(random_bytes(12)).'.pharstub';
}
}

Expand Down
Loading