diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 88462c2..7672de3 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -124,8 +124,13 @@ jobs: dependency-versions: "${{ matrix.composer-deps }}" - name: "Run unit tests (PHPUnit)" + if: "${{ matrix.composer-deps == 'highest' }}" run: "composer dev:test:coverage:ci" + - name: "Run unit tests, with deprecation notices turned off (PHPUnit)" + if: "${{ matrix.composer-deps == 'lowest' }}" + run: "composer dev:test:coverage:ci -- -d 'error_reporting=E_ALL & ~E_DEPRECATED'" + - name: "Publish coverage report to Codecov" uses: "codecov/codecov-action@v3.1.1" diff --git a/src/Command/GenerateCommand.php b/src/Command/GenerateCommand.php index 308b1e2..0037be8 100644 --- a/src/Command/GenerateCommand.php +++ b/src/Command/GenerateCommand.php @@ -15,10 +15,7 @@ namespace Ramsey\Uuid\Console\Command; use Ramsey\Uuid\Console\Exception; -use Ramsey\Uuid\FeatureSet; -use Ramsey\Uuid\Generator\CombGenerator; use Ramsey\Uuid\Uuid; -use Ramsey\Uuid\UuidFactory; use Ramsey\Uuid\UuidInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; @@ -26,7 +23,6 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use function assert; use function filter_var; use function method_exists; @@ -70,18 +66,6 @@ protected function configure(): void InputOption::VALUE_REQUIRED, 'Generate count UUIDs instead of just a single one.', 1, - ) - ->addOption( - 'comb', - null, - InputOption::VALUE_NONE, - 'For version 4 UUIDs, uses the COMB strategy to generate the random data.', - ) - ->addOption( - 'guid', - 'g', - InputOption::VALUE_NONE, - 'Returns a GUID formatted UUID.', ); } @@ -98,21 +82,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int ], ); - if ((bool) $input->getOption('guid') === true) { - $features = new FeatureSet(true); - - Uuid::setFactory(new UuidFactory($features)); - } - - if ((bool) $input->getOption('comb') === true) { - $factory = Uuid::getFactory(); - assert($factory instanceof UuidFactory); - - $factory->setRandomGenerator( - new CombGenerator($factory->getRandomGenerator(), $factory->getNumberConverter()), - ); - } - /** @var scalar $inputVersion */ $inputVersion = $input->getArgument('version');