From b356dee94dab0e4c58f2a00b96064a610f5a155c Mon Sep 17 00:00:00 2001 From: Adrian Green Date: Wed, 24 Nov 2021 12:32:21 +1000 Subject: [PATCH 1/6] Removes a lot of bloat, adds .gitattributes, php ^7.4 and ^8.0, phpunit 9 compat, minor code refactoring --- .gitattributes | 4 + .travis.yml | 11 - README.md | 31 +- composer.json | 19 +- composer.lock | 1577 ++++++++++++------ phpunit.xml | 15 +- sonar-project.properties | 14 - src/Exceptions/UnknownExtensionException.php | 4 +- src/Exceptions/UnknownMethodException.php | 4 +- src/Extensions/AbstractExtension.php | 8 +- src/Extensions/Conditions.php | 17 +- src/Extensions/Convention.php | 111 +- src/Extensions/Hashes.php | 10 +- src/Extensions/Lister.php | 12 +- src/Extensions/Loader.php | 43 +- src/Extensions/Manipulator.php | 34 +- src/Extensions/Parser.php | 6 +- src/Extensions/Process.php | 10 +- src/Extensions/Properties.php | 6 +- src/Extensions/Transformer.php | 10 +- src/Extensions/Url.php | 10 +- src/StringBuffer.php | 61 +- tests/Extensions/ConditionsTest.php | 10 +- tests/Extensions/HashesTest.php | 10 +- tests/Extensions/ListerTest.php | 8 +- tests/Extensions/LoaderTest.php | 12 +- tests/Extensions/ManipulatorTest.php | 8 +- tests/Extensions/ProcessTest.php | 8 +- tests/Extensions/PropertiesTest.php | 8 +- tests/Extensions/TransformerTest.php | 14 +- tests/Extensions/UrlTest.php | 8 +- tests/StringBufferTest.php | 18 +- tests/TestCase.php | 6 +- tests/docs/testdox.txt | 66 - 34 files changed, 1378 insertions(+), 815 deletions(-) create mode 100644 .gitattributes delete mode 100644 .travis.yml delete mode 100644 sonar-project.properties diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..39299b7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +/tests export-ignore +/phpunit.xml export-ignore +/travis.yml export-ignore + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9e52ef6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: php -php: -- 7.0 -addons: - sonarcloud: - organization: simlux - token: - secure: -before_script: composer install -script: - - phpunit --configuration phpunit.xml --coverage-text \ No newline at end of file diff --git a/README.md b/README.md index a21fbf9..d9b1baa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# StringBuffer [![Build Status](https://travis-ci.org/simlux/string-buffer.svg?branch=master)](https://travis-ci.org/simlux/string-buffer) +# StringBuffer Manipulate strings object oriented. ## Installation @@ -21,7 +21,7 @@ echo $buffer->toString(); // footestbar // with factory method StringBuffer::create('Test') // Test ->append('Bar') // TestBar -    ->prepend('Foo'); // FooTestBar + ->prepend('Foo'); // FooTestBar StringBuffer::create('Test') // Test ->appendIf(true, 'AppendIf', 'AppendElse'); // TestAppendIf @@ -39,30 +39,3 @@ StringBuffer::create('Test') // Test StringBuffer::create('Test') // Test ->remove('es'); // Tt ``` - -## SonarQube -### Docker Repository: https://hub.docker.com/_/sonarqube/ -```sh -docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube -``` - -### Sonar Runner via Docker -```sh -docker run --link sonarqube \ - --entrypoint /opt/sonar-runner-2.4/bin/sonar-runner \ - -e SONAR_USER_HOME=/data/.sonar-cache \ - -v $(pwd):/data -u $(id -u) sebp/sonar-runner \ - -Dsonar.host.url=http://sonarqube:9000 \ - -Dsonar.jdbc.url=jdbc:h2:tcp://sonarqube/sonar \ - -Dsonar.jdbc.username=sonar \ - -Dsonar.jdbc.password=sonar \ - -Dsonar.jdbc.driverClassName=org.h2.Driver \ - -Dsonar.embeddedDatabase.port=9092 -``` - -### Sonar Runner: https://docs.sonarqube.org/display/SONARQUBE45/Installing+and+Configuring+SonarQube+Runner -```sh -wget http://repo1.maven.org/maven2/org/codehaus/sonar/runner/sonar-runner-dist/2.4/sonar-runner-dist-2.4.zip -unzip sonar-runner-dist-2.4.zip -./sonar-runner-2.4/bin/sonar-runner -``` diff --git a/composer.json b/composer.json index fa26be6..dbd822f 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { - "name": "simlux/string-buffer", + "name": "adriangreen/string-buffer", "description": "Handle strings object oriented.", "type": "library", "keywords": ["php", "string"], - "homepage": "https://github.com/simlux/string-buffer", + "homepage": "https://github.com/agwd/string-buffer", "license": "MIT", "authors": [ { @@ -12,23 +12,24 @@ } ], "support": { - "issues": "https://github.com/simlux/string-buffer/issues", - "source": "https://github.com/simlux/string-buffer" + "issues": "https://github.com/agwd/string-buffer/issues", + "source": "https://github.com/agwd/string-buffer" }, "minimum-stability": "stable", "require": { - "php": "^7.0", - "illuminate/support": "^5.4" + "php": "^7.4 || ^8.0", + "ext-ctype": "*", + "ext-mbstring": "*" }, "require-dev": { - "phpunit/phpunit": ">=5.0 <5.4" + "phpunit/phpunit": "^9.0" }, "autoload": { "psr-4": { - "Simlux\\String\\": "src/" + "AdrianGreen\\String\\": "src/" } }, "autoload-dev": { - "psr-4": {"Simlux\\String\\Test\\": "tests/"} + "psr-4": {"AdrianGreen\\String\\Test\\": "tests/"} } } diff --git a/composer.lock b/composer.lock index 9ae5866..107a29f 100644 --- a/composer.lock +++ b/composer.lock @@ -1,40 +1,42 @@ { "_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#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0ff301862bdfcdca01cdbd685b357f4e", - "packages": [ + "content-hash": "17800a8dd27f92cd1ad403bb73db0102", + "packages": [], + "packages-dev": [ { - "name": "doctrine/inflector", - "version": "v1.2.0", + "name": "doctrine/instantiator", + "version": "1.4.0", "source": { "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -43,312 +45,288 @@ ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" + "constructor", + "instantiate" ], - "time": "2017-07-22T12:18:28+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v5.4.27", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", - "shasum": "" - }, - "require": { - "php": ">=5.6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" } ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "time": "2017-04-19T20:17:43+00:00" + "time": "2020-11-10T18:47:58+00:00" }, { - "name": "illuminate/support", - "version": "v5.4.27", + "name": "myclabs/deep-copy", + "version": "1.10.2", "source": { "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", - "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "php": "^7.1 || ^8.0" }, "replace": { - "tightenco/collect": "self.version" + "myclabs/deep-copy": "self.version" }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, "autoload": { "psr-4": { - "Illuminate\\Support\\": "" + "DeepCopy\\": "src/DeepCopy/" }, "files": [ - "helpers.php" + "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" } ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "time": "2017-06-15T12:35:32+00:00" + "time": "2020-11-13T09:40:50+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", + "name": "nikic/php-parser", + "version": "v4.13.1", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", "shasum": "" }, "require": { - "php": ">=5.2.0" + "ext-tokenizer": "*", + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "Nikita Popov" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "A PHP parser written in PHP", "keywords": [ - "csprng", - "pseudorandom", - "random" + "parser", + "php" ], - "time": "2017-03-13T16:27:32+00:00" - } - ], - "packages-dev": [ + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + }, + "time": "2021-11-03T20:52:16+00:00" + }, { - "name": "doctrine/instantiator", - "version": "1.0.5", + "name": "phar-io/manifest", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", + "ext-dom": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "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": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.6.1", + "name": "phar-io/version", + "version": "3.1.0", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "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" + } ], - "time": "2017-04-12T18:52:22+00:00" + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -370,38 +348,46 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/4aada1f93c72c35e22fb1383b47fee43b8f1d157", - "reference": "4aada1f93c72c35e22fb1383b47fee43b8f1d157", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.3.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -412,44 +398,50 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-08T06:39:58+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.3.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fb3933512008d8162b3cdf9e18dba9309b7c3773", - "reference": "fb3933512008d8162b3cdf9e18dba9309b7c3773", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -462,42 +454,47 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-06-03T08:32:36+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + }, + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.7.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -525,44 +522,52 @@ "spy", "stub" ], - "time": "2017-03-02T20:05:34+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "3.3.3", + "version": "9.2.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "44cd8e3930e431658d1a5de7d282d5cb37837fd5" + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/44cd8e3930e431658d1a5de7d282d5cb37837fd5", - "reference": "44cd8e3930e431658d1a5de7d282d5cb37837fd5", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0|~2.0" + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.13.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -577,7 +582,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -588,29 +593,42 @@ "testing", "xunit" ], - "time": "2016-05-27T16:24:29+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-19T15:21:02+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -625,7 +643,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -635,26 +653,48 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "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/" @@ -671,37 +711,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], - "time": "2015-06-21T13:50:34+00:00" + "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-timer", - "version": "1.0.9", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -716,42 +766,51 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], - "time": "2017-02-26T11:10:40+00:00" + "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-token-stream", - "version": "1.4.11", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -766,56 +825,78 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "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": "2017-02-27T10:12:30+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "5.3.5", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "08c513bfcab57f3dd72f5214c1c3940439fae7fe" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08c513bfcab57f3dd72f5214c1c3940439fae7fe", - "reference": "08c513bfcab57f3dd72f5214c1c3940439fae7fe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": ">=3.3.0,<4.0.0", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": ">=3.1.0,<3.2.0", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-soap": "*", + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -823,12 +904,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "9.5-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -849,38 +933,46 @@ "testing", "xunit" ], - "time": "2016-06-03T09:42:56+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-09-25T07:38:51+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "3.1.3", + "name": "sebastian/cli-parser", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "151c96874bff6fe61a25039df60e776613a61489" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/151c96874bff6fe61a25039df60e776613a61489", - "reference": "151c96874bff6fe61a25039df60e776613a61489", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.6", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "~5" - }, - "suggest": { - "ext-soap": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -895,42 +987,48 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } ], - "time": "2016-04-20T14:39:26+00:00" + "time": "2020-09-28T06:08:49+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -945,39 +1043,105 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "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": "1.2.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -990,6 +1154,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1001,45 +1169,109 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1052,46 +1284,62 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "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" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-05-22T07:24:03+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1116,34 +1364,44 @@ "environment", "hhvm" ], - "time": "2016-08-18T05:49:44+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1156,6 +1414,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1164,46 +1426,55 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -1211,7 +1482,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1234,33 +1505,101 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "1.0.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~1.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1280,32 +1619,97 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28T13:25:10+00:00" + "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": "1.0.5", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1318,14 +1722,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1333,29 +1737,42 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1375,29 +1792,96 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1418,43 +1902,54 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "symfony/yaml", - "version": "v3.3.6", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" + "php": ">=7.1" }, "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1463,43 +1958,120 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", - "time": "2017-07-23T12:43:26+00:00" + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -1523,7 +2095,11 @@ "check", "validate" ], - "time": "2016-11-23T20:04:58+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -1532,7 +2108,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.0" + "php": "^7.0 || ^8.0", + "ext-ctype": "*", + "ext-mbstring": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/phpunit.xml b/phpunit.xml index 52b30ec..17382b9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,18 +9,9 @@ processIsolation="false" stopOnFailure="false"> - + ./tests - - - ./src - - - - - - - - \ No newline at end of file + + diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 4457182..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,14 +0,0 @@ -sonar.projectKey=StringBuffer -sonar.projectName=StringBuffer -sonar.projectVersion=1.0 -sonar.sources=src -sonar.language=php -sonar.sourceEncoding=UTF-8 - -sonar.host.url=http://localhost:9000 -sonar.login=admin -sonar.password=admin - -sonar.tests=tests -sonar.php.tests.reportPaths=tests/docs/testdox.txt -sonar.php.coverage.reportPaths=tests/docs/coverage.xml \ No newline at end of file diff --git a/src/Exceptions/UnknownExtensionException.php b/src/Exceptions/UnknownExtensionException.php index 2507910..df52e39 100644 --- a/src/Exceptions/UnknownExtensionException.php +++ b/src/Exceptions/UnknownExtensionException.php @@ -1,7 +1,7 @@ string = $string; } -} \ No newline at end of file +} diff --git a/src/Extensions/Conditions.php b/src/Extensions/Conditions.php index c7f2354..891fe07 100644 --- a/src/Extensions/Conditions.php +++ b/src/Extensions/Conditions.php @@ -1,6 +1,11 @@ string->toString()), 0, strlen($string)) === strtolower($string); + return stripos($this->string->toString(), strtolower($string)) === 0; } - return substr($this->string->toString(), 0, strlen($string)) === $string; + return strpos($this->string->toString(), $string) === 0; } /** @@ -74,11 +79,11 @@ public function beginsWithOneOf(array $strings, bool $caseSensitive = true): boo * * @return bool */ - public function endsWith($string, $caseSensitive = true): bool + public function endsWith(string $string, bool $caseSensitive = true): bool { $length = strlen($string) * -1; if (!$caseSensitive) { - return substr(strtolower($this->string->toString()), $length) === strtolower($string); + return strtolower(substr($this->string->toString(), $length)) === strtolower($string); } return substr($this->string->toString(), $length) === $string; @@ -132,4 +137,4 @@ public function isOneOf(array $strings, bool $caseSensitive = true): bool return false; } -} \ No newline at end of file +} diff --git a/src/Extensions/Convention.php b/src/Extensions/Convention.php index 7de64f3..07af65a 100644 --- a/src/Extensions/Convention.php +++ b/src/Extensions/Convention.php @@ -1,12 +1,62 @@ string->setString(Str::camel($this->string->toString())); + $this->string->setString(static::camel($this->string->toString())); if ($ucFirst) { $this->string->ucFirst(); } @@ -22,6 +72,55 @@ public function camelCase(bool $ucFirst = false): StringBuffer return $this->string; } + /** + * Convert a value to studly caps case. + * + * @param string $value + * + * @return string + */ + public static function studly(string $value): string + { + $key = $value; + + if (isset(static::$studlyCache[$key])) { + return static::$studlyCache[$key]; + } + + $value = ucwords(\str_replace(['-', '_'], ' ', $value)); + + return static::$studlyCache[$key] = \str_replace(' ', '', $value); + } + + /** + * Convert a value to camel case. + * + * @param string $value + * + * @return string + */ + public static function camel(string $value): string + { + if (isset(static::$camelCache[$value])) { + return static::$camelCache[$value]; + } + + return static::$camelCache[$value] = lcfirst(static::studly($value)); + } + + /** + * Convert the given string to lower-case. + * + * @param string $value + * + * @return string + */ + public static function lower(string $value): string + { + return mb_strtolower($value, 'UTF-8'); + } + + /** * @param string $delimiter * @@ -29,7 +128,7 @@ public function camelCase(bool $ucFirst = false): StringBuffer */ public function snakeCase(string $delimiter = '_'): StringBuffer { - $this->string->setString(Str::snake($this->string->toString(), $delimiter)); + $this->string->setString(static::snake($this->string->toString(), $delimiter)); return $this->string; } @@ -64,4 +163,4 @@ public function ucWords(): StringBuffer return $this->string; } -} \ No newline at end of file +} diff --git a/src/Extensions/Hashes.php b/src/Extensions/Hashes.php index cafcd65..f114ff8 100644 --- a/src/Extensions/Hashes.php +++ b/src/Extensions/Hashes.php @@ -1,8 +1,8 @@ string->setString(md5($this->string->toString())); + $this->string->setString(\md5($this->string->toString())); return $this->string; } @@ -21,8 +21,8 @@ public function md5(): StringBuffer */ public function sha1(): StringBuffer { - $this->string->setString(sha1($this->string->toString())); + $this->string->setString(\sha1($this->string->toString())); return $this->string; } -} \ No newline at end of file +} diff --git a/src/Extensions/Lister.php b/src/Extensions/Lister.php index 3714472..cb659a0 100644 --- a/src/Extensions/Lister.php +++ b/src/Extensions/Lister.php @@ -1,6 +1,6 @@ string->toString()); + return \explode($delimiter, $this->string->toString()); } /** @@ -21,12 +21,12 @@ public function split(string $delimiter): array */ public function splitUppercase(bool $strToLower = false): array { - $parts = array_filter(preg_split('/(?=[A-Z])/', $this->string->toString())); + $parts = \array_filter(\preg_split('/(?=[A-Z])/', $this->string->toString())); if ($strToLower) { - $parts = array_map('strtolower', $parts); + $parts = \array_map('strtolower', $parts); } - return array_values($parts); + return \array_values($parts); } -} \ No newline at end of file +} diff --git a/src/Extensions/Loader.php b/src/Extensions/Loader.php index 086f178..5d54cfe 100644 --- a/src/Extensions/Loader.php +++ b/src/Extensions/Loader.php @@ -1,27 +1,26 @@ Convention::class, self::EXTENSION_CONDITIONS => Conditions::class, self::EXTENSION_HASHES => Hashes::class, @@ -37,17 +36,17 @@ class Loader /** * @var array */ - protected $extensionCache = []; + protected array $extensionCache = []; /** * @var array */ - protected $extensionMethods = []; + protected array $extensionMethods = []; /** * @var StringBuffer */ - private $string; + private StringBuffer $string; /** * Loader constructor. @@ -58,7 +57,7 @@ public function __construct(StringBuffer $string) { $this->string = $string; foreach ($this->classMap as $key => $class) { - $this->extensionMethods[ $key ] = get_class_methods($class); + $this->extensionMethods[ $key ] = \get_class_methods($class); } } @@ -70,7 +69,7 @@ public function __construct(StringBuffer $string) */ public function factory(string $extension): AbstractExtension { - if (!in_array($extension, array_keys($this->classMap))) { + if (!\array_key_exists($extension, $this->classMap)) { throw new UnknownExtensionException($extension); } @@ -89,7 +88,7 @@ public function factory(string $extension): AbstractExtension */ public function extensionHasMethod(string $extension, string $method): bool { - return in_array($method, $this->extensionMethods[ $extension ]); + return \in_array($method, $this->extensionMethods[$extension], true); } /** @@ -97,6 +96,6 @@ public function extensionHasMethod(string $extension, string $method): bool */ public function getExtensions(): array { - return array_keys($this->classMap); + return \array_keys($this->classMap); } -} \ No newline at end of file +} diff --git a/src/Extensions/Manipulator.php b/src/Extensions/Manipulator.php index 4ea214d..c78adce 100644 --- a/src/Extensions/Manipulator.php +++ b/src/Extensions/Manipulator.php @@ -1,8 +1,8 @@ string->setString(trim($this->string->toString(), $charList)); + return $this->string->setString(\trim($this->string->toString(), $charList)); } /** @@ -25,21 +25,21 @@ public function trim(string $charList = self::CHARLIST): StringBuffer */ public function trimLeft(string $charList = self::CHARLIST): StringBuffer { - return $this->string->setString(ltrim($this->string->toString(), $charList)); + return $this->string->setString(\ltrim($this->string->toString(), $charList)); } /** - * @param string $charList + * @param string|StringBuffer $charList * * @return StringBuffer */ public function trimRight(string $charList = self::CHARLIST): StringBuffer { - return $this->string->setString(rtrim($this->string->toString(), $charList)); + return $this->string->setString(\rtrim($this->string->toString(), $charList)); } /** - * @param string $string + * @param string|StringBuffer $string * @param bool $caseSensitive * * @return StringBuffer @@ -47,14 +47,14 @@ public function trimRight(string $charList = self::CHARLIST): StringBuffer public function cutLeft(string $string, bool $caseSensitive = false): StringBuffer { if ($this->string->beginsWith($string, $caseSensitive)) { - $this->string->setString(substr($this->string->toString(), strlen($string))); + $this->string->setString(\substr($this->string->toString(), strlen($string))); } return $this->string; } /** - * @param string $string + * @param string|StringBuffer $string * @param bool $caseSensitive * * @return StringBuffer @@ -62,15 +62,15 @@ public function cutLeft(string $string, bool $caseSensitive = false): StringBuff public function cutRight(string $string, bool $caseSensitive = false): StringBuffer { if ($this->string->endsWith($string, $caseSensitive)) { - $this->string->setString(substr($this->string->toString(), 0, strlen($string) * -1)); + $this->string->setString(\substr($this->string->toString(), 0, strlen($string) * -1)); } return $this->string; } /** - * @param string|array $search - * @param string|array $replace + * @param string|array|StringBuffer $search + * @param string|array|StringBuffer $replace * @param bool $caseSensitive * * @return StringBuffer @@ -78,14 +78,14 @@ public function cutRight(string $string, bool $caseSensitive = false): StringBuf public function replace($search, $replace, bool $caseSensitive = true): StringBuffer { if ($caseSensitive) { - return $this->string->setString(str_replace($search, $replace, $this->string)); - } else { - return $this->string->setString(str_ireplace($search, $replace, $this->string)); + return $this->string->setString(\str_replace($search, $replace, (string)$this->string)); } + + return $this->string->setString(\str_ireplace($search, $replace, (string)$this->string)); } /** - * @param string|array $string + * @param string|array|StringBuffer $string * @param bool $caseSensitive * * @return StringBuffer @@ -94,4 +94,4 @@ public function remove($string, bool $caseSensitive = true): StringBuffer { return $this->replace($string, '', $caseSensitive); } -} \ No newline at end of file +} diff --git a/src/Extensions/Parser.php b/src/Extensions/Parser.php index 8ada426..0b6af36 100644 --- a/src/Extensions/Parser.php +++ b/src/Extensions/Parser.php @@ -1,6 +1,6 @@ string]); + $then($this->string); } else { - call_user_func_array($else, [$this->string]); + $else($this->string); } return $this->string; } -} \ No newline at end of file +} diff --git a/src/Extensions/Properties.php b/src/Extensions/Properties.php index e64dae7..8d0796f 100644 --- a/src/Extensions/Properties.php +++ b/src/Extensions/Properties.php @@ -1,6 +1,6 @@ string->toString()); + return \mb_strlen($this->string->toString()); } -} \ No newline at end of file +} diff --git a/src/Extensions/Transformer.php b/src/Extensions/Transformer.php index a34a22c..f2f90bb 100644 --- a/src/Extensions/Transformer.php +++ b/src/Extensions/Transformer.php @@ -1,8 +1,8 @@ string->setString(strtolower($this->string->toString())); + return $this->string->setString(\strtolower($this->string->toString())); } /** @@ -19,7 +19,7 @@ public function toLower(): StringBuffer */ public function toUpper(): StringBuffer { - return $this->string->setString(strtoupper($this->string->toString())); + return $this->string->setString(\strtoupper($this->string->toString())); } /** @@ -37,4 +37,4 @@ public function toInteger(): int { return (int)$this->string->toString(); } -} \ No newline at end of file +} diff --git a/src/Extensions/Url.php b/src/Extensions/Url.php index eba8184..6deedb1 100644 --- a/src/Extensions/Url.php +++ b/src/Extensions/Url.php @@ -1,8 +1,12 @@ string->setString(base64_decode($this->string->toString())); } -} \ No newline at end of file +} diff --git a/src/StringBuffer.php b/src/StringBuffer.php index 8ff3d8b..0518293 100644 --- a/src/StringBuffer.php +++ b/src/StringBuffer.php @@ -1,16 +1,15 @@ loader->getExtensions() as $extension) { if ($this->loader->extensionHasMethod($extension, $name)) { - return call_user_func_array([$this->loader->factory($extension), $name], $arguments); + return \call_user_func_array([$this->loader->factory($extension), $name], $arguments); } } @@ -167,10 +166,10 @@ public function appendIf(bool $condition, string $string, string $else = null): { if ($condition) { return $this->append($string); - } else { - if (!is_null($else)) { - return $this->append($else); - } + } + + if (!is_null($else)) { + return $this->append($else); } return $this; @@ -199,10 +198,10 @@ public function prependIf(bool $condition, string $string, string $else = null): { if ($condition) { return $this->prepend($string); - } else { - if (!is_null($else)) { - return $this->prepend($else); - } + } + + if (!is_null($else)) { + return $this->prepend($else); } return $this; @@ -217,9 +216,9 @@ public function prependIf(bool $condition, string $string, string $else = null): public function substring(int $start, int $length = null): StringBuffer { if (is_null($length)) { - $this->string = substr($this->string, $start); + $this->string = \substr($this->string, $start); } else { - $this->string = substr($this->string, $start, $length); + $this->string = \substr($this->string, $start, $length); } return $this; @@ -233,12 +232,12 @@ public function substring(int $start, int $length = null): StringBuffer public function reverse(bool $utf8 = false): StringBuffer { if ($utf8) { - preg_match_all('/./us', $this->string, $matches); - $this->string = join('', array_reverse($matches[0])); + \preg_match_all('/./us', $this->string, $matches); + $this->string = \implode('', \array_reverse($matches[0])); } else { - $this->string = strrev($this->string); + $this->string = \strrev($this->string); } return $this; } -} \ No newline at end of file +} diff --git a/tests/Extensions/ConditionsTest.php b/tests/Extensions/ConditionsTest.php index 2003ed2..2f33912 100644 --- a/tests/Extensions/ConditionsTest.php +++ b/tests/Extensions/ConditionsTest.php @@ -1,10 +1,10 @@ assertSame($expected, $condition->equals($equals, $caseSensitive)); } -} \ No newline at end of file +} diff --git a/tests/Extensions/HashesTest.php b/tests/Extensions/HashesTest.php index 83a3e2a..bbe8d9e 100644 --- a/tests/Extensions/HashesTest.php +++ b/tests/Extensions/HashesTest.php @@ -1,10 +1,10 @@ assertSame(sha1('test'), StringBuffer::create('test')->sha1()->toString()); } -} \ No newline at end of file +} diff --git a/tests/Extensions/ListerTest.php b/tests/Extensions/ListerTest.php index 1b1b1ac..ca34013 100644 --- a/tests/Extensions/ListerTest.php +++ b/tests/Extensions/ListerTest.php @@ -1,9 +1,9 @@ assertSame(['Foo', 'Bar'], StringBuffer::create('FooBar')->splitUppercase(false)); $this->assertSame(['foo', 'bar'], StringBuffer::create('FooBar')->splitUppercase(true)); } -} \ No newline at end of file +} diff --git a/tests/Extensions/LoaderTest.php b/tests/Extensions/LoaderTest.php index 814d4cf..f7324fa 100644 --- a/tests/Extensions/LoaderTest.php +++ b/tests/Extensions/LoaderTest.php @@ -1,11 +1,11 @@ factory('foobar'); } -} \ No newline at end of file +} diff --git a/tests/Extensions/ManipulatorTest.php b/tests/Extensions/ManipulatorTest.php index 529c48f..7eceebf 100644 --- a/tests/Extensions/ManipulatorTest.php +++ b/tests/Extensions/ManipulatorTest.php @@ -1,9 +1,9 @@ assertSame($expected, StringBuffer::create($string)->remove($remove)->toString()); } -} \ No newline at end of file +} diff --git a/tests/Extensions/ProcessTest.php b/tests/Extensions/ProcessTest.php index 6f61aaa..0f126e3 100644 --- a/tests/Extensions/ProcessTest.php +++ b/tests/Extensions/ProcessTest.php @@ -1,9 +1,9 @@ assertSame('foobas', $buffer->toString()); } -} \ No newline at end of file +} diff --git a/tests/Extensions/PropertiesTest.php b/tests/Extensions/PropertiesTest.php index 37683d4..fbcb0c3 100644 --- a/tests/Extensions/PropertiesTest.php +++ b/tests/Extensions/PropertiesTest.php @@ -1,9 +1,9 @@ assertSame(4, StringBuffer::create('test')->length()); $this->assertSame(7, StringBuffer::create('ÄÖÜäöüß')->length()); } -} \ No newline at end of file +} diff --git a/tests/Extensions/TransformerTest.php b/tests/Extensions/TransformerTest.php index fc8ae06..dee6718 100644 --- a/tests/Extensions/TransformerTest.php +++ b/tests/Extensions/TransformerTest.php @@ -1,10 +1,10 @@ assertSame(1.23, StringBuffer::create('1.23')->toFloat()); - $this->assertInternalType('float', StringBuffer::create('1.23')->toFloat()); + $this->assertIsFloat(StringBuffer::create('1.23')->toFloat()); } public function testToInteger() { $this->assertSame(1, StringBuffer::create('1')->toInteger()); - $this->assertInternalType('int', StringBuffer::create('1.23')->toInteger()); + $this->assertIsInt(StringBuffer::create('1.23')->toInteger()); } -} \ No newline at end of file +} diff --git a/tests/Extensions/UrlTest.php b/tests/Extensions/UrlTest.php index 386c6b8..fd9b14a 100644 --- a/tests/Extensions/UrlTest.php +++ b/tests/Extensions/UrlTest.php @@ -1,9 +1,9 @@ assertSame(base64_decode('test'), StringBuffer::create('test')->base64Decode()->toString()); } -} \ No newline at end of file +} diff --git a/tests/StringBufferTest.php b/tests/StringBufferTest.php index f2921f0..4ee2b6e 100644 --- a/tests/StringBufferTest.php +++ b/tests/StringBufferTest.php @@ -1,11 +1,11 @@ assertSame('test', StringBuffer::create('test')->toString()); $this->assertSame('test', StringBuffer::create('test')->__toString()); - $this->assertInternalType('string', StringBuffer::create('test')->toString()); - $this->assertInternalType('string', StringBuffer::create('test')->__toString()); + $this->assertIsString(StringBuffer::create('test')->toString()); + $this->assertIsString(StringBuffer::create('test')->__toString()); } public function testSetString() @@ -153,7 +153,7 @@ public function dataProviderForTestSnakeCase(): array 2 => [ 'string' => 'test case', 'delimiter' => '_', - 'expected' => 'testcase', + 'expected' => 'test_case', ], 3 => [ 'string' => 'test Case', @@ -265,4 +265,4 @@ public function testUcWords(string $string, string $expected) { $this->assertSame($expected, StringBuffer::create($string)->ucWords()->toString()); } -} \ No newline at end of file +} diff --git a/tests/TestCase.php b/tests/TestCase.php index 5bcc1bd..ef6f062 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,8 +1,8 @@ Date: Wed, 24 Nov 2021 12:34:32 +1000 Subject: [PATCH 2/6] Updates composer.json --- composer.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composer.json b/composer.json index dbd822f..8c7b4c0 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,10 @@ "homepage": "https://github.com/agwd/string-buffer", "license": "MIT", "authors": [ + { + "name": "Adrian Green", + "email": "git@adriangreen.org" + }, { "name": "Simon Kleeschulte", "email": "simlux78@gmail.com" From 0b89a9e0813a5182d9371848f37f233027586cb3 Mon Sep 17 00:00:00 2001 From: Adrian Green Date: Wed, 24 Nov 2021 12:38:55 +1000 Subject: [PATCH 3/6] Tweak readme etc --- README.md | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9b1baa..2092d0b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # StringBuffer -Manipulate strings object oriented. +Manipulate strings similarly to Java StringBuffer. ## Installation The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json: ``` -composer require simlux/string-buffer +composer require adriangreen/string-buffer ``` ## Examples diff --git a/composer.json b/composer.json index 8c7b4c0..46702af 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "adriangreen/string-buffer", - "description": "Handle strings object oriented.", + "description": "Handle strings similarly to Java StringBuffer.", "type": "library", "keywords": ["php", "string"], "homepage": "https://github.com/agwd/string-buffer", From e85f281fa9e4260495837f02706a30a2b7427373 Mon Sep 17 00:00:00 2001 From: Adrian Green Date: Tue, 30 Nov 2021 10:11:15 +1000 Subject: [PATCH 4/6] reworked testing stuff --- .gitignore | 3 +- README.md | 34 ++- composer.json | 3 + phpunit.xml | 14 +- tests/StringBufferTest.php | 25 -- tests/docs/coverage.xml | 566 +++++++++++++++++++------------------ 6 files changed, 331 insertions(+), 314 deletions(-) diff --git a/.gitignore b/.gitignore index 5f7264c..415a859 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /vendor/ .idea phpunit -.sonar \ No newline at end of file +.sonar +.phpunit.result.cache diff --git a/README.md b/README.md index 2092d0b..de87bb6 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,49 @@ # StringBuffer + Manipulate strings similarly to Java StringBuffer. ## Installation -The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json: +For my own use and not on Packagist. + +Add to composer.json: ``` -composer require adriangreen/string-buffer + "require": { + "adriangreen/string-buffer": "^1", + ... + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/agwd/string-buffer.git" + }, + ... + ] ``` ## Examples + ```php append('bar'); $buffer->prepend('foo'); -echo $buffer->toString(); // footestbar +echo $buffer->toString(); // footestbar // with factory method StringBuffer::create('Test') // Test ->append('Bar') // TestBar ->prepend('Foo'); // FooTestBar -StringBuffer::create('Test') // Test - ->appendIf(true, 'AppendIf', 'AppendElse'); // TestAppendIf -StringBuffer::create('Test') // Test - ->appendIf(false, 'AppendIf', 'AppendElse'); // TestAppendElse +StringBuffer::create('Test') // Test + ->appendIf(true, 'AppendIf', 'AppendElse'); // TestAppendIf +StringBuffer::create('Test') // Test + ->appendIf(false, 'AppendIf', 'AppendElse'); // TestAppendElse -StringBuffer::create('Test') // Test - ->prependIf(true, 'PrependIf', 'PrependElse'); // PrependIfTest +StringBuffer::create('Test') // Test + ->prependIf(true, 'PrependIf', 'PrependElse'); // PrependIfTest StringBuffer::create('Test') // Test ->prependIf(false, 'PrependIf', 'PrependElse'); // PrependElseTest diff --git a/composer.json b/composer.json index 46702af..d3b2652 100644 --- a/composer.json +++ b/composer.json @@ -35,5 +35,8 @@ }, "autoload-dev": { "psr-4": {"AdrianGreen\\String\\Test\\": "tests/"} + }, + "scripts": { + "tests-with-clover-xdebug": "php -dxdebug.mode=coverage vendor/bin/phpunit " } } diff --git a/phpunit.xml b/phpunit.xml index 17382b9..5e75822 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,11 +7,21 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false"> + stopOnFailure="false" + cacheResultFile="tests/.phpunit.result.cache" + verbose="true" +> ./tests - + + + src + + + + + diff --git a/tests/StringBufferTest.php b/tests/StringBufferTest.php index 4ee2b6e..743cc40 100644 --- a/tests/StringBufferTest.php +++ b/tests/StringBufferTest.php @@ -10,31 +10,6 @@ class StringBufferTest extends TestCase { - public function testThatGetExtensionsThrowsException() - { - $this->markTestSkipped(); - - $this->expectException(UnknownExtensionException::class); - $this->expectExceptionMessage('foobar'); - - - $buffer = new StringBuffer('test'); - $loader = new Loader($buffer); - $loaderRef = new \ReflectionClass($loader); - $extensionsProp = $loaderRef->getProperty('extensionMethods'); - $extensionsProp->setAccessible(true); - $extensions = $extensionsProp->getValue($loaderRef); - $extensions['foobar'] = ['foobar']; - $extensionsProp->setValue($loader, $extensions); - - $bufferRef = new \ReflectionClass($buffer); - $loaderProp = $bufferRef->getProperty('loader'); - $loaderProp->setAccessible(true); - $loaderProp->setValue($buffer, $loader); - - $buffer->foobar(); - } - public function testCreateFactory() { $this->assertInstanceOf(StringBuffer::class, StringBuffer::create('')); diff --git a/tests/docs/coverage.xml b/tests/docs/coverage.xml index ccee2ee..ef29002 100644 --- a/tests/docs/coverage.xml +++ b/tests/docs/coverage.xml @@ -1,279 +1,293 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4a6549a1df466f42b357e0464f4ed09703153851 Mon Sep 17 00:00:00 2001 From: Adrian Green Date: Tue, 30 Nov 2021 11:02:11 +1000 Subject: [PATCH 5/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index de87bb6..65b671a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # StringBuffer +![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/AGWD/string-buffer) + Manipulate strings similarly to Java StringBuffer. ## Installation From cd9ceb0a7de278ca4a31c2b19c9b9a2b7efc1a12 Mon Sep 17 00:00:00 2001 From: Adrian Green Date: Tue, 30 Nov 2021 11:03:26 +1000 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65b671a..4217b97 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # StringBuffer -![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/AGWD/string-buffer) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/AGWD/string-buffer) Manipulate strings similarly to Java StringBuffer.