From 3b2de1e4f1cf149d41a3662c1b4914804e564d3b Mon Sep 17 00:00:00 2001 From: Maximilian Kresse <545671+MaximilianKresse@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:30:38 +0100 Subject: [PATCH] Switched from GoaopParserReflection to BetterReflection Raised php version to 8.2 Added option to include code for resolving but ignored in stub generation --- README.md | 17 +- bin/php-stub-generator | 89 +- composer.json | 11 +- composer.lock | 2120 ++++++++++++++++- phpunit.xml | 6 +- ...rmatter.php => ClassConstantFormatter.php} | 13 +- src/Formatter/ClassFormatter.php | 38 +- src/Formatter/FunctionFormatter.php | 80 +- src/Formatter/MethodFormatter.php | 20 +- src/Formatter/PropertyFormatter.php | 4 +- .../AstLocatorWithNamespaceUses.php | 65 + .../BetterReflectionParser.php | 156 ++ .../FileListSourceLocator.php | 83 + .../BetterReflection/PriorizingReflector.php | 147 ++ .../FindNamespaceUsesInTree.php | 90 + .../ReflectionFileNamespace.php | 90 + .../ClassListLocator.php | 35 - .../GoaopParserReflectionParser.php | 172 -- src/Parser/ParserInterface.php | 26 +- src/PhpStubGenerator.php | 73 +- src/Reader/SingleFile.php | 23 + tests/unit/Formatter/ClassFormatterTest.php | 18 +- .../unit/Formatter/ConstantFormatterTest.php | 48 +- .../unit/Formatter/FunctionFormatterTest.php | 45 +- tests/unit/Formatter/MethodFormatterTest.php | 26 +- .../unit/Formatter/PropertyFormatterTest.php | 22 +- tests/unit/Helper/FormatHelperTest.php | 11 +- vendor-bin/phpstan/composer.json | 2 +- vendor-bin/phpstan/composer.lock | 14 +- vendor-bin/phpunit/composer.json | 6 - vendor-bin/phpunit/composer.lock | 1807 -------------- 31 files changed, 2962 insertions(+), 2395 deletions(-) rename src/Formatter/{ConstantFormatter.php => ClassConstantFormatter.php} (82%) create mode 100644 src/Parser/BetterReflection/AstLocatorWithNamespaceUses.php create mode 100644 src/Parser/BetterReflection/BetterReflectionParser.php create mode 100644 src/Parser/BetterReflection/FileListSourceLocator.php create mode 100644 src/Parser/BetterReflection/PriorizingReflector.php create mode 100644 src/Parser/BetterReflection/ReflectionNamespace/FindNamespaceUsesInTree.php create mode 100644 src/Parser/BetterReflection/ReflectionNamespace/ReflectionFileNamespace.php delete mode 100644 src/Parser/GoaopParserReflection/ClassListLocator.php delete mode 100644 src/Parser/GoaopParserReflection/GoaopParserReflectionParser.php create mode 100644 src/Reader/SingleFile.php delete mode 100644 vendor-bin/phpunit/composer.json delete mode 100644 vendor-bin/phpunit/composer.lock diff --git a/README.md b/README.md index 34f44cb..a207733 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The main purpose for this tool is to generate stub-files from php classes to hav completion for your IDE when encrypting your library with e.g. [the ioncube encoder](http://www.ioncube.com/php_encoder.php). -[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg)](https://php.net/) +[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%208.2-8892BF.svg)](https://php.net/) [![License](https://img.shields.io/packagist/l/setasign/php-stub-generator.svg)](https://packagist.org/packages/setasign/php-stub-generator) ## Installation @@ -75,12 +75,19 @@ class PhpStubGenerator * @var bool */ public static $addClassConstantsVisibility = false; + + /** + * If false the interface \Stringable won't be filtered out (the generated stubs require PHP >= 8.0). + * + * Within the cli tool can be set with the option "--includeStringable" + * + * @var bool + */ + public static bool $includeStringable = false; } ``` -## Drawbacks / TODOs -- Traits are not supported yet and probably won't be because of bugs like [this](https://bugs.php.net/bug.php?id=69180). - The actual reflection api doesn't give enough information to rebuild the conflict resolution block. - Additionally the "declaring class" of imported trait methods is the importing class and not like expected the trait. +## Drawbacks - Calculated constants or constants that use other constants like \_\_DIR\_\_ will be filled with the values of the runtime environment. +- Global Functions and Constants are currently ignored \ No newline at end of file diff --git a/bin/php-stub-generator b/bin/php-stub-generator index 104f998..b59a640 100644 --- a/bin/php-stub-generator +++ b/bin/php-stub-generator @@ -5,34 +5,23 @@ declare(strict_types=1); use setasign\PhpStubGenerator\PhpStubGenerator; use setasign\PhpStubGenerator\Reader\AllFiles; +use setasign\PhpStubGenerator\Reader\SingleFile; use Symfony\Component\Console\Application; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -if (version_compare('7.2', PHP_VERSION, '>=')) { - fwrite( - STDERR, - sprintf( - 'This version of php-stub-generator is supported on PHP 7.2.' . PHP_EOL . - 'You are using PHP %s (%s).' . PHP_EOL, - PHP_VERSION, - PHP_BINARY - ) - ); - - die(1); -} - if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } -foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) { - if (file_exists($file)) { - define('PHP_STUB_GENERATOR_COMPOSER_INSTALL', $file); - break; +if (!defined('PHP_STUB_GENERATOR_COMPOSER_INSTALL')) { + foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) { + if (file_exists($file)) { + define('PHP_STUB_GENERATOR_COMPOSER_INSTALL', $file); + break; + } } } @@ -47,11 +36,9 @@ if (!defined('PHP_STUB_GENERATOR_COMPOSER_INSTALL')) { die(1); } -/** @noinspection PhpIncludeInspection */ require PHP_STUB_GENERATOR_COMPOSER_INSTALL; -/** @noinspection PhpUnhandledExceptionInspection */ -(new Application('setasign php-stub-generator', 'v1.0.0-dev')) +(new Application('setasign php-stub-generator', 'v2.0.0')) ->register('generate') ->setDescription('Build the stub-file') ->addArgument( @@ -59,27 +46,41 @@ require PHP_STUB_GENERATOR_COMPOSER_INSTALL; InputArgument::REQUIRED, 'The root directory of your library' ) - ->addArgument( - 'output', - InputArgument::REQUIRED, - 'The output file' - ) ->addOption( 'exclude', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Exclude any directories' ) + ->addOption( + 'resolvingSource', + null, + InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, + 'Additional directory to resolve dependencies but without generating own stubs' + ) + ->addArgument( + 'output', + InputArgument::REQUIRED, + 'The output file' + ) ->addOption( 'addClassConstantsVisibility', - false, + null, InputOption::VALUE_NONE, 'If enabled all generated class constants get a visibility (the generated stubs require PHP >= 7.1)' ) + ->addOption( + 'includeStringable', + null, + InputOption::VALUE_NONE, + 'If enabled the interface \Stringable won\'t be filtered out (the generated stubs require PHP >= 8.0)' + ) ->setCode(function ( InputInterface $input, OutputInterface $output ) { + gc_disable(); +// $start = microtime(true); $sourceDirectory = $input->getArgument('source'); $outputPath = $input->getArgument('output'); $excludes = $input->getOption('exclude'); @@ -94,13 +95,39 @@ require PHP_STUB_GENERATOR_COMPOSER_INSTALL; } $generator = new PhpStubGenerator(); - $generator->addSource( - 'setapdf-core', - new AllFiles($sourceDirectory, $excludes) - ); + if (is_file($sourceDirectory)) { + $generator->addSource( + 'source', + new SingleFile($sourceDirectory) + ); + } else { + $generator->addSource( + 'source', + new AllFiles($sourceDirectory, $excludes) + ); + } + + $additionalSources = $input->getOption('resolvingSource'); + if (is_array($additionalSources)) { + foreach ($additionalSources as $k => $source) { + if (is_file($source)) { + $generator->addResolvingSource( + 'rs' . $k, + new SingleFile($source) + ); + } else { + $generator->addResolvingSource( + 'rs' . $k, + new AllFiles($source) + ); + } + } + } + $stubs = $generator->generate(); file_put_contents($outputPath, $stubs, LOCK_EX); $output->write('The stubs were successfully generated to: ' . realpath($outputPath) . PHP_EOL); +// $output->write('Time: ' . microtime(true) - $start . PHP_EOL); }) ->getApplication() ->run(); diff --git a/composer.json b/composer.json index 8e375fc..ff526ce 100644 --- a/composer.json +++ b/composer.json @@ -11,16 +11,19 @@ ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.2", "ext-pcre": "*", "ext-mbstring": "*", - "goaop/parser-reflection": "^2.1", - "symfony/console": "^4.0" + "roave/better-reflection": "^6.42", + "symfony/console": "^6.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8" + "bamarni/composer-bin-plugin": "^1.8", + + "phpunit/phpunit": "^11.0", + "php-defer/php-defer": "^5.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index 8915316..7e5420a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,84 +4,78 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "792548f44123f6aad4d10aec01794907", + "content-hash": "44fb108a7294a2590665cb3baa5eeba7", "packages": [ { - "name": "goaop/parser-reflection", - "version": "2.1.3", + "name": "jetbrains/phpstorm-stubs", + "version": "v2024.2", "source": { "type": "git", - "url": "https://github.com/goaop/parser-reflection.git", - "reference": "2e837e150e15d38f7004b0dbcd0af4abe034c9e2" + "url": "https://github.com/JetBrains/phpstorm-stubs.git", + "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/goaop/parser-reflection/zipball/2e837e150e15d38f7004b0dbcd0af4abe034c9e2", - "reference": "2e837e150e15d38f7004b0dbcd0af4abe034c9e2", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", + "reference": "cf7e447ddfa7f0cbab0c1dd38392f0cb05f9881c", "shasum": "" }, - "require": { - "nikic/php-parser": "^4.0 <4.7.0", - "php": ">=7.1" - }, "require-dev": { - "phpunit/phpunit": "~4.0" + "friendsofphp/php-cs-fixer": "v3.46.0", + "nikic/php-parser": "v5.0.0", + "phpdocumentor/reflection-docblock": "5.3.0", + "phpunit/phpunit": "10.5.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "autoload": { "files": [ - "src/bootstrap.php" - ], - "psr-4": { - "Go\\ParserReflection\\": "src" - }, - "exclude-from-classmap": [ - "/tests/" + "PhpStormStubsMap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], - "authors": [ - { - "name": "Alexander Lisachenko", - "email": "lisachenko.it@gmail.com" - } + "description": "PHP runtime & extensions header files for PhpStorm", + "homepage": "https://www.jetbrains.com/phpstorm", + "keywords": [ + "autocomplete", + "code", + "inference", + "inspection", + "jetbrains", + "phpstorm", + "stubs", + "type" ], - "description": "Provides reflection information, based on raw source", "support": { - "issues": "https://github.com/goaop/parser-reflection/issues", - "source": "https://github.com/goaop/parser-reflection/tree/2.x" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2024.2" }, - "time": "2020-08-13T21:02:42+00:00" + "time": "2024-06-17T19:18:18+00:00" }, { "name": "nikic/php-parser", - "version": "v4.6.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c346bbfafe2ff60680258b631afb730d186ed864", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { - "ircmaxell/php-yacc": "0.0.5", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -89,7 +83,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -113,28 +107,33 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.6.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2020-07-02T17:12:47+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -161,55 +160,122 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "roave/better-reflection", + "version": "6.43.0", + "source": { + "type": "git", + "url": "https://github.com/Roave/BetterReflection.git", + "reference": "598266e24e14767cba386d2f4c2bcf2a9e278e12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/598266e24e14767cba386d2f4c2bcf2a9e278e12", + "reference": "598266e24e14767cba386d2f4c2bcf2a9e278e12", + "shasum": "" + }, + "require": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "2024.2", + "nikic/php-parser": "^5.3.1", + "php": "~8.2.0 || ~8.3.2" }, - "time": "2021-11-05T16:50:12+00:00" + "conflict": { + "thecodingmachine/safe": "<1.1.3" + }, + "require-dev": { + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^11.4.3" + }, + "suggest": { + "composer/composer": "Required to use the ComposerSourceLocator" + }, + "type": "library", + "autoload": { + "psr-4": { + "Roave\\BetterReflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "James Titcumb", + "email": "james@asgrim.com", + "homepage": "https://github.com/asgrim" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + }, + { + "name": "Gary Hockin", + "email": "gary@roave.com", + "homepage": "https://github.com/geeh" + }, + { + "name": "Jaroslav Hanslík", + "email": "kukulich@kukulich.cz", + "homepage": "https://github.com/kukulich" + } + ], + "description": "Better Reflection - an improved code reflection API", + "support": { + "issues": "https://github.com/Roave/BetterReflection/issues", + "source": "https://github.com/Roave/BetterReflection/tree/6.43.0" + }, + "time": "2024-11-19T17:44:59+00:00" }, { "name": "symfony/console", - "version": "v4.4.49", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9" + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", + "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", - "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -236,8 +302,14 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], "support": { - "source": "https://github.com/symfony/console/tree/v4.4.49" + "source": "https://github.com/symfony/console/tree/v6.4.15" }, "funding": [ { @@ -253,7 +325,7 @@ "type": "tidelift" } ], - "time": "2022-11-05T17:10:16+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/deprecation-contracts", @@ -323,27 +395,27 @@ "time": "2024-04-18T09:32:20+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "symfony/polyfill-ctype", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { "php": ">=7.2" }, "provide": { - "ext-mbstring": "*" + "ext-ctype": "*" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { @@ -357,7 +429,83 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -374,17 +522,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -403,22 +552,25 @@ "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php73", + "name": "symfony/polyfill-intl-normalizer", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { "php": ">=7.2" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -431,7 +583,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -451,16 +603,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -479,22 +633,28 @@ "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php80", + "name": "symfony/polyfill-mbstring", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { "php": ">=7.2" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -507,21 +667,14 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -531,16 +684,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -560,33 +714,30 @@ }, { "name": "symfony/service-contracts", - "version": "v2.5.3", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -596,7 +747,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -623,7 +777,94 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/string", + "version": "v7.1.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/591ebd41565f356fcd8b090fe64dbb5878f50281", + "reference": "591ebd41565f356fcd8b090fe64dbb5878f50281", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "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": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.1.8" }, "funding": [ { @@ -639,7 +880,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:04:16+00:00" + "time": "2024-11-13T13:31:21+00:00" } ], "packages-dev": [ @@ -699,6 +940,1627 @@ "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2" }, "time": "2022-10-31T08:38:03+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-11-08T17:47:46+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "php-defer/php-defer", + "version": "v5.0.7", + "source": { + "type": "git", + "url": "https://github.com/php-defer/php-defer.git", + "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-defer/php-defer/zipball/9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", + "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bartłomiej Krukowski", + "email": "bartlomiej@krukowski.me" + } + ], + "description": "Golang's defer statement for PHP", + "keywords": [ + "defer", + "golang" + ], + "support": { + "issues": "https://github.com/php-defer/php-defer/issues", + "source": "https://github.com/php-defer/php-defer/tree/v5.0.7" + }, + "time": "2023-09-21T16:38:54+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.3.1", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^11.4.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T06:21:38+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6", + "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-27T05:02:59+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8e8ed1854de5d36c088ec1833beae40d2dedd76", + "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.7", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.1", + "sebastian/comparator": "^6.1.1", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.1.3", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.4-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.3" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-10-28T13:07:50+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", + "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:44:28+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739", + "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-31T05:30:08+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:54:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:56:19+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", + "reference": "694d156164372abbd149a4b85ccda2e4670c0e16", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:10:34+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-09-17T13:12:04+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -707,7 +2569,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^8.2", "ext-pcre": "*", "ext-mbstring": "*" }, diff --git a/phpunit.xml b/phpunit.xml index a052192..8b1ce8f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,14 +1,14 @@ - + ./src/ - + diff --git a/src/Formatter/ConstantFormatter.php b/src/Formatter/ClassConstantFormatter.php similarity index 82% rename from src/Formatter/ConstantFormatter.php rename to src/Formatter/ClassConstantFormatter.php index 1425ea6..aaece57 100644 --- a/src/Formatter/ConstantFormatter.php +++ b/src/Formatter/ClassConstantFormatter.php @@ -4,22 +4,17 @@ namespace setasign\PhpStubGenerator\Formatter; +use ReflectionClassConstant; use setasign\PhpStubGenerator\Helper\FormatHelper; use setasign\PhpStubGenerator\PhpStubGenerator; -class ConstantFormatter +class ClassConstantFormatter { private string $className; - private \ReflectionClassConstant $reflectionClassConstant; + private ReflectionClassConstant $reflectionClassConstant; - /** - * ConstantFormatter constructor. - * - * @param string $className - * @param \ReflectionClassConstant $reflectionClassConstant - */ - public function __construct(string $className, \ReflectionClassConstant $reflectionClassConstant) + public function __construct(string $className, ReflectionClassConstant $reflectionClassConstant) { $this->className = $className; $this->reflectionClassConstant = $reflectionClassConstant; diff --git a/src/Formatter/ClassFormatter.php b/src/Formatter/ClassFormatter.php index dd165b4..3ff5959 100644 --- a/src/Formatter/ClassFormatter.php +++ b/src/Formatter/ClassFormatter.php @@ -25,7 +25,6 @@ public function __construct(ReflectionClass $class) /** * @param bool $ignoreSubElements * @return string - * @throws \ReflectionException */ public function format(bool $ignoreSubElements = false): string { @@ -34,11 +33,21 @@ public function format(bool $ignoreSubElements = false): string $result = ''; $docComment = $this->class->getDocComment(); - if ($docComment !== false) { + if (\is_string($docComment)) { $result .= FormatHelper::indentDocBlock($docComment, 1, $t) . $n; } - $result .= $t; + $attributes = $this->class->getAttributes(); + foreach ($attributes as $attribute) { + $result .= $t . '#[' . $attribute->getName(); + if ($attribute->getArguments() !== []) { + $arguments = \array_map([FormatHelper::class, 'formatValue'], $attribute->getArguments()); + $result .= '(' . \implode(', ', $arguments) . ')'; + } + $result .= ']' . $n; + } + + $result .= $t; if ($this->class->isInterface()) { $result .= 'interface '; } elseif ($this->class->isTrait()) { @@ -56,21 +65,22 @@ public function format(bool $ignoreSubElements = false): string $parentClass = null; try { $parentClass = $this->class->getParentClass(); - } catch (\Throwable $e) { + } catch (\Throwable) { } if ($parentClass instanceof ReflectionClass) { $result .= ' extends \\' . \ltrim($parentClass->getName(), '\\'); } $interfaces = $this->class->getInterfaces(); - // remove interfaces from parent class if there is a parent class + if (!PhpStubGenerator::$includeStringable) { + $interfaces = \array_filter($interfaces, function ($interface) { + return $interface->getName() !== 'Stringable'; + }); + } + if ($parentClass instanceof ReflectionClass) { + // remove interfaces from parent class if there is a parent class $interfaces = \array_filter($interfaces, function (ReflectionClass $interface) use ($parentClass) { - // if the $parentClass is a default php class it cannot use an user defined interface - if (!$parentClass->isUserDefined() && $interface->isUserDefined()) { - return false; - } - return !$parentClass->implementsInterface($interface->getName()); }); } @@ -82,11 +92,7 @@ public function format(bool $ignoreSubElements = false): string /** * @var ReflectionClass $compareInterface */ - // if the $compareInterface is a default php interface it cannot use an user defined interface - if ( - (!$compareInterface->isUserDefined() && $interface->isUserDefined()) - || $compareInterface->implementsInterface($interfaceName) - ) { + if ($compareInterface->implementsInterface($interfaceName)) { return false; } } @@ -116,7 +122,7 @@ public function format(bool $ignoreSubElements = false): string if (!$ignoreSubElements) { foreach ($this->class->getReflectionConstants() as $constant) { - $result .= (new ConstantFormatter($this->class->getName(), $constant))->format(); + $result .= (new ClassConstantFormatter($this->class->getName(), $constant))->format(); } foreach ($this->class->getProperties() as $property) { diff --git a/src/Formatter/FunctionFormatter.php b/src/Formatter/FunctionFormatter.php index 5db8cd0..fbecfc7 100644 --- a/src/Formatter/FunctionFormatter.php +++ b/src/Formatter/FunctionFormatter.php @@ -4,30 +4,62 @@ namespace setasign\PhpStubGenerator\Formatter; -use ReflectionFunctionAbstract; +use ReflectionFunction; +use ReflectionMethod; use ReflectionType; +use ReflectionUnionType; use setasign\PhpStubGenerator\Helper\FormatHelper; use setasign\PhpStubGenerator\PhpStubGenerator; class FunctionFormatter { - public const DEFAULT_TYPES = ['int', 'float', 'bool', 'string', 'self', 'callable', 'array', 'object']; + public const DEFAULT_TYPES = [ + 'null', 'int', 'float', 'bool', 'string', 'self', 'callable', 'array', 'object', 'mixed' + ]; - protected ReflectionFunctionAbstract $function; + protected ReflectionFunction|ReflectionMethod $function; /** * FunctionFormatter constructor. * - * @param ReflectionFunctionAbstract $function + * @param ReflectionFunction $function */ - public function __construct(ReflectionFunctionAbstract $function) + public function __construct(ReflectionFunction $function) { $this->function = $function; } + protected function formatType(ReflectionType|null $type): string + { + if ($type instanceof ReflectionUnionType) { + $unionTypes = \array_map([$this, 'formatType'], $type->getTypes()); + $unionTypesWithoutNull = \array_filter($unionTypes, function (string $type) { + return $type !== 'null'; + }); + if ($type->allowsNull() && count($unionTypesWithoutNull) === 1) { + $typeAllowsNull = true; + $type = \implode('|', $unionTypesWithoutNull); + } else { + $typeAllowsNull = false; + $type = \implode('|', $unionTypes); + } + } else { + $typeAllowsNull = $type->allowsNull(); + $type = \ltrim((string) $type, '\\?'); + if (!\in_array($type, self::DEFAULT_TYPES, true)) { + $type = '\\' . $type; + } + } + + if ($type === 'null' || $type === 'mixed') { + return $type; + } + + return ($typeAllowsNull ? '?' : '') . $type; + } + /** * @return string - * @throws \ReflectionException */ protected function formatParams(): string { @@ -35,26 +67,8 @@ protected function formatParams(): string foreach ($this->function->getParameters() as $parameter) { $param = ''; $type = $parameter->getType(); - $typeAllowsNull = false; if ($type instanceof ReflectionType) { - $typeAllowsNull = $type->allowsNull(); - $type = (string) $type; - } else { - $type = ''; - } - - if ($type !== '') { - if ($typeAllowsNull) { - $param .= '?'; - } - - if (\in_array($type, self::DEFAULT_TYPES, true)) { - $param .= $type; - } else { - $param .= '\\' . \ltrim($type, '\\'); - } - - $param .= ' '; + $param .= $this->formatType($type) . ' '; } if ($parameter->isPassedByReference()) { @@ -72,7 +86,6 @@ protected function formatParams(): string } else { $default = FormatHelper::formatValue($parameter->getDefaultValue()); } - $param .= ' = ' . $default; } $params[] = $param; @@ -91,19 +104,7 @@ protected function formatReturnType(): string $result = ''; if ($this->function->hasReturnType()) { - $returnType = $this->function->getReturnType(); - - if ($returnType instanceof ReflectionType) { - $allowsNull = $returnType->allowsNull(); - $returnType = (string) $returnType; - - $result .= ': ' . ($allowsNull ? '?' : ''); - if (\in_array($returnType, self::DEFAULT_TYPES, true)) { - $result .= $returnType; - } else { - $result .= '\\' . \ltrim($returnType, '\\'); - } - } + $result .= ': ' . $this->formatType($this->function->getReturnType()); } return $result; @@ -111,7 +112,6 @@ protected function formatReturnType(): string /** * @return string - * @throws \ReflectionException */ public function format(): string { diff --git a/src/Formatter/MethodFormatter.php b/src/Formatter/MethodFormatter.php index 20c7e1c..0857d3d 100644 --- a/src/Formatter/MethodFormatter.php +++ b/src/Formatter/MethodFormatter.php @@ -5,15 +5,10 @@ namespace setasign\PhpStubGenerator\Formatter; use ReflectionMethod; +use ReturnTypeWillChange; use setasign\PhpStubGenerator\Helper\FormatHelper; use setasign\PhpStubGenerator\PhpStubGenerator; -/** - * Class MethodFormatter - * - * @package setasign\PhpStubGenerator\Formatter - * @property ReflectionMethod $function - */ class MethodFormatter extends FunctionFormatter { private string $className; @@ -31,12 +26,11 @@ public function __construct(string $className, bool $classIsInterface, Reflectio { $this->className = $className; $this->classIsInterface = $classIsInterface; - parent::__construct($method); + $this->function = $method; } /** * @return string - * @throws \ReflectionException */ public function format(): string { @@ -53,6 +47,16 @@ public function format(): string $result .= FormatHelper::indentDocBlock($doc, 2, $t) . $n; } + $attributes = $this->function->getAttributes(); + foreach ($attributes as $attribute) { + $result .= $t . '#[' . $attribute->getName(); + if ($attribute->getArguments() !== []) { + $arguments = \array_map([FormatHelper::class, 'formatValue'], $attribute->getArguments()); + $result .= '(' . \implode(', ', $arguments) . ')'; + } + $result .= ']' . $n; + } + $result .= $t . $t; if (!$this->classIsInterface && $this->function->isAbstract()) { $result .= 'abstract '; diff --git a/src/Formatter/PropertyFormatter.php b/src/Formatter/PropertyFormatter.php index f441e89..1fa2249 100644 --- a/src/Formatter/PropertyFormatter.php +++ b/src/Formatter/PropertyFormatter.php @@ -17,7 +17,7 @@ class PropertyFormatter /** * @var mixed */ - protected $defaultValue; + protected mixed $defaultValue; /** * PropertyFormatter constructor. @@ -26,7 +26,7 @@ class PropertyFormatter * @param ReflectionProperty $property * @param mixed $defaultValue */ - public function __construct(string $className, ReflectionProperty $property, $defaultValue) + public function __construct(string $className, ReflectionProperty $property, mixed $defaultValue) { $this->className = $className; $this->property = $property; diff --git a/src/Parser/BetterReflection/AstLocatorWithNamespaceUses.php b/src/Parser/BetterReflection/AstLocatorWithNamespaceUses.php new file mode 100644 index 0000000..1e03fd7 --- /dev/null +++ b/src/Parser/BetterReflection/AstLocatorWithNamespaceUses.php @@ -0,0 +1,65 @@ +findReflectionsInTree = new FindReflectionsInTree(new NodeToReflection()); + $this->findNamespaceUsesInTree = new FindNamespaceUsesInTree(); + } + + /** + * Get an array of reflections found in some code. + * + * @return list + * + * @throws ParseToAstFailure + */ + public function findReflectionsOfType( + Reflector $reflector, + LocatedSource $locatedSource, + IdentifierType $identifierType, + ): array { + try { + $ast = $this->parser->parse($locatedSource->getSource()); + $namespaceUses = $this->findNamespaceUsesInTree->__invoke($ast, $identifierType); + foreach ($namespaceUses as $className => $uses) { + $this->namespaceUses[$identifierType->getName()][$className] = $uses; + } + + return $this->findReflectionsInTree->__invoke( + $reflector, + $ast, + $identifierType, + $locatedSource, + ); + } catch (Throwable $exception) { + throw ParseToAstFailure::fromLocatedSource($locatedSource, $exception); + } + } + + public function getNamespaceUses(IdentifierType $identifierType, string $name): array + { + return $this->namespaceUses[$identifierType->getName()][$name] ?? []; + } +} diff --git a/src/Parser/BetterReflection/BetterReflectionParser.php b/src/Parser/BetterReflection/BetterReflectionParser.php new file mode 100644 index 0000000..52b5fa9 --- /dev/null +++ b/src/Parser/BetterReflection/BetterReflectionParser.php @@ -0,0 +1,156 @@ +getFiles(); + }, \array_values($readers)); + return \array_merge(...$files); + } + + /** + * @inheritDoc + */ + public function parse(): void + { + $betterReflection = new BetterReflection(); + $astLocator = new AstLocatorWithNamespaceUses($betterReflection->phpParser()); + + $mainSourceLocator = new FileListSourceLocator($this->resolveReaders($this->sources), $astLocator); + $secondarySourceLocators = []; + if (count($this->resolvingSources) > 0) { + $secondarySourceLocators[] = new FileListSourceLocator( + $this->resolveReaders($this->resolvingSources), + $astLocator + ); + } + + // php internals + $secondarySourceLocators[] = new MemoizingSourceLocator( + new PhpInternalSourceLocator($astLocator, new ReflectionSourceStubber()) + ); + + $reflector = new PriorizingReflector( + $mainSourceLocator, + new AggregateSourceLocator($secondarySourceLocators) + ); + + $classes = []; +// $functions = []; +// $constants = []; + $aliases = []; + + $classIdent = new IdentifierType(IdentifierType::IDENTIFIER_CLASS); + foreach ($reflector->reflectAllClasses() as $class) { + $className = $class->getName(); + $classes[$class->getNamespaceName()][$className] = new ReflectionClass($class); + + $aliases[self::TYPE_CLASS][$className] = $astLocator->getNamespaceUses($classIdent, $className); + } + +// $functionIdent = new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION); +// foreach ($reflector->reflectAllFunctions() as $function) { +// $functionName = $function->getName(); +// $functions[$function->getNamespaceName()][$functionName] = new ReflectionFunction($function); +// +// $aliases[self::TYPE_FUNCTION][$functionName] = $astLocator->getNamespaceUses($functionIdent, $className); +// } + +// foreach ($reflector->reflectAllConstants() as $constant) { +// $constants[$constant->getNamespaceName()][$constant->getName()] = $constant; +// } + + $this->classes = $classes; +// $this->functions = $functions; +// $this->constants = $constants; + $this->aliases = $aliases; + } + + /** + * @inheritdoc + */ + public function getClasses(): array + { + if ($this->classes === null) { + throw new \BadMethodCallException('BetterReflectionParser::parse wasn\'t called yet!'); + } + + return $this->classes; + } + +// /** +// * @inheritdoc +// */ +// public function getFunctions(): array +// { +// if ($this->functions === null) { +// throw new \BadMethodCallException('BetterReflectionParser::parse wasn\'t called yet!'); +// } +// +// return $this->functions; +// } + +// /** +// * @inheritDoc +// */ +// public function getConstants(): array +// { +// if ($this->constants === null) { +// throw new \BadMethodCallException('BetterReflectionParser::parse wasn\'t called yet!'); +// } +// +// return $this->constants; +// } + + /** + * @inheritdoc + */ + public function getAliases(string $classOrFunctionName, string $type): array + { + if ($this->aliases === null) { + throw new \BadMethodCallException('BetterReflectionParser::parse wasn\'t called yet!'); + } + + if (!\array_key_exists($classOrFunctionName, $this->aliases[$type])) { + throw new \InvalidArgumentException(\sprintf( + 'Unknown class or function "%s"!', + $classOrFunctionName + )); + } + + return $this->aliases[$type][$classOrFunctionName]; + } +} diff --git a/src/Parser/BetterReflection/FileListSourceLocator.php b/src/Parser/BetterReflection/FileListSourceLocator.php new file mode 100644 index 0000000..af2d08c --- /dev/null +++ b/src/Parser/BetterReflection/FileListSourceLocator.php @@ -0,0 +1,83 @@ +memoize[$identifierType->getName()] = []; + $this->remainingFiles[$identifierType->getName()] = $this->fileList; + } + + protected function continueBuildMap(Reflector $reflector, IdentifierType $identifierType) + { + while ( + \array_key_exists($identifierType->getName(), $this->remainingFiles) + && $file = array_shift($this->remainingFiles[$identifierType->getName()]) + ) { + $locatedSource = new LocatedSource( + file_get_contents($file), + '*', + $file, + ); + + $reflections = $this->astLocator->findReflectionsOfType( + $reflector, + $locatedSource, + $identifierType, + ); + + foreach ($reflections as $reflection) { + $this->memoize[$identifierType->getName()][$reflection->getName()] = $reflection; + } + } + unset($this->remainingFiles[$identifierType->getName()]); + } + + public function locateIdentifier(Reflector $reflector, Identifier $identifier): ?Reflection + { + if (!\array_key_exists($identifier->getType()->getName(), $this->memoize)) { + $this->buildFileMap($identifier->getType()); + } + if (\array_key_exists($identifier->getType()->getName(), $this->remainingFiles)) { + $this->continueBuildMap($reflector, $identifier->getType()); + } + + if (\array_key_exists($identifier->getName(), $this->memoize[$identifier->getType()->getName()])) { + return $this->memoize[$identifier->getType()->getName()][$identifier->getName()]; + } + + return null; + } + + public function locateIdentifiersByType(Reflector $reflector, IdentifierType $identifierType): array + { + if (!\array_key_exists($identifierType->getName(), $this->memoize)) { + $this->buildFileMap($identifierType); + } + if (\array_key_exists($identifierType->getName(), $this->remainingFiles)) { + $this->continueBuildMap($reflector, $identifierType); + } + + return $this->memoize[$identifierType->getName()]; + } +} diff --git a/src/Parser/BetterReflection/PriorizingReflector.php b/src/Parser/BetterReflection/PriorizingReflector.php new file mode 100644 index 0000000..7978409 --- /dev/null +++ b/src/Parser/BetterReflection/PriorizingReflector.php @@ -0,0 +1,147 @@ +mainSourceLocator->locateIdentifier($this, $identifier); + + if ($classInfo === null) { + $classInfo = $this->secondarySourceLocator->locateIdentifier($this, $identifier); + } + + if ($classInfo === null) { + throw IdentifierNotFound::fromIdentifier($identifier); + } + + assert($classInfo instanceof ReflectionClass); + + return $classInfo; + } + + /** + * Get all the classes available in the scope specified by the MainSourceLocator. + * + * @return list + */ + public function reflectAllClasses(): iterable + { + /** @var list $allClasses */ + $allClasses = $this->mainSourceLocator->locateIdentifiersByType( + $this, + new IdentifierType(IdentifierType::IDENTIFIER_CLASS), + ); + + return $allClasses; + } + + /** + * Create a ReflectionFunction for the specified $functionName. + * + * @throws IdentifierNotFound + */ + public function reflectFunction(string $identifierName): ReflectionFunction + { + $identifier = new Identifier($identifierName, new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION)); + + $functionInfo = $this->mainSourceLocator->locateIdentifier($this, $identifier); + + if ($functionInfo === null) { + $functionInfo = $this->secondarySourceLocator->locateIdentifier($this, $identifier); + } + + if ($functionInfo === null) { + throw IdentifierNotFound::fromIdentifier($identifier); + } + + assert($functionInfo instanceof ReflectionFunction); + + return $functionInfo; + } + + /** + * Get all the functions available in the scope specified by the MainSourceLocator. + * + * @return list + */ + public function reflectAllFunctions(): iterable + { + /** @var list $allFunctions */ + $allFunctions = $this->mainSourceLocator->locateIdentifiersByType( + $this, + new IdentifierType(IdentifierType::IDENTIFIER_FUNCTION), + ); + + return $allFunctions; + } + + /** + * Create a ReflectionConstant for the specified $constantName. + * + * @throws IdentifierNotFound + */ + public function reflectConstant(string $identifierName): ReflectionConstant + { + $identifier = new Identifier($identifierName, new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT)); + + $constantInfo = $this->mainSourceLocator->locateIdentifier($this, $identifier); + + if ($constantInfo === null) { + $constantInfo = $this->secondarySourceLocator->locateIdentifier($this, $identifier); + } + + if ($constantInfo === null) { + throw IdentifierNotFound::fromIdentifier($identifier); + } + + assert($constantInfo instanceof ReflectionConstant); + + return $constantInfo; + } + + /** + * Get all the constants available in the scope specified by the MainSourceLocator. + * + * @return list + */ + public function reflectAllConstants(): iterable + { + /** @var list $allConstants */ + $allConstants = $this->mainSourceLocator->locateIdentifiersByType( + $this, + new IdentifierType(IdentifierType::IDENTIFIER_CONSTANT), + ); + + return $allConstants; + } +} diff --git a/src/Parser/BetterReflection/ReflectionNamespace/FindNamespaceUsesInTree.php b/src/Parser/BetterReflection/ReflectionNamespace/FindNamespaceUsesInTree.php new file mode 100644 index 0000000..599fb40 --- /dev/null +++ b/src/Parser/BetterReflection/ReflectionNamespace/FindNamespaceUsesInTree.php @@ -0,0 +1,90 @@ +currentNamespace = $node; + } + + return null; + } + + /** + * {@inheritDoc} + */ + public function leaveNode(Node $node) + { + if ($node instanceof Use_ && $this->currentNamespace === null) { + $this->currentUnassignedUses[] = $node; + + return null; + } + + if ( + ($this->identifierType->isClass() && $node instanceof Node\Stmt\ClassLike && $node->name !== null) + || ($this->identifierType->isFunction() && $node instanceof Node\Stmt\Function_) + ) { + if ($this->currentNamespace === null) { + $this->currentNamespace = new Namespace_(null, $this->currentUnassignedUses); + } + + if ($this->currentNamespace->name !== null) { + $name = $this->currentNamespace->name->toString() . '\\' . $node->name->toString(); + } else { + $name = $node->name->toString(); + } + + $this->uses[$name] = (new ReflectionFileNamespace($this->currentNamespace))->getNamespaceAliases(); + + return null; + } + +// if ($this->identifierType->isConstant() && $node instanceof Node\Stmt\Const_) { +// } + + if ($node instanceof Namespace_) { + $this->currentNamespace = null; + } + + return null; + } + + public function getAliases(): array + { + return $this->uses; + } + }; + + $nodeTraverser = new NodeTraverser($nodeVisitor); + $nodeTraverser->traverse($ast); + + return $nodeVisitor->getAliases(); + } +} diff --git a/src/Parser/BetterReflection/ReflectionNamespace/ReflectionFileNamespace.php b/src/Parser/BetterReflection/ReflectionNamespace/ReflectionFileNamespace.php new file mode 100644 index 0000000..5447247 --- /dev/null +++ b/src/Parser/BetterReflection/ReflectionNamespace/ReflectionFileNamespace.php @@ -0,0 +1,90 @@ +namespaceNode = $namespaceNode; + } + + /** + * Gets namespace name + */ + public function getName(): string + { + $nameNode = $this->namespaceNode->name; + + return $nameNode ? $nameNode->toString() : ''; + } + + /** + * Returns a list of namespace aliases + */ + public function getNamespaceAliases(): array + { + if (!isset($this->fileNamespaceAliases)) { + $this->fileNamespaceAliases = $this->findNamespaceAliases(); + } + + return $this->fileNamespaceAliases; + } + + /** + * Returns an AST-node for namespace + */ + public function getNode(): ?Namespace_ + { + return $this->namespaceNode; + } + + /** + * Searches for namespace aliases for the current block + */ + private function findNamespaceAliases(): array + { + $namespaceAliases = []; + + // aliases can be only top-level nodes in the namespace, so we can scan them directly + foreach ($this->namespaceNode->stmts as $namespaceLevelNode) { + if ($namespaceLevelNode instanceof Use_) { + $useAliases = $namespaceLevelNode->uses; + if (!empty($useAliases)) { + foreach ($useAliases as $useNode) { + $namespaceAliases[$useNode->name->toString()] = (string) $useNode->getAlias(); + } + } + } + } + + return $namespaceAliases; + } +} diff --git a/src/Parser/GoaopParserReflection/ClassListLocator.php b/src/Parser/GoaopParserReflection/ClassListLocator.php deleted file mode 100644 index 6cd911c..0000000 --- a/src/Parser/GoaopParserReflection/ClassListLocator.php +++ /dev/null @@ -1,35 +0,0 @@ -classMap = $classMap; - } - - public function locateClass($className) - { - if (\strpos($className, '\\') === 0) { - $className = \ltrim($className, '\\'); - } - - if (!isset($this->classMap[$className])) { - return false; - } - - return $this->classMap[$className]; - } -} diff --git a/src/Parser/GoaopParserReflection/GoaopParserReflectionParser.php b/src/Parser/GoaopParserReflection/GoaopParserReflectionParser.php deleted file mode 100644 index 8c7f247..0000000 --- a/src/Parser/GoaopParserReflection/GoaopParserReflectionParser.php +++ /dev/null @@ -1,172 +0,0 @@ -sources = $sources; - } - - /** - * @inheritdoc - */ - public function parse(): void - { - $this->resolveNamespaces(); - - $paths = \array_map(function (array $classes) { - return \array_map(function (ReflectionClass $reflectionClass) { - return $reflectionClass->getFileName(); - }, $classes); - }, $this->classes); - - $classMap = \array_merge(...\array_values($paths)); - $locator = new ClassListLocator($classMap); - ReflectionEngine::init($locator); - } - - /** - * @inheritdoc - */ - public function getClasses(): array - { - if ($this->classes === null) { - throw new \BadMethodCallException('GoaopParserReflectionParser::parse wasn\'t called yet!'); - } - - return $this->classes; - } - - /** - * @inheritdoc - */ - public function getFunctions(): array - { - if ($this->functions === null) { - throw new \BadMethodCallException('GoaopParserReflectionParser::parse wasn\'t called yet!'); - } - - return $this->functions; - } - - /** - * @inheritDoc - */ - public function getConstants(): array - { - if ($this->constants === null) { - throw new \BadMethodCallException('GoaopParserReflectionParser::parse wasn\'t called yet!'); - } - - return $this->constants; - } - - /** - * @inheritdoc - */ - public function getAliases(string $classOrFunctionName, string $type): array - { - if ($this->aliases === null) { - throw new \BadMethodCallException('GoaopParserReflectionParser::parse wasn\'t called yet!'); - } - - if (!\array_key_exists($classOrFunctionName, $this->aliases[$type])) { - throw new \InvalidArgumentException(\sprintf( - 'Unknown class or function "%s"!', - $classOrFunctionName - )); - } - - return $this->aliases[$type][$classOrFunctionName]; - } - - protected function resolveNamespaces(): void - { - $files = \array_map(function (ReaderInterface $source) { - return $source->getFiles(); - }, \array_values($this->sources)); - $files = \array_merge(...$files); - - $files = \array_map(function (string $file) { - return new ReflectionFile($file); - }, $files); - - $allFileNamespaces = \array_map(function (ReflectionFile $file) { - return $file->getFileNamespaces(); - }, $files); - - $classes = []; - $functions = []; - $constants = []; - $aliases = []; - foreach ($allFileNamespaces as $fileNamespaces) { - foreach ($fileNamespaces as $fileNamespace) { - /** - * @var ReflectionFileNamespace $fileNamespace - */ - $namespace = $fileNamespace->getName(); - $namespaceAliases = $fileNamespace->getNamespaceAliases(); - foreach ($fileNamespace->getClasses() as $class) { - $className = $class->getName(); - $classes[$namespace][$className] = $class; - $aliases[self::TYPE_CLASS][$className] = $namespaceAliases; - } - - foreach ($fileNamespace->getFunctions() as $function) { - $functionName = $function->getName(); - $functions[$namespace][$functionName] = $function; - $aliases[self::TYPE_FUNCTION][$functionName] = $namespaceAliases; - } - - foreach ($fileNamespace->getConstants(true) as $constantName => $constantValue) { - $constants[$namespace][$constantName] = $constantValue; - } - } - } - $this->classes = $classes; - $this->functions = $functions; - $this->constants = $constants; - $this->aliases = $aliases; - } -} diff --git a/src/Parser/ParserInterface.php b/src/Parser/ParserInterface.php index dcb3404..6be1562 100644 --- a/src/Parser/ParserInterface.php +++ b/src/Parser/ParserInterface.php @@ -4,6 +4,8 @@ namespace setasign\PhpStubGenerator\Parser; +use ReflectionClass; + interface ParserInterface { public const TYPE_CLASS = 'class'; @@ -15,22 +17,22 @@ interface ParserInterface public function parse(): void; /** - * @return array Returns an array like this: ['NamespaceName' => \ReflectionClass[]] + * @return array Returns an array like this: ['NamespaceName' => ReflectionClass[]] * @throws \BadMethodCallException If parse wasn't called yet. */ public function getClasses(): array; - /** - * @return array Returns an array like this: ['NamespaceName' => \ReflectionFunction[]] - * @throws \BadMethodCallException If parse wasn't called yet. - */ - public function getFunctions(): array; - - /** - * @return array Returns an array like this: ['NamespaceName' => ['ConstantName' => 'ConstantValue']] - * @throws \BadMethodCallException If parse wasn't called yet. - */ - public function getConstants(): array; +// /** +// * @return array +// * @throws \BadMethodCallException If parse wasn't called yet. +// */ +// public function getFunctions(): array; +// +// /** +// * @return array +// * @throws \BadMethodCallException If parse wasn't called yet. +// */ +// public function getConstants(): array; /** * Returns an array with all use aliases for $classOrFunctionName. diff --git a/src/PhpStubGenerator.php b/src/PhpStubGenerator.php index f8fcbbb..93566e2 100644 --- a/src/PhpStubGenerator.php +++ b/src/PhpStubGenerator.php @@ -4,11 +4,8 @@ namespace setasign\PhpStubGenerator; -use ReflectionClass; -use ReflectionFunction; use setasign\PhpStubGenerator\Formatter\ClassFormatter; -use setasign\PhpStubGenerator\Formatter\FunctionFormatter; -use setasign\PhpStubGenerator\Parser\GoaopParserReflection\GoaopParserReflectionParser; +use setasign\PhpStubGenerator\Parser\BetterReflection\BetterReflectionParser; use setasign\PhpStubGenerator\Parser\ParserInterface; use setasign\PhpStubGenerator\Reader\ReaderInterface; @@ -39,11 +36,25 @@ class PhpStubGenerator */ public static bool $addClassConstantsVisibility = false; + /** + * If false the interface \Stringable won't be filtered out (the generated stubs require PHP >= 8.0). + * + * Within the cli tool can be set with the option "--includeStringable" + * + * @var bool + */ + public static bool $includeStringable = false; + /** * @var ReaderInterface[] */ private array $sources = []; + /** + * @var ReaderInterface[] + */ + private array $resolvingSources = []; + /** * @param string $name * @param ReaderInterface $reader @@ -61,17 +72,33 @@ public function removeSource(string $name): void unset($this->sources[$name]); } + /** + * @param string $name + * @param ReaderInterface $reader + */ + public function addResolvingSource(string $name, ReaderInterface $reader): void + { + $this->resolvingSources[$name] = $reader; + } + + /** + * @param string $name + */ + public function removeResolvingSource(string $name): void + { + unset($this->resolvingSources[$name]); + } + /** * @return ParserInterface */ public function getParser(): ParserInterface { - return new GoaopParserReflectionParser($this->sources); + return new BetterReflectionParser($this->sources, $this->resolvingSources); } /** * @return string - * @throws \ReflectionException */ public function generate(): string { @@ -82,9 +109,6 @@ public function generate(): string $parser = $this->getParser(); $parser->parse(); - /** - * @var ReflectionClass[] $classes - */ foreach ($parser->getClasses() as $namespace => $classes) { foreach ($classes as $class) { $isGlobalNamespace = $namespace === ''; @@ -99,22 +123,19 @@ public function generate(): string } } - /** - * @var ReflectionFunction[] $functions - */ - foreach ($parser->getFunctions() as $namespace => $functions) { - foreach ($functions as $function) { - $isGlobalNamespace = ($namespace === ''); - $result .= 'namespace' . (!$isGlobalNamespace ? ' ' . $namespace : '') . $n - . '{' . $n; - $result .= $this->formatNamespaceAliases( - $parser->getAliases($function->getName(), ParserInterface::TYPE_FUNCTION) - ); - $result .= $n - . (new FunctionFormatter($function))->format() - . '}' . $n . $n; - } - } +// foreach ($parser->getFunctions() as $namespace => $functions) { +// foreach ($functions as $function) { +// $isGlobalNamespace = ($namespace === ''); +// $result .= 'namespace' . (!$isGlobalNamespace ? ' ' . $namespace : '') . $n +// . '{' . $n; +// $result .= $this->formatNamespaceAliases( +// $parser->getAliases($function->getName(), ParserInterface::TYPE_FUNCTION) +// ); +// $result .= $n +// . (new FunctionFormatter($function))->format() +// . '}' . $n . $n; +// } +// } return $result; } @@ -133,7 +154,7 @@ protected function formatNamespaceAliases(array $aliases): string $alias = (string) $alias; $result .= $t . 'use ' . $fullName; - if ($alias !== \substr($fullName, -\strlen($alias))) { + if (!str_ends_with($fullName, $alias)) { $result .= ' as ' . $alias; } $result .= ';' . $n; diff --git a/src/Reader/SingleFile.php b/src/Reader/SingleFile.php new file mode 100644 index 0000000..be01514 --- /dev/null +++ b/src/Reader/SingleFile.php @@ -0,0 +1,23 @@ +filename)) { + throw new \InvalidArgumentException('File "' . $this->filename . '" does not exist.'); + } + } + + /** + * @inheritDoc + */ + public function getFiles(): array + { + return [$this->filename]; + } +} diff --git a/tests/unit/Formatter/ClassFormatterTest.php b/tests/unit/Formatter/ClassFormatterTest.php index 6c972c9..e5be136 100644 --- a/tests/unit/Formatter/ClassFormatterTest.php +++ b/tests/unit/Formatter/ClassFormatterTest.php @@ -6,6 +6,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use ReflectionClass; use setasign\PhpStubGenerator\Formatter\ClassFormatter; use setasign\PhpStubGenerator\PhpStubGenerator; @@ -13,7 +14,7 @@ class ClassFormatterTest extends TestCase { protected function createReflectionClassMock(): MockObject { - return $this->getMockBuilder(\ReflectionClass::class) + return $this->getMockBuilder(ReflectionClass::class) ->disableOriginalConstructor() ->onlyMethods([ 'getShortName', @@ -57,9 +58,8 @@ public function testSimpleClass(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ - $formatter = new ClassFormatter($reflectionClass); $expectedResult = $t . 'class TestClass' . $n . $t . '{' . $n . $t . '}' . $n; $this->assertSame($expectedResult, $formatter->format(true)); @@ -89,7 +89,7 @@ public function testSimpleInterface(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); @@ -121,7 +121,7 @@ public function testSimpleTrait(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); @@ -153,7 +153,7 @@ public function testSimpleAbstract(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); @@ -185,7 +185,7 @@ public function testSimpleFinal(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); @@ -308,7 +308,7 @@ public function testComplexClass(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); @@ -411,7 +411,7 @@ public function testComplexInterface(): void $reflectionClass->method('isUserDefined')->willReturn(true); /** - * @var \ReflectionClass $reflectionClass + * @var ReflectionClass $reflectionClass */ $formatter = new ClassFormatter($reflectionClass); diff --git a/tests/unit/Formatter/ConstantFormatterTest.php b/tests/unit/Formatter/ConstantFormatterTest.php index 70e2395..103e34b 100644 --- a/tests/unit/Formatter/ConstantFormatterTest.php +++ b/tests/unit/Formatter/ConstantFormatterTest.php @@ -6,14 +6,16 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -use setasign\PhpStubGenerator\Formatter\ConstantFormatter; +use ReflectionClass; +use ReflectionClassConstant; +use setasign\PhpStubGenerator\Formatter\ClassConstantFormatter; use setasign\PhpStubGenerator\PhpStubGenerator; class ConstantFormatterTest extends TestCase { protected function createReflectionConstMock(): MockObject { - return $this->getMockBuilder(\ReflectionClassConstant::class) + return $this->getMockBuilder(ReflectionClassConstant::class) ->onlyMethods([ 'getDocComment', 'getName', @@ -29,11 +31,11 @@ protected function createReflectionConstMock(): MockObject protected function createReflectionClassMock(): MockObject { - return $this->getMockBuilder(\ReflectionClass::class) + return $this->getMockBuilder(ReflectionClass::class) ->disableOriginalConstructor() ->onlyMethods([ 'getName', - 'getReflectionConstant', + 'getConstant', ]) ->getMock(); } @@ -50,7 +52,7 @@ public function testSimpleConstant(): void $const = $this->createReflectionConstMock(); $class->method('getName')->willReturn('TestClass'); - $class->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $class->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDocComment')->willReturn(false); $const->method('getName')->willReturn('SUPER_CONSTANT'); @@ -61,11 +63,11 @@ public function testSimpleConstant(): void $const->method('isPrivate')->willReturn(false); /** - * @var \ReflectionClass $class - * @var \ReflectionClassConstant $const + * @var ReflectionClass $class + * @var ReflectionClassConstant $const */ $expectedOutput = $t . $t . 'const SUPER_CONSTANT = true;' . $n . $n; - $this->assertSame($expectedOutput, (new ConstantFormatter('TestClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('TestClass', $const))->format()); } /** @@ -77,15 +79,15 @@ public function testConstantFromParent(): void $parentClass = $this->createReflectionClassMock(); $parentClass->method('getName')->willReturn('ParentClass'); - $parentClass->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $parentClass->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDeclaringClass')->willReturn($parentClass); /** - * @var \ReflectionClassConstant $const + * @var ReflectionClassConstant $const */ $expectedOutput = ''; - $this->assertSame($expectedOutput, (new ConstantFormatter('ImplementingClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('ImplementingClass', $const))->format()); } /** @@ -100,7 +102,7 @@ public function testConstantWithDocComment(): void $const = $this->createReflectionConstMock(); $class->method('getName')->willReturn('TestClass'); - $class->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $class->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDocComment')->willReturn(<<method('isPrivate')->willReturn(false); /** - * @var \ReflectionClassConstant $const + * @var ReflectionClassConstant $const */ $expectedOutput = $t . $t . '/**' . $n . $t . $t . ' * This is just a cool test case!' . $n @@ -130,7 +132,7 @@ public function testConstantWithDocComment(): void . $t . $t . ' * @var bool' . $n . $t . $t . ' */' . $n . $t . $t . 'const SUPER_CONSTANT = true;' . $n . $n; - $this->assertSame($expectedOutput, (new ConstantFormatter('TestClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('TestClass', $const))->format()); } public function testPublicConstant(): void @@ -147,7 +149,7 @@ public function testPublicConstant(): void $const = $this->createReflectionConstMock(); $class->method('getName')->willReturn('TestClass'); - $class->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $class->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDocComment')->willReturn(false); $const->method('getName')->willReturn('SUPER_CONSTANT'); @@ -158,10 +160,10 @@ public function testPublicConstant(): void $const->method('isPrivate')->willReturn(false); /** - * @var \ReflectionClassConstant $const + * @var ReflectionClassConstant $const */ $expectedOutput = $t . $t . 'public const SUPER_CONSTANT = true;' . $n . $n; - $this->assertSame($expectedOutput, (new ConstantFormatter('TestClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('TestClass', $const))->format()); } public function testProtectedConstant(): void @@ -178,7 +180,7 @@ public function testProtectedConstant(): void $const = $this->createReflectionConstMock(); $class->method('getName')->willReturn('TestClass'); - $class->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $class->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDocComment')->willReturn(false); $const->method('getName')->willReturn('SUPER_CONSTANT'); @@ -189,10 +191,10 @@ public function testProtectedConstant(): void $const->method('isPrivate')->willReturn(false); /** - * @var \ReflectionClassConstant $const + * @var ReflectionClassConstant $const */ $expectedOutput = $t . $t . 'protected const SUPER_CONSTANT = true;' . $n . $n; - $this->assertSame($expectedOutput, (new ConstantFormatter('TestClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('TestClass', $const))->format()); } public function testPrivateConstant(): void @@ -209,7 +211,7 @@ public function testPrivateConstant(): void $const = $this->createReflectionConstMock(); $class->method('getName')->willReturn('TestClass'); - $class->method('getReflectionConstant')->with('SUPER_CONSTANT')->willReturn($const); + $class->method('getConstant')->with('SUPER_CONSTANT')->willReturn($const); $const->method('getDocComment')->willReturn(false); $const->method('getName')->willReturn('SUPER_CONSTANT'); @@ -220,9 +222,9 @@ public function testPrivateConstant(): void $const->method('isPrivate')->willReturn(true); /** - * @var \ReflectionClassConstant $const + * @var ReflectionClassConstant $const */ $expectedOutput = $t . $t . 'private const SUPER_CONSTANT = true;' . $n . $n; - $this->assertSame($expectedOutput, (new ConstantFormatter('TestClass', $const))->format()); + $this->assertSame($expectedOutput, (new ClassConstantFormatter('TestClass', $const))->format()); } } diff --git a/tests/unit/Formatter/FunctionFormatterTest.php b/tests/unit/Formatter/FunctionFormatterTest.php index 79aab34..d3b02e4 100644 --- a/tests/unit/Formatter/FunctionFormatterTest.php +++ b/tests/unit/Formatter/FunctionFormatterTest.php @@ -5,14 +5,18 @@ namespace setasign\PhpStubGenerator\Tests\unit\Formatter; use PHPUnit\Framework\TestCase; +use ReflectionFunction; +use ReflectionNamedType; +use ReflectionParameter; +use ReflectionType; use setasign\PhpStubGenerator\Formatter\FunctionFormatter; use setasign\PhpStubGenerator\PhpStubGenerator; class FunctionFormatterTest extends TestCase { - protected function createReflectionTypeMock(string $name, bool $allowsNull = false): \ReflectionType + protected function createReflectionTypeMock(string $name, bool $allowsNull = false): ReflectionNamedType { - $result = $this->getMockBuilder(\ReflectionType::class) + $result = $this->getMockBuilder(ReflectionNamedType::class) ->onlyMethods(['allowsNull', '__toString']) ->disableOriginalConstructor() ->getMock(); @@ -20,20 +24,19 @@ protected function createReflectionTypeMock(string $name, bool $allowsNull = fal $result->method('allowsNull')->willReturn($allowsNull); $result->method('__toString')->willReturn($name); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } protected function createReflectionParameterMock( string $name, - ?\ReflectionType $type, + ?ReflectionType $type, bool $hasDefault, - ?string $defaultConstant, + string $defaultConstant, $defaultValue, bool $isVariadic, bool $isPassedByReference - ): \ReflectionParameter { - $result = $this->getMockBuilder(\ReflectionParameter::class) + ): ReflectionParameter { + $result = $this->getMockBuilder(ReflectionParameter::class) ->onlyMethods([ 'getName', 'getType', @@ -51,7 +54,7 @@ protected function createReflectionParameterMock( $result->method('getType')->willReturn($type); $result->method('isDefaultValueAvailable')->willReturn($hasDefault); if ($hasDefault) { - $result->method('isDefaultValueConstant')->willReturn($defaultConstant !== null); + $result->method('isDefaultValueConstant')->willReturn($defaultConstant !== ''); $result->method('getDefaultValueConstantName')->willReturn($defaultConstant); $result->method('getDefaultValue')->willReturn($defaultValue); } else { @@ -68,17 +71,16 @@ protected function createReflectionParameterMock( $result->method('isVariadic')->willReturn($isVariadic); $result->method('isPassedByReference')->willReturn($isPassedByReference); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } protected function createReflectionFunctionMock( string $name, array $parameters, - ?\ReflectionType $returnType, + ?ReflectionType $returnType, ?string $doc - ): \ReflectionFunction { - $result = $this->getMockBuilder(\ReflectionFunction::class) + ): ReflectionFunction { + $result = $this->getMockBuilder(ReflectionFunction::class) ->onlyMethods([ 'getName', 'getParameters', @@ -102,7 +104,6 @@ protected function createReflectionFunctionMock( /** @noinspection ProperNullCoalescingOperatorUsageInspection */ $result->method('getDocComment')->willReturn($doc ?? false); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } @@ -162,7 +163,7 @@ public function testFunctionWithParams(): void 'a', $this->createReflectionTypeMock('stdClass'), false, - null, + '', null, false, false @@ -172,7 +173,7 @@ public function testFunctionWithParams(): void 'b', $this->createReflectionTypeMock('int', true), false, - null, + '', null, false, false @@ -192,7 +193,7 @@ public function testFunctionWithParams(): void 'd', null, true, - null, + '', 123, false, false @@ -215,7 +216,7 @@ public function testFunctionWithVariadicParam(): void 'a', $this->createReflectionTypeMock('int'), false, - null, + '', null, false, false @@ -225,7 +226,7 @@ public function testFunctionWithVariadicParam(): void 'b', null, false, - null, + '', null, true, false @@ -248,7 +249,7 @@ public function testFunctionWithPassedByReferenceParam(): void 'a', $this->createReflectionTypeMock('int'), false, - null, + '', null, false, true @@ -258,7 +259,7 @@ public function testFunctionWithPassedByReferenceParam(): void 'b', null, false, - null, + '', null, false, true @@ -281,7 +282,7 @@ public function testFunctionWithVariadicPassedByReferenceParam(): void 'a', $this->createReflectionTypeMock('int'), false, - null, + '', null, false, false @@ -291,7 +292,7 @@ public function testFunctionWithVariadicPassedByReferenceParam(): void 'b', null, false, - null, + '', null, true, true diff --git a/tests/unit/Formatter/MethodFormatterTest.php b/tests/unit/Formatter/MethodFormatterTest.php index 3874995..cf5e657 100644 --- a/tests/unit/Formatter/MethodFormatterTest.php +++ b/tests/unit/Formatter/MethodFormatterTest.php @@ -4,16 +4,20 @@ namespace setasign\PhpStubGenerator\Tests\unit\Formatter; -use ReflectionMethod; use PHPUnit\Framework\TestCase; +use ReflectionClass; +use ReflectionMethod; +use ReflectionNamedType; +use ReflectionParameter; +use ReflectionType; use setasign\PhpStubGenerator\Formatter\MethodFormatter; use setasign\PhpStubGenerator\PhpStubGenerator; class MethodFormatterTest extends TestCase { - protected function createReflectionTypeMock(string $name, bool $allowsNull = false): \ReflectionType + protected function createReflectionTypeMock(string $name, bool $allowsNull = false): ReflectionNamedType { - $result = $this->getMockBuilder(\ReflectionType::class) + $result = $this->getMockBuilder(ReflectionNamedType::class) ->onlyMethods(['allowsNull', '__toString']) ->disableOriginalConstructor() ->getMock(); @@ -21,20 +25,19 @@ protected function createReflectionTypeMock(string $name, bool $allowsNull = fal $result->method('allowsNull')->willReturn($allowsNull); $result->method('__toString')->willReturn($name); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } protected function createReflectionParameterMock( string $name, - ?\ReflectionType $type, + ?ReflectionType $type, bool $hasDefault, ?string $defaultConstant, $defaultValue, bool $isVariadic, bool $isPassedByReference - ): \ReflectionParameter { - $result = $this->getMockBuilder(\ReflectionParameter::class) + ): ReflectionParameter { + $result = $this->getMockBuilder(ReflectionParameter::class) ->onlyMethods([ 'getName', 'getType', @@ -53,7 +56,8 @@ protected function createReflectionParameterMock( $result->method('isDefaultValueAvailable')->willReturn($hasDefault); if ($hasDefault) { $result->method('isDefaultValueConstant')->willReturn($defaultConstant !== null); - $result->method('getDefaultValueConstantName')->willReturn($defaultConstant); + $result->method('getDefaultValueConstantName') + ->willReturn($defaultConstant !== null ? $defaultConstant : ''); $result->method('getDefaultValue')->willReturn($defaultValue); } else { $result->method('isDefaultValueConstant')->willThrowException( @@ -69,7 +73,6 @@ protected function createReflectionParameterMock( $result->method('isVariadic')->willReturn($isVariadic); $result->method('isPassedByReference')->willReturn($isPassedByReference); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } @@ -78,7 +81,7 @@ protected function createReflectionMethodMock( string $declaringClassName, int $modifiers, array $parameters, - ?\ReflectionType $returnType, + ?ReflectionType $returnType, ?string $doc ): ReflectionMethod { $result = $this->getMockBuilder(ReflectionMethod::class) @@ -101,7 +104,7 @@ protected function createReflectionMethodMock( $result->method('getName')->willReturn($name); - $declaringClass = $this->getMockBuilder(\ReflectionClass::class) + $declaringClass = $this->getMockBuilder(ReflectionClass::class) ->onlyMethods(['getName']) ->disableOriginalConstructor() ->getMock(); @@ -132,7 +135,6 @@ protected function createReflectionMethodMock( /** @noinspection ProperNullCoalescingOperatorUsageInspection */ $result->method('getDocComment')->willReturn($doc ?? false); - /** @noinspection PhpIncompatibleReturnTypeInspection */ return $result; } diff --git a/tests/unit/Formatter/PropertyFormatterTest.php b/tests/unit/Formatter/PropertyFormatterTest.php index 7c674d8..aab55c3 100644 --- a/tests/unit/Formatter/PropertyFormatterTest.php +++ b/tests/unit/Formatter/PropertyFormatterTest.php @@ -6,6 +6,8 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use ReflectionClass; +use ReflectionProperty; use setasign\PhpStubGenerator\Formatter\PropertyFormatter; use setasign\PhpStubGenerator\PhpStubGenerator; @@ -14,13 +16,13 @@ class PropertyFormatterTest extends TestCase protected function createReflectionPropertyMock( string $declaringClassName ): MockObject { - $declaringClass = $this->getMockBuilder(\ReflectionClass::class) + $declaringClass = $this->getMockBuilder(ReflectionClass::class) ->onlyMethods(['getName']) ->disableOriginalConstructor() ->getMock(); $declaringClass->method('getName')->willReturn($declaringClassName); - $property = $this->getMockBuilder(\ReflectionProperty::class) + $property = $this->getMockBuilder(ReflectionProperty::class) ->onlyMethods([ 'getName', 'isDefault', @@ -58,7 +60,7 @@ public function testSimpleProperty(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = $t . $t . 'public $test = 123;' . $n . $n; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -83,7 +85,7 @@ public function testProtectedProperty(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = $t . $t . 'protected $test = 123;' . $n . $n; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -108,7 +110,7 @@ public function testPrivateProperty(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = $t . $t . 'private $test = 123;' . $n . $n; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -133,7 +135,7 @@ public function testStaticProperty(): void $property->method('isStatic')->willReturn(true); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = $t . $t . 'public static $test = 123;' . $n . $n; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -155,7 +157,7 @@ public function testIsNotDefaultProperty(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = ''; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -180,7 +182,7 @@ public function testPropertyWithoutValue(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = $t . $t . 'public $test;' . $n . $n; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, null))->format()); @@ -202,7 +204,7 @@ public function testPropertyFromParent(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = ''; $this->assertSame($expectedOutput, (new PropertyFormatter('TestClass', $property, 123))->format()); @@ -236,7 +238,7 @@ public function testPropertyWithDoc(): void $property->method('isStatic')->willReturn(false); /** - * @var \ReflectionProperty $property + * @var ReflectionProperty $property */ $expectedOutput = '' . $t . $t . '/**' . $n diff --git a/tests/unit/Helper/FormatHelperTest.php b/tests/unit/Helper/FormatHelperTest.php index 36cac83..88f9db3 100644 --- a/tests/unit/Helper/FormatHelperTest.php +++ b/tests/unit/Helper/FormatHelperTest.php @@ -4,6 +4,7 @@ namespace setasign\PhpStubGenerator\Tests\unit\Helper; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use setasign\PhpStubGenerator\Helper\FormatHelper; @@ -12,7 +13,7 @@ class FormatHelperTest extends TestCase /** * @return array */ - public function indentDocBlockDataProvider(): array + public static function indentDocBlockDataProvider(): array { $t1 = ' '; $t2 = "\t"; @@ -48,13 +49,12 @@ public function indentDocBlockDataProvider(): array } /** - * @dataProvider indentDocBlockDataProvider - * * @param string $expectedOutput * @param string $block * @param int $tabCount * @param string $tabChar */ + #[DataProvider('indentDocBlockDataProvider')] public function testIndentDocBlock(string $expectedOutput, string $block, int $tabCount, string $tabChar): void { $this->assertSame( @@ -72,7 +72,7 @@ public function testIndentDocBlock(string $expectedOutput, string $block, int $t /** * @return array */ - public function formatValueDataProvider(): array + public static function formatValueDataProvider(): array { return [ ['\'\'', ''], @@ -91,11 +91,10 @@ public function formatValueDataProvider(): array } /** - * @dataProvider formatValueDataProvider - * * @param string $expectedOutput * @param string $value */ + #[DataProvider('formatValueDataProvider')] public function testFormatValue(string $expectedOutput, $value): void { $this->assertSame( diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index d4796e1..9509a8d 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,5 +1,5 @@ { "require-dev": { - "phpstan/phpstan": "^1.0" + "phpstan/phpstan": "^2.0" } } diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index 5f72149..5125e4b 100644 --- a/vendor-bin/phpstan/composer.lock +++ b/vendor-bin/phpstan/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6cacb25d8fa20e46dcdc5a4e4ec88acd", + "content-hash": "b58308a8fdaa607107d5b89691af6064", "packages": [], "packages-dev": [ { "name": "phpstan/phpstan", - "version": "1.12.11", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733" + "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", - "reference": "0d1fc20a962a91be578bcfe7cf939e6e1a2ff733", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6c98c7600fc717b2c78c11ef60040d5b1e359c82", + "reference": "6c98c7600fc717b2c78c11ef60040d5b1e359c82", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -63,7 +63,7 @@ "type": "github" } ], - "time": "2024-11-17T14:08:01+00:00" + "time": "2024-11-17T14:17:00+00:00" } ], "aliases": [], diff --git a/vendor-bin/phpunit/composer.json b/vendor-bin/phpunit/composer.json deleted file mode 100644 index b98c1d4..0000000 --- a/vendor-bin/phpunit/composer.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "require-dev": { - "phpunit/phpunit": "^9.0", - "php-defer/php-defer": "^5.0" - } -} diff --git a/vendor-bin/phpunit/composer.lock b/vendor-bin/phpunit/composer.lock deleted file mode 100644 index c8ee496..0000000 --- a/vendor-bin/phpunit/composer.lock +++ /dev/null @@ -1,1807 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "931858907e65e3126501846978d8d5e4", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.12.1", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" - }, - "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2024-11-08T17:47:46+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v5.3.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", - "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" - }, - "time": "2024-10-08T18:51:32+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "php-defer/php-defer", - "version": "v5.0.7", - "source": { - "type": "git", - "url": "https://github.com/php-defer/php-defer.git", - "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-defer/php-defer/zipball/9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", - "reference": "9f4183d6039e8337fefc3b5e73ed4ede58ee0bf7", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.inc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bartłomiej Krukowski", - "email": "bartlomiej@krukowski.me" - } - ], - "description": "Golang's defer statement for PHP", - "keywords": [ - "defer", - "golang" - ], - "support": { - "issues": "https://github.com/php-defer/php-defer/issues", - "source": "https://github.com/php-defer/php-defer/tree/v5.0.7" - }, - "time": "2023-09-21T16:38:54+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "9.2.32", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", - "theseer/tokenizer": "^1.2.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6" - }, - "suggest": { - "ext-pcov": "PHP extension that provides line coverage", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "9.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-08-22T04:23:01+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "3.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-12-02T12:48:52+00:00" - }, - { - "name": "phpunit/php-invoker", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-pcntl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Invoke callables with a timeout", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:58:55+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T05:33:50+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "5.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:16:10+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "9.6.21", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.5.0 || ^2", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", - "phar-io/manifest": "^2.0.4", - "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.6-dev" - } - }, - "autoload": { - "files": [ - "src/Framework/Assert/Functions.php" - ], - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" - }, - "funding": [ - { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" - } - ], - "time": "2024-09-19T10:50:18+00:00" - }, - { - "name": "sebastian/cli-parser", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for parsing CLI options", - "homepage": "https://github.com/sebastianbergmann/cli-parser", - "support": { - "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:27:43+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" - }, - { - "name": "sebastian/comparator", - "version": "4.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2022-09-14T12:41:17+00:00" - }, - { - "name": "sebastian/complexity", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for calculating the complexity of PHP code units", - "homepage": "https://github.com/sebastianbergmann/complexity", - "support": { - "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:19:30+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:30:58+00:00" - }, - { - "name": "sebastian/environment", - "version": "5.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:03:51+00:00" - }, - { - "name": "sebastian/exporter", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "https://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:33:00+00:00" - }, - { - "name": "sebastian/global-state", - "version": "5.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:35:11+00:00" - }, - { - "name": "sebastian/lines-of-code", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library for counting the lines of code in PHP source code", - "homepage": "https://github.com/sebastianbergmann/lines-of-code", - "support": { - "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-12-22T06:20:34+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "4.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:12:34+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:14:26+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "4.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "https://github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" - }, - { - "name": "sebastian/type", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:13:03+00:00" - }, - { - "name": "sebastian/version", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:39:44+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": {}, - "prefer-stable": false, - "prefer-lowest": false, - "platform": {}, - "platform-dev": {}, - "plugin-api-version": "2.6.0" -}