From 654592557a8cae60169de6f2ba145ef7ebb38f37 Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Sun, 20 Feb 2022 19:59:30 +0100 Subject: [PATCH 01/14] Prepare v4.0 release (#76) * add sshPipelining test * update readme with more development goals * Feature/php 8 migration (#68) * move to php 8 compat only * fix phpstan config * fix phpcs issues * add phpunit and printer * remove version from composer.json * add phpunit as dev dependency to keep scrutinizer happy * Added version 6 for symfony/process to the required versions (#75) * fix phpcs, local versions, add 8.1 to travis * Add new badges, remove travis & Scrutinizer, switch to GH actions * Add more useful names to actions >.< * remove travis file * fix merge oversight Co-authored-by: Roy Kaldung --- .github/workflows/static-analysis-8-1.yml | 55 + .github/workflows/static-analysis.yml | 55 + .travis.yml | 23 - Asm/Ansible/Ansible.php | 53 +- .../Command/AbstractAnsibleCommand.php | 46 +- .../Command/AnsibleCommandInterface.php | 16 +- Asm/Ansible/Command/AnsibleGalaxy.php | 18 +- .../Command/AnsibleGalaxyInterface.php | 14 +- Asm/Ansible/Command/AnsiblePlaybook.php | 79 +- .../Command/AnsiblePlaybookInterface.php | 26 +- Asm/Ansible/Command/Option.php | 29 +- Asm/Ansible/Exception/CommandException.php | 4 +- Asm/Ansible/Process/ProcessBuilder.php | 21 +- .../Process/ProcessBuilderInterface.php | 13 +- Asm/Ansible/Utils/Env.php | 12 +- CHANGELOG.md | 9 + README.md | 16 +- .../Asm/Ansible/Command/AnsibleGalaxyTest.php | 39 +- .../Ansible/Command/AnsiblePlaybookTest.php | 143 +- Tests/Asm/Ansible/Command/OptionTest.php | 11 +- .../Ansible/Process/ProcessBuilderTest.php | 17 +- Tests/Asm/Ansible/Testing/AnsibleTestCase.php | 76 +- composer.json | 6 +- composer.lock | 2280 +++++++++++++++++ phpcs.xml | 24 + phpstan.neon | 5 + psalm.xml | 10 + 27 files changed, 2683 insertions(+), 417 deletions(-) create mode 100644 .github/workflows/static-analysis-8-1.yml create mode 100644 .github/workflows/static-analysis.yml delete mode 100644 .travis.yml create mode 100644 composer.lock create mode 100644 phpcs.xml create mode 100644 phpstan.neon create mode 100644 psalm.xml diff --git a/.github/workflows/static-analysis-8-1.yml b/.github/workflows/static-analysis-8-1.yml new file mode 100644 index 0000000..24aaf96 --- /dev/null +++ b/.github/workflows/static-analysis-8-1.yml @@ -0,0 +1,55 @@ +--- +name: Test and analyze PHP 8.1 +on: + push: {} + pull_request: + branches: + - main + - develop +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.1 + extensions: redis, apcu, ctype, dom, iconv, gd, mbstring, fileinfo, intl, json, mysql, bcmath, zip + coverage: none # disable xdebug, pcov + ini-values: post_max_size=256M memory + tools: cs2pr, pecl, php-cs-fixer, phpunit, vimeo/psalm, phpstan, phpcs + + - uses: actions/checkout@v2 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q + + - name: Install phpunit output for PRs + run: composer require mheap/phpunit-github-actions-printer + + - name: Run UnitTests + run: phpunit --printer mheap\\GithubActionsReporter\\Printer -c phpunit.xml.dist + + - name: Run phpstan + run: phpstan analyse --error-format=checkstyle -c "phpstan.neon" | cs2pr + + #- name: Run psalm + # run: psalm -c psalm.xml --output-format=github + + - name: Check PHP code style + continue-on-error: true + run: phpcs --standard=phpcs.xml --parallel=2 --report-full --report-checkstyle=./phpcs-report.xml + + - name: Show PHPCS results in PR + run: cs2pr ./phpcs-report.xml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..e963ff0 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,55 @@ +--- +name: Test and analyze PHP 8.0 +on: + push: {} + pull_request: + branches: + - main + - develop +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + extensions: redis, apcu, ctype, dom, iconv, gd, mbstring, fileinfo, intl, json, mysql, bcmath, zip + coverage: none # disable xdebug, pcov + ini-values: post_max_size=256M memory + tools: cs2pr, pecl, php-cs-fixer, phpunit, vimeo/psalm, phpstan, phpcs + + - uses: actions/checkout@v2 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q + + - name: Install phpunit output for PRs + run: composer require mheap/phpunit-github-actions-printer + + - name: Run UnitTests + run: phpunit --printer mheap\\GithubActionsReporter\\Printer -c phpunit.xml.dist + + - name: Run phpstan + run: phpstan analyse --error-format=checkstyle -c "phpstan.neon" | cs2pr + + #- name: Run psalm + # run: psalm -c psalm.xml --output-format=github + + - name: Check PHP code style + continue-on-error: true + run: phpcs --standard=phpcs.xml --parallel=2 --report-full --report-checkstyle=./phpcs-report.xml + + - name: Show PHPCS results in PR + run: cs2pr ./phpcs-report.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33a7fd5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -sudo: false - -language: php - -cache: - directories: - - $HOME/.composer/cache/files - -env: - global: - - deps="" - -matrix: - fast_finish: true - allow_failures: - include: - - php: 7.3 - - php: 7.4 - - php: 8.0 - -before_script: - - if [ "$PROCESS_VERSION" != "" ]; then composer require symfony/process:${PROCESS_VERSION} --dev --no-update; fi - - if [ "$deps" = "" ]; then composer install; fi diff --git a/Asm/Ansible/Ansible.php b/Asm/Ansible/Ansible.php index 8b174b5..84cc39e 100644 --- a/Asm/Ansible/Ansible.php +++ b/Asm/Ansible/Ansible.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible; @@ -18,6 +12,7 @@ use Asm\Ansible\Process\ProcessBuilder; use Asm\Ansible\Process\ProcessBuilderInterface; use Asm\Ansible\Utils\Env; +use JetBrains\PhpStorm\Pure; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\NullLogger; @@ -30,32 +25,20 @@ */ final class Ansible implements LoggerAwareInterface { - const DEFAULT_TIMEOUT = 300; - /** * Adds a local $logger instance and the setter. */ use LoggerAwareTrait; - /** - * @var string - */ - private $playbookCommand; + private const DEFAULT_TIMEOUT = 300; - /** - * @var string - */ - private $galaxyCommand; + private string $playbookCommand; - /** - * @var string - */ - private $ansibleBaseDir; + private string $galaxyCommand; - /** - * @var integer - */ - private $timeout; + private string $ansibleBaseDir; + + private int $timeout; /** * @param string $ansibleBaseDir base directory of ansible project structure @@ -69,7 +52,7 @@ public function __construct(string $ansibleBaseDir, string $playbookCommand = '' $this->galaxyCommand = $this->checkCommand($galaxyCommand, 'ansible-galaxy'); $this->timeout = Ansible::DEFAULT_TIMEOUT; - $this->logger= new NullLogger(); + $this->logger = new NullLogger(); } /** @@ -115,7 +98,7 @@ public function setTimeout(int $timeout): Ansible * @param string $prefix base command * @return ProcessBuilderInterface */ - private function createProcess(string $prefix): ProcessBuilderInterface + private function createProcess(string $prefix): ProcessBuilderInterface { $process = new ProcessBuilder($prefix, $this->ansibleBaseDir); @@ -132,8 +115,9 @@ private function checkCommand(string $command, string $default): string { // normally ansible is in /usr/local/bin/* if (empty($command)) { - if (Env::isWindows()) + if (Env::isWindows()) { return $default; + } // not testable without ansible installation if (null === shell_exec('which ' . $default)) { @@ -173,17 +157,20 @@ private function checkDir(string $dir): string * @param string $command * @return bool */ - private function isExecutable($command): bool + private function isExecutable(string $command): bool { - if (empty($command)) + if (empty($command)) { return false; + } - if (!Env::isWindows()) + if (!Env::isWindows()) { return is_executable($command); + } foreach (['exe', 'com', 'bat', 'cmd', 'ps1'] as $ext) { - if (strtolower(substr($command, -3, 3)) === $ext) + if (strtolower(substr($command, -3, 3)) === $ext) { return true; + } } return false; diff --git a/Asm/Ansible/Command/AbstractAnsibleCommand.php b/Asm/Ansible/Command/AbstractAnsibleCommand.php index ea12ddf..6dfd8ae 100644 --- a/Asm/Ansible/Command/AbstractAnsibleCommand.php +++ b/Asm/Ansible/Command/AbstractAnsibleCommand.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -28,25 +22,17 @@ abstract class AbstractAnsibleCommand * Adds a local $logger instance and the setter. */ use LoggerAwareTrait; - /** - * @var ProcessBuilderInterface - */ - protected $processBuilder; + + protected ProcessBuilderInterface $processBuilder; /** * @var Option[] */ - private $options; + private array $options; - /** - * @var array - */ - private $parameters; + private array $parameters; - /** - * @var array - */ - private $baseOptions; + private array $baseOptions; /** * @param ProcessBuilderInterface $processBuilder @@ -67,7 +53,7 @@ public function __construct(ProcessBuilderInterface $processBuilder, LoggerInter * @param bool $asArray * @return string|array */ - protected function prepareArguments(bool $asArray = true) + protected function prepareArguments(bool $asArray = true): string|array { $arguments = array_merge( [$this->getBaseOptions()], @@ -86,11 +72,11 @@ protected function prepareArguments(bool $asArray = true) * Add an Option. * * @param string $name - * @param string $value + * @param int|string $value */ - protected function addOption(string $name, string $value): void + protected function addOption(string $name, int|string $value): void { - $this->options[] = new Option($name, $value); + $this->options[] = new Option($name, (string)$value); } /** @@ -136,7 +122,7 @@ protected function getParameters(): array * @param string $baseOption * @return $this */ - protected function addBaseOption(string $baseOption) + protected function addBaseOption(string $baseOption): self { $this->baseOptions[] = $baseOption; @@ -160,7 +146,7 @@ protected function getBaseOptions(): string * @param string $glue * @return string */ - protected function checkParam($param, string $glue = ' '): string + protected function checkParam(string|array $param, string $glue = ' '): string { if (is_array($param)) { $param = implode($glue, $param); @@ -171,11 +157,12 @@ protected function checkParam($param, string $glue = ' '): string /** * Creates process with processBuilder builder and executes it. + * Has to return the process exit code in case of error * * @param callable|null $callback * @return int|string */ - protected function runProcess($callback = null) + protected function runProcess(?callable $callback): int|string { $process = $this->processBuilder ->setArguments( @@ -209,8 +196,9 @@ protected function runProcess($callback = null) protected function getProcessCommandline(Process $process): string { $commandline = $process->getCommandLine(); - if (count($process->getEnv()) === 0) + if (count($process->getEnv()) === 0) { return $commandline; + } // Here: we also need to dump the environment variables $vars = []; diff --git a/Asm/Ansible/Command/AnsibleCommandInterface.php b/Asm/Ansible/Command/AnsibleCommandInterface.php index 6a402c2..a7deda6 100644 --- a/Asm/Ansible/Command/AnsibleCommandInterface.php +++ b/Asm/Ansible/Command/AnsibleCommandInterface.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -22,12 +16,12 @@ interface AnsibleCommandInterface extends LoggerAwareInterface { /** * Executes a command process. - * Returns either exitcode or string output if no callback is given. + * Returns either exit code or string output if no callback is given. * * @param callable|null $callback * @return integer|string */ - public function execute($callback = null); + public function execute(?callable $callback = null): int|string; /** * Get parameter string which will be used to call ansible. @@ -35,5 +29,5 @@ public function execute($callback = null); * @param bool $asArray * @return string|array */ - public function getCommandlineArguments(bool $asArray = true); + public function getCommandlineArguments(bool $asArray = true): string|array; } diff --git a/Asm/Ansible/Command/AnsibleGalaxy.php b/Asm/Ansible/Command/AnsibleGalaxy.php index 73b2ca4..9c0157d 100644 --- a/Asm/Ansible/Command/AnsibleGalaxy.php +++ b/Asm/Ansible/Command/AnsibleGalaxy.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -25,7 +19,7 @@ final class AnsibleGalaxy extends AbstractAnsibleCommand implements AnsibleGalax * @param callable|null $callback * @return integer|string */ - public function execute($callback = null) + public function execute(?callable $callback = null): int|string { return $this->runProcess($callback); } @@ -72,7 +66,7 @@ public function info(string $role, string $version = ''): AnsibleGalaxyInterface * @param string|array $roles role_name(s)[,version] | scm+role_repo_url[,version] * @return AnsibleGalaxyInterface */ - public function install($roles = ''): AnsibleGalaxyInterface + public function install(string|array $roles = ''): AnsibleGalaxyInterface { $roles = $this->checkParam($roles, ' '); @@ -108,7 +102,7 @@ public function modulelist(string $roleName = ''): AnsibleGalaxyInterface * @param string|array $roles * @return AnsibleGalaxyInterface */ - public function remove($roles = ''): AnsibleGalaxyInterface + public function remove(string|array $roles = ''): AnsibleGalaxyInterface { $roles = $this->checkParam($roles, ' '); @@ -241,7 +235,7 @@ public function noDeps(): AnsibleGalaxyInterface * @param bool $asArray * @return string|array */ - public function getCommandlineArguments(bool $asArray = true) + public function getCommandlineArguments(bool $asArray = true): string|array { return $this->prepareArguments($asArray); } diff --git a/Asm/Ansible/Command/AnsibleGalaxyInterface.php b/Asm/Ansible/Command/AnsibleGalaxyInterface.php index fad1562..b3c2a00 100644 --- a/Asm/Ansible/Command/AnsibleGalaxyInterface.php +++ b/Asm/Ansible/Command/AnsibleGalaxyInterface.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -42,7 +36,7 @@ public function info(string $role, string $version = ''): AnsibleGalaxyInterface * @param string|array $roles role_name(s)[,version] | scm+role_repo_url[,version] * @return AnsibleGalaxyInterface */ - public function install($roles = ''): AnsibleGalaxyInterface; + public function install(string|array $roles = ''): AnsibleGalaxyInterface; /** * Get a list of installed modules. @@ -58,7 +52,7 @@ public function modulelist(string $roleName = ''): AnsibleGalaxyInterface; * @param string|array $roles * @return AnsibleGalaxyInterface */ - public function remove($roles = ''): AnsibleGalaxyInterface; + public function remove(string|array $roles = ''): AnsibleGalaxyInterface; /** * Show general or specific help. diff --git a/Asm/Ansible/Command/AnsiblePlaybook.php b/Asm/Ansible/Command/AnsiblePlaybook.php index efb57b0..98dcfb4 100644 --- a/Asm/Ansible/Command/AnsiblePlaybook.php +++ b/Asm/Ansible/Command/AnsiblePlaybook.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -20,19 +14,16 @@ */ final class AnsiblePlaybook extends AbstractAnsibleCommand implements AnsiblePlaybookInterface { - /** - * @var boolean - */ - private $hasInventory = false; + private bool $hasInventory = false; /** * Executes a command process. - * Returns either exitcode or string output if no callback is given. + * Returns either exit code or string output if no callback is given. * * @param callable|null $callback * @return integer|string */ - public function execute($callback = null) + public function execute(?callable $callback = null): int|string { $this->checkInventory(); @@ -198,14 +189,10 @@ public function diff(): AnsiblePlaybookInterface * @param string|array $extraVars * @return AnsiblePlaybookInterface */ - public function extraVars($extraVars = ''): AnsiblePlaybookInterface + public function extraVars(string|array $extraVars = ''): AnsiblePlaybookInterface { - if (empty($extraVars)) + if (empty($extraVars)) { return $this; - - // Throw exception when $extraVars is an object - if (gettype($extraVars) === 'object') { - throw new InvalidArgumentException(sprintf('Expected string|array, got "%s"', gettype($extraVars))); } // Building the key=>value parameter @@ -218,18 +205,12 @@ public function extraVars($extraVars = ''): AnsiblePlaybookInterface return $this; } - // Should we consider $extraVars as a JSON/YML file? - if (@is_file($extraVars)) { - $this->addOption('--extra-vars', sprintf('@"%s"', $extraVars)); - return $this; - } - // At this point, the only allowed type is string. - if (!is_string($extraVars)) + if (!is_string($extraVars)) { throw new InvalidArgumentException(sprintf('Expected string|array, got "%s"', gettype($extraVars))); + } - - if (strpos($extraVars, '=') === false) { + if (!str_contains($extraVars, '=')) { throw new InvalidArgumentException('The extra vars raw string should be in the "key=value" form.'); } @@ -257,7 +238,8 @@ public function forceHandlers(): AnsiblePlaybookInterface */ public function forks(int $forks = 5): AnsiblePlaybookInterface { - $this->addOption('--forks', $forks); + // this is ugly, but on commandline it will later be automatically string anyways + $this->addOption('--forks', (string)$forks); return $this; } @@ -279,8 +261,9 @@ public function help(): AnsiblePlaybookInterface */ public function inventory(array $hosts = []): AnsiblePlaybookInterface { - if (empty($hosts)) + if (empty($hosts)) { return $this; + } // In order to let ansible-playbook understand that the given option is a list of hosts, the list must end by // comma "," if it contains just an entry. For example, supposing just a single host, "localhosts": @@ -289,8 +272,9 @@ public function inventory(array $hosts = []): AnsiblePlaybookInterface // Correct: --inventory="locahost," $hostList = implode(', ', $hosts); - if (count($hosts) === 1) + if (count($hosts) === 1) { $hostList .= ','; + } $this->addOption('--inventory', sprintf('"%s"', $hostList)); $this->hasInventory = true; @@ -315,13 +299,12 @@ public function inventoryFile(string $inventory = '/etc/ansible/hosts'): Ansible /** * Further limit selected hosts to an additional pattern. * - * @param array|string $subset list of hosts + * @param string|array $subset list of hosts * @return AnsiblePlaybookInterface */ - public function limit($subset = ''): AnsiblePlaybookInterface + public function limit(string|array $subset = ''): AnsiblePlaybookInterface { $subset = $this->checkParam($subset, ','); - $this->addOption('--limit', $subset); return $this; @@ -418,10 +401,10 @@ public function privateKey(string $file): AnsiblePlaybookInterface /** * Only run plays and tasks whose tags do not match these values. * - * @param array|string $tags list of tags to skip + * @param string|array $tags list of tags to skip * @return AnsiblePlaybookInterface */ - public function skipTags($tags = ''): AnsiblePlaybookInterface + public function skipTags(string|array $tags = ''): AnsiblePlaybookInterface { $tags = $this->checkParam($tags, ','); $this->addOption('--skip-tags', $tags); @@ -497,7 +480,7 @@ public function syntaxCheck(): AnsiblePlaybookInterface * @param string|array $tags list of tags * @return AnsiblePlaybookInterface */ - public function tags($tags): AnsiblePlaybookInterface + public function tags(string|array $tags): AnsiblePlaybookInterface { $tags = $this->checkParam($tags, ','); $this->addOption('--tags', $tags); @@ -613,7 +596,7 @@ public function newVaultPasswordFile(string $passwordFile): AnsiblePlaybookInter * @param string|array $scpExtraArgs * @return AnsiblePlaybookInterface */ - public function scpExtraArgs($scpExtraArgs): AnsiblePlaybookInterface + public function scpExtraArgs(string|array $scpExtraArgs): AnsiblePlaybookInterface { $scpExtraArgs = $this->checkParam($scpExtraArgs, ','); $this->addOption('--scp-extra-args', $scpExtraArgs); @@ -627,7 +610,7 @@ public function scpExtraArgs($scpExtraArgs): AnsiblePlaybookInterface * @param string|array $sftpExtraArgs * @return AnsiblePlaybookInterface */ - public function sftpExtraArgs($sftpExtraArgs): AnsiblePlaybookInterface + public function sftpExtraArgs(string|array $sftpExtraArgs): AnsiblePlaybookInterface { $sftpExtraArgs = $this->checkParam($sftpExtraArgs, ','); $this->addOption('--sftp-extra-args', $sftpExtraArgs); @@ -641,7 +624,7 @@ public function sftpExtraArgs($sftpExtraArgs): AnsiblePlaybookInterface * @param string|array $sshArgs * @return AnsiblePlaybookInterface */ - public function sshCommonArgs($sshArgs): AnsiblePlaybookInterface + public function sshCommonArgs(string|array $sshArgs): AnsiblePlaybookInterface { $sshArgs = $this->checkParam($sshArgs, ','); $this->addOption('--ssh-common-args', $sshArgs); @@ -655,7 +638,7 @@ public function sshCommonArgs($sshArgs): AnsiblePlaybookInterface * @param string|array $extraArgs * @return AnsiblePlaybookInterface */ - public function sshExtraArgs($extraArgs): AnsiblePlaybookInterface + public function sshExtraArgs(string|array $extraArgs): AnsiblePlaybookInterface { $extraArgs = $this->checkParam($extraArgs, ','); $this->addOption('--ssh-extra-args', $extraArgs); @@ -682,7 +665,7 @@ public function vaultId(string $vaultId): AnsiblePlaybookInterface * @param bool $asArray * @return string|array */ - public function getCommandlineArguments(bool $asArray = true) + public function getCommandlineArguments(bool $asArray = true): string|array { $this->checkInventory(); @@ -694,11 +677,13 @@ public function getCommandlineArguments(bool $asArray = true) */ public function rolesPath(string $path): AnsiblePlaybookInterface { - if (empty($path)) + if (empty($path)) { return $this; + } - if (!file_exists($path)) + if (!file_exists($path)) { throw new InvalidArgumentException(sprintf('The path "%s" does not exist.', $path)); + } $this->processBuilder->setEnv('ANSIBLE_ROLES_PATH', $path); return $this; @@ -709,9 +694,7 @@ public function rolesPath(string $path): AnsiblePlaybookInterface */ public function hostKeyChecking(bool $enable = true): AnsiblePlaybookInterface { - $enable ? - $flag = 'True' : - $flag = 'False'; + $enable ? $flag = 'True' : $flag = 'False'; $this->processBuilder->setEnv('ANSIBLE_HOST_KEY_CHECKING', $flag); return $this; diff --git a/Asm/Ansible/Command/AnsiblePlaybookInterface.php b/Asm/Ansible/Command/AnsiblePlaybookInterface.php index 5202fd9..6412ecf 100644 --- a/Asm/Ansible/Command/AnsiblePlaybookInterface.php +++ b/Asm/Ansible/Command/AnsiblePlaybookInterface.php @@ -1,12 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -122,7 +116,7 @@ public function diff(): AnsiblePlaybookInterface; * @param string|array $extraVars * @return AnsiblePlaybookInterface */ - public function extraVars($extraVars = ''): AnsiblePlaybookInterface; + public function extraVars(string|array $extraVars = ''): AnsiblePlaybookInterface; /** * clear the fact cache @@ -180,7 +174,7 @@ public function inventory(array $hosts = []): AnsiblePlaybookInterface; * @param array|string $subset list of hosts * @return AnsiblePlaybookInterface */ - public function limit($subset = ''): AnsiblePlaybookInterface; + public function limit(string|array $subset = ''): AnsiblePlaybookInterface; /** * Outputs a list of matching hosts; does not execute anything else. @@ -256,7 +250,7 @@ public function privateKey(string $file): AnsiblePlaybookInterface; * @param array|string $tags list of tags to skip * @return AnsiblePlaybookInterface */ - public function skipTags($tags = ''): AnsiblePlaybookInterface; + public function skipTags(string|array $tags = ''): AnsiblePlaybookInterface; /** * Start the playbook at the task matching this name. @@ -294,7 +288,7 @@ public function suUser(string $user = 'root'): AnsiblePlaybookInterface; * @param string|array $scpExtraArgs * @return AnsiblePlaybookInterface */ - public function scpExtraArgs($scpExtraArgs): AnsiblePlaybookInterface; + public function scpExtraArgs(string|array $scpExtraArgs): AnsiblePlaybookInterface; /** * specify extra arguments to pass to sftp only (e.g. -f, -l) @@ -302,7 +296,7 @@ public function scpExtraArgs($scpExtraArgs): AnsiblePlaybookInterface; * @param string|array $sftpExtraArgs * @return AnsiblePlaybookInterface */ - public function sftpExtraArgs($sftpExtraArgs): AnsiblePlaybookInterface; + public function sftpExtraArgs(string|array $sftpExtraArgs): AnsiblePlaybookInterface; /** * specify common arguments to pass to sftp/scp/ssh (e.g. ProxyCommand) @@ -310,7 +304,7 @@ public function sftpExtraArgs($sftpExtraArgs): AnsiblePlaybookInterface; * @param string|array $sshArgs * @return AnsiblePlaybookInterface */ - public function sshCommonArgs($sshArgs): AnsiblePlaybookInterface; + public function sshCommonArgs(string|array $sshArgs): AnsiblePlaybookInterface; /** * specify extra arguments to pass to ssh only (e.g. -R) @@ -318,7 +312,7 @@ public function sshCommonArgs($sshArgs): AnsiblePlaybookInterface; * @param string|array $extraArgs * @return AnsiblePlaybookInterface */ - public function sshExtraArgs($extraArgs): AnsiblePlaybookInterface; + public function sshExtraArgs(string|array $extraArgs): AnsiblePlaybookInterface; /** * Ansible SSH pipelining option @@ -342,7 +336,7 @@ public function syntaxCheck(): AnsiblePlaybookInterface; * @param string|array $tags list of tags * @return AnsiblePlaybookInterface */ - public function tags($tags): AnsiblePlaybookInterface; + public function tags(string|array $tags): AnsiblePlaybookInterface; /** * Override the SSH timeout in seconds (default=10). diff --git a/Asm/Ansible/Command/Option.php b/Asm/Ansible/Command/Option.php index ceb1fea..c8d8efc 100644 --- a/Asm/Ansible/Command/Option.php +++ b/Asm/Ansible/Command/Option.php @@ -1,37 +1,26 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; /** * Class Option + * * @package Asm\Ansible\Command * @author Metagûsto */ class Option { - /** - * @var string|null - */ - protected $name = null; - /** - * @var string|null - */ - protected $value = null; + protected string|null $name = null; + protected string|null $value = null; /** * Option constructor. * @param string|null $name * @param string|null $value */ - public function __construct(?string $name = null, ?string $value = null) + public function __construct(?string $name, ?string $value) { $this->name = $name; $this->value = $value; @@ -92,10 +81,10 @@ public function toString(): string */ public function equals(?Option $other) { - if ($other === null) + if ($other === null) { return false; + } return $this->name === $other->getName() && $this->value === $other->value; } - -} \ No newline at end of file +} diff --git a/Asm/Ansible/Exception/CommandException.php b/Asm/Ansible/Exception/CommandException.php index b3a20a6..eda0bb1 100644 --- a/Asm/Ansible/Exception/CommandException.php +++ b/Asm/Ansible/Exception/CommandException.php @@ -1,4 +1,7 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Asm\Ansible\Process; @@ -24,23 +17,23 @@ class ProcessBuilder implements ProcessBuilderInterface /** * @var array */ - private $arguments; + private array $arguments; /** * @var int */ - private $timeout; + private int $timeout; /** * @var string */ - private $path; + private string $path; /** * @var array */ - private $envVars; + private array $envVars; /** * ProcessBuilder constructor. @@ -84,10 +77,10 @@ public function setTimeout(int $timeout): ProcessBuilderInterface /** * @param string $name name of ENV VAR - * @param string $value + * @param string|int $value * @return ProcessBuilderInterface */ - public function setEnv(string $name, string $value): ProcessBuilderInterface + public function setEnv(string $name, string|int $value): ProcessBuilderInterface { $this->envVars[$name] = $value; diff --git a/Asm/Ansible/Process/ProcessBuilderInterface.php b/Asm/Ansible/Process/ProcessBuilderInterface.php index c392886..12bb73f 100644 --- a/Asm/Ansible/Process/ProcessBuilderInterface.php +++ b/Asm/Ansible/Process/ProcessBuilderInterface.php @@ -1,13 +1,6 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Asm\Ansible\Process; @@ -33,10 +26,10 @@ public function setTimeout(int $timeout): ProcessBuilderInterface; /** * @param string $name name of ENV VAR - * @param string $value + * @param string|int $value * @return ProcessBuilderInterface */ - public function setEnv(string $name, string $value): ProcessBuilderInterface; + public function setEnv(string $name, string|int $value): ProcessBuilderInterface; /** * @return Process diff --git a/Asm/Ansible/Utils/Env.php b/Asm/Ansible/Utils/Env.php index 5d93ef0..0a0c89c 100644 --- a/Asm/Ansible/Utils/Env.php +++ b/Asm/Ansible/Utils/Env.php @@ -1,14 +1,8 @@ - */ -namespace Asm\Ansible\Utils; +declare(strict_types=1); +namespace Asm\Ansible\Utils; class Env { @@ -19,4 +13,4 @@ public static function isWindows(): bool { return defined('PHP_WINDOWS_VERSION_BUILD'); } -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e0c342..905149b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v4.0 + * drop php7.x compat, 8.0+ only + * removed travis, scrutinizer, replace with github actions + * add symfony process v6.x, drop process <5.x + * fix differences main/dev >.< + +## v3.0.x + * switch to 7.3|8.0 + ## v2.0.0 * migration to php >=7.1 only * move to ansible 2.x diff --git a/README.md b/README.md index bd7e81d..aed6b7a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # php-ansible library -[![Build Status](https://travis-ci.org/maschmann/php-ansible.png?branch=master)](https://travis-ci.org/maschmann/php-ansible) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/maschmann/php-ansible/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/maschmann/php-ansible/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/maschmann/php-ansible/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/maschmann/php-ansible/?branch=master) +![PHP8.0 build](https://github.com/maschmann/php-ansible/actions/workflows/static-analysis.yml/badge.svg) +![PHP8.1 build](https://github.com/maschmann/php-ansible/actions/workflows/static-analysis-8-1.yml/badge.svg) This library is a OOP-wrapper for the ansible provisioning tool. I intend to use this library for a symfony2 bundle and also a deployment GUI, based on php/symfony2. @@ -15,7 +14,6 @@ Your OS should be a flavor of linux and ansible has to be installed. It's easies The library tries to find ansible-playbook and ansible-galaxy by itself or use the paths/executables you provide. - ## Usage First instantiate the base object which works as a factory for the commands. @@ -170,7 +168,7 @@ $ansible ## Thank you for your contributions! thank you for reviewing, bug reporting, suggestions and PRs :-) -[xabbuh](https://github.com/xabbuh), [emielmolenaar](https://github.com/emielmolenaar), [saverio](https://github.com/saverio), [soupdiver](https://github.com/soupdiver), [linaori](https://github.com/linaori), [paveldanilin](https://github.com/paveldanilin) +[xabbuh](https://github.com/xabbuh), [emielmolenaar](https://github.com/emielmolenaar), [saverio](https://github.com/saverio), [soupdiver](https://github.com/soupdiver), [linaori](https://github.com/linaori), [paveldanilin](https://github.com/paveldanilin) and many others! @@ -178,8 +176,12 @@ thank you for reviewing, bug reporting, suggestions and PRs :-) The Next steps for implementation are: -- wrapping the library into a bundle. -- provide commandline-capabilities. +- improve type handling and structure, due to overall complexity of the playbook at the moment +- scalar typehints all over the place +- provide docker support for development +- move to php8.0 exclusively for the next major release +- wrapping the library into a bundle -> maybe +- provide commandline-capabilities -> maybe diff --git a/Tests/Asm/Ansible/Command/AnsibleGalaxyTest.php b/Tests/Asm/Ansible/Command/AnsibleGalaxyTest.php index dbba8e1..d8d1308 100644 --- a/Tests/Asm/Ansible/Command/AnsibleGalaxyTest.php +++ b/Tests/Asm/Ansible/Command/AnsibleGalaxyTest.php @@ -1,12 +1,7 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); + namespace Asm\Ansible\Command; use Asm\Ansible\Process\ProcessBuilder; @@ -18,12 +13,12 @@ class AnsibleGalaxyTest extends AnsibleTestCase /** * @return AnsibleGalaxyInterface */ - public function testCreateInstance() + public function testCreateInstance(): AnsibleGalaxyInterface { $process = new ProcessBuilder($this->getGalaxyUri(), $this->getProjectUri()); $ansibleGalaxy = new AnsibleGalaxy($process); - $this->assertInstanceOf('\Asm\Ansible\Command\AnsibleGalaxy', $ansibleGalaxy); + $this->assertInstanceOf(AnsibleGalaxy::class, $ansibleGalaxy); return $ansibleGalaxy; } @@ -32,7 +27,7 @@ public function testCreateInstance() * @depends testCreateInstance * @param AnsibleGalaxyInterface $command */ - public function testExecute(AnsibleGalaxyInterface $command) + public function testExecute(AnsibleGalaxyInterface $command): void { // Skipped on Windows if (Env::isWindows()) { @@ -46,7 +41,7 @@ public function testExecute(AnsibleGalaxyInterface $command) $this->assertTrue(true); } - public function testInit() + public function testInit(): void { $command = $this->testCreateInstance(); @@ -66,7 +61,7 @@ public function testInit() $this->assertArrayHasKey('--server=http://ansible.com', $arguments); } - public function testInfo() + public function testInfo(): void { $command = $this->testCreateInstance(); $command->info('test_role'); @@ -75,7 +70,7 @@ public function testInfo() $this->assertArrayHasKey('info test_role', $arguments); } - public function testInfoWithVersion() + public function testInfoWithVersion(): void { $command = $this->testCreateInstance(); $command->info('test_role', '1.0'); @@ -84,7 +79,7 @@ public function testInfoWithVersion() $this->assertArrayHasKey('info test_role,1.0', $arguments); } - public function testInstall() + public function testInstall(): void { $command = $this->testCreateInstance(); $command->install('test_role'); @@ -93,7 +88,7 @@ public function testInstall() $this->assertArrayHasKey('install test_role', $arguments); } - public function testInstallWithRoles() + public function testInstallWithRoles(): void { $command = $this->testCreateInstance(); $command->install( @@ -108,7 +103,7 @@ public function testInstallWithRoles() $this->assertArrayHasKey('install test_role another_role yet_another_role', $arguments); } - public function testInstallWithOptions() + public function testInstallWithOptions(): void { $command = $this->testCreateInstance(); @@ -133,7 +128,7 @@ public function testInstallWithOptions() $this->assertArrayHasKey('--no-deps', $arguments); } - public function testList() + public function testList(): void { $command = $this->testCreateInstance(); $command->modulelist(); @@ -141,7 +136,7 @@ public function testList() $this->assertEquals('list', $command->getCommandlineArguments(false)); } - public function testListWithRole() + public function testListWithRole(): void { $command = $this->testCreateInstance(); $command->modulelist('test_role'); @@ -149,7 +144,7 @@ public function testListWithRole() $this->assertEquals('list test_role', $command->getCommandlineArguments(false)); } - public function testListWithHelp() + public function testListWithHelp(): void { $command = $this->testCreateInstance(); $command @@ -159,7 +154,7 @@ public function testListWithHelp() $this->assertEquals('list --help', $command->getCommandlineArguments(false)); } - public function testRemove() + public function testRemove(): void { $command = $this->testCreateInstance(); $command->remove('test_role'); @@ -167,7 +162,7 @@ public function testRemove() $this->assertEquals('remove test_role', $command->getCommandlineArguments(false)); } - public function testRemoveRoles() + public function testRemoveRoles(): void { $command = $this->testCreateInstance(); $command->remove( diff --git a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php index 77d8d3a..b1ce0f2 100644 --- a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php +++ b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php @@ -1,12 +1,7 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +declare(strict_types=1); + namespace Asm\Ansible\Command; use Asm\Ansible\Process\ProcessBuilder; @@ -23,7 +18,7 @@ class AnsiblePlaybookTest extends AnsibleTestCase /** * @return AnsiblePlaybookInterface */ - public function testCreateInstance() + public function testCreateInstance(): AnsiblePlaybookInterface { $process = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); $ansible = new AnsiblePlaybook($process); @@ -39,7 +34,7 @@ public function testCreateInstance() * @return AnsiblePlaybookInterface * @throws Exception */ - public function testDefaultDeployment(AnsiblePlaybookInterface $command) + public function testDefaultDeployment(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $today = new DateTime(); @@ -61,7 +56,7 @@ public function testDefaultDeployment(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testAskPassArgumentPresent(AnsiblePlaybookInterface $command) + public function testAskPassArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -78,7 +73,7 @@ public function testAskPassArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testAskSuPassArgumentPresent(AnsiblePlaybookInterface $command) + public function testAskSuPassArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -95,7 +90,7 @@ public function testAskSuPassArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testAskBecomePassArgumentPresent(AnsiblePlaybookInterface $command) + public function testAskBecomePassArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -112,7 +107,7 @@ public function testAskBecomePassArgumentPresent(AnsiblePlaybookInterface $comma * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testAskVaultPassArgumentPresent(AnsiblePlaybookInterface $command) + public function testAskVaultPassArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -129,7 +124,7 @@ public function testAskVaultPassArgumentPresent(AnsiblePlaybookInterface $comman * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testConnectionArgumentPresent(AnsiblePlaybookInterface $command) + public function testConnectionArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -152,7 +147,7 @@ public function testConnectionArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testDiffArgumentPresent(AnsiblePlaybookInterface $command) + public function testDiffArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -169,7 +164,7 @@ public function testDiffArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testForceHandlersArgumentPresent(AnsiblePlaybookInterface $command) + public function testForceHandlersArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -186,7 +181,7 @@ public function testForceHandlersArgumentPresent(AnsiblePlaybookInterface $comma * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testForksArgumentPresent(AnsiblePlaybookInterface $command) + public function testForksArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -209,7 +204,7 @@ public function testForksArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testHelpArgumentPresent(AnsiblePlaybookInterface $command) + public function testHelpArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -226,7 +221,7 @@ public function testHelpArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testLimitArgumentPresent(AnsiblePlaybookInterface $command) + public function testLimitArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -255,7 +250,7 @@ public function testLimitArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testlistHostsArgumentPresent(AnsiblePlaybookInterface $command) + public function testlistHostsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -272,7 +267,7 @@ public function testlistHostsArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testListTasksArgumentPresent(AnsiblePlaybookInterface $command) + public function testListTasksArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -289,7 +284,7 @@ public function testListTasksArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testModulePathArgumentPresent(AnsiblePlaybookInterface $command) + public function testModulePathArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -312,7 +307,7 @@ public function testModulePathArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testPrivateKeyArgumentPresent(AnsiblePlaybookInterface $command) + public function testPrivateKeyArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -329,7 +324,7 @@ public function testPrivateKeyArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSkipTagsArgumentPresent(AnsiblePlaybookInterface $command) + public function testSkipTagsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -358,7 +353,7 @@ public function testSkipTagsArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testStartAtTaskArgumentPresent(AnsiblePlaybookInterface $command) + public function testStartAtTaskArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -375,7 +370,7 @@ public function testStartAtTaskArgumentPresent(AnsiblePlaybookInterface $command * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testStepArgumentPresent(AnsiblePlaybookInterface $command) + public function testStepArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -409,7 +404,7 @@ public function testSuArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSuUserArgumentPresent(AnsiblePlaybookInterface $command) + public function testSuUserArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -432,7 +427,7 @@ public function testSuUserArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testBecomeArgumentPresent(AnsiblePlaybookInterface $command) + public function testBecomeArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -449,7 +444,7 @@ public function testBecomeArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testBecomeUserArgumentPresent(AnsiblePlaybookInterface $command) + public function testBecomeUserArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -472,7 +467,7 @@ public function testBecomeUserArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSyntaxCheckArgumentPresent(AnsiblePlaybookInterface $command) + public function testSyntaxCheckArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -489,7 +484,7 @@ public function testSyntaxCheckArgumentPresent(AnsiblePlaybookInterface $command * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testTagsArgumentPresent(AnsiblePlaybookInterface $command) + public function testTagsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -518,7 +513,7 @@ public function testTagsArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testTimeoutArgumentPresent(AnsiblePlaybookInterface $command) + public function testTimeoutArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -541,7 +536,7 @@ public function testTimeoutArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testUserArgumentPresent(AnsiblePlaybookInterface $command) + public function testUserArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -558,7 +553,7 @@ public function testUserArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface $command) + public function testVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -575,7 +570,7 @@ public function testVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface $c * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testVerboseArgumentPresent(AnsiblePlaybookInterface $command) + public function testVerboseArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -598,7 +593,7 @@ public function testVerboseArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testVersionArgumentPresent(AnsiblePlaybookInterface $command) + public function testVersionArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -615,7 +610,7 @@ public function testVersionArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testFlushCacheParameterPresent(AnsiblePlaybookInterface $command) + public function testFlushCacheParameterPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -632,7 +627,7 @@ public function testFlushCacheParameterPresent(AnsiblePlaybookInterface $command * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testNewVaultIdArgumentPresent(AnsiblePlaybookInterface $command) + public function testNewVaultIdArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -649,7 +644,7 @@ public function testNewVaultIdArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testNewVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface $command) + public function testNewVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -666,7 +661,7 @@ public function testNewVaultPasswordFileArgumentPresent(AnsiblePlaybookInterface * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testScpExtraArgsArgumentPresent(AnsiblePlaybookInterface $command) + public function testScpExtraArgsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -683,7 +678,7 @@ public function testScpExtraArgsArgumentPresent(AnsiblePlaybookInterface $comman * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSftpExtraArgsArgumentPresent(AnsiblePlaybookInterface $command) + public function testSftpExtraArgsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -700,7 +695,7 @@ public function testSftpExtraArgsArgumentPresent(AnsiblePlaybookInterface $comma * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSshCommonArgsArgumentPresent(AnsiblePlaybookInterface $command) + public function testSshCommonArgsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -717,7 +712,7 @@ public function testSshCommonArgsArgumentPresent(AnsiblePlaybookInterface $comma * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testSshExtraArgsArgumentPresent(AnsiblePlaybookInterface $command) + public function testSshExtraArgsArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -734,7 +729,7 @@ public function testSshExtraArgsArgumentPresent(AnsiblePlaybookInterface $comman * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testVaultIdArgumentPresent(AnsiblePlaybookInterface $command) + public function testVaultIdArgumentPresent(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $command ->play($this->getPlayUri()) @@ -751,7 +746,7 @@ public function testVaultIdArgumentPresent(AnsiblePlaybookInterface $command) * @param AnsiblePlaybookInterface $command * @return AnsiblePlaybookInterface */ - public function testGetCommandlineArguments(AnsiblePlaybookInterface $command) + public function testGetCommandlineArguments(AnsiblePlaybookInterface $command): AnsiblePlaybookInterface { $arguments = $command ->play($this->getPlayUri()) @@ -767,7 +762,7 @@ public function testGetCommandlineArguments(AnsiblePlaybookInterface $command) * @depends testDefaultDeployment * @param AnsiblePlaybookInterface $command */ - public function testExecuteWithCallback(AnsiblePlaybookInterface $command) + public function testExecuteWithCallback(AnsiblePlaybookInterface $command): void { // Skipped on Windows if (Env::isWindows()) { @@ -775,25 +770,25 @@ public function testExecuteWithCallback(AnsiblePlaybookInterface $command) return; } - $exitcode = $command - ->execute(function ($type, $buffer) { + $exitCode = $command + ->execute(function (string $type, string $buffer) { if (Process::ERR === $type) { - $out = 'ERR > '.$buffer; + $out = 'ERR > ' . $buffer; } else { - $out = 'OUT > '.$buffer; + $out = 'OUT > ' . $buffer; } // Silly assert, just to remove the unused warning. $this->assertNotNull($out); }); - $this->assertTrue(is_integer($exitcode)); + $this->assertTrue(is_integer($exitCode)); } /** * @depends testDefaultDeployment * @param AnsiblePlaybookInterface $command */ - public function textExecuteWithTextOutput(AnsiblePlaybookInterface $command) + public function textExecuteWithTextOutput(AnsiblePlaybookInterface $command): void { $result = $command ->execute(null); @@ -801,9 +796,9 @@ public function textExecuteWithTextOutput(AnsiblePlaybookInterface $command) $this->assertTrue(is_string($result)); } - public function testExtraVars() + public function testExtraVars(): void { - $playbookFile = $this->getSamplesPathFor(AnsiblePlaybook::class) . '/playbook1.yml'; + //$playbookFile = $this->getSamplesPathFor(AnsiblePlaybook::class) . '/playbook1.yml'; $tests = [ [ @@ -826,16 +821,16 @@ public function testExtraVars() 'input' => 'key=value', 'expect' => '--extra-vars=key=value', ], - [ - 'input' => $playbookFile, - 'expect' => sprintf('--extra-vars=@"%s"', $playbookFile), - ], + //[ + // 'input' => $playbookFile, + // 'expect' => sprintf('--extra-vars=@"%s"', $playbookFile), + //], ]; $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); - foreach ($tests as $test) { + foreach ($tests as $test) { $input = $test['input']; $expect = $test['expect']; @@ -869,8 +864,12 @@ public function testExtraVars() $ansible->extraVars($input); // We should never reach this line! - $this->fail(sprintf('Failing asserting that %s exception has been thrown', - InvalidArgumentException::class)); + $this->fail( + sprintf( + 'Failing asserting that %s exception has been thrown', + InvalidArgumentException::class + ) + ); } catch (InvalidArgumentException $ignored) { } } catch (TypeError $ignored) { @@ -883,15 +882,15 @@ public function testExtraVars() // ------------------------------------------------------ $ansible = new AnsiblePlaybook($builder); $ansible->extraVars(['key' => 'value']); - $ansible->extraVars($playbookFile); + //$ansible->extraVars($playbookFile); // We should get: $arguments = $ansible->getCommandlineArguments(); $this->assertTrue(in_array('--extra-vars=key=value', $arguments)); - $this->assertTrue(in_array(sprintf('--extra-vars=@"%s"', $playbookFile), $arguments)); + //$this->assertTrue(in_array(sprintf('--extra-vars=@"%s"', $playbookFile), $arguments)); } - public function testInventory() + public function testInventory(): void { $tests = [ [ @@ -910,8 +909,8 @@ public function testInventory() ]; $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); - foreach ($tests as $test) { + foreach ($tests as $test) { $input = $test['input']; $expect = $test['expect']; @@ -929,7 +928,7 @@ public function testInventory() } } - public function testRolesPath() + public function testRolesPath(): void { $samplePath = $this->getSamplesPathFor(AnsiblePlaybook::class); $tests = [ @@ -945,8 +944,8 @@ public function testRolesPath() $ansible = null; $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); - foreach ($tests as $test) { + foreach ($tests as $test) { $input = $test['input']; $expect = $test['expect']; @@ -969,7 +968,7 @@ public function testRolesPath() $ansible->rolesPath('/really/not/existing/path'); } - public function testHostKeyChecking() + public function testHostKeyChecking(): void { $tests = [ [ @@ -983,8 +982,8 @@ public function testHostKeyChecking() ]; $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); - foreach ($tests as $test) { + foreach ($tests as $test) { $input = $test['input']; $expect = $test['expect']; @@ -997,7 +996,7 @@ public function testHostKeyChecking() } } - public function testSshPipelining() + public function testSshPipelining(): void { $tests = [ [ @@ -1011,8 +1010,8 @@ public function testSshPipelining() ]; $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); - foreach ($tests as $test) { + foreach ($tests as $test) { $input = $test['input']; $expect = $test['expect']; diff --git a/Tests/Asm/Ansible/Command/OptionTest.php b/Tests/Asm/Ansible/Command/OptionTest.php index 3222c6c..a2e2152 100644 --- a/Tests/Asm/Ansible/Command/OptionTest.php +++ b/Tests/Asm/Ansible/Command/OptionTest.php @@ -1,11 +1,6 @@ - */ + +declare(strict_types=1); namespace Asm\Ansible\Command; @@ -13,7 +8,7 @@ class OptionTest extends TestCase { - public function testInstance() + public function testInstance(): void { $option = new Option('name', 'value'); $this->assertEquals('name', $option->getName()); diff --git a/Tests/Asm/Ansible/Process/ProcessBuilderTest.php b/Tests/Asm/Ansible/Process/ProcessBuilderTest.php index 11f7059..ceb9388 100644 --- a/Tests/Asm/Ansible/Process/ProcessBuilderTest.php +++ b/Tests/Asm/Ansible/Process/ProcessBuilderTest.php @@ -1,13 +1,6 @@ package. - * - * (c) Marc Aschmann - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Asm\Ansible\Process; @@ -20,7 +13,7 @@ class ProcessBuilderTest extends AnsibleTestCase /** * @return ProcessBuilderInterface */ - public function testCreateInstance() + public function testCreateInstance(): ProcessBuilderInterface { $processBuilder = new ProcessBuilder($this->getGalaxyUri(), $this->getProjectUri()); $this->assertInstanceOf(ProcessBuilderInterface::class, $processBuilder); @@ -29,10 +22,10 @@ public function testCreateInstance() } /** - * @param $processBuilder + * @param ProcessBuilderInterface $processBuilder * @depends testCreateInstance */ - public function testGetProcess(ProcessBuilderInterface $processBuilder) + public function testGetProcess(ProcessBuilderInterface $processBuilder): void { $process = $processBuilder ->setArguments(['more_args']) @@ -43,7 +36,7 @@ public function testGetProcess(ProcessBuilderInterface $processBuilder) $this->assertInstanceOf(Process::class, $process); // verify, all args are kept and merged correctly - // Process component escapes all arguments with '' + // Process component escapes all arguments with '' $this->assertEquals("'{$this->getGalaxyUri()}' 'more_args'", $process->getCommandLine()); } } diff --git a/Tests/Asm/Ansible/Testing/AnsibleTestCase.php b/Tests/Asm/Ansible/Testing/AnsibleTestCase.php index 566b6ba..52c92a0 100644 --- a/Tests/Asm/Ansible/Testing/AnsibleTestCase.php +++ b/Tests/Asm/Ansible/Testing/AnsibleTestCase.php @@ -13,6 +13,7 @@ use Asm\Ansible\Utils\Env; use LogicException; use org\bovigo\vfs\vfsStream; +use org\bovigo\vfs\vfsStreamDirectory; use org\bovigo\vfs\vfsStreamFile; use PHPUnit\Framework\TestCase; @@ -24,27 +25,15 @@ */ abstract class AnsibleTestCase extends TestCase { - /** - * @var vfsStreamFile - */ - protected $ansiblePlaybook; - /** - * @var vfsStreamFile - */ - protected $ansibleGalaxy; - /** - * @var - */ - protected $project; - /** - * @var string|null - */ - protected $testRootPath = null; + protected vfsStreamFile $ansiblePlaybook; - /** - * default setup - */ - protected function setUp():void + protected vfsStreamFile $ansibleGalaxy; + + protected vfsStreamDirectory $project; + + protected ?string $testRootPath = null; + + protected function setUp(): void { $this->createProjectStructure(); } @@ -52,7 +41,7 @@ protected function setUp():void /** * Setup file system structure for tests. */ - protected function createProjectStructure() + protected function createProjectStructure(): vfsStreamDirectory { $projectStructure = [ 'ansible-project' => [ @@ -66,34 +55,22 @@ protected function createProjectStructure() return $this->project; } - /** - * @return string - */ - protected function getProjectUri() + protected function getProjectUri(): string { return $this->project->url() . '/ansible-project'; } - /** - * @return string - */ - protected function getPlayUri() + protected function getPlayUri(): string { return $this->project->url() . '/ansible-project/testproject.yml'; } - /** - * @return string - */ - protected function getInventoryUri() + protected function getInventoryUri(): string { return $this->project->url() . '/ansible-project/testproject'; } - /** - * @return string - */ - protected function getPlaybookUri() + protected function getPlaybookUri(): string { Env::isWindows() ? $command = 'ansible-playbook.bat' : @@ -102,10 +79,7 @@ protected function getPlaybookUri() return implode('/', [$this->getAssetsBinPath(), $command]); } - /** - * @return string - */ - protected function getGalaxyUri() + protected function getGalaxyUri(): string { Env::isWindows() ? $command = 'ansible-galaxy.bat' : @@ -114,10 +88,7 @@ protected function getGalaxyUri() return implode('/', [$this->getAssetsBinPath(), $command]); } - /** - * @return string - */ - protected function getPlaybookContent() + protected function getPlaybookContent(): string { return <<=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "symfony/process", + "version": "v6.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "298ed357274c1868c20a0061df256a1250a6c4af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/298ed357274c1868c20a0061df256a1250a6c4af", + "reference": "298ed357274c1868c20a0061df256a1250a6c4af", + "shasum": "" + }, + "require": { + "php": ">=8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.0.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-26T17:23:29+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.10", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "250c0825537d501e327df879fb3d4cd751933b85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/250c0825537d501e327df879fb3d4cd751933b85", + "reference": "250c0825537d501e327df879fb3d4cd751933b85", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "time": "2021-09-25T08:05:01+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.13.2", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + }, + "time": "2021-11-30T19:35:32+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "15a90844ad40f127afd244c0cad228de2a80052a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a", + "reference": "15a90844ad40f127afd244c0cad228de2a80052a", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.1" + }, + "time": "2022-02-07T21:56:48+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + }, + "time": "2022-01-04T19:58:01+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.11", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", + "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-18T12:46:09+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "1883687169c017d6ae37c58883ca3994cfc34189" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", + "reference": "1883687169c017d6ae37c58883ca3994cfc34189", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-18T12:54:07+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T14:18:36+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-10-20T20:35:02+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^8.0.0" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..3db997a --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,24 @@ + + + default cs ruleset for php-ansible + + Asm + + */Tests/* + + + + + + + + + + + + + + + + + diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..5066a90 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,5 @@ +parameters: + level: 2 + paths: + - Asm + - Tests diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..8b0757c --- /dev/null +++ b/psalm.xml @@ -0,0 +1,10 @@ + + + + + + From 028a756ff649c304990b2676e4f3ea3a5a934054 Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Tue, 28 Feb 2023 11:43:49 +0100 Subject: [PATCH 02/14] feature/build and version cleanup (#84) * github workflow update * move to different phpunit runner * remove lock file, open dependencies * ignore lock file, update actions * move to build matrix --- .github/workflows/static-analysis-8-1.yml | 55 - .github/workflows/static-analysis.yml | 45 +- .gitignore | 2 + README.md | 3 +- composer.json | 4 +- composer.lock | 2280 --------------------- phpunit-10.xml.dist | 17 + 7 files changed, 46 insertions(+), 2360 deletions(-) delete mode 100644 .github/workflows/static-analysis-8-1.yml delete mode 100644 composer.lock create mode 100644 phpunit-10.xml.dist diff --git a/.github/workflows/static-analysis-8-1.yml b/.github/workflows/static-analysis-8-1.yml deleted file mode 100644 index 24aaf96..0000000 --- a/.github/workflows/static-analysis-8-1.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Test and analyze PHP 8.1 -on: - push: {} - pull_request: - branches: - - main - - develop -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.1 - extensions: redis, apcu, ctype, dom, iconv, gd, mbstring, fileinfo, intl, json, mysql, bcmath, zip - coverage: none # disable xdebug, pcov - ini-values: post_max_size=256M memory - tools: cs2pr, pecl, php-cs-fixer, phpunit, vimeo/psalm, phpstan, phpcs - - - uses: actions/checkout@v2 - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install dependencies - run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q - - - name: Install phpunit output for PRs - run: composer require mheap/phpunit-github-actions-printer - - - name: Run UnitTests - run: phpunit --printer mheap\\GithubActionsReporter\\Printer -c phpunit.xml.dist - - - name: Run phpstan - run: phpstan analyse --error-format=checkstyle -c "phpstan.neon" | cs2pr - - #- name: Run psalm - # run: psalm -c psalm.xml --output-format=github - - - name: Check PHP code style - continue-on-error: true - run: phpcs --standard=phpcs.xml --parallel=2 --report-full --report-checkstyle=./phpcs-report.xml - - - name: Show PHPCS results in PR - run: cs2pr ./phpcs-report.xml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index e963ff0..4ae65c4 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,5 +1,5 @@ --- -name: Test and analyze PHP 8.0 +name: Test and analyze PHP on: push: {} pull_request: @@ -9,37 +9,40 @@ on: jobs: build: runs-on: ubuntu-latest + + strategy: + matrix: + php: + - "8.0" + - "8.1" + - "8.2" + include: + - php-version: "8.0" + phpunit: "9.5" + phpunit-config: "phpunit.xml.dist" + steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.0 + php-version: "${{ matrix.php }}" extensions: redis, apcu, ctype, dom, iconv, gd, mbstring, fileinfo, intl, json, mysql, bcmath, zip coverage: none # disable xdebug, pcov ini-values: post_max_size=256M memory - tools: cs2pr, pecl, php-cs-fixer, phpunit, vimeo/psalm, phpstan, phpcs - - - uses: actions/checkout@v2 + tools: cs2pr, pecl, php-cs-fixer, vimeo/psalm, phpstan, phpcs - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/checkout@v3 - - name: Cache dependencies - uses: actions/cache@v2 + - uses: "ramsey/composer-install@v2" with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- + composer-options: "--no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q" - - name: Install dependencies - run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q - - - name: Install phpunit output for PRs - run: composer require mheap/phpunit-github-actions-printer - - - name: Run UnitTests - run: phpunit --printer mheap\\GithubActionsReporter\\Printer -c phpunit.xml.dist + - name: PHPUnit tests + uses: php-actions/phpunit@v3 + with: + version: "${{ matrix.phpunit }}" + configuration: "${{ matrix.phpunit-config }}" + memory_limit: "256M" - name: Run phpstan run: phpstan analyse --error-format=checkstyle -c "phpstan.neon" | cs2pr diff --git a/.gitignore b/.gitignore index 54f2ffe..dd969ed 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ Tests/data/** !Tests/data/cache/.empty !Tests/data/logs/.empty !Tests/data/temp/.empty +composer.lock +.phpunit.cache diff --git a/README.md b/README.md index aed6b7a..98db526 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # php-ansible library -![PHP8.0 build](https://github.com/maschmann/php-ansible/actions/workflows/static-analysis.yml/badge.svg) -![PHP8.1 build](https://github.com/maschmann/php-ansible/actions/workflows/static-analysis-8-1.yml/badge.svg) +![Build PHP 8.0/8.1/8.2](https://github.com/maschmann/php-ansible/actions/workflows/static-analysis.yml/badge.svg) This library is a OOP-wrapper for the ansible provisioning tool. I intend to use this library for a symfony2 bundle and also a deployment GUI, based on php/symfony2. diff --git a/composer.json b/composer.json index 3598809..6546e3f 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ } ], "require": { - "php": "^8.0.0", + "php": "^8.0.0|^8.1.0|^8.2.0", "psr/log": "^1.1", "symfony/process": "^5.3|^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.5|^10.0 ", "mikey179/vfsstream": "^1.6" }, "autoload": { diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 1d9f6fe..0000000 --- a/composer.lock +++ /dev/null @@ -1,2280 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "7bfa66c7d598a53e46c1d31b3fbbdaff", - "packages": [ - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "symfony/process", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "298ed357274c1868c20a0061df256a1250a6c4af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/298ed357274c1868c20a0061df256a1250a6c4af", - "reference": "298ed357274c1868c20a0061df256a1250a6c4af", - "shasum": "" - }, - "require": { - "php": ">=8.0.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-26T17:23:29+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "mikey179/vfsstream", - "version": "v1.6.10", - "source": { - "type": "git", - "url": "https://github.com/bovigo/vfsStream.git", - "reference": "250c0825537d501e327df879fb3d4cd751933b85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/250c0825537d501e327df879fb3d4cd751933b85", - "reference": "250c0825537d501e327df879fb3d4cd751933b85", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", - "support": { - "issues": "https://github.com/bovigo/vfsStream/issues", - "source": "https://github.com/bovigo/vfsStream/tree/master", - "wiki": "https://github.com/bovigo/vfsStream/wiki" - }, - "time": "2021-09-25T08:05:01+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.13.2", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" - }, - "time": "2021-11-30T19:35:32+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" - }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "15a90844ad40f127afd244c0cad228de2a80052a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a", - "reference": "15a90844ad40f127afd244c0cad228de2a80052a", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.1" - }, - "time": "2022-02-07T21:56:48+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-18T12:46:09+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.5.14", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-18T12:54:07+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:49:45+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:52:27+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:10:38+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:52:38+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-11-11T14:18:36+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-02-14T08:28:10+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-28T06:42:11+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" - }, - { - "name": "sebastian/type", - "version": "2.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-15T12:49:02+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^8.0.0" - }, - "platform-dev": [], - "plugin-api-version": "2.1.0" -} diff --git a/phpunit-10.xml.dist b/phpunit-10.xml.dist new file mode 100644 index 0000000..189c807 --- /dev/null +++ b/phpunit-10.xml.dist @@ -0,0 +1,17 @@ + + + + + . + + + ./Tests + ./vendor + + + + + ./Tests + + + From 7f9af0c1931dbadccf1fbe07d0805e6afa4a325d Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Tue, 28 Feb 2023 10:53:20 +0000 Subject: [PATCH 03/14] allow all psr/log versions to be used. methods & interface/traits do not change between versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6546e3f..2f6a2dd 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.0.0|^8.1.0|^8.2.0", - "psr/log": "^1.1", + "psr/log": "^1.1|^2.0|^3.0", "symfony/process": "^5.3|^6.0" }, "require-dev": { From 9eec90bdb6c25185c1c8c0339b44567b387831c0 Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:06:08 +0100 Subject: [PATCH 04/14] removed IDE's Import --- Asm/Ansible/Ansible.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Asm/Ansible/Ansible.php b/Asm/Ansible/Ansible.php index 84cc39e..49ec365 100644 --- a/Asm/Ansible/Ansible.php +++ b/Asm/Ansible/Ansible.php @@ -12,7 +12,6 @@ use Asm\Ansible\Process\ProcessBuilder; use Asm\Ansible\Process\ProcessBuilderInterface; use Asm\Ansible\Utils\Env; -use JetBrains\PhpStorm\Pure; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\NullLogger; From e928338d0343e660a7c9359e9edc201fe9dfe4e6 Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:12:49 +0100 Subject: [PATCH 05/14] allow JSON Format to be used with the --extra-vars parameter. Escape single quotes as required. --- Asm/Ansible/Command/AnsiblePlaybook.php | 16 ++++++ Asm/Ansible/Utils/Str.php | 39 +++++++++++++++ .../Ansible/Command/AnsiblePlaybookTest.php | 21 +++++++- Tests/Asm/Ansible/Utils/StrTest.php | 49 +++++++++++++++++++ 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 Asm/Ansible/Utils/Str.php create mode 100644 Tests/Asm/Ansible/Utils/StrTest.php diff --git a/Asm/Ansible/Command/AnsiblePlaybook.php b/Asm/Ansible/Command/AnsiblePlaybook.php index 98dcfb4..2b21b52 100644 --- a/Asm/Ansible/Command/AnsiblePlaybook.php +++ b/Asm/Ansible/Command/AnsiblePlaybook.php @@ -4,7 +4,9 @@ namespace Asm\Ansible\Command; +use Asm\Ansible\Utils\Str; use InvalidArgumentException; +use JsonException; /** * Class AnsiblePlaybook @@ -210,6 +212,20 @@ public function extraVars(string|array $extraVars = ''): AnsiblePlaybookInterfac throw new InvalidArgumentException(sprintf('Expected string|array, got "%s"', gettype($extraVars))); } + // Trim the string & check if empty before moving on. + $extraVars = trim($extraVars); + + if ($extraVars === '') { + return $this; + } + + // JSON formatted string can be used for extra vars as is, wrap around single quotes. + if (Str::isJsonFormatted($extraVars)) { + $this->addOption('--extra-vars', '\'' . Str::escapeSingleQuotes($extraVars) . '\''); + + return $this; + } + if (!str_contains($extraVars, '=')) { throw new InvalidArgumentException('The extra vars raw string should be in the "key=value" form.'); } diff --git a/Asm/Ansible/Utils/Str.php b/Asm/Ansible/Utils/Str.php new file mode 100644 index 0000000..048f36e --- /dev/null +++ b/Asm/Ansible/Utils/Str.php @@ -0,0 +1,39 @@ +getSamplesPathFor(AnsiblePlaybook::class) . '/playbook1.yml'; $tests = [ + // Test empty strings (with & without spaces). [ 'input' => '', 'expect' => false, ], + [ + 'input' => ' ', + 'expect' => false, + ], + // Test empty array. [ 'input' => [], 'expect' => false, ], + // Test Arrays [ 'input' => ['key' => 'value'], 'expect' => '--extra-vars=key=value', @@ -817,6 +824,17 @@ public function testExtraVars(): void 'input' => ['key1' => 'value1', 'key2' => 'value2'], 'expect' => '--extra-vars=key1=value1 key2=value2', ], + // Test valid JSON. + [ + 'input' => '{ "key1": "value1", "key2": "value2" }', + 'expect' => '--extra-vars=\'{ "key1": "value1", "key2": "value2" }\'', + ], + // Test valid JSON with single quotes escaped. + [ + 'input' => '{ "key1": "va\'lue1", "key2": "va\'lue2" }', + 'expect' => '--extra-vars=\'{ "key1": "va\\\'lue1", "key2": "va\\\'lue2" }\'', + ], + // Test key value string. [ 'input' => 'key=value', 'expect' => '--extra-vars=key=value', @@ -854,7 +872,8 @@ public function testExtraVars(): void $tests = [ 'string without equals', - new DateTime() + '{ key1: "value1" }', // Invalid JSON syntax (missing " from key1) which would trigger string without `=`. + new DateTime() // Invalid type ]; foreach ($tests as $input) { diff --git a/Tests/Asm/Ansible/Utils/StrTest.php b/Tests/Asm/Ansible/Utils/StrTest.php new file mode 100644 index 0000000..d49f821 --- /dev/null +++ b/Tests/Asm/Ansible/Utils/StrTest.php @@ -0,0 +1,49 @@ +assertTrue(Str::isJsonFormatted($value)); + } + + /** + * Assert string is not valid JSON. + * + * @return void + */ + public function testStringIsNotJson(): void + { + $value = 'something'; + + $this->assertFalse(Str::isJsonFormatted($value)); + } + + /** + * Assert single quotes are properly escaped. + * + * @return void + */ + public function testSingleQuotesEscaped(): void + { + $value = "O'What"; + + $this->assertEquals("O\'What", Str::escapeSingleQuotes($value)); + } +} From 0b4a7a1e6f2f44dfb28d668cf27a106b221e6cce Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:49:22 +0100 Subject: [PATCH 06/14] removed escaping because the library already handles this via the symfony process escaping --- Asm/Ansible/Command/AnsiblePlaybook.php | 5 +++-- Asm/Ansible/Utils/Str.php | 11 ----------- Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php | 7 +------ Tests/Asm/Ansible/Utils/StrTest.php | 12 ------------ 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/Asm/Ansible/Command/AnsiblePlaybook.php b/Asm/Ansible/Command/AnsiblePlaybook.php index 2b21b52..a2db809 100644 --- a/Asm/Ansible/Command/AnsiblePlaybook.php +++ b/Asm/Ansible/Command/AnsiblePlaybook.php @@ -219,9 +219,10 @@ public function extraVars(string|array $extraVars = ''): AnsiblePlaybookInterfac return $this; } - // JSON formatted string can be used for extra vars as is, wrap around single quotes. + // JSON formatted string can be used for extra vars as is. + // The value is automatically escaped & wrapped around single quotes from the Library's process. if (Str::isJsonFormatted($extraVars)) { - $this->addOption('--extra-vars', '\'' . Str::escapeSingleQuotes($extraVars) . '\''); + $this->addOption('--extra-vars', $extraVars); return $this; } diff --git a/Asm/Ansible/Utils/Str.php b/Asm/Ansible/Utils/Str.php index 048f36e..d76f8fe 100644 --- a/Asm/Ansible/Utils/Str.php +++ b/Asm/Ansible/Utils/Str.php @@ -25,15 +25,4 @@ public static function isJsonFormatted(string $value): bool return false; } } - - /** - * Escape single quotes. - * - * @param string $value - * @return string - */ - public static function escapeSingleQuotes(string $value): string - { - return str_replace("'", "\'", $value); - } } diff --git a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php index d48639f..47140b6 100644 --- a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php +++ b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php @@ -827,12 +827,7 @@ public function testExtraVars(): void // Test valid JSON. [ 'input' => '{ "key1": "value1", "key2": "value2" }', - 'expect' => '--extra-vars=\'{ "key1": "value1", "key2": "value2" }\'', - ], - // Test valid JSON with single quotes escaped. - [ - 'input' => '{ "key1": "va\'lue1", "key2": "va\'lue2" }', - 'expect' => '--extra-vars=\'{ "key1": "va\\\'lue1", "key2": "va\\\'lue2" }\'', + 'expect' => '--extra-vars={ "key1": "value1", "key2": "value2" }', ], // Test key value string. [ diff --git a/Tests/Asm/Ansible/Utils/StrTest.php b/Tests/Asm/Ansible/Utils/StrTest.php index d49f821..2f311e0 100644 --- a/Tests/Asm/Ansible/Utils/StrTest.php +++ b/Tests/Asm/Ansible/Utils/StrTest.php @@ -34,16 +34,4 @@ public function testStringIsNotJson(): void $this->assertFalse(Str::isJsonFormatted($value)); } - - /** - * Assert single quotes are properly escaped. - * - * @return void - */ - public function testSingleQuotesEscaped(): void - { - $value = "O'What"; - - $this->assertEquals("O\'What", Str::escapeSingleQuotes($value)); - } } From 724e47b6ff7b6d6a40c2beb76af71b29a5c4b286 Mon Sep 17 00:00:00 2001 From: bambamboole Date: Sun, 30 Apr 2023 13:03:03 +0200 Subject: [PATCH 07/14] fix error output --- .../Command/AbstractAnsibleCommand.php | 16 ++++++---- .../Ansible/Command/AnsiblePlaybookTest.php | 32 +++++++++++++++++++ 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Asm/Ansible/Command/AbstractAnsibleCommand.php b/Asm/Ansible/Command/AbstractAnsibleCommand.php index 6dfd8ae..d3e6829 100644 --- a/Asm/Ansible/Command/AbstractAnsibleCommand.php +++ b/Asm/Ansible/Command/AbstractAnsibleCommand.php @@ -176,16 +176,18 @@ protected function runProcess(?callable $callback): int|string // exit code $result = $process->run($callback); - // text-mode - if (null === $callback) { - $result = $process->getOutput(); + // if a callback is set, we return the exit code + if (null !== $callback) { + return $result; + } - if (false === $process->isSuccessful()) { - $process->getErrorOutput(); - } + // if no callback is set, and the process is not successful, we return the output + if (false === $process->isSuccessful()) { + return $process->getErrorOutput(); } - return $result; + // if no callback is set, and the process is successful, we return the output + return $process->getOutput(); } /** diff --git a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php index b1ce0f2..d5d5d28 100644 --- a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php +++ b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php @@ -5,6 +5,7 @@ namespace Asm\Ansible\Command; use Asm\Ansible\Process\ProcessBuilder; +use Asm\Ansible\Process\ProcessBuilderInterface; use Asm\Ansible\Testing\AnsibleTestCase; use Asm\Ansible\Utils\Env; use DateTime; @@ -1023,4 +1024,35 @@ public function testSshPipelining(): void $this->assertEquals($expect, $env['ANSIBLE_SSH_PIPELINING']); } } + + public function testReturnsErrorOutputIfProcessWasNotSuccessful(): void + { + $builder = $this->createMock(ProcessBuilderInterface::class); + $builder + ->expects(self::once()) + ->method('setArguments') + ->willReturnSelf(); + $builder + ->expects(self::once()) + ->method('getProcess') + ->willReturn($process = $this->createMock(Process::class)); + $process + ->expects(self::once()) + ->method('run'); + $process + ->expects(self::once()) + ->method('isSuccessful') + ->willReturn(false); + $process + ->expects(self::once()) + ->method('getErrorOutput') + ->willReturn('error output'); + $process + ->expects(self::never()) + ->method('getOutput'); + + $playbook = new AnsiblePlaybook($builder); + + self::assertEquals('error output', $playbook->execute()); + } } From 96b97ec72a963c675cca98931edfaf00739fc804 Mon Sep 17 00:00:00 2001 From: bambamboole Date: Sun, 30 Apr 2023 13:09:24 +0200 Subject: [PATCH 08/14] Extend tests --- .../Ansible/Command/AnsiblePlaybookTest.php | 69 +++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php index d5d5d28..83b48ac 100644 --- a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php +++ b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php @@ -855,7 +855,7 @@ public function testExtraVars(): void $tests = [ 'string without equals', - new DateTime() + new DateTime(), ]; foreach ($tests as $input) { @@ -1001,11 +1001,11 @@ public function testSshPipelining(): void { $tests = [ [ - 'input' => true, + 'input' => true, 'expect' => 'True', ], [ - 'input' => false, + 'input' => false, 'expect' => 'False', ], ]; @@ -1013,7 +1013,7 @@ public function testSshPipelining(): void $builder = new ProcessBuilder($this->getPlaybookUri(), $this->getProjectUri()); foreach ($tests as $test) { - $input = $test['input']; + $input = $test['input']; $expect = $test['expect']; $ansible = new AnsiblePlaybook($builder); @@ -1055,4 +1055,65 @@ public function testReturnsErrorOutputIfProcessWasNotSuccessful(): void self::assertEquals('error output', $playbook->execute()); } + + public function testReturnsNormalOutputIfProcessWasSuccessful(): void + { + $builder = $this->createMock(ProcessBuilderInterface::class); + $builder + ->expects(self::once()) + ->method('setArguments') + ->willReturnSelf(); + $builder + ->expects(self::once()) + ->method('getProcess') + ->willReturn($process = $this->createMock(Process::class)); + $process + ->expects(self::once()) + ->method('run'); + $process + ->expects(self::once()) + ->method('isSuccessful') + ->willReturn(true); + $process + ->expects(self::once()) + ->method('getOutput') + ->willReturn('success'); + $process + ->expects(self::never()) + ->method('getErrorOutput'); + + $playbook = new AnsiblePlaybook($builder); + + self::assertEquals('success', $playbook->execute()); + } + + public function testReturnsExitCodeIfCallbackwasPassed(): void + { + $builder = $this->createMock(ProcessBuilderInterface::class); + $builder + ->expects(self::once()) + ->method('setArguments') + ->willReturnSelf(); + $builder + ->expects(self::once()) + ->method('getProcess') + ->willReturn($process = $this->createMock(Process::class)); + $process + ->expects(self::once()) + ->method('run') + ->willReturn(0); + $process + ->expects(self::never()) + ->method('isSuccessful'); + $process + ->expects(self::never()) + ->method('getOutput'); + $process + ->expects(self::never()) + ->method('getErrorOutput'); + + $playbook = new AnsiblePlaybook($builder); + + self::assertEquals(0, $playbook->execute(fn () => null)); + } } From c2cc649ec6dc8c5429cfd910ddaf131f5da98f53 Mon Sep 17 00:00:00 2001 From: bambamboole Date: Sun, 30 Apr 2023 18:23:31 +0200 Subject: [PATCH 09/14] remove not used use statement --- Asm/Ansible/Command/AnsiblePlaybook.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Asm/Ansible/Command/AnsiblePlaybook.php b/Asm/Ansible/Command/AnsiblePlaybook.php index a2db809..a710570 100644 --- a/Asm/Ansible/Command/AnsiblePlaybook.php +++ b/Asm/Ansible/Command/AnsiblePlaybook.php @@ -6,7 +6,6 @@ use Asm\Ansible\Utils\Str; use InvalidArgumentException; -use JsonException; /** * Class AnsiblePlaybook From fbc227e7abf96104638e24ccfde079437ca83799 Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Mon, 1 May 2023 16:34:55 +0100 Subject: [PATCH 10/14] re-added json extra-vars tests & comments that were accidentally removed from PR #87 --- Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php index 70d70e0..d8f3817 100644 --- a/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php +++ b/Tests/Asm/Ansible/Command/AnsiblePlaybookTest.php @@ -802,14 +802,21 @@ public function testExtraVars(): void //$playbookFile = $this->getSamplesPathFor(AnsiblePlaybook::class) . '/playbook1.yml'; $tests = [ + // Test empty strings (with & without spaces). [ 'input' => '', 'expect' => false, ], + [ + 'input' => ' ', + 'expect' => false, + ], + // Test empty array. [ 'input' => [], 'expect' => false, ], + // Test Arrays [ 'input' => ['key' => 'value'], 'expect' => '--extra-vars=key=value', @@ -818,6 +825,12 @@ public function testExtraVars(): void 'input' => ['key1' => 'value1', 'key2' => 'value2'], 'expect' => '--extra-vars=key1=value1 key2=value2', ], + // Test valid JSON. + [ + 'input' => '{ "key1": "value1", "key2": "value2" }', + 'expect' => '--extra-vars={ "key1": "value1", "key2": "value2" }', + ], + // Test key value string. [ 'input' => 'key=value', 'expect' => '--extra-vars=key=value', From 4ced822ec94d8feac6f1dbd71835234b06a70039 Mon Sep 17 00:00:00 2001 From: RoussKS <7203382+RoussKS@users.noreply.github.com> Date: Mon, 1 May 2023 16:39:44 +0100 Subject: [PATCH 11/14] updated docblock --- Asm/Ansible/Command/AnsiblePlaybook.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Asm/Ansible/Command/AnsiblePlaybook.php b/Asm/Ansible/Command/AnsiblePlaybook.php index a710570..a250945 100644 --- a/Asm/Ansible/Command/AnsiblePlaybook.php +++ b/Asm/Ansible/Command/AnsiblePlaybook.php @@ -181,12 +181,20 @@ public function diff(): AnsiblePlaybookInterface * * ## String * You can also pass the raw extra vars string directly. - + * * Example: * ```php * $ansible = new Ansible()->playbook()->extraVars('path=/some/path'); * ``` * + * ## JSON String + * You can also use a JSON string to pass the key/value pairs of extra vars. + * + * Example: + * ```php + * $ansible = new Ansible()->playbook()->extraVars('{ "key1": "value1" }'); + * ``` + * * @param string|array $extraVars * @return AnsiblePlaybookInterface */ From bd494b6fa191b248fd9633bd469e80452579b083 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Mon, 12 Feb 2024 15:28:54 +0100 Subject: [PATCH 12/14] Allow PHP 8.3 and Symfony 7.0 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6546e3f..70ae7ac 100644 --- a/composer.json +++ b/composer.json @@ -15,9 +15,9 @@ } ], "require": { - "php": "^8.0.0|^8.1.0|^8.2.0", + "php": "^8.0.0|^8.1.0|^8.2.0|^8.3.0", "psr/log": "^1.1", - "symfony/process": "^5.3|^6.0" + "symfony/process": "^5.3|^6.0|^7.0" }, "require-dev": { "phpunit/phpunit": "^9.5|^10.0 ", From 9f1b7394a2f7cacc6c08ceae9164b6fe755924b4 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Mon, 12 Feb 2024 15:31:50 +0100 Subject: [PATCH 13/14] Update PHP version matrix in actions workflow --- .github/workflows/static-analysis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4ae65c4..56c2e4a 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -16,6 +16,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" include: - php-version: "8.0" phpunit: "9.5" From ea07a7a37c49e74c1a0968490005b3af95e4006f Mon Sep 17 00:00:00 2001 From: turegjorup Date: Mon, 12 Feb 2024 16:02:21 +0100 Subject: [PATCH 14/14] Allow psr/log 2.0 and 3.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 70ae7ac..8d3272d 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": "^8.0.0|^8.1.0|^8.2.0|^8.3.0", - "psr/log": "^1.1", + "psr/log": "^1.1|^2.0|^3.0", "symfony/process": "^5.3|^6.0|^7.0" }, "require-dev": {