diff --git a/.gitignore b/.gitignore index 8416846..f5dfac6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.phpunit.result.cache /.psalm-cache/ /clover.xml +/config/ /coveralls-upload.json /phpunit.xml /vendor/ diff --git a/README.md b/README.md index 4ba891a..05d1d9a 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,17 @@ laminas-composer-autoloading Introduction ------------ -The `laminas-composer-autoloading` package provides a single vendor binary, -`laminas-composer-autoloading`, which provides following commands: +The `laminas-composer-autoloading` package provides the following commands for use with [laminas-cli](https://docs.laminas.dev/laminas-cli/): -- `enable` - add the named module to the project autoloading rules - defined in `composer.json`, and -- `disable` - remove autoloading rules for the module from - `composer.json` +- `composer:autoload:enable` - add the named module to the project autoloading rules defined in `composer.json` +- `composer:autoload:disable` - remove autoloading rules for the module from `composer.json` Both commands also dump the autoloading rules on completion. > ### Upgrading > -> If you were using the v1 series of this component, the script previously -> exposed was `autoload-module-via-composer`. That script is now renamed -> to `laminas-composer-autoloading`. +> If you were using the v2 series of this component, the package previously provided its own binary, `laminas-composer-autoloading`. +> You will now call `laminas composer:autoload:(disable|enable)` instead. Installation ------------ @@ -37,41 +33,21 @@ Usage ----- ```bash -$ ./vendor/bin/laminas-composer-autoloading \ -> enable|disable \ -> [help|--help|-h] \ -> [--composer|-c ] \ -> [--type|-t ] \ -> [--modules-path|-p ] \ -> modulename +# Enable the module "Foo" and autodetermine if PSR-0 or PSR-4 autoloading should be generated +$ ./vendor/bin/laminas composer:autoload:enable Foo +# Enable the module "Bar" using PSR-0 rules +$ ./vendor/bin/laminas composer:autoload:enable Bar --type psr-0 +# Disable the module "Baz" +$ ./vendor/bin/laminas composer:autoload:disable Baz ``` -### Commands - -- `enable` - enables composer-based autoloading for the module. -- `disable` - disables composer-based autoloading for the module. - -### Arguments - -- `help`, `--help`, and `-h` each display the script's help message. -- `--composer` and `-c` each allow you to specify the path to the Composer - binary, if it is not in your `$PATH`. -- `--type` and `-t` allow you to specify the autoloading type, which should be - one of `psr-0` or `psr-4`; if not provided, the script will attempt to - auto-determine the value based on the directory structure of the module. -- `--modules-path` and `-p` allow you to specify the path to the modules - directory; default to `module`. -- `modulename` is the name of the module for which to setup Composer-based - autoloading. +Use `laminas help ` to get detailed help about available options and arguments. ### Notes -- Modules are assumed to have a `src/` directory. If they do not, the - autoloading generated will be incorrect. -- If unable to determine the autoloading type, PSR-0 will be assumed. -- On enabling autoloading, if the `Module` class file for the module - is in the module root, it will be moved to the module's `src/` directory - (laminas-mvc applications only). +- Modules are assumed to have a `src/` directory. If they do not, the autoloading generated will be incorrect. +- If unable to determine the autoloading type, the command raises an exception. +- On enabling autoloading, if the `Module` class file for the module is in the module root, it will be moved to the module's `src/` directory (laminas-mvc applications only). Examples -------- @@ -80,40 +56,40 @@ Examples entry for "Status" module. ```bash - $ ./vendor/bin/laminas-composer-autoloading enable Status + $ ./vendor/bin/laminas composer:autoload:enable Status ``` 1. Autodetect a module's autoloading type, and remove a Composer autoloading entry for "Status" module. ```bash - $ ./vendor/bin/laminas-composer-autoloading disable Status + $ ./vendor/bin/laminas composer:autoload:disable Status ``` 1. Specify PSR-0 for the module type, and generate a Composer autoloading entry for "Status" module. ```bash - $ ./vendor/bin/laminas-composer-autoloading enable --type psr0 Status + $ ./vendor/bin/laminas composer:autoload:enable --type psr-0 Status ``` 1. Specify PSR-4 for the module type, and generate a Composer autoloading entry for "Status" module. ```bash - $ ./vendor/bin/laminas-composer-autoloading enable --type psr4 Status + $ ./vendor/bin/laminas composer:autoload:enable --type psr-4 Status ``` 1. Specify the path to the composer binary when generating autoloading entry for "Status" module: ```bash - $ ./vendor/bin/laminas-composer-autoloading enable -c composer.phar Status + $ ./vendor/bin/laminas composer:autoload:enable -c composer.phar Status ``` 1. Specify the path to modules directory, and generate a Composer autoloading entry for "Status" module. ```bash - $ ./vendor/bin/laminas-composer-autoloading enable -p src Status + $ ./vendor/bin/laminas composer:autoload:enable -m src Status ``` diff --git a/bin/laminas-composer-autoloading b/bin/laminas-composer-autoloading deleted file mode 100644 index 0fdf9ca..0000000 --- a/bin/laminas-composer-autoloading +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env php -process(array_slice($argv, 1)); -exit($return); diff --git a/composer.json b/composer.json index cf17268..21a6352 100644 --- a/composer.json +++ b/composer.json @@ -20,19 +20,20 @@ "sort-packages": true }, "extra": { + "laminas": { + "component": "Laminas\\ComposerAutoloading", + "config-provider": "Laminas\\ComposerAutoloading\\ConfigProvider" + } }, "require": { "php": "^7.3 || ~8.0.0", - "laminas/laminas-stdlib": "^3.1", - "laminas/laminas-zendframework-bridge": "^1.0" + "laminas/laminas-cli": "^1.0", + "webmozart/assert": "^1.10" }, "require-dev": { "laminas/laminas-coding-standard": "~2.1.4", "mikey179/vfsstream": "^1.6.7", - "mockery/mockery": "^1.4.1", - "php-mock/php-mock-phpunit": "^2.0", "phpunit/phpunit": "^9.3", - "psalm/plugin-mockery": "^0.7.0", "psalm/plugin-phpunit": "^0.15.1", "vimeo/psalm": "^4.6" }, @@ -46,9 +47,6 @@ "LaminasTest\\ComposerAutoloading\\": "test/" } }, - "bin": [ - "bin/laminas-composer-autoloading" - ], "scripts": { "check": [ "@cs-check", @@ -58,8 +56,5 @@ "cs-fix": "phpcbf", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" - }, - "replace": { - "zfcampus/zf-composer-autoloading": "^2.1.0" } } diff --git a/composer.lock b/composer.lock index 6e5fd19..d7683fb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,93 +4,119 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c79771a56a31d00c341101993e3057e", + "content-hash": "91f12e77401b7d9fe7e6e29ef0379850", "packages": [ { - "name": "laminas/laminas-stdlib", - "version": "3.3.1", + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe" + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/d81c7ffe602ed0e6ecb18691019111c0f4bf1efe", - "reference": "d81c7ffe602ed0e6ecb18691019111c0f4bf1efe", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", "shasum": "" }, "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ^8.0" + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" }, "replace": { - "zendframework/zend-stdlib": "^3.2.1" + "ocramius/package-versions": "1.11.99" }, "require-dev": { - "laminas/laminas-coding-standard": "~1.0.0", - "phpbench/phpbench": "^0.17.1", - "phpunit/phpunit": "~9.3.7" + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } }, - "type": "library", "autoload": { "psr-4": { - "Laminas\\Stdlib\\": "src/" + "PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "description": "SPL extensions, array utilities, error handlers, and more", - "homepage": "https://laminas.dev", - "keywords": [ - "laminas", - "stdlib" + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-stdlib/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-stdlib/issues", - "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", - "source": "https://github.com/laminas/laminas-stdlib" + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" }, "funding": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" } ], - "time": "2020-11-19T20:18:59+00:00" + "time": "2020-11-11T10:22:58+00:00" }, { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.2.0", + "name": "laminas/laminas-cli", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" + "url": "https://github.com/laminas/laminas-cli.git", + "reference": "2b33cb5bf1b6b72e84a33f11c40ca4c7b7d7b2ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", - "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", + "url": "https://api.github.com/repos/laminas/laminas-cli/zipball/2b33cb5bf1b6b72e84a33f11c40ca4c7b7d7b2ef", + "reference": "2b33cb5bf1b6b72e84a33f11c40ca4c7b7d7b2ef", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "composer/package-versions-deprecated": "^1.10.99", + "php": "^7.3 || ~8.0.0", + "psr/container": "^1.0", + "symfony/console": "^4.3 || ^5.1.2", + "symfony/event-dispatcher": "^4.0 || ^5.0", + "symfony/polyfill-php80": "^1.17", + "webmozart/assert": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" + "laminas/laminas-coding-standard": "~2.0.0", + "laminas/laminas-mvc": "^3.1.1", + "laminas/laminas-servicemanager": "^3.4", + "phpunit/phpunit": "^9.4.1", + "vimeo/psalm": "^4.4.1" }, + "bin": [ + "bin/laminas" + ], "type": "library", "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" } }, "autoload": { @@ -98,25 +124,27 @@ "src/autoload.php" ], "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" + "Laminas\\Cli\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "description": "Command-line interface for Laminas projects", "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" + "cli", + "command", + "console", + "laminas" ], "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-cli/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/mezzio/laminas-cli/issues", + "rss": "https://github.com/mezzio/laminas-cli/releases.atom", + "source": "https://github.com/mezzio/laminas-cli" }, "funding": [ { @@ -124,50 +152,30 @@ "type": "community_bridge" } ], - "time": "2021-02-25T21:54:58+00:00" - } - ], - "packages-dev": [ + "time": "2021-02-26T17:15:07+00:00" + }, { - "name": "amphp/amp", - "version": "v2.5.2", + "name": "psr/container", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", - "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=7" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6.0.9 | ^7", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "psr-4": { - "Amp\\": "lib" - }, - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ] + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -175,87 +183,52 @@ ], "authors": [ { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.5.2" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2021-01-10T17:06:37+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { - "name": "amphp/byte-stream", - "version": "v1.8.0", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f0c20cf598a958ba2aa8c6e5a71c697d652c7088", - "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" + "php": ">=7.2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Amp\\ByteStream\\": "lib" - }, - "files": [ - "lib/functions.php" - ] + "Psr\\EventDispatcher\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -263,68 +236,77 @@ ], "authors": [ { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "description": "Standard interfaces for event handling.", "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" + "events", + "psr", + "psr-14" ], "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/master" + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2020-06-29T18:35:05+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.1", + "name": "symfony/console", + "version": "v5.2.5", "source": { "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + "url": "https://github.com/symfony/console.git", + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", - "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "url": "https://api.github.com/repos/symfony/console/zipball/938ebbadae1b0a9c9d1ec313f87f9708609f1b79", + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, - "replace": { - "ocramius/package-versions": "1.11.99" + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" + "provide": { + "psr/log-implementation": "1.0" }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, + "type": "library", "autoload": { "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -332,66 +314,72 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + "source": "https://github.com/symfony/console/tree/v5.2.5" }, "funding": [ { - "url": "https://packagist.com", + "url": "https://symfony.com/sponsor", "type": "custom" }, { - "url": "https://github.com/composer", + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2020-11-11T10:22:58+00:00" + "time": "2021-03-06T13:42:15+00:00" }, { - "name": "composer/semver", - "version": "3.2.4", + "name": "symfony/deprecation-contracts", + "version": "v2.2.0", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.x-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } + "files": [ + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -399,75 +387,84 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.4" + "source": "https://github.com/symfony/deprecation-contracts/tree/master" }, "funding": [ { - "url": "https://packagist.com", + "url": "https://symfony.com/sponsor", "type": "custom" }, { - "url": "https://github.com/composer", + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2020-11-13T08:59:24+00:00" + "time": "2020-09-07T11:33:47+00:00" }, { - "name": "composer/xdebug-handler", - "version": "1.4.5", + "name": "symfony/event-dispatcher", + "version": "v5.2.4", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f28d44c286812c714741478d968104c5e604a1d4" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "d08d6ec121a425897951900ab692b612a61d6240" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", - "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", + "reference": "d08d6ec121a425897951900ab692b612a61d6240", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "autoload": { "psr-4": { - "Composer\\XdebugHandler\\": "src" - } + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -475,67 +472,69 @@ ], "authors": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" }, "funding": [ { - "url": "https://packagist.com", + "url": "https://symfony.com/sponsor", "type": "custom" }, { - "url": "https://github.com/composer", + "url": "https://github.com/fabpot", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2020-11-13T08:04:11+00:00" + "time": "2021-02-18T17:12:37+00:00" }, { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", + "name": "symfony/event-dispatcher-contracts", + "version": "v2.2.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2", + "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" + "suggest": { + "symfony/event-dispatcher-implementation": "" }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "Symfony\\Contracts\\EventDispatcher\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -544,105 +543,159 @@ ], "authors": [ { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.2.0" }, - "time": "2020-12-07T18:04:37+00:00" + "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": "2020-09-07T11:33:47+00:00" }, { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { "psr-4": { - "XdgBaseDir\\": "src/" - } + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "implementation of xdg base directory specification for php", + "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": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" }, - "time": "2019-12-04T15:06:13+00:00" + "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-01-07T16:49:33+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.4.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=7.1" }, - "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" + "suggest": { + "ext-intl": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -650,1334 +703,1483 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", "keywords": [ - "constructor", - "instantiate" + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", + "url": "https://symfony.com/sponsor", "type": "custom" }, { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" + "url": "https://github.com/fabpot", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", - "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", "shasum": "" }, "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" + "suggest": { + "ext-intl": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" + "MIT" ], "authors": [ { - "name": "Felix Becker", - "email": "felix.b@outlook.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A more advanced JSONRPC implementation", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" }, - "time": "2021-01-10T17:48:47+00:00" + "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-01-22T09:19:47+00:00" }, { - "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "LanguageServerProtocol\\": "src/" - } + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "ISC" + "MIT" ], "authors": [ { - "name": "Felix Becker", - "email": "felix.b@outlook.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" }, - "time": "2021-02-22T14:02:09+00:00" + "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-01-22T09:19:47+00:00" }, { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", + "name": "symfony/polyfill-php73", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { - "php": "^5.3|^7.0|^8.0" - }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" - }, - "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], "classmap": [ - "hamcrest" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" + "MIT" ], - "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" - }, - "time": "2020-07-09T08:09:16+00:00" - }, - { - "name": "laminas/laminas-coding-standard", - "version": "2.1.4", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-coding-standard.git", - "reference": "d75f1acf615232e108da2d2cf5a7df3e527b8f38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/d75f1acf615232e108da2d2cf5a7df3e527b8f38", - "reference": "d75f1acf615232e108da2d2cf5a7df3e527b8f38", - "shasum": "" - }, - "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.3 || ~8.0.0", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8", - "webimpress/coding-standard": "^1.1.6" - }, - "type": "phpcodesniffer-standard", - "autoload": { - "psr-4": { - "LaminasCodingStandard\\": "src/LaminasCodingStandard/" + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" ], - "description": "Laminas Coding Standard", - "homepage": "https://laminas.dev", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "Coding Standard", - "laminas" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-coding-standard/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-coding-standard/issues", - "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", - "source": "https://github.com/laminas/laminas-coding-standard" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" }, "funding": [ { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" + "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": "2020-10-26T07:33:05+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { - "name": "mikey179/vfsstream", - "version": "v1.6.8", + "name": "symfony/polyfill-php80", + "version": "v1.22.1", "source": { "type": "git", - "url": "https://github.com/bovigo/vfsStream.git", - "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe", - "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/bovigo/vfsStream/issues", - "source": "https://github.com/bovigo/vfsStream/tree/master", - "wiki": "https://github.com/bovigo/vfsStream/wiki" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" }, - "time": "2019-10-30T15:31:00+00:00" + "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-01-07T16:49:33+00:00" }, { - "name": "mockery/mockery", - "version": "1.4.3", + "name": "symfony/service-contracts", + "version": "v2.2.0", "source": { "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" - }, - "conflict": { - "phpunit/phpunit": "<8.0" + "php": ">=7.2.5", + "psr/container": "^1.0" }, - "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-0": { - "Mockery": "library/" + "psr-4": { + "Symfony\\Contracts\\Service\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.3" + "source": "https://github.com/symfony/service-contracts/tree/master" }, - "time": "2021-02-24T09:51:49+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "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": "2020-09-07T11:33:47+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "4e78d7d47061fa183639927ec40d607973699609" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/symfony/string/zipball/4e78d7d47061fa183639927ec40d607973699609", + "reference": "4e78d7d47061fa183639927ec40d607973699609", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "replace": { - "myclabs/deep-copy": "self.version" + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" }, "type": "library", "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Symfony\\Component\\String\\": "" }, "files": [ - "src/DeepCopy/deep_copy.php" + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/symfony/string/tree/v5.2.4" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "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": "2020-11-13T09:40:50+00:00" + "time": "2021-02-16T10:20:28+00:00" }, { - "name": "netresearch/jsonmapper", - "version": "v2.1.0", + "name": "webmozart/assert", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", - "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.6" + "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": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", - "squizlabs/php_codesniffer": "~3.5" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { - "psr-0": { - "JsonMapper": "src/" + "psr-4": { + "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "OSL-3.0" + "MIT" ], "authors": [ { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Map nested JSON structures onto PHP classes", + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/master" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-04-16T18:48:43+00:00" - }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "packages-dev": [ { - "name": "nikic/php-parser", - "version": "v4.10.4", + "name": "amphp/amp", + "version": "v2.5.2", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "url": "https://github.com/amphp/amp.git", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7" }, "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6.0.9 | ^7", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" }, - "bin": [ - "bin/php-parse" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "PhpParser\\": "lib/PhpParser" - } + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "A PHP parser written in PHP", + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", "keywords": [ - "parser", - "php" + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" ], "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.5.2" }, - "time": "2020-12-20T10:01:03+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-01-10T17:06:37+00:00" }, { - "name": "openlss/lib-array2xml", - "version": "1.0.0", + "name": "amphp/byte-stream", + "version": "v1.8.0", "source": { "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + "url": "https://github.com/amphp/byte-stream.git", + "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f0c20cf598a958ba2aa8c6e5a71c697d652c7088", + "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088", "shasum": "" }, "require": { - "php": ">=5.3.2" + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" }, "type": "library", - "autoload": { - "psr-0": { - "LSS": "" + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" } }, + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" ], "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/master" }, - "time": "2019-03-29T20:06:56+00:00" + "time": "2020-06-29T18:35:05+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.1", + "name": "composer/semver", + "version": "3.2.4", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "url": "https://github.com/composer/semver.git", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\Semver\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" }, { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" }, - "time": "2020-06-27T14:33:11+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:59:24+00:00" }, { - "name": "phar-io/version", - "version": "3.1.0", + "name": "composer/xdebug-handler", + "version": "1.4.5", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "f28d44c286812c714741478d968104c5e604a1d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", + "reference": "f28d44c286812c714741478d968104c5e604a1d4", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "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" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "Library for handling version information and constraints", + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" }, - "time": "2021-02-23T14:00:09+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:04:11+00:00" }, { - "name": "php-mock/php-mock", - "version": "2.3.0", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", "source": { "type": "git", - "url": "https://github.com/php-mock/php-mock.git", - "reference": "a3142f257153b71c09bf9146ecf73430b3818b7c" + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock/zipball/a3142f257153b71c09bf9146ecf73430b3818b7c", - "reference": "a3142f257153b71c09bf9146ecf73430b3818b7c", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0", - "phpunit/php-text-template": "^1 || ^2" - }, - "replace": { - "malkusch/php-mock": "*" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.5" + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" }, - "suggest": { - "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "type": "library", "autoload": { - "files": [ - "autoload.php" - ], "psr-4": { - "phpmock\\": [ - "classes/", - "tests/" - ] + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "WTFPL" + "MIT" ], "authors": [ { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" } ], - "description": "PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.", - "homepage": "https://github.com/php-mock/php-mock", + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "stub", - "test", - "test double" + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" ], "support": { - "issues": "https://github.com/php-mock/php-mock/issues", - "source": "https://github.com/php-mock/php-mock/tree/2.3.0" + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" }, - "funding": [ - { - "url": "https://github.com/michalbundyra", - "type": "github" - } - ], - "time": "2020-12-11T19:20:04+00:00" + "time": "2020-12-07T18:04:37+00:00" }, { - "name": "php-mock/php-mock-integration", - "version": "2.1.0", + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", "source": { "type": "git", - "url": "https://github.com/php-mock/php-mock-integration.git", - "reference": "003d585841e435958a02e9b986953907b8b7609b" + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/003d585841e435958a02e9b986953907b8b7609b", - "reference": "003d585841e435958a02e9b986953907b8b7609b", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { - "php": ">=5.6", - "php-mock/php-mock": "^2.2", - "phpunit/php-text-template": "^1 || ^2" + "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9" + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, "type": "library", "autoload": { "psr-4": { - "phpmock\\integration\\": "classes/" + "XdgBaseDir\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "WTFPL" - ], - "authors": [ - { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" - } - ], - "description": "Integration package for PHP-Mock", - "homepage": "https://github.com/php-mock/php-mock-integration", - "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "stub", - "test", - "test double" + "MIT" ], + "description": "implementation of xdg base directory specification for php", "support": { - "issues": "https://github.com/php-mock/php-mock-integration/issues", - "source": "https://github.com/php-mock/php-mock-integration/tree/2.1.0" + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" }, - "time": "2020-02-08T14:40:25+00:00" + "time": "2019-12-04T15:06:13+00:00" }, { - "name": "php-mock/php-mock-phpunit", - "version": "2.6.0", + "name": "doctrine/instantiator", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/php-mock/php-mock-phpunit.git", - "reference": "2877a0e58f12e91b64bf36ccd080a209dcbf6c30" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/2877a0e58f12e91b64bf36ccd080a209dcbf6c30", - "reference": "2877a0e58f12e91b64bf36ccd080a209dcbf6c30", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { - "php": ">=7", - "php-mock/php-mock-integration": "^2.1", - "phpunit/phpunit": "^6 || ^7 || ^8 || ^9" + "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": { - "files": [ - "autoload.php" - ], "psr-4": { - "phpmock\\phpunit\\": "classes/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "WTFPL" + "MIT" ], "authors": [ { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.", - "homepage": "https://github.com/php-mock/php-mock-phpunit", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "phpunit", - "stub", - "test", - "test double" + "constructor", + "instantiate" ], "support": { - "issues": "https://github.com/php-mock/php-mock-phpunit/issues", - "source": "https://github.com/php-mock/php-mock-phpunit/tree/2.6.0" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" }, - "time": "2020-02-08T15:44:47+00:00" + "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": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "netresearch/jsonmapper": "^1.0 || ^2.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" }, + "type": "library", "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src/" + "AdvancedJsonRpc\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "ISC" ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], + "description": "A more advanced JSONRPC implementation", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" }, - "time": "2020-06-27T09:03:43+00:00" + "time": "2021-01-10T17:48:47+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", "shasum": "" }, "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" + "php": ">=7.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "LanguageServerProtocol\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "ISC" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "name": "Felix Becker", + "email": "felix.b@outlook.com" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-02-22T14:02:09+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "name": "laminas/laminas-coding-standard", + "version": "2.1.4", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "url": "https://github.com/laminas/laminas-coding-standard.git", + "reference": "d75f1acf615232e108da2d2cf5a7df3e527b8f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/laminas/laminas-coding-standard/zipball/d75f1acf615232e108da2d2cf5a7df3e527b8f38", + "reference": "d75f1acf615232e108da2d2cf5a7df3e527b8f38", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ~8.0.0", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "^3.5.8", + "webimpress/coding-standard": "^1.1.6" }, + "type": "phpcodesniffer-standard", "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": "src" + "LaminasCodingStandard\\": "src/LaminasCodingStandard/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } + "description": "Laminas Coding Standard", + "homepage": "https://laminas.dev", + "keywords": [ + "Coding Standard", + "laminas" ], - "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.4.0" + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-coding-standard/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-coding-standard/issues", + "rss": "https://github.com/laminas/laminas-coding-standard/releases.atom", + "source": "https://github.com/laminas/laminas-coding-standard" }, - "time": "2020-09-17T18:55:26+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-10-26T07:33:05+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.13.0", + "name": "laminas/laminas-zendframework-bridge", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" } }, "autoload": { + "files": [ + "src/autoload.php" + ], "psr-4": { - "Prophecy\\": "src/Prophecy" + "Laminas\\ZendFrameworkBridge\\": "src//" } }, "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" - } + "BSD-3-Clause" ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Alias legacy ZF class names to Laminas Project equivalents.", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "ZendFramework", + "autoloading", + "laminas", + "zf" ], "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" }, - "time": "2021-03-17T13:42:18+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-02-25T21:54:58+00:00" }, { - "name": "phpstan/phpdoc-parser", - "version": "0.4.9", + "name": "mikey179/vfsstream", + "version": "v1.6.8", "source": { "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=5.3.0" }, "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.26", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" + "phpunit/phpunit": "^4.5|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { - "psr-4": { - "PHPStan\\PhpDocParser\\": [ - "src/" - ] + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "PHPDoc parser with support for nullable, intersection and generic types", + "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/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" }, - "time": "2020-08-03T20:32:43+00:00" + "time": "2019-10-30T15:31:00+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "9.2.5", + "name": "myclabs/deep-copy", + "version": "1.10.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "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" + "php": "^7.1 || ^8.0" }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "replace": { + "myclabs/deep-copy": "self.version" }, - "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.2-dev" - } - }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "MIT" ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Create deep copies (clones) of your objects", "keywords": [ - "coverage", - "testing", - "xunit" + "clone", + "copy", + "duplicate", + "object", + "object graph" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5" + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" } ], - "time": "2020-11-28T06:44:49+00:00" + "time": "2020-11-13T09:40:50+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "name": "netresearch/jsonmapper", + "version": "v2.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", "shasum": "" }, "require": { - "php": ">=7.3" + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "squizlabs/php_codesniffer": "~3.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "JsonMapper": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "OSL-3.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], + "description": "Map nested JSON structures onto PHP classes", "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/master" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2020-04-16T18:48:43+00:00" }, { - "name": "phpunit/php-invoker", - "version": "3.1.1", + "name": "nikic/php-parser", + "version": "v4.10.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", "shasum": "" }, "require": { - "php": ">=7.3" + "ext-tokenizer": "*", + "php": ">=7.0" }, "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" + "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": "3.1-dev" + "dev-master": "4.9-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1985,111 +2187,98 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Nikita Popov" } ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "description": "A PHP parser written in PHP", "keywords": [ - "process" + "parser", + "php" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2020-12-20T10:01:03+00:00" }, { - "name": "phpunit/php-text-template", - "version": "2.0.4", + "name": "openlss/lib-array2xml", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "php": ">=5.3.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "LSS": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", "keywords": [ - "template" + "array", + "array conversion", + "xml", + "xml conversion" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2019-03-29T20:06:56+00:00" }, { - "name": "phpunit/php-timer", - "version": "5.0.3", + "name": "phar-io/manifest", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2102,96 +2291,50 @@ "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": "lead" + "role": "Developer" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2020-06-27T14:33:11+00:00" }, { - "name": "phpunit/phpunit", - "version": "9.5.3", + "name": "phar-io/version", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41" + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/27241ac75fc37ecf862b6e002bf713b6566cbe41", - "reference": "27241ac75fc37ecf862b6e002bf713b6566cbe41", - "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.1", - "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "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", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "require": { + "php": "^7.2 || ^8.0" }, - "bin": [ - "phpunit" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.5-dev" - } - }, "autoload": { "classmap": [ "src/" - ], - "files": [ - "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2199,70 +2342,55 @@ "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": "lead" + "role": "Developer" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.3" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-03-17T07:30:34+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { - "name": "psalm/plugin-mockery", - "version": "0.7.0", + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", "source": { "type": "git", - "url": "https://github.com/psalm/psalm-plugin-mockery.git", - "reference": "f40d4777a0d18913bc01edef7ebe8173629663a6" + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-mockery/zipball/f40d4777a0d18913bc01edef7ebe8173629663a6", - "reference": "f40d4777a0d18913bc01edef7ebe8173629663a6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "mockery/mockery": "^0.9 || ^1.0", - "vimeo/psalm": "^4.0" - }, - "require-dev": { - "codeception/base": "^2.5", - "phpunit/phpunit": "^6.0 || ^7.0 || ^8.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.2.1" + "php": "^7.2 || ^8.0" }, - "type": "psalm-plugin", + "type": "library", "extra": { - "psalm": { - "pluginClass": "Psalm\\MockeryPlugin\\Plugin" + "branch-alias": { + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "Psalm\\MockeryPlugin\\": [ - "." - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2271,58 +2399,58 @@ ], "authors": [ { - "name": "Matt Brown", - "email": "github@muglug.com" + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], - "description": "Psalm plugin for Mockery", + "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/psalm/psalm-plugin-mockery/issues", - "source": "https://github.com/psalm/psalm-plugin-mockery/tree/0.7.0" + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" }, - "time": "2020-12-01T19:45:52+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { - "name": "psalm/plugin-phpunit", - "version": "0.15.1", + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", "source": { "type": "git", - "url": "https://github.com/psalm/psalm-plugin-phpunit.git", - "reference": "30ca25ce069bf4943c36e59b7df6954f6af05e64" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/30ca25ce069bf4943c36e59b7df6954f6af05e64", - "reference": "30ca25ce069bf4943c36e59b7df6954f6af05e64", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.10", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "ext-simplexml": "*", - "php": "^7.1 || ^8.0", - "vimeo/psalm": "dev-master || dev-4.x || ^4.0" - }, - "conflict": { - "phpunit/phpunit": "<7.5" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "codeception/codeception": "^4.0.3", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", - "squizlabs/php_codesniffer": "^3.3.1", - "weirdan/codeception-psalm-module": "^0.11.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "mockery/mockery": "~1.3.2" }, - "type": "psalm-plugin", + "type": "library", "extra": { - "psalm": { - "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" + "branch-alias": { + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "Psalm\\PhpUnitPlugin\\": "src" + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2331,38 +2459,51 @@ ], "authors": [ { - "name": "Matt Brown", - "email": "github@muglug.com" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], - "description": "Psalm plugin for PHPUnit", + "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/psalm/psalm-plugin-phpunit/issues", - "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.15.1" + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2021-01-23T00:19:07+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { - "name": "psr/container", - "version": "1.1.1", + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2371,51 +2512,51 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2020-09-17T18:55:26+00:00" }, { - "name": "psr/log", - "version": "1.1.3", + "name": "phpspec/prophecy", + "version": "1.13.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { - "php": ">=5.3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -2424,102 +2565,124 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", "keywords": [ - "log", - "psr", - "psr-3" + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.3" + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" }, - "time": "2020-03-23T09:12:05+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { - "name": "sebastian/cli-parser", - "version": "1.0.1", + "name": "phpstan/phpdoc-parser", + "version": "0.4.9", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", "shasum": "" }, "require": { - "php": ">=7.3" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "consistence/coding-standard": "^3.5", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.26", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^4.7.2", + "symfony/process": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "0.4-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } + "MIT" ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/master" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2020-08-03T20:32:43+00:00" }, { - "name": "sebastian/code-unit", - "version": "1.0.8", + "name": "phpunit/php-code-coverage", + "version": "9.2.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", "shasum": "" }, "require": { - "php": ">=7.3" + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "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": "1.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -2538,11 +2701,16 @@ "role": "lead" } ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", + "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/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5" }, "funding": [ { @@ -2550,20 +2718,20 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2020-11-28T06:44:49+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "name": "phpunit/php-file-iterator", + "version": "3.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { @@ -2575,7 +2743,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2590,14 +2758,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "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/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" }, "funding": [ { @@ -2605,34 +2778,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "sebastian/comparator", - "version": "4.0.6", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "php": ">=7.3" }, "require-dev": { + "ext-pcntl": "*", "phpunit/phpunit": "^9.3" }, + "suggest": { + "ext-pcntl": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2647,31 +2822,18 @@ "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" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "comparator", - "compare", - "equality" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, "funding": [ { @@ -2679,24 +2841,23 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "sebastian/complexity", - "version": "2.0.2", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", "php": ">=7.3" }, "require-dev": { @@ -2724,11 +2885,14 @@ "role": "lead" } ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -2736,33 +2900,32 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "sebastian/diff", - "version": "4.0.4", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2777,24 +2940,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -2802,40 +2959,75 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "sebastian/environment", - "version": "5.1.3", + "name": "phpunit/phpunit", + "version": "9.5.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", "shasum": "" }, "require": { - "php": ">=7.3" + "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.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "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", + "sebastian/version": "^3.0.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { - "ext-posix": "*" + "ext-soap": "*", + "ext-xdebug": "*" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2845,185 +3037,158 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "Xdebug", - "environment", - "hhvm" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" }, "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2021-03-23T07:16:29+00:00" }, { - "name": "sebastian/exporter", - "version": "4.0.3", + "name": "psalm/plugin-phpunit", + "version": "0.15.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "url": "https://github.com/psalm/psalm-plugin-phpunit.git", + "reference": "30ca25ce069bf4943c36e59b7df6954f6af05e64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/30ca25ce069bf4943c36e59b7df6954f6af05e64", + "reference": "30ca25ce069bf4943c36e59b7df6954f6af05e64", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "composer/package-versions-deprecated": "^1.10", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "ext-simplexml": "*", + "php": "^7.1 || ^8.0", + "vimeo/psalm": "dev-master || dev-4.x || ^4.0" + }, + "conflict": { + "phpunit/phpunit": "<7.5" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "codeception/codeception": "^4.0.3", + "php": "^7.3 || ^8.0", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.3.1", + "weirdan/codeception-psalm-module": "^0.11.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" }, - "type": "library", + "type": "psalm-plugin", "extra": { - "branch-alias": { - "dev-master": "4.0-dev" + "psalm": { + "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psalm\\PhpUnitPlugin\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "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" + "name": "Matt Brown", + "email": "github@muglug.com" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Psalm plugin for PHPUnit", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.15.1" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-01-23T00:19:07+00:00" }, { - "name": "sebastian/global-state", - "version": "5.0.2", + "name": "psr/log", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "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": "*" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "global state" + "log", + "psr", + "psr-3" ], "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + "source": "https://github.com/php-fig/log/tree/1.1.3" }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { - "name": "sebastian/lines-of-code", - "version": "1.0.3", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", "php": ">=7.3" }, "require-dev": { @@ -3051,11 +3216,11 @@ "role": "lead" } ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" }, "funding": [ { @@ -3063,26 +3228,24 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "4.0.4", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=7.3" }, "require-dev": { "phpunit/phpunit": "^9.3" @@ -3090,7 +3253,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -3105,14 +3268,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { @@ -3120,20 +3284,20 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { - "name": "sebastian/object-reflector", - "version": "2.0.4", + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { @@ -3163,11 +3327,11 @@ "email": "sebastian@phpunit.de" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "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/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -3175,24 +3339,26 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "sebastian/recursion-context", - "version": "4.0.4", + "name": "sebastian/comparator", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { "phpunit/phpunit": "^9.3" @@ -3222,15 +3388,24 @@ "email": "whatthejeff@gmail.com" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "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/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" }, "funding": [ { @@ -3238,32 +3413,33 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2020-10-26T15:49:45+00:00" }, { - "name": "sebastian/resource-operations", - "version": "3.0.3", + "name": "sebastian/complexity", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "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.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3278,14 +3454,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" }, "funding": [ { @@ -3293,32 +3470,33 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2020-10-26T15:52:27+00:00" }, { - "name": "sebastian/type", - "version": "2.3.1", + "name": "sebastian/diff", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -3333,15 +3511,24 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -3349,29 +3536,35 @@ "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { - "name": "sebastian/version", - "version": "3.0.2", + "name": "sebastian/environment", + "version": "5.1.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "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": "3.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3386,15 +3579,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "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/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" }, "funding": [ { @@ -3402,869 +3599,661 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2020-09-28T05:52:38+00:00" }, { - "name": "slevomat/coding-standard", - "version": "6.4.1", + "name": "sebastian/exporter", + "version": "4.0.3", "source": { "type": "git", - "url": "https://github.com/slevomat/coding-standard.git", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", - "squizlabs/php_codesniffer": "^3.5.6" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phing/phing": "2.16.3", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.48", - "phpstan/phpstan-deprecation-rules": "0.12.5", - "phpstan/phpstan-phpunit": "0.12.16", - "phpstan/phpstan-strict-rules": "0.12.5", - "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" }, - "type": "phpcodesniffer-standard", + "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { - "psr-4": { - "SlevomatCodingStandard\\": "SlevomatCodingStandard" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "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": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { - "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" }, "funding": [ { - "url": "https://github.com/kukulich", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", - "type": "tidelift" } ], - "time": "2020-10-05T12:39:37+00:00" + "time": "2020-09-28T05:24:23+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "3.5.8", + "name": "sebastian/global-state", + "version": "5.0.2", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", "shasum": "" }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "5.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Greg Sherwood", - "role": "lead" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "phpcs", - "standards" + "global state" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" }, - "time": "2020-10-23T02:01:07+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+00:00" }, { - "name": "symfony/console", - "version": "v5.2.5", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/938ebbadae1b0a9c9d1ec313f87f9708609f1b79", - "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" - }, - "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0" + "nikic/php-parser": "^4.6", + "php": ">=7.3" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "source": "https://github.com/symfony/console/tree/v5.2.5" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-03-06T13:42:15+00:00" + "time": "2020-11-28T06:42:11+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.22.1", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.1", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" + "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": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.1", + "name": "sebastian/recursion-context", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2020-10-26T13:17:30+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.22.1", + "name": "sebastian/resource-operations", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2020-09-28T06:45:17+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.22.1", + "name": "sebastian/type", + "version": "2.3.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "2.3-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2020-10-26T13:18:59+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.22.1", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "symfony/service-contracts", - "version": "v2.2.0", + "name": "slevomat/coding-standard", + "version": "6.4.1", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.0" + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", + "squizlabs/php_codesniffer": "^3.5.6" }, - "suggest": { - "symfony/service-implementation": "" + "require-dev": { + "phing/phing": "2.16.3", + "php-parallel-lint/php-parallel-lint": "1.2.0", + "phpstan/phpstan": "0.12.48", + "phpstan/phpstan-deprecation-rules": "0.12.5", + "phpstan/phpstan-phpunit": "0.12.16", + "phpstan/phpstan-strict-rules": "0.12.5", + "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" }, - "type": "library", + "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "2.2-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "6.x-dev" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" + "SlevomatCodingStandard\\": "SlevomatCodingStandard" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { - "source": "https://github.com/symfony/service-contracts/tree/master" + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/kukulich", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2020-10-05T12:39:37+00:00" }, { - "name": "symfony/string", - "version": "v5.2.4", + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "4e78d7d47061fa183639927ec40d607973699609" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e78d7d47061fa183639927ec40d607973699609", - "reference": "4e78d7d47061fa183639927ec40d607973699609", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "files": [ - "Resources/functions.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Greg Sherwood", + "role": "lead" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" + "phpcs", + "standards" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.4" + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "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-02-16T10:20:28+00:00" + "time": "2020-10-23T02:01:07+00:00" }, { "name": "theseer/tokenizer", @@ -4475,64 +4464,6 @@ ], "time": "2021-01-11T18:13:55+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" - }, { "name": "webmozart/path-util", "version": "2.3.0", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index e117e01..c7a5183 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -12,7 +12,6 @@ - bin src test diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 43140f6..ed904e8 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,136 +1,50 @@ - - - new $command($this->projectDir, $this->modulesPath, $this->composer) - - - $args[$i + 1] - $args[$i] - $dest - $movedModuleClass - $movedModuleClass - $this->module - array_shift($args) - - - $arg - $arg - $dest - $movedModuleClass - $this->composer - $this->module - $this->type - - - (string) $command - - - getMovedModuleClass - - - - [] - - - $composerPackage - array{autoload: array<string, array<string, string>|mixed>|mixed} - + + $type + - - - $composerPackage - + - $composerPackage['autoload'][$type] + $this->composer['autoload'][$type] - - false|array{autoload: array<string, array<string, string>|mixed>|mixed} - - - - - $composerPackage['autoload'][$type] + + $this->composer['autoload'][$type] + $this->composer['autoload'][$type] - - (bool) $value - + + array<string, mixed> + + + json_decode($json, true, 512, JSON_THROW_ON_ERROR) + - - setMethods - - - - at - + + $this->dir->getChild('module') + - - - $json['autoload'][$type] - $json['autoload'][$type] + + + $definition + $definition + $definition['autoload'] + $definition['autoload'] + $definition['autoload'][$type] + $definition['autoload'][$type] + $definition['autoload'][$type][$expectedKey] - - $json['autoload'] - $json['autoload'] - $json['autoload'] - $json['autoload'] + + $definition['autoload'] + $definition['autoload'] + $definition['autoload'] + $definition['autoload'] + $definition['autoload'][$type] - $json - $json + $definition + $definition - - - null|array<string-string> - - - $json['autoload'][$type] - $json['autoload'][$type] - $json['autoload'][$type] - $newModuleFile->url() - reset($expected) - - - key($expected) - - - $json['autoload'] - $json['autoload'] - $json['autoload'] - $json['autoload'] - $json['autoload'] - $json['autoload'] - $json['autoload'] - - - $json - $json - $json - $newModuleFile - - - at - getContent - url - - - getChild - - - - - $command - - - vfsStreamFile - vfsStreamFile - - - at - at - - diff --git a/psalm.xml.dist b/psalm.xml.dist index 720cf6b..1b92541 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -8,7 +8,6 @@ errorBaseline="psalm-baseline.xml" > - @@ -29,7 +28,8 @@ + - + diff --git a/src/AutoloadDumpInterface.php b/src/AutoloadDumpInterface.php new file mode 100644 index 0000000..fea1af6 --- /dev/null +++ b/src/AutoloadDumpInterface.php @@ -0,0 +1,16 @@ +systemCommand; + $systemCommand($command); + } +} diff --git a/src/Command.php b/src/Command.php deleted file mode 100644 index 15b78e6..0000000 --- a/src/Command.php +++ /dev/null @@ -1,305 +0,0 @@ - Command\Disable::class, - 'enable' => Command\Enable::class, - ]; - - /** @var array */ - private $helpArgs = ['--help', '-h', 'help']; - - /** @var string */ - private $command; - - /** @var string Composer binary name/location */ - private $composer = 'composer'; - - /** @var ConsoleHelper */ - private $console; - - /** @var string One of psr-0 or psr-4 */ - private $type = ''; - - /** @var string Filesystem path to modules directory */ - private $modulesPath = 'module'; - - /** @var string Module name */ - private $module = ''; - - /** @var string Filesystem path to module */ - private $modulePath = ''; - - /** - * @param string $command - */ - public function __construct($command = self::DEFAULT_COMMAND_NAME, ?ConsoleHelper $console = null) - { - $this->command = (string) $command; - $this->console = $console ?: new ConsoleHelper(); - } - - /** - * Process the command. - * - * Facade method that performs all tasks related to the command. - * - * @param array $args - * @return int Exit status - */ - public function process(array $args) - { - if ($this->isHelpRequest($args)) { - return $this->showHelp(); - } - - $command = $this->getCommand(array_shift($args)); - if (false === $command) { - $this->console->writeErrorMessage('Unknown command'); - return $this->showHelp(STDERR); - } - - try { - $this->parseArguments($args); - } catch (Exception\InvalidArgumentException $ex) { - $this->console->writeErrorMessage($ex->getMessage()); - return $this->showHelp(STDERR); - } - - /** @var Command\AbstractCommand $instance */ - $instance = new $command($this->projectDir, $this->modulesPath, $this->composer); - - $isEnableCommand = $instance instanceof Command\Enable; - - try { - if ($instance->process($this->module, $this->type)) { - if ($isEnableCommand && ($movedModuleClass = $instance->getMovedModuleClass())) { - $src = key($movedModuleClass); - $dest = reset($movedModuleClass); - - $this->console->writeLine(sprintf('Renaming %s to %s', $src, $dest)); - } - - $this->console->writeLine(sprintf( - $isEnableCommand - ? 'Successfully added composer autoloading for the module "%s"' - : 'Successfully removed composer autoloading for the module "%s"', - $this->module - )); - - if ($isEnableCommand) { - $this->console->writeLine(sprintf( - 'You can now safely remove the %s\\Module::getAutoloaderConfig() implementation.', - $this->module - )); - } - } else { - $this->console->writeLine(sprintf( - $isEnableCommand - ? 'Autoloading rules already exist for the module "%s"' - : 'Autoloading rules already do not exist for the module "%s"', - $this->module - )); - } - } catch (Exception\RuntimeException $ex) { - $this->console->writeErrorMessage($ex->getMessage()); - return 1; - } - - return 0; - } - - /** - * @param string $cmd - * @return false|string - */ - private function getCommand($cmd) - { - if (isset($this->commands[$cmd])) { - return $this->commands[$cmd]; - } - - return false; - } - - /** - * Emits the help message to the provided stream. - * - * @param resource $resource - * @return int - */ - private function showHelp($resource = STDOUT) - { - $help = new Help($this->command, $this->console); - $help($resource); - - return $resource === STDERR ? 1 : 0; - } - - /** - * Is this a help request? - * - * @param array $args - * @return bool - */ - private function isHelpRequest(array $args) - { - $numArgs = count($args); - if (0 === $numArgs) { - return true; - } - - $arg = array_shift($args); - - if (in_array($arg, $this->helpArgs, true)) { - return true; - } - - if (empty($args)) { - return false; - } - - $arg = array_shift($args); - - return in_array($arg, $this->helpArgs, true); - } - - /** - * Parse arguments - * - * Parses arguments for: - * - * - Module name (validating that a path representing that module exists) - * - No unexpected arguments - * - --composer/-c argument, if present, represents a valid composer binary - * - --type/-t argument, if present, is valid - * - --modules-path/-p argument, if present, represents a valid path to modules directory - * - * Sets the module, modulePath, composer, type and modulesPath properties. - * - * @param array $args - * @return void - * @throws Exception\InvalidArgumentException If invalid argument detected. - */ - private function parseArguments(array $args) - { - // Get module argument (always expected in last position) - $this->module = array_pop($args); - if (! $this->module) { - throw new Exception\InvalidArgumentException('Invalid module name'); - } - - // Parse arguments - $args = array_values($args); - $count = count($args); - - if (0 !== $count % 2) { - throw new Exception\InvalidArgumentException('Invalid arguments'); - } - - for ($i = 0; $i < $count; $i += 2) { - switch ($args[$i]) { - case '--composer': - // fall-through - case '-c': - $this->composer = $args[$i + 1]; - break; - - case '--type': - // fall-through - case '-t': - $this->type = $args[$i + 1]; - if (! in_array($this->type, ['psr0', 'psr4'], true)) { - throw new Exception\InvalidArgumentException( - 'Invalid type provided; must be one of psr0 or psr4' - ); - } - - $this->type = preg_replace('/^(psr)([04])$/', '$1-$2', $this->type); - break; - - case '--modules-path': - // fall-through - case '-p': - $this->modulesPath = preg_replace('/^\.\//', '', str_replace('\\', '/', $args[$i + 1])); - break; - - default: - throw new Exception\InvalidArgumentException(sprintf( - 'Unknown argument "%s" provided', - $args[$i] - )); - } - } - - $this->modulePath = sprintf('%s/%s/%s', $this->projectDir, $this->modulesPath, $this->module); - - $this->checkArguments(); - } - - /** - * Checks if arguments of the script are correct. - * - * @return void - * @throws Exception\InvalidArgumentException - */ - private function checkArguments() - { - $output = []; - $returnVar = null; - // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName - exec(sprintf('%s 2>&1', $this->composer), $output, $returnVar); - - if ($returnVar !== 0) { - throw new Exception\InvalidArgumentException( - 'Unable to determine composer binary' - ); - } - - if (! is_dir(sprintf('%s/%s', $this->projectDir, $this->modulesPath))) { - throw new Exception\InvalidArgumentException( - 'Unable to determine modules directory' - ); - } - - if (! is_dir($this->modulePath)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Could not locate module "%s" in path "%s"', - $this->module, - $this->modulePath - )); - } - } -} diff --git a/src/Command/AbstractCommand.php b/src/Command/AbstractCommand.php index 6425d90..b05a722 100644 --- a/src/Command/AbstractCommand.php +++ b/src/Command/AbstractCommand.php @@ -6,184 +6,141 @@ * @license https://github.com/laminas/laminas-composer-autoloading/blob/master/LICENSE.md New BSD License */ -namespace Laminas\ComposerAutoloading\Command; +declare(strict_types=1); -use Laminas\ComposerAutoloading\Exception; +namespace Laminas\ComposerAutoloading\Command; -use function file_get_contents; -use function file_put_contents; -use function is_array; +use Laminas\ComposerAutoloading\AutoloadDumpInterface; +use Laminas\ComposerAutoloading\Composer; +use Laminas\ComposerAutoloading\Exception\RuntimeException; +use Laminas\ComposerAutoloading\FileReaderInterface; +use Laminas\ComposerAutoloading\FileWriterInterface; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Webmozart\Assert\Assert; + +use function getcwd; +use function implode; use function is_dir; -use function is_readable; -use function is_writable; -use function json_decode; -use function json_encode; -use function json_last_error; +use function realpath; use function sprintf; -use const JSON_ERROR_NONE; -use const JSON_PRETTY_PRINT; -use const JSON_UNESCAPED_SLASHES; -use const JSON_UNESCAPED_UNICODE; - -abstract class AbstractCommand +abstract class AbstractCommand extends Command { - /** @var string */ - protected $projectDir; - - /** @var string */ - protected $modulePath = ''; + /** @var AutoloadDumpInterface */ + protected $autoloadDumper; - /** @var string */ - protected $modulesPath; + /** @var FileReaderInterface */ + protected $fileReader; - /** @var string */ - protected $composer; + /** @var FileWriterInterface */ + protected $fileWriter; - /** @var string */ - protected $composerJsonFile = ''; - - /** - * @var array - * @psalm-var array{autoload: array|mixed>|mixed} - */ - protected $composerPackage = []; - - /** @var string */ - protected $moduleName = ''; - - /** @var string */ - protected $type = ''; - - /** - * @param string $projectDir - * @param string $modulesPath - * @param string $composer - */ - public function __construct($projectDir, $modulesPath, $composer) + protected function prepareCommonCommandOptions(Command $command): void { - $this->projectDir = $projectDir; - $this->modulesPath = $modulesPath; - $this->composer = $composer; - } - - /** - * @param string $moduleName - * @param null|string $type - * @return bool - * @throws Exception\RuntimeException - */ - public function process($moduleName, $type = null) - { - $this->moduleName = $moduleName; - $this->modulePath = sprintf('%s/%s/%s', $this->projectDir, $this->modulesPath, $moduleName); - $this->type = $type ?: $this->autodiscoverModuleType(); - $this->composerPackage = $this->getComposerJson(); - - $content = $this->execute(); - - if ($content !== false) { - $this->writeJsonFileAndDumpAutoloader($content); - return true; - } - - return false; - } - - /** - * Validate that the composer.json exists, is writable, and contains valid contents. - * - * @return array{autoload: array|mixed>|mixed} - * @throws Exception\RuntimeException - */ - public function getComposerJson() - { - $this->composerJsonFile = sprintf('%s/composer.json', $this->projectDir); - - if (! is_readable($this->composerJsonFile)) { - throw new Exception\RuntimeException('composer.json file does not exist or is not readable'); - } - if (! is_writable($this->composerJsonFile)) { - throw new Exception\RuntimeException('composer.json file is not writable'); - } - - $composerJson = file_get_contents($this->composerJsonFile); - $composerPackage = json_decode($composerJson, true); - if (! is_array($composerPackage)) { - $error = json_last_error(); - $error = $error === JSON_ERROR_NONE - ? 'The composer.json file was empty' - : 'Error parsing composer.json file; please check that it is valid'; - throw new Exception\RuntimeException($error); - } - - return $composerPackage; + $command->addOption( + 'composer', + 'c', + InputOption::VALUE_REQUIRED, + 'Full path to the composer binary', + 'composer' + ); + + $command->addOption( + 'type', + 't', + InputOption::VALUE_REQUIRED, + 'Autoloading type to use; one of psr-0 or psr-4' + ); + + $command->addOption( + 'project-path', + 'p', + InputOption::VALUE_REQUIRED, + 'Path to project, if not current working directory', + realpath(getcwd()) + ); + + $command->addOption( + 'modules-path', + 'm', + InputOption::VALUE_REQUIRED, + 'Path to the modules directory', + 'module' + ); } /** * Determine the autoloading type for the module. * - * If passed as a flag, uses that. - * - * Otherwise, introspects the module tree to determine if PSR-0 or PSR-4 is - * being used. + * Call this if the autoloading type was not passed as a flag. * - * If the module tree does not include a src/ directory, returns false, - * indicating inability to autodiscover. + * Introspects the module tree to determine if PSR-0 or PSR-4 is being used. * - * Sets the type property on successful discovery. - * - * @return string - * @throws Exception\RuntimeException + * @psalm-return Composer::AUTOLOADER_PSR* + * @throws RuntimeException If unable to autodetermine autoloader type. */ - protected function autodiscoverModuleType() - { - $psr0Spec = sprintf('%s/src/%s', $this->modulePath, $this->moduleName); + protected function autodiscoverModuleType( + string $projectPath, + string $modulePath, + string $moduleName + ): string { + $basePath = sprintf('%s/%s/%s', $projectPath, $modulePath, $moduleName); + $psr0Spec = sprintf('%s/src/%s', $basePath, $moduleName); if (is_dir($psr0Spec)) { - return 'psr-0'; - } - - $srcPath = sprintf('%s/src', $this->modulePath); - if (! is_dir($srcPath)) { - throw new Exception\RuntimeException( - 'Unable to determine autoloading type; no src directory found in module' - ); + return Composer::AUTOLOADER_PSR0; } - return 'psr-4'; - } - - /** - * Do autoloading rules already exist for this module? - * - * @return bool - */ - protected function autoloadingRulesExist() - { - if (! isset($this->composerPackage['autoload'][$this->type][$this->moduleName . '\\'])) { - return false; + $psr4Spec = sprintf('%s/src', $basePath); + if (is_dir($psr4Spec)) { + return Composer::AUTOLOADER_PSR4; } - return true; + throw new RuntimeException(sprintf( + 'Unable to determine autoloading type (looking in %s)', + $basePath + )); } - /** - * @return void - */ - protected function writeJsonFileAndDumpAutoloader(array $content) + protected function validateOptionsAndPrepareComposer(InputInterface $input): ValidatedOptions { - file_put_contents($this->composerJsonFile, json_encode( - $content, - JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE - ) . "\n"); - - $command = sprintf('%s dump-autoload', $this->composer); - // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName - system($command); + $module = $input->getArgument('modulename'); + $composerPath = $input->getOption('composer'); + $projectPath = $input->getOption('project-path'); + $modulesPath = $input->getOption('modules-path'); + + Assert::stringNotEmpty($module, 'A non-empty string is required for the name'); + Assert::stringNotEmpty($composerPath, 'A non-empty string is required for the --composer executable'); + Assert::stringNotEmpty($projectPath, '--project-path must be a directory'); + Assert::directory($projectPath, '--project-path must be a directory'); + Assert::stringNotEmpty($modulesPath, 'A non-empty string is required for the --modules-path'); + + $type = $input->getOption('type') ?: $this->autodiscoverModuleType( + $projectPath, + $modulesPath, + $module + ); + Assert::oneOf( + $type, + Composer::AUTOLOADER_TYPES, + sprintf('--type must be one of [%s]', implode(', ', Composer::AUTOLOADER_TYPES)) + ); + + $composer = new Composer( + $projectPath, + $this->fileReader, + $this->fileWriter, + $this->autoloadDumper + ); + + return new ValidatedOptions( + $module, + $composerPath, + $projectPath, + $modulesPath, + $type, + $composer + ); } - - /** - * @return false|array{autoload: array|mixed>|mixed} - */ - abstract protected function execute(); } diff --git a/src/Command/Disable.php b/src/Command/Disable.php deleted file mode 100644 index 4ff3712..0000000 --- a/src/Command/Disable.php +++ /dev/null @@ -1,43 +0,0 @@ -|mixed>|mixed} - */ - protected function execute() - { - if (! $this->autoloadingRulesExist()) { - return false; - } - - $composerPackage = $this->composerPackage; - $type = $this->type; - $module = $this->moduleName; - - unset($composerPackage['autoload'][$type][$module . '\\']); - if (! $composerPackage['autoload'][$type]) { - unset($composerPackage['autoload'][$type]); - - if (! $composerPackage['autoload']) { - unset($composerPackage['autoload']); - } - } - - return $composerPackage; - } -} diff --git a/src/Command/DisableCommand.php b/src/Command/DisableCommand.php new file mode 100644 index 0000000..3d6e6d0 --- /dev/null +++ b/src/Command/DisableCommand.php @@ -0,0 +1,82 @@ +fileReader = $fileReader; + $this->fileWriter = $fileWriter; + $this->autoloadDumper = $autoloadDumper; + parent::__construct(); + } + + protected function configure(): void + { + $this->setDescription('Disable composer-based autoloading for a module'); + $this->setHelp(self::HELP); + + $this->addArgument( + 'modulename', + InputArgument::REQUIRED, + 'The name of the module for which to remove autoloading' + ); + + $this->prepareCommonCommandOptions($this); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $options = $this->validateOptionsAndPrepareComposer($input); + + if (! $options->composer->autoloadingRulesExist($options->type, $options->module)) { + $output->writeln(sprintf( + 'No %s autoloading rules exist for module %s; nothing to do.', + $options->type, + $options->module + )); + return 0; + } + + $output->writeln(sprintf( + 'Removing %s autoloading rule for module %s', + $options->type, + $options->module + )); + $options->composer->removeAutoloaderEntry($options->type, $options->module); + + $output->writeln('Updating composer.json and dumping autoloader rules.'); + $options->composer->updatePackageAndDumpAutoloader($options->composerPath); + + return 0; + } +} diff --git a/src/Command/DisableCommandFactory.php b/src/Command/DisableCommandFactory.php new file mode 100644 index 0000000..4ebef6a --- /dev/null +++ b/src/Command/DisableCommandFactory.php @@ -0,0 +1,27 @@ +|mixed>|mixed}|false - */ - protected function execute() - { - if ($this->autoloadingRulesExist()) { - return false; - } - - if ($this->moveModuleClass) { - $this->moveModuleClassFile(); - } - - $composerPackage = $this->composerPackage; - $type = $this->type; - $module = $this->moduleName; - - $composerPackage['autoload'][$type][$module . '\\'] = sprintf('%s/%s/src/', $this->modulesPath, $module); - - return $composerPackage; - } - - /** - * Moves the Module class file under the src tree, if necessary. - * - * @return void - */ - private function moveModuleClassFile() - { - $moduleClassFile = sprintf('%s/Module.php', $this->modulePath); - if (! file_exists($moduleClassFile)) { - return; - } - - $moduleClassContents = file_get_contents($moduleClassFile); - if (! preg_match('/\bclass Module\b/', $moduleClassContents)) { - return; - } - - $srcModuleClassFile = sprintf('%s/src/Module.php', $this->modulePath); - if (file_exists($srcModuleClassFile)) { - return; - } - - $moduleClassContents = preg_replace('#(__DIR__ \. \')(/config/)#', '$1/..$2', $moduleClassContents); - file_put_contents($srcModuleClassFile, $moduleClassContents); - unlink($moduleClassFile); - - $this->movedModuleClass = [$moduleClassFile => $srcModuleClassFile]; - } - - /** - * @param bool $value - * @return $this - */ - public function setMoveModuleClass($value) - { - $this->moveModuleClass = (bool) $value; - - return $this; - } - - /** - * @return null|string[] - */ - public function getMovedModuleClass() - { - return $this->movedModuleClass; - } -} diff --git a/src/Command/EnableCommand.php b/src/Command/EnableCommand.php new file mode 100644 index 0000000..80ca2e7 --- /dev/null +++ b/src/Command/EnableCommand.php @@ -0,0 +1,102 @@ +fileReader = $fileReader; + $this->fileWriter = $fileWriter; + $this->autoloadDumper = $autoloadDumper; + $this->moduleFileMover = $moduleFileMover; + parent::__construct(); + } + + protected function configure(): void + { + $this->setDescription('Enable composer-based autoloading for a module'); + $this->setHelp(self::HELP); + + $this->addArgument( + 'modulename', + InputArgument::REQUIRED, + 'The name of the module for which to add autoloading' + ); + + $this->prepareCommonCommandOptions($this); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $options = $this->validateOptionsAndPrepareComposer($input); + + if ($options->composer->autoloadingRulesExist($options->type, $options->module)) { + $output->writeln(sprintf( + 'Autoloading rules of type %s already exist for module %s', + $options->type, + $options->module + )); + return 0; + } + + $resolvedModulesPath = sprintf('%s/%s', rtrim($options->projectPath, '\\/'), $options->modulesPath); + $this->moduleFileMover->__invoke( + $resolvedModulesPath, + function (string $original, string $target) use ($output): void { + $output->writeln(sprintf( + 'Renamed %s to %s', + $original, + $target + )); + } + ); + + $output->writeln(sprintf( + 'Adding %s autoloading rule for module %s', + $options->type, + $options->module + )); + $options->composer->addAutoloaderEntry($options->type, $options->module, $options->modulesPath); + + $output->writeln('Updating composer.json and dumping autoloader rules.'); + $options->composer->updatePackageAndDumpAutoloader($options->composerPath); + + return 0; + } +} diff --git a/src/Command/EnableCommandFactory.php b/src/Command/EnableCommandFactory.php new file mode 100644 index 0000000..ae7a4da --- /dev/null +++ b/src/Command/EnableCommandFactory.php @@ -0,0 +1,29 @@ +module = $module; + $this->composerPath = $composerPath; + $this->projectPath = $projectPath; + $this->modulesPath = $modulesPath; + $this->type = $type; + $this->composer = $composer; + } +} diff --git a/src/Composer.php b/src/Composer.php new file mode 100644 index 0000000..776d5c6 --- /dev/null +++ b/src/Composer.php @@ -0,0 +1,176 @@ + + */ + private $composer; + + /** @var FileWriterInterface */ + private $fileWriter; + + /** @var string */ + private $composerJsonFile; + + public function __construct( + string $projectDir, + FileReaderInterface $fileReader, + FileWriterInterface $fileWriter, + AutoloadDumpInterface $autoloadDumper + ) { + $composerJsonFile = sprintf('%s/%s', rtrim($projectDir, '\\/'), self::COMPOSER_FILE); + Assert::stringNotEmpty($composerJsonFile); + + $composerJsonFileContents = $fileReader($composerJsonFile); + + $composer = $this->deserializeJson($composerJsonFileContents, $composerJsonFile); + + $this->autoloadDumper = $autoloadDumper; + $this->composerJsonFile = $composerJsonFile; + $this->composer = $composer; + $this->fileWriter = $fileWriter; + } + + /** + * @psalm-param Composer::AUTOLOADER_PSR* $type + * @psalm-param non-empty-string $moduleName + * @psalm-param non-empty-string $modulePath + */ + public function addAutoloaderEntry(string $type, string $moduleName, string $modulePath): void + { + if ($this->autoloadingRulesExist($type, $moduleName)) { + return; + } + + if (! isset($this->composer['autoload'][$type])) { + $this->composer['autoload'][$type] = []; + } + + $key = $moduleName . '\\'; + $path = sprintf('%s/%s/src/', $modulePath, $moduleName); + + $this->composer['autoload'][$type][$key] = $path; + $this->changed = true; + } + + /** + * @psalm-param Composer::AUTOLOADER_PSR* $type + * @psalm-param non-empty-string $moduleName + */ + public function autoloadingRulesExist(string $type, string $moduleName): bool + { + $this->validateType($type); + $key = $moduleName . '\\'; + + return isset($this->composer['autoload'][$type][$key]); + } + + /** + * @psalm-param Composer::AUTOLOADER_PSR* $type + * @psalm-param non-empty-string $moduleName + */ + public function removeAutoloaderEntry(string $type, string $moduleName): void + { + if (! $this->autoloadingRulesExist($type, $moduleName)) { + return; + } + + $key = $moduleName . '\\'; + unset($this->composer['autoload'][$type][$key]); + $this->changed = true; + } + + /** + * @psalm-param non-empty-string $composerPath + */ + public function updatePackageAndDumpAutoloader(string $composerPath): void + { + if (! $this->changed) { + return; + } + + $this->fileWriter->__invoke( + $this->composerJsonFile, + $this->serializeToJson() + ); + $this->autoloadDumper->__invoke($composerPath); + } + + /** + * @psalm-param non-empty-string $filename + * @psalm-return array + */ + private function deserializeJson(string $json, string $filename): array + { + try { + return json_decode($json, true, 512, JSON_THROW_ON_ERROR); + } catch (JsonException $e) { + throw Exception\ComposerJsonFileException::forUnparseableFile($filename, $json, $e); + } + } + + private function serializeToJson(): string + { + try { + return json_encode( + $this->composer, + JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR + ) . "\n"; + } catch (JsonException $e) { + throw Exception\ComposerJsonFileException::forUnserializableContents($e); + } + } + + private function validateType(string $type): void + { + if (! in_array($type, self::AUTOLOADER_TYPES, true)) { + throw new Exception\RuntimeException(sprintf( + 'Invalid autoloader type "%s" provided; must be one of [%s]', + $type, + implode(', ', self::AUTOLOADER_TYPES) + )); + } + } +} diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php new file mode 100644 index 0000000..7be220f --- /dev/null +++ b/src/ConfigProvider.php @@ -0,0 +1,45 @@ +>> */ + public function __invoke(): array + { + return [ + 'dependencies' => $this->getDependencies(), + 'laminas-cli' => $this->getConsoleConfig(), + ]; + } + + /** @psalm-return array> */ + public function getConsoleConfig(): array + { + return [ + 'commands' => [ + 'composer:autoload:disable' => Command\DisableCommand::class, + 'composer:autoload:enable' => Command\EnableCommand::class, + ], + ]; + } + + /** @psalm-return array> */ + public function getDependencies(): array + { + return [ + 'factories' => [ + Command\DisableCommand::class => Command\DisableCommandFactory::class, + Command\EnableCommand::class => Command\EnableCommandFactory::class, + ], + ]; + } +} diff --git a/src/Exception/ComposerJsonFileException.php b/src/Exception/ComposerJsonFileException.php new file mode 100644 index 0000000..c2882dc --- /dev/null +++ b/src/Exception/ComposerJsonFileException.php @@ -0,0 +1,63 @@ +getMessage() + ), (int) $previousException->getCode(), $previousException); + } + + public static function forUnserializableContents(JsonException $previousException): self + { + return new self(sprintf( + 'Unable to serialize composer.json contents to JSON: %s', + $previousException->getMessage() + ), (int) $previousException->getCode(), $previousException); + } + + public static function forUnwriteableFile(string $composerJsonFile): self + { + return new self(sprintf( + '"%s" file is read-only', + $composerJsonFile + )); + } +} diff --git a/src/Exception/InvalidArgumentException.php b/src/FileReaderInterface.php similarity index 68% rename from src/Exception/InvalidArgumentException.php rename to src/FileReaderInterface.php index 660f9de..693bff8 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/FileReaderInterface.php @@ -6,10 +6,11 @@ * @license https://github.com/laminas/laminas-composer-autoloading/blob/master/LICENSE.md New BSD License */ -namespace Laminas\ComposerAutoloading\Exception; +declare(strict_types=1); -use RuntimeException; +namespace Laminas\ComposerAutoloading; -class InvalidArgumentException extends RuntimeException +interface FileReaderInterface { + public function __invoke(string $filename): string; } diff --git a/src/FileReaderViaFileGetContents.php b/src/FileReaderViaFileGetContents.php new file mode 100644 index 0000000..8f2080b --- /dev/null +++ b/src/FileReaderViaFileGetContents.php @@ -0,0 +1,31 @@ +Usage: - - %s [command] [options] modulename - -Commands: - - help Display this help/usage message - enable Enable composer-based autoloading for the module - disable Disable composer-based autoloading for the module - -Options: - - --help|-h Display this help/usage message - --composer|-c Specify the path to the composer binary; - defaults to "composer" - --type|-t Specify the autoloading type to use; - if not provided, attempts to - autodetermine the type, defaults to - PSR-0 autoloading if unable to determine it. - --modules-path|-p Specify the path to the modules directory; - defaults to "module" - -EOT; - - /** @var string */ - private $command; - - /** @var ConsoleHelper */ - private $helper; - - /** - * @param string $command Name of script invoking the command. - */ - public function __construct($command, ConsoleHelper $helper) - { - $this->command = $command; - $this->helper = $helper; - } - - /** - * Emit the help message. - * - * @param resource $resource Stream to which to write; defaults to STDOUT. - * @return void - */ - public function __invoke($resource = STDOUT) - { - // Find relative command path - $command = strtr(realpath($this->command) ?: $this->command, [ - getcwd() . DIRECTORY_SEPARATOR => '', - 'laminas' . DIRECTORY_SEPARATOR . 'laminas-composer-autoloading' . DIRECTORY_SEPARATOR => '', - ]); - - $this->helper->writeLine(sprintf( - self::TEMPLATE, - $command - ), true, $resource); - } -} diff --git a/src/Module.php b/src/Module.php new file mode 100644 index 0000000..ea3e452 --- /dev/null +++ b/src/Module.php @@ -0,0 +1,24 @@ +>> */ + public function getConfig(): array + { + $configProvider = new ConfigProvider(); + return [ + 'laminas-cli' => $configProvider->getConsoleConfig(), + 'service_manager' => $configProvider->getDependencies(), + ]; + } +} diff --git a/src/MoveModuleClassFileInterface.php b/src/MoveModuleClassFileInterface.php new file mode 100644 index 0000000..2efab35 --- /dev/null +++ b/src/MoveModuleClassFileInterface.php @@ -0,0 +1,19 @@ +systemCommand = function (string $command) use ($composerPath): void { + $expected = sprintf('%s dump-autoload', $composerPath); + Assert::assertSame($expected, $command); + }; + + $this->assertNull($dumper($composerPath)); + } +} diff --git a/test/Command/AbstractCommandTest.php b/test/Command/AbstractCommandTest.php index 4863a0e..c2bedd5 100644 --- a/test/Command/AbstractCommandTest.php +++ b/test/Command/AbstractCommandTest.php @@ -8,160 +8,193 @@ namespace LaminasTest\ComposerAutoloading\Command; -use Laminas\ComposerAutoloading\Command; -use Laminas\ComposerAutoloading\Exception; -use LaminasTest\ComposerAutoloading\ProjectSetupTrait; +use InvalidArgumentException; +use Laminas\ComposerAutoloading\AutoloadDumpInterface; +use Laminas\ComposerAutoloading\FileReaderInterface; +use Laminas\ComposerAutoloading\FileWriterInterface; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamDirectory; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use ReflectionMethod; +use RuntimeException; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; -use function file_get_contents; - -class AbstractCommandTest extends TestCase +abstract class AbstractCommandTest extends TestCase { - use ProjectSetupTrait; + /** + * @var AutoloadDumpInterface|MockObject + * @psalm-var AutoloadDumpInterface&MockObject + */ + protected $autoloadDumper; - /** @var vfsStreamDirectory */ - private $dir; + /** @var Command */ + protected $command; /** @var vfsStreamDirectory */ - private $modulesDir; + protected $dir; /** - * @var Command\AbstractCommand|MockObject - * @psalm-var Command\AbstractCommand&MockObject + * @var FileReaderInterface|MockObject + * @psalm-var FileReaderInterface&MockObject */ - private $command; - - protected function setUp(): void - { - parent::setUp(); - - $this->dir = vfsStream::setup('project'); - $this->modulesDir = vfsStream::newDirectory('module')->at($this->dir); - - $this->command = $this->getMockBuilder(Command\AbstractCommand::class) - ->setMethods(['execute']) - ->setConstructorArgs([$this->dir->url(), 'module', $this->composer]) - ->enableOriginalConstructor() - ->enableProxyingToOriginalMethods() - ->getMockForAbstractClass(); - } + protected $fileReader; /** - * @psalm-return array + * @var FileWriterInterface|MockObject + * @psalm-var FileWriterInterface&MockObject */ - public function type(): array - { - return [ - 'psr-0' => ['psr-0'], - 'psr-4' => ['psr-4'], - ]; - } + protected $fileWriter; /** - * @dataProvider type + * @var InputInterface|MockObject + * @psalm-var InputInterface&MockObject */ - public function testThrowsExceptionWhenComposerJsonDoesNotExist(string $type): void - { - $this->command->expects($this->never())->method('execute'); - $this->setUpModule($this->modulesDir, 'App', $type); + protected $input; - $this->expectException(Exception\RuntimeException::class); - $this->expectExceptionMessage('composer.json file does not exist'); - $this->command->process('App', $type); - } + /** @var vfsStreamDirectory */ + protected $modulesDir; /** - * @dataProvider type + * @var OutputInterface|MockObject + * @psalm-var OutputInterface&MockObject */ - public function testThrowsExceptionWhenComposerJsonIsNotWritable(string $type): void + protected $output; + + protected function setUp(): void { - $this->command->expects($this->never())->method('execute'); - $this->setUpModule($this->modulesDir, 'App', $type); - vfsStream::newFile('composer.json', 0444)->at($this->dir); + $this->dir = vfsStream::setup('root', null, [ + 'config' => [ + 'config.php' => ' [], + ]); + + $this->modulesDir = $this->dir->getChild('module'); + $this->input = $this->createMock(InputInterface::class); + $this->output = $this->createMock(OutputInterface::class); + $this->fileReader = $this->createMock(FileReaderInterface::class); + $this->fileWriter = $this->createMock(FileWriterInterface::class); + $this->autoloadDumper = $this->createMock(AutoloadDumpInterface::class); + } - $this->expectException(Exception\RuntimeException::class); - $this->expectExceptionMessage('composer.json file is not writable'); - $this->command->process('App', $type); + public function prepareReader(string $filename, string $jsonToReturn): void + { + $this->fileReader + ->expects($this->once()) + ->method('__invoke') + ->with($filename) + ->willReturn($jsonToReturn); } /** - * @dataProvider type + * @return mixed */ - public function testThrowsExceptionWhenComposerJsonHasInvalidContent(string $type): void + public function executeCommand(Command $command) { - $this->command->expects($this->never())->method('execute'); - $this->setUpModule($this->modulesDir, 'App', $type); - vfsStream::newFile('composer.json') - ->withContent('invalid content') - ->at($this->dir); - - $this->expectException(Exception\RuntimeException::class); - $this->expectExceptionMessage('Error parsing composer.json file'); - $this->command->process('App', $type); + $r = new ReflectionMethod($command, 'execute'); + $r->setAccessible(true); + return $r->invoke($command, $this->input, $this->output); } /** - * @dataProvider type + * @psalm-return iterable */ - public function testThrowsExceptionWhenComposerJsonHasNoContent(string $type): void + public function invalidCommandLines(): iterable { - $this->command->expects($this->never())->method('execute'); - $this->setUpModule($this->modulesDir, 'App', $type); - $this->setUpComposerJson($this->dir); - - $this->expectException(Exception\RuntimeException::class); - $this->expectExceptionMessage('The composer.json file was empty'); - $this->command->process('App', $type); - } - - public function testThrowsExceptionWhenCannotDetermineModuleType(): void - { - $this->command->expects($this->never())->method('execute'); - vfsStream::newDirectory('App')->at($this->modulesDir); - $this->setUpComposerJson($this->dir, []); - - $this->expectException(Exception\RuntimeException::class); - $this->expectExceptionMessage('Unable to determine autoloading type; no src directory found in module'); - $this->command->process('App'); + // phpcs:disable Generic.Files.LineLength.TooLong + yield 'empty module name' => ['', 'composer.phar', vfsStream::url('root/'), 'module', '']; + yield 'empty composer path' => ['NewModule', '', vfsStream::url('root/'), 'module', '--composer']; + yield 'non-directory project path' => ['NewModule', 'composer.phar', 'not-a-directory', 'module', '--project-path']; + yield 'empty modules path' => ['NewModule', 'composer.phar', vfsStream::url('root/'), '', '--modules-path']; + // phpcs:enable } /** - * @dataProvider type + * @dataProvider invalidCommandLines + * @psalm-param non-empty-string $expectedMessage */ - public function testComposerJsonContentIsNotChangedAndDumpAutoloadIsNotCalledWhenExecuteMethodReturnsFalse( - string $type + public function testRaisesAssertionExceptionWhenOptionsOrArgumentsAreInvalid( + string $module, + string $composerPath, + string $projectPath, + string $modulePath, + string $expectedMessage ): void { - $this->command->expects($this->once())->method('execute')->willReturn(false); - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson($this->dir, ['foo' => 'bar']); + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn($module); + $this->input + ->expects($this->exactly(3)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'] + ) + ->willReturnOnConsecutiveCalls( + $composerPath, + $projectPath, + $modulePath + ); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage($expectedMessage); + $this->executeCommand($this->command); + } - $this->assertNotComposerDumpAutoload(); - $this->assertFalse($this->command->process('App', $type)); - $this->assertEquals('{"foo":"bar"}', file_get_contents($composerJson->url())); + public function testRaisesAssertionWhenModuleDirectoryHasUnrecognizedStructure(): void + { + vfsStream::newDirectory('NewModule')->at($this->modulesDir); + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('NewModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root/'), + 'module', + null + ); + + $this->expectException(RuntimeException::class); + $this->expectExceptionMessage('Unable to determine autoloading type'); + $this->executeCommand($this->command); } - /** - * @dataProvider type - */ - public function testComposerJsonContentIsUpdatedAndDumpAutoloadIsCalledWhenExecuteMethodReturnsNewContent( - string $type - ): void { - $expectedComposerJson = <<<'EOC' - { - "new": "content" - } - - EOC; - - $this->command->expects($this->once())->method('execute')->willReturn(['new' => 'content']); - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson($this->dir, ['foo' => 'bar']); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('App', $type)); - $this->assertEquals($expectedComposerJson, file_get_contents($composerJson->url())); + public function testRaisesAssertionWhenUnableProvideWithInvalidType(): void + { + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('NewModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root'), + 'module', + 'not-a-valid-autoloader-type' + ); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('--type'); + $this->executeCommand($this->command); } } diff --git a/test/Command/DisableCommandTest.php b/test/Command/DisableCommandTest.php new file mode 100644 index 0000000..b95e00d --- /dev/null +++ b/test/Command/DisableCommandTest.php @@ -0,0 +1,121 @@ +command = new DisableCommand($this->fileReader, $this->fileWriter, $this->autoloadDumper); + } + + public function testReturnsEarlyWhenAutoloadingRulesDoNotExist(): void + { + $this->prepareReader(vfsStream::url('root/composer.json'), '{}'); + + $this->fileWriter->expects($this->never())->method('__invoke'); + $this->autoloadDumper->expects($this->never())->method('__invoke'); + + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('OldModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root'), + 'module', + 'psr-4' + ); + + $this->output + ->expects($this->once()) + ->method('writeln') + ->with($this->stringContains('No psr-4 autoloading rules exist')); + + $this->assertSame(0, $this->executeCommand($this->command)); + } + + public function testRemovesAutoloaderEntryUpdatesPackageAndDumpsAutoloader(): void + { + vfsStream::newDirectory('OldModule')->at($this->modulesDir); + + $this->prepareReader( + vfsStream::url('root/composer.json'), + <<<'END' + { + "autoload": { + "psr-4": { + "OldModule\\": "module/OldModule/src/" + } + } + } + END + ); + + $this->fileWriter + ->expects($this->once()) + ->method('__invoke') + ->with( + vfsStream::url('root/composer.json'), + <<<'END' + { + "autoload": { + "psr-4": [] + } + } + + END + ); + + $this->autoloadDumper + ->expects($this->once()) + ->method('__invoke') + ->with('composer.phar'); + + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('OldModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root'), + 'module', + 'psr-4' + ); + + $this->output + ->expects($this->exactly(2)) + ->method('writeln') + ->withConsecutive( + [$this->stringContains('Removing psr-4 autoloading rule for module OldModule')], + [$this->stringContains('Updating composer.json and dumping autoloader rules')] + ); + + $this->assertSame(0, $this->executeCommand($this->command)); + } +} diff --git a/test/Command/DisableTest.php b/test/Command/DisableTest.php deleted file mode 100644 index 957fa03..0000000 --- a/test/Command/DisableTest.php +++ /dev/null @@ -1,128 +0,0 @@ -dir = vfsStream::setup('project'); - $this->modulesDir = vfsStream::newDirectory('my-modules')->at($this->dir); - $this->command = new Command\Disable($this->dir->url(), 'my-modules', $this->composer); - } - - /** - * @psalm-return array - */ - public function type(): array - { - return [ - 'psr-0' => ['psr-0'], - 'psr-4' => ['psr-4'], - ]; - } - - /** - * @dataProvider type - */ - public function testReturnsFalseWithoutChangesBecauseComposerAutoloadingAlreadyDisabled(string $type): void - { - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson( - $this->dir, - ['autoload' => [$type => ['Other\\' => 'path/to/module/src']]] - ); - - $this->assertNotComposerDumpAutoload(); - $this->assertFalse($this->command->process('App', $type)); - $json = json_decode($composerJson->getContent(), true); - $this->assertCount(1, $json['autoload'][$type]); - $this->assertEquals('path/to/module/src', $json['autoload'][$type]['Other\\']); - } - - /** - * @dataProvider type - */ - public function testRemovesEntryFromComposerJsonAndComposerDumpAutoloadCalled(string $type): void - { - $expectedComposerJson = <<<'EOC' - { - "autoload": { - "%s": { - "Other\\": "path/to/other" - } - } - } - - EOC; - - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson( - $this->dir, - ['autoload' => [$type => ['Other\\' => 'path/to/other', 'App\\' => 'my-modules/App/src']]] - ); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('App', $type)); - - $composerJsonContent = $composerJson->getContent(); - $json = json_decode($composerJsonContent, true); - $this->assertCount(1, $json['autoload'][$type]); - $this->assertEquals('path/to/other', $json['autoload'][$type]['Other\\']); - $this->assertEquals(sprintf($expectedComposerJson, $type), $composerJsonContent); - } - - /** - * @dataProvider type - */ - public function testAddsCorrectEntryToComposerJsonAndComposerDumpAutoloadCalledAutodiscoveryModuleType( - string $type - ): void { - $expectedComposerJson = <<<'EOC' - { - "foo": "bar" - } - - EOC; - - $this->setUpModule($this->modulesDir, 'MyApp', $type); - $composerJson = $this->setUpComposerJson( - $this->dir, - ['foo' => 'bar', 'autoload' => [$type => ['MyApp\\' => 'my-modules/MyApp/src']]] - ); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('MyApp')); - - $composerJsonContent = $composerJson->getContent(); - $this->assertEquals($expectedComposerJson, $composerJsonContent); - } -} diff --git a/test/Command/EnableCommandTest.php b/test/Command/EnableCommandTest.php new file mode 100644 index 0000000..259e23a --- /dev/null +++ b/test/Command/EnableCommandTest.php @@ -0,0 +1,145 @@ +moduleFileMover = $this->createMock(MoveModuleClassFileInterface::class); + + $this->command = new EnableCommand( + $this->fileReader, + $this->fileWriter, + $this->autoloadDumper, + $this->moduleFileMover, + ); + } + + public function testReturnsEarlyWhenAutoloadingRulesAlreadyExist(): void + { + $this->prepareReader( + vfsStream::url('root/composer.json'), + <<<'END' + { + "autoload": { + "psr-4": { + "NewModule\\": "module/NewModule/src/" + } + } + } + END + ); + + $this->moduleFileMover->expects($this->never())->method('__invoke'); + $this->fileWriter->expects($this->never())->method('__invoke'); + $this->autoloadDumper->expects($this->never())->method('__invoke'); + + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('NewModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root'), + 'module', + 'psr-4' + ); + + $this->output->expects($this->once())->method('writeln')->with($this->stringContains('already exist')); + + $this->assertSame(0, $this->executeCommand($this->command)); + } + + public function testMovesModuleFileAddsAutoloaderEntryUpdatesPackageAndDumpsAutoloader(): void + { + vfsStream::newDirectory('NewModule')->at($this->modulesDir); + + $this->prepareReader(vfsStream::url('root/composer.json'), '{}'); + + $this->moduleFileMover + ->expects($this->once()) + ->method('__invoke') + ->with( + vfsStream::url('root/module'), + $this->isInstanceOf(Closure::class) + ); + + $this->fileWriter + ->expects($this->once()) + ->method('__invoke') + ->with( + vfsStream::url('root/composer.json'), + <<<'END' + { + "autoload": { + "psr-4": { + "NewModule\\": "module/NewModule/src/" + } + } + } + + END + ); + + $this->autoloadDumper + ->expects($this->once()) + ->method('__invoke') + ->with('composer.phar'); + + $this->input->expects($this->once())->method('getArgument')->with('modulename')->willReturn('NewModule'); + $this->input + ->expects($this->exactly(4)) + ->method('getOption') + ->withConsecutive( + ['composer'], + ['project-path'], + ['modules-path'], + ['type'] + ) + ->willReturnOnConsecutiveCalls( + 'composer.phar', + vfsStream::url('root'), + 'module', + 'psr-4' + ); + + $this->output + ->expects($this->exactly(2)) + ->method('writeln') + ->withConsecutive( + [$this->stringContains('Adding psr-4 autoloading rule for module NewModule')], + [$this->stringContains('Updating composer.json and dumping autoloader rules')] + ); + + $this->assertSame(0, $this->executeCommand($this->command)); + } +} diff --git a/test/Command/EnableTest.php b/test/Command/EnableTest.php deleted file mode 100644 index 9a19795..0000000 --- a/test/Command/EnableTest.php +++ /dev/null @@ -1,238 +0,0 @@ -dir = vfsStream::setup('project'); - $this->modulesDir = vfsStream::newDirectory('my-modules')->at($this->dir); - $this->command = new Command\Enable($this->dir->url(), 'my-modules', $this->composer); - } - - /** - * @psalm-return array - */ - public function type(): array - { - return [ - 'psr-0' => ['psr-0'], - 'psr-4' => ['psr-4'], - ]; - } - - /** - * @dataProvider type - */ - public function testReturnsFalseWithoutChangesBecauseComposerAutoloadingAlreadyEnabled(string $type): void - { - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson( - $this->dir, - ['autoload' => [$type => ['App\\' => 'path/to/module/src']]] - ); - - $this->assertNotComposerDumpAutoload(); - $this->assertFalse($this->command->process('App', $type)); - $json = json_decode($composerJson->getContent(), true); - $this->assertCount(1, $json['autoload'][$type]); - $this->assertEquals('path/to/module/src', $json['autoload'][$type]['App\\']); - } - - /** - * @dataProvider type - */ - public function testAddsEntryToComposerJsonAndComposerDumpAutoloadCalled(string $type): void - { - $expectedComposerJson = <<<'EOC' - { - "autoload": { - "%s": { - "Other\\": "path/to/other", - "App\\": "my-modules/App/src/" - } - } - } - - EOC; - - $this->setUpModule($this->modulesDir, 'App', $type); - $composerJson = $this->setUpComposerJson( - $this->dir, - ['autoload' => [$type => ['Other\\' => 'path/to/other']]] - ); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('App', $type)); - - $composerJsonContent = $composerJson->getContent(); - $json = json_decode($composerJsonContent, true); - $this->assertCount(2, $json['autoload'][$type]); - $this->assertEquals('path/to/other', $json['autoload'][$type]['Other\\']); - $this->assertEquals('my-modules/App/src/', $json['autoload'][$type]['App\\']); - $this->assertEquals(sprintf($expectedComposerJson, $type), $composerJsonContent); - $this->assertNull($this->command->getMovedModuleClass()); - } - - /** - * @dataProvider type - */ - public function testAddsCorrectEntryToComposerJsonAndComposerDumpAutoloadCalledAutodiscoveryModuleType( - string $type - ): void { - $expectedComposerJson = <<<'EOC' - { - "autoload": { - "%s": { - "MyApp\\": "my-modules/MyApp/src/" - } - } - } - - EOC; - - $this->setUpModule($this->modulesDir, 'MyApp', $type); - $composerJson = $this->setUpComposerJson($this->dir, []); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('MyApp')); - - $composerJsonContent = $composerJson->getContent(); - $json = json_decode($composerJsonContent, true); - $this->assertCount(1, $json['autoload'][$type]); - $this->assertEquals('my-modules/MyApp/src/', $json['autoload'][$type]['MyApp\\']); - $this->assertEquals(sprintf($expectedComposerJson, $type), $composerJsonContent); - $this->assertNull($this->command->getMovedModuleClass()); - } - - /** - * @dataProvider type - */ - public function testModuleClassFileDoesNotContainModuleClassSoItIsNotMoved(string $type): void - { - $this->setUpModule($this->modulesDir, 'FooApp', $type); - $this->setUpComposerJson($this->dir, []); - $this->setUpModuleClassFile($this->modulesDir, 'FooApp', 'require __DIR__ . "/src/Module.php";'); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('FooApp')); - $this->assertNull($this->command->getMovedModuleClass()); - } - - /** - * @psalm-return array - * }> - */ - public function moveModuleClassFile(): array - { - return [ - 'psr-0-move' => ['psr-0', true, ['%s/%s/Module.php' => '%s/%s/src/Module.php']], - 'psr-0-not-move' => ['psr-0', false, null], - 'psr-4-move' => ['psr-4', true, ['%s/%s/Module.php' => '%s/%s/src/Module.php']], - 'psr-4-not-move' => ['psr-4', false, null], - ]; - } - - /** - * @dataProvider moveModuleClassFile - */ - public function testModuleClassFileExistsInBothLocationSoItIsNotMoved(string $type, bool $move): void - { - $this->setUpModule($this->modulesDir, 'BarApp', $type); - $this->setUpComposerJson($this->dir, []); - $moduleFile = $this->setUpModuleClassFile($this->modulesDir, 'BarApp'); - $newModuleFile = vfsStream::newFile('Module.php') - ->withContent('foo bar content') - ->at($this->modulesDir->getChild('BarApp')->getChild('src')); - - $this->command->setMoveModuleClass($move); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('BarApp')); - $this->assertNull($this->command->getMovedModuleClass()); - $this->assertFileExists($moduleFile->url()); - $this->assertFileExists($newModuleFile->url()); - $this->assertEquals(sprintf($this->moduleFileContent, 'BarApp'), $moduleFile->getContent()); - $this->assertEquals('foo bar content', $newModuleFile->getContent()); - } - - /** - * @dataProvider moveModuleClassFile - * @psalm-param null|array $expected - */ - public function testMovesModuleClassFile(string $type, bool $move, ?array $expected): void - { - $expectedModuleFileContent = <<<'EOM' - setUpModule($this->modulesDir, 'FooApp', $type); - $this->setUpComposerJson($this->dir, []); - $moduleFile = $this->setUpModuleClassFile($this->modulesDir, 'FooApp'); - $this->command->setMoveModuleClass($move); - - $this->assertComposerDumpAutoload(); - $this->assertTrue($this->command->process('FooApp')); - if (null === $expected) { - $this->assertNull($this->command->getMovedModuleClass()); - $this->assertFileExists($moduleFile->url()); - } else { - $from = sprintf(key($expected), $this->modulesDir->url(), 'FooApp'); - $to = sprintf(reset($expected), $this->modulesDir->url(), 'FooApp'); - $this->assertEquals([$from => $to], $this->command->getMovedModuleClass()); - $this->assertFileDoesNotExist($moduleFile->url()); - $newModuleFile = vfsStream::url('project/my-modules/FooApp/src/Module.php'); - $this->assertFileExists($newModuleFile); - $this->assertEquals( - sprintf($expectedModuleFileContent, 'FooApp'), - file_get_contents($newModuleFile) - ); - } - } -} diff --git a/test/CommandTest.php b/test/CommandTest.php deleted file mode 100644 index b13e552..0000000 --- a/test/CommandTest.php +++ /dev/null @@ -1,553 +0,0 @@ -dir = vfsStream::setup('project'); - - $this->console = $this->createMock(ConsoleHelper::class); - - $this->command = new Command(self::TEST_COMMAND_NAME, $this->console); - $this->setProjectDir($this->command, $this->dir->url()); - } - - /** @param mixed $expected */ - protected function assertAttributeSame( - $expected, - string $property, - object $instance, - string $message = '' - ): void { - $r = new ReflectionProperty($instance, $property); - $r->setAccessible(true); - self::assertSame($expected, $r->getValue($instance), $message); - } - - /** - * @psalm-return array> - */ - public function helpRequest(): array - { - return [ - 'no-args' => [[]], - 'help-command' => [['help']], - 'help-option' => [['--help']], - 'help-flag' => [['-h']], - 'enable-command-help-option' => [['enable', '--help']], - 'enable-command-help-flag' => [['enable', '-h']], - 'disable-command-help-option' => [['disable', '--help']], - 'disable-command-help-flag' => [['disable', '-h']], - ]; - } - - /** - * @dataProvider helpRequest - * @param string[] $args - */ - public function testHelpRequestsEmitHelpToStdout(array $args): void - { - $this->assertHelpOutput(); - $this->assertEquals(0, $this->command->process($args)); - } - - /** - * @psalm-return array - */ - public function argument(): array - { - return [ - // $action, $argument, $value, $propertyName, $expectedValue - ['enable', '--composer', 'foo/bar', 'composer', 'foo/bar'], - ['enable', '-c', 'bar/baz', 'composer', 'bar/baz'], - ['enable', '--modules-path', './foo/modules', 'modulesPath', 'foo/modules'], - ['enable', '-p', 'bar\path', 'modulesPath', 'bar/path'], - ['enable', '--type', 'psr0', 'type', 'psr-0'], - ['enable', '--type', 'psr0', 'type', 'psr-0'], - ['enable', '-t', 'psr4', 'type', 'psr-4'], - ['enable', '-t', 'psr4', 'type', 'psr-4'], - ['disable', '--composer', 'foo/bar', 'composer', 'foo/bar'], - ['disable', '-c', 'bar/baz', 'composer', 'bar/baz'], - ['disable', '--modules-path', 'foo/modules', 'modulesPath', 'foo/modules'], - ['disable', '-p', 'bar/path', 'modulesPath', 'bar/path'], - ['disable', '--type', 'psr0', 'type', 'psr-0'], - ['disable', '--type', 'psr0', 'type', 'psr-0'], - ['disable', '-t', 'psr4', 'type', 'psr-4'], - ['disable', '-t', 'psr4', 'type', 'psr-4'], - ]; - } - - /** - * @dataProvider argument - */ - public function testArgumentIsSetAndHasExpectedValue( - string $action, - string $argument, - string $value, - string $propertyName, - string $expectedValue - ): void { - $this->command->process([$action, $argument, $value, 'module-name']); - - $this->assertAttributeSame($expectedValue, $propertyName, $this->command); - } - - public function testDefaultArgumentsValues(): void - { - $this->assertAttributeSame('module', 'modulesPath', $this->command); - $this->assertAttributeSame('composer', 'composer', $this->command); - $this->assertAttributeSame('', 'type', $this->command); - } - - public function testUnknownCommandEmitsHelpToStderrWithErrorMessage(): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Unknown command')); - $this->assertHelpOutput(STDERR); - - $this->assertEquals(1, $this->command->process(['foo', 'bar'])); - } - - /** @psalm-return array */ - public function action(): array - { - return [ - 'disable' => ['disable'], - 'enable' => ['enable'], - ]; - } - - /** - * @dataProvider action - */ - public function testCommandErrorIfNoModuleNameProvided(string $action): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Invalid module name')); - $this->assertHelpOutput(STDERR); - - $this->assertEquals(1, $this->command->process([$action])); - } - - /** - * @dataProvider action - */ - public function testCommandErrorIfInvalidNumberOfArgumentsProvided(string $action): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Invalid arguments')); - $this->assertHelpOutput(STDERR); - - $this->assertEquals(1, $this->command->process([$action, 'invalid', 'module-name'])); - } - - /** - * @dataProvider action - */ - public function testCommandErrorIfUnknownArgumentProvided(string $action): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Unknown argument "--invalid" provided')); - $this->assertHelpOutput(STDERR); - - $this->assertEquals(1, $this->command->process([$action, '--invalid', 'value', 'module-name'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider action - */ - public function testCommandErrorIfModulesDirectoryDoesNotExist(string $action): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Unable to determine modules directory')); - $this->assertHelpOutput(STDERR); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(1, $this->command->process([$action, 'module-name'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider action - */ - public function testCommandErrorIfModuleDoesNotExist(string $action): void - { - vfsStream::newDirectory('module')->at($this->dir); - - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Could not locate module "module-name"')); - $this->assertHelpOutput(STDERR); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(1, $this->command->process([$action, 'module-name'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider action - */ - public function testCommandErrorIfComposerIsNotExecutable(string $action): void - { - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'module-name', 'psr4'); - $this->setUpComposerJson($this->dir, []); - - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Unable to determine composer binary')); - $this->assertHelpOutput(STDERR); - $this->assertComposerBinaryNotExecutable(); - - $this->assertEquals(1, $this->command->process([$action, 'module-name'])); - } - - /** @psalm-return array */ - public function invalidType(): array - { - return [ - 'enable-invalid-psr-0' => ['enable', 'psr-0'], - 'enable-invalid-psr-4' => ['enable', 'psr-4'], - 'disable-invalid-psr-0' => ['disable', 'psr-0'], - 'disable-invalid-psr-4' => ['disable', 'psr-4'], - ]; - } - - /** - * @dataProvider invalidType - */ - public function testCommandErrorIfInvalidTypeProvided(string $action, string $type): void - { - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'module-name', 'psr4'); - $this->setUpComposerJson($this->dir, []); - - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Invalid type provided; must be one of psr0 or psr4')); - $this->assertHelpOutput(STDERR); - - $result = $this->command->process([$action, '--type', $type, 'module-name']); - $this->assertEquals(1, $result); - } - - /** @psalm-return array */ - public function type(): array - { - return [ - 'psr-0' => ['psr0'], - 'psr-4' => ['psr4'], - ]; - } - - /** - * @runInSeparateProcess - * @dataProvider type - */ - public function testErrorMessageWhenActionProcessThrowsException(string $type): void - { - Mockery::mock('overload:' . MyTestingCommand::class) - ->shouldReceive('process') - ->with('App', $type === 'psr0' ? 'psr-0' : 'psr-4') - ->andThrow(Exception\RuntimeException::class, 'Testing Exception Message') - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->atLeastOnce()) - ->method('writeErrorMessage') - ->with($this->stringContains('Testing Exception Message')); - $this->assertNotHelpOutput(STDERR); - $this->assertComposerBinaryExecutable(); - - $this->injectCommand($this->command, 'my-command', MyTestingCommand::class); - $this->assertEquals(1, $this->command->process(['my-command', '--type', $type, 'App'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider type - */ - public function testMessageOnEnableWhenModuleIsAlreadyEnabled(string $type): void - { - Mockery::mock('overload:' . Command\Enable::class) - ->shouldReceive('process') - ->with('App', null) - ->andReturn(false) - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->once()) - ->method('writeLine') - ->with('Autoloading rules already exist for the module "App"'); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(0, $this->command->process(['enable', 'App'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider type - */ - public function testSuccessMessageOnEnable(string $type): void - { - $mock = Mockery::mock('overload:' . Command\Enable::class); - $mock - ->shouldReceive('process') - ->with('App', null) - ->andReturn(true) - ->once(); - $mock - ->shouldReceive('getMovedModuleClass') - ->withNoArgs() - ->andReturnNull() - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->exactly(2)) - ->method('writeLine') - ->withConsecutive( - ['Successfully added composer autoloading for the module "App"'], - ['You can now safely remove the App\Module::getAutoloaderConfig() implementation.'], - ); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(0, $this->command->process(['enable', 'App'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider type - */ - public function testSuccessMessageOnEnableAndModuleClassFileMoved(string $type): void - { - $mock = Mockery::mock('overload:' . Command\Enable::class); - $mock - ->shouldReceive('process') - ->with('App', null) - ->andReturn(true) - ->once(); - $mock - ->shouldReceive('getMovedModuleClass') - ->withNoArgs() - ->andReturn(['from-foo' => 'too-bar']) - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->exactly(3)) - ->method('writeLine') - ->withConsecutive( - ['Renaming from-foo to too-bar'], - ['Successfully added composer autoloading for the module "App"'], - ['You can now safely remove the App\Module::getAutoloaderConfig() implementation.'], - ); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(0, $this->command->process(['enable', 'App'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider type - */ - public function testMessageOnDisableWhenModuleIsAlreadyDisabled(string $type): void - { - Mockery::mock('overload:' . Command\Disable::class) - ->shouldReceive('process') - ->with('App', null) - ->andReturn(false) - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->once()) - ->method('writeLine') - ->with('Autoloading rules already do not exist for the module "App"'); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(0, $this->command->process(['disable', 'App'])); - } - - /** - * @runInSeparateProcess - * @preserveGlobalState disabled - * @dataProvider type - */ - public function testSuccessMessageOnDisable(string $type): void - { - Mockery::mock('overload:' . Command\Disable::class) - ->shouldReceive('process') - ->with('App', null) - ->andReturn(true) - ->once(); - - $modulesDir = vfsStream::newDirectory('module')->at($this->dir); - $this->setUpModule($modulesDir, 'App', $type); - - $this->console - ->expects($this->atLeastOnce()) - ->method('writeLine') - ->with('Successfully removed composer autoloading for the module "App"'); - $this->assertComposerBinaryExecutable(); - - $this->assertEquals(0, $this->command->process(['disable', 'App'])); - } - - private function injectCommand(Command $command, string $cmd, string $class): void - { - $rCommand = new ReflectionObject($command); - $rp = $rCommand->getProperty('commands'); - $rp->setAccessible(true); - - $commands = $rp->getValue($command); - $commands[$cmd] = $class; - - $rp->setValue($command, $commands); - } - - private function setProjectDir(Command $command, string $dir): void - { - $rc = new ReflectionObject($command); - $rp = $rc->getProperty('projectDir'); - $rp->setAccessible(true); - $rp->setValue($command, $dir); - } - - /** @param resource $resource */ - private function assertHelpOutput($resource = STDOUT, string $command = self::TEST_COMMAND_NAME): void - { - $this->console - ->expects($this->atLeastOnce()) - ->method('writeLine') - ->with( - $this->stringContains($command . ' [command] [options] modulename'), - true, - $resource - ); - } - - /** @param resource $resource */ - private function assertNotHelpOutput($resource = STDOUT, string $command = self::TEST_COMMAND_NAME): void - { - $this->console - ->expects($this->never()) - ->method('writeLine') - ->with( - $this->stringContains($command . ' [command] [options] modulename'), - true, - $resource - ); - } - - private function assertComposerBinaryNotExecutable(): void - { - $exec = $this->getFunctionMock('Laminas\ComposerAutoloading', 'exec'); - $exec->expects($this->once())->willReturnCallback( - /** - * @param null|string[] $output - * @param null|int $retValue - */ - function (string $command, &$output, &$retValue): void { - $this->assertEquals('composer 2>&1', $command); - $retValue = 1; - } - ); - } - - private function assertComposerBinaryExecutable(): void - { - $exec = $this->getFunctionMock('Laminas\ComposerAutoloading', 'exec'); - $exec->expects($this->once())->willReturnCallback( - /** - * @param null|string[] $output - * @param null|int $retValue - */ - function (string $command, &$output, &$retValue): void { - $this->assertEquals('composer 2>&1', $command); - $retValue = 0; - } - ); - } -} diff --git a/test/ComposerTest.php b/test/ComposerTest.php new file mode 100644 index 0000000..2741dea --- /dev/null +++ b/test/ComposerTest.php @@ -0,0 +1,304 @@ +fileReader = $this->createMock(FileReaderInterface::class); + $this->fileWriter = $this->createMock(FileWriterInterface::class); + $this->autoloadDumper = $this->createMock(AutoloadDumpInterface::class); + } + + private function assertComposerUnchanged(Composer $composer): void + { + $r = new ReflectionProperty($composer, 'changed'); + $r->setAccessible(true); + $this->assertFalse($r->getValue($composer), 'composer.json has changed, but was not expected to.'); + } + + private function assertAutoloadEntryExists( + string $expectedKey, + string $expectedPath, + string $type, + Composer $composer + ): void { + $r = new ReflectionProperty($composer, 'composer'); + $r->setAccessible(true); + + $definition = $r->getValue($composer); + + $this->assertArrayHasKey('autoload', $definition, sprintf( + 'Failed to determine if %s autoload definition for module %s exists; no autoload definitions exist', + $type, + $expectedKey + )); + + $this->assertArrayHasKey($type, $definition['autoload'], sprintf( + 'Failed to determine if autoload definition for module %s exists; no %s autoload definitions exist', + $expectedKey, + $type + )); + + $this->assertArrayHasKey($expectedKey, $definition['autoload'][$type], sprintf( + '%s autoload definition for module %s does not exist', + $type, + $expectedKey + )); + + $this->assertSame($expectedPath, $definition['autoload'][$type][$expectedKey], sprintf( + '%s autoload definition for module %s does not match "%s"; found "%s"', + $type, + $expectedKey, + $expectedPath, + $definition['autoload'][$type][$expectedKey] + )); + } + + private function assertNotAutoloadEntryExists( + string $moduleKey, + string $type, + Composer $composer + ): void { + $r = new ReflectionProperty($composer, 'composer'); + $r->setAccessible(true); + + $definition = $r->getValue($composer); + + if (! array_key_exists('autoload', $definition)) { + return; + } + + if (! array_key_exists($type, $definition['autoload'])) { + return; + } + + $this->assertArrayNotHasKey($moduleKey, $definition['autoload'][$type], sprintf( + '%s autoload dfinition for module %s found, but should not have been', + $type, + $moduleKey + )); + } + + private function prepareReader(string $filename, string $jsonToReturn): void + { + $this->fileReader + ->expects($this->once()) + ->method('__invoke') + ->with($filename) + ->willReturn($jsonToReturn); + } + + public function testAddAutoloaderEntryDoesNothingIfRuleExistsForModule(): void + { + $this->prepareReader( + './composer.json', + <<<'END' + { + "autoload": { + "psr-4": { + "ModuleName\\": "module/ModuleName/src/" + } + } + } + END + ); + + $composer = new Composer('.', $this->fileReader, $this->fileWriter, $this->autoloadDumper); + + $this->assertNull($composer->addAutoloaderEntry('psr-4', 'ModuleName', 'module')); + $this->assertComposerUnchanged($composer); + } + + /** + * @psalm-return iterable + */ + public function moduleProvider(): iterable + { + yield 'psr-4' => ['psr-4', 'ModuleName', 'module', 'ModuleName\\', 'module/ModuleName/src/']; + yield 'psr-0' => ['psr-0', 'ModuleName', 'module', 'ModuleName\\', 'module/ModuleName/src/']; + yield 'psr-4-custom' => ['psr-4', 'ModuleName', 'lib', 'ModuleName\\', 'lib/ModuleName/src/']; + yield 'psr-0-custom' => ['psr-0', 'ModuleName', 'lib', 'ModuleName\\', 'lib/ModuleName/src/']; + } + + /** + * @dataProvider moduleProvider + * @psalm-param Composer::AUTOLOADER_PSR* $type + * @psalm-param non-empty-string $moduleName + * @psalm-param non-empty-string $modulePath + * @psalm-param non-empty-string $expectedKey + * @psalm-param non-empty-string $expectedPath + */ + public function testAddAutoloaderEntryAddsExpectedEntry( + string $type, + string $moduleName, + string $modulePath, + string $expectedKey, + string $expectedPath + ): void { + $this->prepareReader('./composer.json', '{}'); + + $composer = new Composer('.', $this->fileReader, $this->fileWriter, $this->autoloadDumper); + + $this->assertNull($composer->addAutoloaderEntry($type, $moduleName, $modulePath)); + $this->assertAutoloadEntryExists($expectedKey, $expectedPath, $type, $composer); + } + + public function testRemoveAutoloaderEntryDoesNothingIfNoRuleExistsForModule(): void + { + $this->prepareReader('./composer.json', '{}'); + $composer = new Composer('.', $this->fileReader, $this->fileWriter, $this->autoloadDumper); + + $this->assertNull($composer->removeAutoloaderEntry('psr-4', 'ModuleName')); + $this->assertComposerUnchanged($composer); + } + + /** + * @dataProvider moduleProvider + * @psalm-param Composer::AUTOLOADER_PSR* $type + * @psalm-param non-empty-string $moduleName + * @psalm-param non-empty-string $pathToModules + * @psalm-param non-empty-string $moduleKey + * @psalm-param non-empty-string $modulePath + */ + public function testRemoveAutoloaderEntryRemovesMatchedEntry( + string $type, + string $moduleName, + string $pathToModules, + string $moduleKey, + string $modulePath + ): void { + $this->prepareReader( + './composer.json', + <<fileReader, $this->fileWriter, $this->autoloadDumper); + + $this->assertNull($composer->removeAutoloaderEntry($type, $moduleName)); + $this->assertNotAutoloadEntryExists($moduleKey, $type, $composer); + } + + public function testUpdatePackageAndDumpAutoloaderDoesNothingIfDefinitionIsUnchanged(): void + { + $this->fileWriter + ->expects($this->never()) + ->method('__invoke'); + $this->autoloadDumper + ->expects($this->never()) + ->method('__invoke'); + $this->prepareReader( + './composer.json', + <<<'END' + { + "autoload": { + "psr-4": { + "ModuleName\\": "module/ModuleName/src/" + } + } + } + END + ); + + $composer = new Composer('.', $this->fileReader, $this->fileWriter, $this->autoloadDumper); + + $this->assertNull($composer->updatePackageAndDumpAutoloader('composer')); + } + + public function testUpdatePackageAndDumpAutoloaderDoesWorkWhenDefinitionHasChanges(): void + { + $this->prepareReader( + './composer.json', + <<<'END' + { + "autoload": { + "psr-4": { + "ModuleName\\": "module/ModuleName/src/" + } + } + } + END + ); + + $composer = new Composer('.', $this->fileReader, $this->fileWriter, $this->autoloadDumper); + $composer->addAutoloaderEntry('psr-0', 'NewModule', 'module'); + + $expectedJson = <<<'END' + { + "autoload": { + "psr-4": { + "ModuleName\\": "module/ModuleName/src/" + }, + "psr-0": { + "NewModule\\": "module/NewModule/src/" + } + } + } + + END; + + $this->fileWriter + ->expects($this->once()) + ->method('__invoke') + ->with('./composer.json', $expectedJson); + + $this->autoloadDumper + ->expects($this->once()) + ->method('__invoke') + ->with('composer.phar'); + + $this->assertNull($composer->updatePackageAndDumpAutoloader('composer.phar')); + } +} diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php new file mode 100644 index 0000000..5840396 --- /dev/null +++ b/test/ConfigProviderTest.php @@ -0,0 +1,67 @@ +assertArrayHasKey('dependencies', $config); + $this->assertArrayHasKey('laminas-cli', $config); + } + + /** @psalm-return array */ + public function expectedCommandFactoryKeys(): array + { + return [ + 'DisableCommand' => [DisableCommand::class, 'composer:autoload:disable'], + 'EnableCommand' => [EnableCommand::class, 'composer:autoload:enable'], + ]; + } + + /** + * @dataProvider expectedCommandFactoryKeys + * @psalm-param class-string $commandClass + */ + public function testDependenciesIncludesFactoriesForEachCommand(string $commandClass): void + { + $provider = new ConfigProvider(); + $dependencies = $provider->getDependencies(); + $this->assertArrayHasKey('factories', $dependencies); + + $factories = $dependencies['factories']; + $this->assertArrayHasKey($commandClass, $factories); + } + + /** + * @dataProvider expectedCommandFactoryKeys + * @psalm-param class-string $commandClass + * @psalm-param non-empty-string $command + */ + public function testConsoleConfigMapsCommandNamesToCommandClasses(string $commandClass, string $command): void + { + $provider = new ConfigProvider(); + $config = $provider->getConsoleConfig(); + $this->assertArrayHasKey('commands', $config); + + $commands = $config['commands']; + $this->assertArrayHasKey($command, $commands); + $this->assertSame($commandClass, $commands[$command]); + } +} diff --git a/test/FileReaderViaFileGetContentsTest.php b/test/FileReaderViaFileGetContentsTest.php new file mode 100644 index 0000000..5b4c54f --- /dev/null +++ b/test/FileReaderViaFileGetContentsTest.php @@ -0,0 +1,63 @@ +dir = vfsStream::setup('root', null, [ + 'config' => [ + 'config.php' => ' [], + ]); + } + + public function testRaisesExceptionIfFileDoesNotExist(): void + { + $filename = vfsStream::url('root/composer.json'); + $reader = new FileReaderViaFileGetContents(); + + $this->expectException(ComposerJsonFileException::class); + $this->expectExceptionMessage('does not exist'); + $reader($filename); + } + + public function testRaisesExceptionIfFileIsNotReadable(): void + { + vfsStream::newFile('composer.json', 0222)->at($this->dir); + $filename = vfsStream::url('root/composer.json'); + $reader = new FileReaderViaFileGetContents(); + + $this->expectException(ComposerJsonFileException::class); + $this->expectExceptionMessage('unreadable'); + $reader($filename); + } + + public function testReturnsFileContentsIfFileExistsAndIsReadable(): void + { + $fileContent = '{"name": "laminas/laminas-composer-autoloading"}'; + vfsStream::newFile('composer.json')->at($this->dir)->withContent($fileContent); + + $filename = vfsStream::url('root/composer.json'); + $reader = new FileReaderViaFileGetContents(); + + $this->assertSame($fileContent, $reader($filename)); + } +} diff --git a/test/FileWriterViaFilePutContentsTest.php b/test/FileWriterViaFilePutContentsTest.php new file mode 100644 index 0000000..689d8f0 --- /dev/null +++ b/test/FileWriterViaFilePutContentsTest.php @@ -0,0 +1,66 @@ +dir = vfsStream::setup('root', null, [ + 'config' => [ + 'config.php' => ' [], + ]); + } + + public function testRaisesExceptionIfDirectoryIsNotWritable(): void + { + vfsStream::newDirectory('test', 0111)->at($this->dir); + $filename = vfsStream::url('root/test/newfile.txt'); + $writer = new FileWriterViaFilePutContents(); + + $this->expectException(ComposerJsonFileException::class); + $this->expectExceptionMessage('read-only'); + $writer($filename, 'test contents'); + } + + public function testRaisesExceptionIfFileIsNotWritable(): void + { + vfsStream::newFile('test/newfile.txt', 0111)->at($this->dir); + $filename = vfsStream::url('root/test/newfile.txt'); + $writer = new FileWriterViaFilePutContents(); + + $this->expectException(ComposerJsonFileException::class); + $this->expectExceptionMessage('read-only'); + $writer($filename, 'test contents'); + } + + public function testWritesFileToFilesystem(): void + { + $contents = 'test contents'; + vfsStream::newFile('test/newfile.txt')->at($this->dir)->withContent(''); + $filename = vfsStream::url('root/test/newfile.txt'); + $writer = new FileWriterViaFilePutContents(); + + $this->assertNull($writer($filename, $contents)); + $this->assertSame($contents, file_get_contents($filename)); + } +} diff --git a/test/HelpTest.php b/test/HelpTest.php deleted file mode 100644 index 8a77b35..0000000 --- a/test/HelpTest.php +++ /dev/null @@ -1,66 +0,0 @@ -createMock(ConsoleHelper::class); - $console - ->expects($this->atLeastOnce()) - ->method('writeLine') - ->with( - $this->callback(function (string $message): bool { - return false !== strpos($message, 'laminas-composer-autoloading'); - }), - true, - $resource - ); - - $command = new Help('laminas-composer-autoloading', $console); - - $this->assertNull($command($resource)); - } - - public function testTruncatesCommandToBasenameIfItIsARealpath(): void - { - $resource = fopen('php://temp', 'wb+'); - - /** @psalm-var ConsoleHelper&MockObject $console */ - $console = $this->createMock(ConsoleHelper::class); - $console - ->expects($this->atLeastOnce()) - ->method('writeLine') - ->with( - $this->callback(function (string $message): bool { - return false !== strpos($message, basename(__FILE__)); - }), - true, - $resource - ); - - $command = new Help(realpath(__FILE__), $console); - - $this->assertNull($command($resource)); - } -} diff --git a/test/ModuleTest.php b/test/ModuleTest.php new file mode 100644 index 0000000..24b074e --- /dev/null +++ b/test/ModuleTest.php @@ -0,0 +1,26 @@ +getConfig(); + + $this->assertArrayHasKey('service_manager', $config); + $this->assertArrayHasKey('laminas-cli', $config); + } +} diff --git a/test/MoveModuleClassFileViaFileOperationsTest.php b/test/MoveModuleClassFileViaFileOperationsTest.php new file mode 100644 index 0000000..c82ff14 --- /dev/null +++ b/test/MoveModuleClassFileViaFileOperationsTest.php @@ -0,0 +1,196 @@ +dir = vfsStream::setup('root', null, [ + 'config' => [ + 'config.php' => ' [ + 'TestModule' => [ + '.placeholder' => '', + ], + ], + ]); + } + + /** + * @psalm-return callable(string $originalFile, string $newFile):void + */ + private function createNoopReporter(): callable + { + return function (string $original, string $target): void { + Assert::fail('Reporter was reached, but should not have been'); + }; + } + + /** + * @psalm-return callable(string $originalFile, string $newFile):void + */ + private function createSpyReporter(string $expectedOriginal, string $expectedTarget): callable + { + return function (string $original, string $target) use ($expectedOriginal, $expectedTarget): void { + Assert::assertSame($expectedOriginal, $original, sprintf( + 'Did not receive expected original file "%s"; received "%s"', + $expectedOriginal, + $original + )); + + Assert::assertSame($expectedTarget, $target, sprintf( + 'Did not receive expected target file "%s"; received "%s"', + $expectedTarget, + $target + )); + }; + } + + public function testReturnsEarlyIfModuleClassFileDoesNotExistInModuleRoot(): void + { + $mover = new MoveModuleClassFileViaFileOperations(); + $path = vfsStream::url('root/module/TestModule'); + $this->assertNull($mover($path, $this->createNoopReporter())); + } + + public function testReturnsEarlyIfModuleClassFileDoesNotContainModuleClass(): void + { + /** @var vfsStreamDirectory $modulePath */ + $modulePath = $this->dir->getChild('module/TestModule'); + vfsStream::newFile('Module.php')->at($modulePath)->setContent('assertNull($mover($path, $this->createNoopReporter())); + } + + public function testReturnsEarlyIfTargetModuleClassFileAlreadyExists(): void + { + /** @var vfsStreamDirectory $modulePath */ + $modulePath = $this->dir->getChild('module/TestModule'); + vfsStream::newFile('Module.php')->at($modulePath)->setContent(<<<'END' + at($modulePath); + vfsStream::newFile('src/Module.php')->at($modulePath)->setContent('assertNull($mover($path, $this->createNoopReporter())); + } + + public function testMovesModuleClassFromModuleRootIntoModuleSourceDirectory(): void + { + /** @var vfsStreamDirectory $modulePath */ + $modulePath = $this->dir->getChild('module/TestModule'); + $moduleClassFileContents = <<<'END' + at($modulePath)->setContent($moduleClassFileContents); + + vfsStream::newDirectory('src')->at($modulePath); + + $mover = new MoveModuleClassFileViaFileOperations(); + $path = vfsStream::url('root/module/TestModule'); + $this->assertNull($mover( + $path, + $this->createSpyReporter( + vfsStream::url('root/module/TestModule/Module.php'), + vfsStream::url('root/module/TestModule/src/Module.php') + ) + )); + + $this->assertFileDoesNotExist(vfsStream::url('root/module/TestModule/Module.php')); + $this->assertFileExists(vfsStream::url('root/module/TestModule/src/Module.php')); + $this->assertSame( + $moduleClassFileContents, + file_get_contents(vfsStream::url('root/module/TestModule/src/Module.php')) + ); + } + + public function testMovesModuleClassFromModuleRootIntoModuleSourceDirectoryAndRewritesDirReferences(): void + { + /** @var vfsStreamDirectory $modulePath */ + $modulePath = $this->dir->getChild('module/TestModule'); + $moduleClassFileContents = <<<'END' + at($modulePath)->setContent($moduleClassFileContents); + + vfsStream::newDirectory('src')->at($modulePath); + + $expectedModuleClassFileContents = <<<'END' + assertNull($mover( + $path, + $this->createSpyReporter( + vfsStream::url('root/module/TestModule/Module.php'), + vfsStream::url('root/module/TestModule/src/Module.php') + ) + )); + + $this->assertFileDoesNotExist(vfsStream::url('root/module/TestModule/Module.php')); + $this->assertFileExists(vfsStream::url('root/module/TestModule/src/Module.php')); + $this->assertSame( + $expectedModuleClassFileContents, + file_get_contents(vfsStream::url('root/module/TestModule/src/Module.php')) + ); + } +} diff --git a/test/ProjectSetupTrait.php b/test/ProjectSetupTrait.php deleted file mode 100644 index b2a828a..0000000 --- a/test/ProjectSetupTrait.php +++ /dev/null @@ -1,97 +0,0 @@ -at($modulesDir); - } - - /** - * @param array|null $content - * @return vfsStreamFile - */ - protected function setUpComposerJson(vfsStreamContainer $dir, ?array $content = null) - { - return vfsStream::newFile('composer.json') - ->withContent(json_encode($content)) - ->at($dir); - } - - /** - * @param string $module - * @param null|string $content - * @return vfsStreamFile - */ - protected function setUpModuleClassFile(vfsStreamContainer $modulesDir, $module, $content = null) - { - $content = $content ?: sprintf($this->moduleFileContent, $module); - - return vfsStream::newFile('Module.php') - ->withContent($content) - ->at($modulesDir->getChild($module)); - } - - /** - * @return void - */ - private function assertComposerDumpAutoload() - { - $system = $this->getFunctionMock(Command::class, 'system'); - $system->expects($this->once())->willReturnCallback(function ($command) { - $this->assertEquals($this->composer . ' dump-autoload', $command); - }); - } - - /** - * @return void - */ - private function assertNotComposerDumpAutoload() - { - $system = $this->getFunctionMock(Command::class, 'system'); - $system->expects($this->never()); - } -}