pax_global_header00006660000000000000000000000064135640102440014511gustar00rootroot0000000000000052 comment=fb41d077ff6ad3f7c58689990ae96ca249af83f3 php-doctrine-collections-1.6.4/000077500000000000000000000000001356401024400164315ustar00rootroot00000000000000php-doctrine-collections-1.6.4/.doctrine-project.json000066400000000000000000000003721356401024400226570ustar00rootroot00000000000000{ "active": true, "name": "Collections", "slug": "collections", "docsSlug": "doctrine-collections", "versions": [ { "name": "master", "branchName": "master", "slug": "latest", "aliases": [ "current", "stable" ] } ] } php-doctrine-collections-1.6.4/.gitignore000066400000000000000000000000501356401024400204140ustar00rootroot00000000000000vendor/ build/ /phpcs.xml /.phpcs-cache php-doctrine-collections-1.6.4/.scrutinizer.yml000066400000000000000000000002221356401024400216070ustar00rootroot00000000000000build: environment: php: version: 7.1.3 tools: external_code_coverage: timeout: 600 # Timeout in seconds. php-doctrine-collections-1.6.4/.travis.yml000066400000000000000000000025621356401024400205470ustar00rootroot00000000000000dist: trusty sudo: false language: php cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 - 7.4snapshot before_install: - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" - travis_retry composer self-update install: - rm composer.lock - travis_retry composer -n --prefer-source install script: ./vendor/bin/phpunit jobs: include: - stage: Test env: COVERAGE before_script: - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} - if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi script: - ./vendor/bin/phpunit --coverage-clover clover.xml after_script: - travis_retry wget https://scrutinizer-ci.com/ocular.phar - travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml - stage: Code Quality env: CODING_STANDARDS install: travis_retry composer install --prefer-dist script: ./vendor/bin/phpcs - stage: Code Quality env: STATIC_ANALYSIS install: travis_retry composer install --prefer-dist script: vendor/bin/phpstan analyse -l 3 lib - stage: Code Quality env: STATIC_ANALYSIS install: travis_retry composer install --prefer-dist script: vendor/bin/psalm php-doctrine-collections-1.6.4/CONTRIBUTING.md000066400000000000000000000035361356401024400206710ustar00rootroot00000000000000# Contribute to Doctrine Thank you for contributing to Doctrine! Before we can merge your Pull-Request here are some guidelines that you need to follow. These guidelines exist not to annoy you, but to keep the code base clean, unified and future proof. ## We only accept PRs to "master" Our branching strategy is "everything to master first", even bugfixes and we then merge them into the stable branches. You should only open pull requests against the master branch. Otherwise we cannot accept the PR. There is one exception to the rule, when we merged a bug into some stable branches we do occasionally accept pull requests that merge the same bug fix into earlier branches. ## Coding Standard We use the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard). ## Unit-Tests Please try to add a test for your pull-request. * If you want to contribute new functionality add unit- or functional tests depending on the scope of the feature. You can run the unit-tests by calling ``vendor/bin/phpunit`` from the root of the project. It will run all the project tests. In order to do that, you will need a fresh copy of doctrine/collections, and you will have to run a composer installation in the project: ```sh git clone git@github.com:doctrine/collections.git cd collections curl -sS https://getcomposer.org/installer | php -- ./composer.phar install ``` ## Travis We automatically run your pull request through [Travis CI](https://www.travis-ci.org) against supported PHP versions. If you break the tests, we cannot merge your code, so please make sure that your code is working before opening up a Pull-Request. ## Getting merged Please allow us time to review your pull requests. We will give our best to review everything as fast as possible, but cannot always live up to our own expectations. Thank you very much again for your contribution! php-doctrine-collections-1.6.4/LICENSE000066400000000000000000000020511356401024400174340ustar00rootroot00000000000000Copyright (c) 2006-2013 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. php-doctrine-collections-1.6.4/README.md000066400000000000000000000122271356401024400177140ustar00rootroot00000000000000# Doctrine Collections [![Build Status](https://travis-ci.org/doctrine/collections.svg?branch=master)](https://travis-ci.org/doctrine/collections) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/collections/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/collections/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/collections/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/collections/?branch=master) Collections Abstraction library ## Changelog ### v1.6.1 This release, combined with the release of [`doctrine/collections` `v1.6.1`](https://github.com/doctrine/collections/releases/tag/v1.6.1), fixes an issue where parsing annotations was not possible for classes within `doctrine/collections`. Specifically, `v1.6.0` introduced Psalm-specific annotations such as (for example) `@template` and `@template-implements`, which were both incorrectly recognized as `@template`. `@template` has therefore been removed, and instead we use the prefixed `@psalm-template`, which is no longer parsed by `doctrine/collections` `v1.6.1` Total issues resolved: **1** - [186: Use `@psalm-template` annotation to avoid clashes](https://github.com/doctrine/collections/pull/186) thanks to @muglug ### v1.6.0 This release bumps the minimum required PHP version to 7.1.3. Following improvements were introduced: * `ArrayCollection#filter()` now allows filtering by key, value or both. * When using the `ClosureExpressionVisitor` over objects with a defined accessor and property, the accessor is prioritised. * Updated testing tools and coding standards, autoloading, which also led to marginal performance improvements * Introduced generic type docblock declarations from [psalm](https://github.com/vimeo/psalm), which should allow users to declare `/** @var Collection */` in their code, and leverage the type propagation deriving from that. Total issues resolved: **16** - [127: Use PSR-4](https://github.com/doctrine/collections/pull/127) thanks to @Nyholm - [129: Remove space in method declaration](https://github.com/doctrine/collections/pull/129) thanks to @bounoable - [130: Update build to add PHPCS and PHPStan](https://github.com/doctrine/collections/pull/130) thanks to @lcobucci - [131: ClosureExpressionVisitor > Don't duplicate the accessor when the field already starts with it](https://github.com/doctrine/collections/pull/131) thanks to @ruudk - [139: Apply Doctrine CS 2.1](https://github.com/doctrine/collections/pull/139) thanks to @Majkl578 - [142: CS 4.0, version composer.lock, merge stages](https://github.com/doctrine/collections/pull/142) thanks to @Majkl578 - [144: Update to PHPUnit 7](https://github.com/doctrine/collections/pull/144) thanks to @carusogabriel - [146: Update changelog for v1.4.0 and v1.5.0](https://github.com/doctrine/collections/pull/146) thanks to @GromNaN - [154: Update index.rst](https://github.com/doctrine/collections/pull/154) thanks to @chraiet - [158: Extract Selectable method into own documentation section](https://github.com/doctrine/collections/pull/158) thanks to @SenseException - [160: Update homepage](https://github.com/doctrine/collections/pull/160) thanks to @Majkl578 - [165: Allow `ArrayCollection#filter()` to filter by key, value or both](https://github.com/doctrine/collections/issues/165) thanks to @0x13a - [167: Allow `ArrayCollection#filter()` to filter by key and also value](https://github.com/doctrine/collections/pull/167) thanks to @0x13a - [175: CI: Test against PHP 7.4snapshot instead of nightly (8.0)](https://github.com/doctrine/collections/pull/175) thanks to @Majkl578 - [177: Generify collections using Psalm](https://github.com/doctrine/collections/pull/177) thanks to @nschoellhorn - [178: Updated doctrine/coding-standard to 6.0](https://github.com/doctrine/collections/pull/178) thanks to @patrickjahns ### v1.5.0 * [Require PHP 7.1+](https://github.com/doctrine/collections/pull/105) * [Drop HHVM support](https://github.com/doctrine/collections/pull/118) ### v1.4.0 * [Require PHP 5.6+](https://github.com/doctrine/collections/pull/105) * [Add `ArrayCollection::createFrom()`](https://github.com/doctrine/collections/pull/91) * [Support non-camel-case naming](https://github.com/doctrine/collections/pull/57) * [Comparison `START_WITH`, `END_WITH`](https://github.com/doctrine/collections/pull/78) * [Comparison `MEMBER_OF`](https://github.com/doctrine/collections/pull/66) * [Add Contributing guide](https://github.com/doctrine/collections/pull/103) ### v1.3.0 * [Explicit casting of first and max results in criteria API](https://github.com/doctrine/collections/pull/26) * [Keep keys when using `ArrayCollection#matching()` with sorting](https://github.com/doctrine/collections/pull/49) * [Made `AbstractLazyCollection#$initialized` protected for extensibility](https://github.com/doctrine/collections/pull/52) ### v1.2.0 * Add a new ``AbstractLazyCollection`` ### v1.1.0 * Deprecated ``Comparison::IS``, because it's only there for SQL semantics. These are fixed in the ORM instead. * Add ``Comparison::CONTAINS`` to perform partial string matches: $criteria->andWhere($criteria->expr()->contains('property', 'Foo')); php-doctrine-collections-1.6.4/composer.json000066400000000000000000000024301356401024400211520ustar00rootroot00000000000000{ "name": "doctrine/collections", "type": "library", "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", "keywords": [ "php", "collections", "array", "iterators" ], "homepage": "https://www.doctrine-project.org/projects/collections.html", "license": "MIT", "authors": [ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, {"name": "Roman Borschel", "email": "roman@code-factory.org"}, {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { "php": "^7.1.3" }, "require-dev": { "phpunit/phpunit": "^7.0", "doctrine/coding-standard": "^6.0", "phpstan/phpstan-shim": "^0.9.2", "vimeo/psalm": "^3.2.2" }, "autoload": { "psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" } }, "autoload-dev": { "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } }, "extra": { "branch-alias": { "dev-master": "1.6.x-dev" } } } php-doctrine-collections-1.6.4/composer.lock000066400000000000000000003027261356401024400211440ustar00rootroot00000000000000{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "9089934b1d5718afcff78cb110ec244a", "packages": [], "packages-dev": [ { "name": "amphp/amp", "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", "reference": "7075ef7d74dbd32626bfd31c976b23055c3ade6a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/amphp/amp/zipball/7075ef7d74dbd32626bfd31c976b23055c3ade6a", "reference": "7075ef7d74dbd32626bfd31c976b23055c3ade6a", "shasum": "" }, "require": { "php": ">=7" }, "require-dev": { "amphp/phpunit-util": "^1", "friendsofphp/php-cs-fixer": "^2.3", "phpstan/phpstan": "^0.8.5", "phpunit/phpunit": "^6.0.9", "react/promise": "^2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { "Amp\\": "lib" }, "files": [ "lib/functions.php", "lib/Internal/functions.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bob Weinand", "email": "bobwei9@hotmail.com" }, { "name": "Niklas Keller", "email": "me@kelunik.com" }, { "name": "Daniel Lowrey", "email": "rdlowrey@php.net" }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" } ], "description": "A non-blocking concurrency framework for PHP applications.", "homepage": "http://amphp.org/amp", "keywords": [ "async", "asynchronous", "awaitable", "concurrency", "event", "event-loop", "future", "non-blocking", "promise" ], "time": "2018-12-11T10:31:37+00:00" }, { "name": "amphp/byte-stream", "version": "v1.5.1", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", "reference": "6bbfcb6f47e92577e739586ba0c87e867be70a23" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/amphp/byte-stream/zipball/6bbfcb6f47e92577e739586ba0c87e867be70a23", "reference": "6bbfcb6f47e92577e739586ba0c87e867be70a23", "shasum": "" }, "require": { "amphp/amp": "^2" }, "require-dev": { "amphp/php-cs-fixer-config": "dev-master", "amphp/phpunit-util": "^1", "friendsofphp/php-cs-fixer": "^2.3", "infection/infection": "^0.9.3", "phpunit/phpunit": "^6" }, "type": "library", "autoload": { "psr-4": { "Amp\\ByteStream\\": "lib" }, "files": [ "lib/functions.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Niklas Keller", "email": "me@kelunik.com" }, { "name": "Aaron Piotrowski", "email": "aaron@trowski.com" } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", "homepage": "http://amphp.org/byte-stream", "keywords": [ "amp", "amphp", "async", "io", "non-blocking", "stream" ], "time": "2018-12-27T18:08:06+00:00" }, { "name": "composer/xdebug-handler", "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", "reference": "d17708133b6c276d6e42ef887a877866b909d892" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", "reference": "d17708133b6c276d6e42ef887a877866b909d892", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0", "psr/log": "^1.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "autoload": { "psr-4": { "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "John Stevenson", "email": "john-stevenson@blueyonder.co.uk" } ], "description": "Restarts a process without xdebug.", "keywords": [ "Xdebug", "performance" ], "time": "2019-01-28T20:25:53+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.5.0", "source": { "type": "git", "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", "reference": "e749410375ff6fb7a040a68878c656c2e610b132" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132", "reference": "e749410375ff6fb7a040a68878c656c2e610b132", "shasum": "" }, "require": { "composer-plugin-api": "^1.0", "php": "^5.3|^7", "squizlabs/php_codesniffer": "^2|^3" }, "require-dev": { "composer/composer": "*", "phpcompatibility/php-compatibility": "^9.0", "sensiolabs/security-checker": "^4.1.0" }, "type": "composer-plugin", "extra": { "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Franck Nijhof", "email": "franck.nijhof@dealerdirect.com", "homepage": "http://www.frenck.nl", "role": "Developer / IT Manager" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", "homepage": "http://www.dealerdirect.com", "keywords": [ "PHPCodeSniffer", "PHP_CodeSniffer", "code quality", "codesniffer", "composer", "installer", "phpcs", "plugin", "qa", "quality", "standard", "standards", "style guide", "stylecheck", "tests" ], "time": "2018-10-26T13:21:45+00:00" }, { "name": "doctrine/coding-standard", "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/coding-standard.git", "reference": "d33f69eb98b25aa51ffe3a909f0ec77000af4701" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/coding-standard/zipball/d33f69eb98b25aa51ffe3a909f0ec77000af4701", "reference": "d33f69eb98b25aa51ffe3a909f0ec77000af4701", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", "php": "^7.1", "slevomat/coding-standard": "^5.0", "squizlabs/php_codesniffer": "^3.4.0" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { "dev-master": "6.0.x-dev" } }, "autoload": { "psr-4": { "Doctrine\\Sniffs\\": "lib/Doctrine/Sniffs" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, { "name": "Steve Müller", "email": "st.mueller@dzh-online.de" } ], "description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.", "homepage": "https://www.doctrine-project.org/projects/coding-standard.html", "keywords": [ "checks", "code", "coding", "cs", "doctrine", "rules", "sniffer", "sniffs", "standard", "style" ], "time": "2019-03-15T12:45:47+00:00" }, { "name": "doctrine/instantiator", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "^6.2.3", "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", "homepage": "http://ocramius.github.com/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://github.com/doctrine/instantiator", "keywords": [ "constructor", "instantiate" ], "time": "2017-07-22T11:58:36+00:00" }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", "reference": "241c470695366e7b83672be04ea0e64d8085a551" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/241c470695366e7b83672be04ea0e64d8085a551", "reference": "241c470695366e7b83672be04ea0e64d8085a551", "shasum": "" }, "require": { "netresearch/jsonmapper": "^1.0", "php": ">=7.0", "phpdocumentor/reflection-docblock": "^4.0.0" }, "require-dev": { "phpunit/phpunit": "^6.0.0" }, "type": "library", "autoload": { "psr-4": { "AdvancedJsonRpc\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "ISC" ], "authors": [ { "name": "Felix Becker", "email": "felix.b@outlook.com" } ], "description": "A more advanced JSONRPC implementation", "time": "2018-09-10T08:58:41+00:00" }, { "name": "felixfbecker/language-server-protocol", "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", "reference": "1bdd1bcc95428edf85ec04c7b558d0886c07280f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/1bdd1bcc95428edf85ec04c7b558d0886c07280f", "reference": "1bdd1bcc95428edf85ec04c7b558d0886c07280f", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpstan/phpstan": "*", "phpunit/phpunit": "^6.3", "squizlabs/php_codesniffer": "^3.1" }, "type": "library", "autoload": { "psr-4": { "LanguageServerProtocol\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "ISC" ], "authors": [ { "name": "Felix Becker", "email": "felix.b@outlook.com" } ], "description": "PHP classes for the Language Server Protocol", "keywords": [ "language", "microsoft", "php", "server" ], "time": "2018-09-25T11:42:25+00:00" }, { "name": "muglug/package-versions-56", "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/muglug/PackageVersions.git", "reference": "a67bed26deaaf9269a348e53063bc8d4dcc60ffd" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/muglug/PackageVersions/zipball/a67bed26deaaf9269a348e53063bc8d4dcc60ffd", "reference": "a67bed26deaaf9269a348e53063bc8d4dcc60ffd", "shasum": "" }, "require": { "composer-plugin-api": "^1.0", "php": "^5.6 || ^7.0" }, "require-dev": { "composer/composer": "^1.3", "ext-zip": "*", "phpunit/phpunit": "^5.7.5" }, "type": "composer-plugin", "extra": { "class": "Muglug\\PackageVersions\\Installer", "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { "Muglug\\PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com" }, { "name": "Abdul Malik Ikhsan", "email": "samsonasik@gmail.com" }, { "name": "Matt Brown", "email": "github@muglug.com" } ], "description": "A backport of ocramius/package-versions that supports php ^5.6. Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "time": "2018-03-26T03:22:13+00:00" }, { "name": "myclabs/deep-copy", "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", "phpunit/phpunit": "^4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" }, "files": [ "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", "keywords": [ "clone", "copy", "duplicate", "object", "object graph" ], "time": "2017-10-19T19:58:43+00:00" }, { "name": "netresearch/jsonmapper", "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", "reference": "3868fe1128ce1169228acdb623359dca74db5ef3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/3868fe1128ce1169228acdb623359dca74db5ef3", "reference": "3868fe1128ce1169228acdb623359dca74db5ef3", "shasum": "" }, "require": { "php": ">=5.6" }, "require-dev": { "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4", "squizlabs/php_codesniffer": "~1.5" }, "type": "library", "autoload": { "psr-0": { "JsonMapper": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "OSL-3.0" ], "authors": [ { "name": "Christian Weiske", "email": "cweiske@cweiske.de", "homepage": "http://github.com/cweiske/jsonmapper/", "role": "Developer" } ], "description": "Map nested JSON structures onto PHP classes", "time": "2017-11-28T21:30:01+00:00" }, { "name": "nikic/php-parser", "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5221f49a608808c1e4d436df32884cbc1b821ac0", "reference": "5221f49a608808c1e4d436df32884cbc1b821ac0", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { "dev-master": "4.2-dev" } }, "autoload": { "psr-4": { "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Nikita Popov" } ], "description": "A PHP parser written in PHP", "keywords": [ "parser", "php" ], "time": "2019-02-16T20:54:15+00:00" }, { "name": "openlss/lib-array2xml", "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/nullivex/lib-array2xml.git", "reference": "c8b5998a342d7861f2e921403f44e0a2f3ef2be0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/c8b5998a342d7861f2e921403f44e0a2f3ef2be0", "reference": "c8b5998a342d7861f2e921403f44e0a2f3ef2be0", "shasum": "" }, "require": { "php": ">=5.3.2" }, "type": "library", "autoload": { "psr-0": { "LSS": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], "authors": [ { "name": "Bryan Tong", "email": "contact@nullivex.com", "homepage": "http://bryantong.com" }, { "name": "Tony Butler", "email": "spudz76@gmail.com", "homepage": "http://openlss.org" } ], "description": "Array2XML conversion library credit to lalit.org", "homepage": "http://openlss.org", "keywords": [ "array", "array conversion", "xml", "xml conversion" ], "time": "2016-11-10T19:10:18+00:00" }, { "name": "phar-io/manifest", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", "phar-io/version": "^1.0.1", "php": "^5.6 || ^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "time": "2017-03-05T18:14:27+00:00" }, { "name": "phar-io/version", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, { "name": "php-cs-fixer/diff", "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.7.23 || ^6.4.3", "symfony/process": "^3.3" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "SpacePossum" } ], "description": "sebastian/diff v2 backport support for PHP5.6", "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ "diff" ], "time": "2018-02-15T16:58:55+00:00" }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { "php": ">=5.5" }, "require-dev": { "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Jaap van Otterdijk", "email": "opensource@ijaap.nl" } ], "description": "Common reflection classes used by phpdocumentor to reflect the code structure", "homepage": "http://www.phpdoc.org", "keywords": [ "FQSEN", "phpDocumentor", "phpdoc", "reflection", "static analysis" ], "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { "php": "^7.0", "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { "doctrine/instantiator": "~1.0.5", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { "mockery/mockery": "^0.9.4", "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpmyadmin/sql-parser", "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/phpmyadmin/sql-parser.git", "reference": "0eb16ef5e3acacbc792be336754e42d98791a33f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/0eb16ef5e3acacbc792be336754e42d98791a33f", "reference": "0eb16ef5e3acacbc792be336754e42d98791a33f", "shasum": "" }, "require": { "php": ">=5.3.0", "symfony/polyfill-mbstring": "^1.3" }, "conflict": { "phpmyadmin/motranslator": "<3.0" }, "require-dev": { "phpunit/php-code-coverage": "*", "phpunit/phpunit": "~4.8 || ~5.7 || ~6.5", "sami/sami": "^4.0" }, "suggest": { "ext-mbstring": "For best performance", "phpmyadmin/motranslator": "Translate messages to your favorite locale" }, "bin": [ "bin/highlight-query", "bin/lint-query" ], "type": "library", "autoload": { "psr-4": { "PhpMyAdmin\\SqlParser\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "authors": [ { "name": "The phpMyAdmin Team", "email": "developers@phpmyadmin.net", "homepage": "https://www.phpmyadmin.net/team/" } ], "description": "A validating SQL lexer and parser with a focus on MySQL dialect.", "homepage": "https://github.com/phpmyadmin/sql-parser", "keywords": [ "analysis", "lexer", "parser", "sql" ], "time": "2019-01-05T13:46:38+00:00" }, { "name": "phpspec/prophecy", "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", "sebastian/comparator": "^1.1|^2.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.7.x-dev" } }, "autoload": { "psr-0": { "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Konstantin Kudryashov", "email": "ever.zet@gmail.com", "homepage": "http://everzet.com" }, { "name": "Marcello Duarte", "email": "marcello.duarte@gmail.com" } ], "description": "Highly opinionated mocking framework for PHP 5.3+", "homepage": "https://github.com/phpspec/prophecy", "keywords": [ "Double", "Dummy", "fake", "mock", "spy", "stub" ], "time": "2018-02-19T10:16:54+00:00" }, { "name": "phpstan/phpdoc-parser", "version": "0.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/2cc49f47c69b023eaf05b48e6529389893b13d74", "reference": "2cc49f47c69b023eaf05b48e6529389893b13d74", "shasum": "" }, "require": { "php": "~7.1" }, "require-dev": { "consistence/coding-standard": "^2.0.0", "jakub-onderka/php-parallel-lint": "^0.9.2", "phing/phing": "^2.16.0", "phpstan/phpstan": "^0.10", "phpunit/phpunit": "^6.3", "slevomat/coding-standard": "^3.3.0", "symfony/process": "^3.4 || ^4.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "0.3-dev" } }, "autoload": { "psr-4": { "PHPStan\\PhpDocParser\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "PHPDoc parser with support for nullable, intersection and generic types", "time": "2019-01-14T12:26:23+00:00" }, { "name": "phpstan/phpstan-shim", "version": "0.9.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-shim.git", "reference": "e4720fb2916be05de02869780072253e7e0e8a75" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpstan/phpstan-shim/zipball/e4720fb2916be05de02869780072253e7e0e8a75", "reference": "e4720fb2916be05de02869780072253e7e0e8a75", "shasum": "" }, "require": { "php": "~7.0" }, "replace": { "phpstan/phpstan": "self.version" }, "bin": [ "phpstan", "phpstan.phar" ], "type": "library", "extra": { "branch-alias": { "dev-master": "0.9-dev" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "PHPStan Phar distribution", "time": "2018-01-28T14:29:27+00:00" }, { "name": "phpunit/php-code-coverage", "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f8ca4b604baf23dab89d87773c28cc07405189ba", "reference": "f8ca4b604baf23dab89d87773c28cc07405189ba", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^7.1", "phpunit/php-file-iterator": "^1.4.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^3.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "suggest": { "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ "coverage", "testing", "xunit" ], "time": "2018-02-02T07:01:41+00:00" }, { "name": "phpunit/php-file-iterator", "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ "filesystem", "iterator" ], "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Simple template engine.", "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ "template" ], "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "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": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ "timer" ], "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", "homepage": "https://github.com/sebastianbergmann/php-token-stream/", "keywords": [ "tokenizer" ], "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", "reference": "e2f8aa21bc54b6ba218bdd4f9e0dac1e9bc3b4e9", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.1", "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^6.0", "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "phpunit/phpunit-mock-objects": "^6.0", "sebastian/comparator": "^2.1", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { "dev-master": "7.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "The PHP Unit Testing framework.", "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], "time": "2018-02-26T07:03:12+00:00" }, { "name": "phpunit/phpunit-mock-objects", "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/e3249dedc2d99259ccae6affbc2684eac37c2e53", "reference": "e3249dedc2d99259ccae6affbc2684eac37c2e53", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", "php": "^7.1", "phpunit/php-text-template": "^1.2.1", "sebastian/exporter": "^3.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Mock Object library for PHPUnit", "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "keywords": [ "mock", "xunit" ], "abandoned": true, "time": "2018-02-15T05:27:38+00:00" }, { "name": "psr/log", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for logging libraries", "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], "time": "2018-11-20T15:27:04+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-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/", "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { "php": "^7.0", "sebastian/diff": "^2.0 || ^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "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": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0", "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff", "udiff", "unidiff", "unified diff" ], "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides functionality to handle HHVM/PHP environments", "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", "hhvm" ], "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { "php": "^7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "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" } ], "description": "Provides the functionality to export PHP variables for visualization", "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" }, "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": "Snapshotting of global state", "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { "php": "^7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "time": "2017-08-03T12:35:26+00:00" }, { "name": "sebastian/object-reflector", "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1-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/", "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { "php": ">=5.6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, { "name": "slevomat/coding-standard", "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", "reference": "223f02b6193fe47b7b483bfa5bf75693535482dd" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/223f02b6193fe47b7b483bfa5bf75693535482dd", "reference": "223f02b6193fe47b7b483bfa5bf75693535482dd", "shasum": "" }, "require": { "php": "^7.1", "phpstan/phpdoc-parser": "^0.3.1", "squizlabs/php_codesniffer": "^3.4.0" }, "require-dev": { "jakub-onderka/php-parallel-lint": "1.0.0", "phing/phing": "2.16.1", "phpstan/phpstan": "0.11.1", "phpstan/phpstan-phpunit": "0.11", "phpstan/phpstan-strict-rules": "0.11", "phpunit/phpunit": "8.0.0" }, "type": "phpcodesniffer-standard", "autoload": { "psr-4": { "SlevomatCodingStandard\\": "SlevomatCodingStandard" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "time": "2019-03-12T20:26:36+00:00" }, { "name": "squizlabs/php_codesniffer", "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "reference": "379deb987e26c7cd103a7b387aea178baec96e48" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", "reference": "379deb987e26c7cd103a7b387aea178baec96e48", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": ">=5.4.0" }, "require-dev": { "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { "dev-master": "3.x-dev" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Greg Sherwood", "role": "lead" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", "homepage": "http://www.squizlabs.com/php-codesniffer", "keywords": [ "phpcs", "standards" ], "time": "2018-12-19T23:57:18+00:00" }, { "name": "symfony/console", "version": "v4.2.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/console/zipball/9dc2299a016497f9ee620be94524e6c0af0280a9", "reference": "9dc2299a016497f9ee620be94524e6c0af0280a9", "shasum": "" }, "require": { "php": "^7.1.3", "symfony/contracts": "^1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "symfony/dependency-injection": "<3.4", "symfony/process": "<3.3" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/event-dispatcher": "~3.4|~4.0", "symfony/lock": "~3.4|~4.0", "symfony/process": "~3.4|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.2-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Console Component", "homepage": "https://symfony.com", "time": "2019-02-23T15:17:42+00:00" }, { "name": "symfony/contracts", "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/symfony/contracts.git", "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", "shasum": "" }, "require": { "php": "^7.1.3" }, "require-dev": { "psr/cache": "^1.0", "psr/container": "^1.0" }, "suggest": { "psr/cache": "When using the Cache contracts", "psr/container": "When using the Service contracts", "symfony/cache-contracts-implementation": "", "symfony/service-contracts-implementation": "", "symfony/translation-contracts-implementation": "" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\": "" }, "exclude-from-classmap": [ "**/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "A set of abstractions extracted out of the Symfony components", "homepage": "https://symfony.com", "keywords": [ "abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards" ], "time": "2018-12-05T08:06:11+00:00" }, { "name": "symfony/polyfill-ctype", "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { "php": ">=5.3.3" }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, "files": [ "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" }, { "name": "Gert de Pagter", "email": "backendtea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "ctype", "polyfill", "portable" ], "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { "php": ">=5.3.3" }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, "files": [ "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", "mbstring", "polyfill", "portable", "shim" ], "time": "2018-09-21T13:07:52+00:00" }, { "name": "theseer/tokenizer", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": "^7.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", "time": "2017-04-07T12:08:54+00:00" }, { "name": "vimeo/psalm", "version": "3.2.2", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", "reference": "f0ddc6f3bc35ba7ecb99232903907a1d5ec1c8e8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/vimeo/psalm/zipball/f0ddc6f3bc35ba7ecb99232903907a1d5ec1c8e8", "reference": "f0ddc6f3bc35ba7ecb99232903907a1d5ec1c8e8", "shasum": "" }, "require": { "amphp/amp": "^2.1", "amphp/byte-stream": "^1.5", "composer/xdebug-handler": "^1.1", "felixfbecker/advanced-json-rpc": "^3.0.3", "felixfbecker/language-server-protocol": "^1.2", "muglug/package-versions-56": "1.2.4", "netresearch/jsonmapper": "^1.0", "nikic/php-parser": "^4.0.2 || ^4.1", "openlss/lib-array2xml": "^0.0.10||^0.5.1", "php": "^7.0", "php-cs-fixer/diff": "^1.2", "phpmyadmin/sql-parser": "^4.0", "symfony/console": "^3.0||^4.0", "webmozart/glob": "^4.1", "webmozart/path-util": "^2.3" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", "phpunit/phpunit": "^6.0 || ^7.0", "psalm/plugin-phpunit": "^0.5.1", "squizlabs/php_codesniffer": "^3.0" }, "suggest": { "ext-igbinary": "^2.0.5" }, "bin": [ "psalm", "psalter", "psalm-language-server", "psalm-plugin" ], "type": "library", "extra": { "branch-alias": { "dev-master": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { "Psalm\\Plugin\\": "src/Psalm/Plugin", "Psalm\\": "src/Psalm" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Matthew Brown" } ], "description": "A static analysis tool for finding errors in PHP applications", "keywords": [ "code", "inspection", "php" ], "time": "2019-03-17T22:14:30+00:00" }, { "name": "webmozart/assert", "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.3-dev" } }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ "assert", "check", "validate" ], "time": "2018-12-25T11:19:39+00:00" }, { "name": "webmozart/glob", "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/webmozart/glob.git", "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", "shasum": "" }, "require": { "php": "^5.3.3|^7.0", "webmozart/path-util": "^2.2" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1", "symfony/filesystem": "^2.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.1-dev" } }, "autoload": { "psr-4": { "Webmozart\\Glob\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "A PHP implementation of Ant's glob.", "time": "2015-12-29T11:14:33+00:00" }, { "name": "webmozart/path-util", "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/path-util.git", "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", "shasum": "" }, "require": { "php": ">=5.3.3", "webmozart/assert": "~1.0" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.3-dev" } }, "autoload": { "psr-4": { "Webmozart\\PathUtil\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^7.1.3" }, "platform-dev": [] } php-doctrine-collections-1.6.4/docs/000077500000000000000000000000001356401024400173615ustar00rootroot00000000000000php-doctrine-collections-1.6.4/docs/en/000077500000000000000000000000001356401024400177635ustar00rootroot00000000000000php-doctrine-collections-1.6.4/docs/en/derived-collections.rst000066400000000000000000000013421356401024400244530ustar00rootroot00000000000000Derived Collections =================== You can create custom collection classes by extending the ``Doctrine\Common\Collections\ArrayCollection`` class. If the ``__construct`` semantics are different from the default ``ArrayCollection`` you can override the ``createFrom`` method: .. code-block:: php final class DerivedArrayCollection extends ArrayCollection { /** @var \stdClass */ private $foo; public function __construct(\stdClass $foo, array $elements = []) { $this->foo = $foo; parent::__construct($elements); } protected function createFrom(array $elements) : self { return new static($this->foo, $elements); } } php-doctrine-collections-1.6.4/docs/en/expression-builder.rst000066400000000000000000000067261356401024400243530ustar00rootroot00000000000000Expression Builder ================== The Expression Builder is a convenient fluent interface for building expressions to be used with the ``Doctrine\Common\Collections\Criteria`` class: .. code-block:: php $expressionBuilder = Criteria::expr(); $criteria = new Criteria(); $criteria->where($expressionBuilder->eq('name', 'jwage')); $criteria->orWhere($expressionBuilder->eq('name', 'romanb')); $collection->matching($criteria); The ``ExpressionBuilder`` has the following API: andX ---- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->andX( $expressionBuilder->eq('foo', 1), $expressionBuilder->eq('bar', 1) ); $collection->matching(new Criteria($expression)); orX --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->orX( $expressionBuilder->eq('foo', 1), $expressionBuilder->eq('bar', 1) ); $collection->matching(new Criteria($expression)); eq --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->eq('foo', 1); $collection->matching(new Criteria($expression)); gt --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->gt('foo', 1); $collection->matching(new Criteria($expression)); lt --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->lt('foo', 1); $collection->matching(new Criteria($expression)); gte --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->gte('foo', 1); $collection->matching(new Criteria($expression)); lte --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->lte('foo', 1); $collection->matching(new Criteria($expression)); neq --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->neq('foo', 1); $collection->matching(new Criteria($expression)); isNull ------ .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->isNull('foo'); $collection->matching(new Criteria($expression)); in --- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->in('foo', ['value1', 'value2']); $collection->matching(new Criteria($expression)); notIn ----- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->notIn('foo', ['value1', 'value2']); $collection->matching(new Criteria($expression)); contains -------- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->contains('foo', 'value1'); $collection->matching(new Criteria($expression)); memberOf -------- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->memberOf('foo', ['value1', 'value2']); $collection->matching(new Criteria($expression)); startsWith ---------- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->startsWith('foo', 'hello'); $collection->matching(new Criteria($expression)); endsWith -------- .. code-block:: php $expressionBuilder = Criteria::expr(); $expression = $expressionBuilder->endsWith('foo', 'world'); $collection->matching(new Criteria($expression)); php-doctrine-collections-1.6.4/docs/en/expressions.rst000066400000000000000000000042631356401024400231040ustar00rootroot00000000000000Expressions =========== The ``Doctrine\Common\Collections\Expr\Comparison`` class can be used to create expressions to be used with the ``Doctrine\Common\Collections\Criteria`` class. It has the following operator constants: - ``Comparison::EQ`` - ``Comparison::NEQ`` - ``Comparison::LT`` - ``Comparison::LTE`` - ``Comparison::GT`` - ``Comparison::GTE`` - ``Comparison::IS`` - ``Comparison::IN`` - ``Comparison::NIN`` - ``Comparison::CONTAINS`` - ``Comparison::MEMBER_OF`` - ``Comparison::STARTS_WITH`` - ``Comparison::ENDS_WITH`` The ``Doctrine\Common\Collections\Criteria`` class has the following API to be used with expressions: where ----- Sets the where expression to evaluate when this Criteria is searched for. .. code-block:: php $expr = new Comparison('key', Comparison::EQ, 'value'); $criteria->where($expr); andWhere -------- Appends the where expression to evaluate when this Criteria is searched for using an AND with previous expression. .. code-block:: php $expr = new Comparison('key', Comparison::EQ, 'value'); $criteria->andWhere($expr); orWhere ------- Appends the where expression to evaluate when this Criteria is searched for using an OR with previous expression. .. code-block:: php $expr1 = new Comparison('key', Comparison::EQ, 'value1'); $expr2 = new Comparison('key', Comparison::EQ, 'value2'); $criteria->where($expr1); $criteria->orWhere($expr2); orderBy ------- Sets the ordering of the result of this Criteria. .. code-block:: php $criteria->orderBy(['name' => Criteria::ASC]); setFirstResult -------------- Set the number of first result that this Criteria should return. .. code-block:: php $criteria->setFirstResult(0); getFirstResult -------------- Gets the current first result option of this Criteria. .. code-block:: php $criteria->setFirstResult(10); echo $criteria->getFirstResult(); // 10 setMaxResults ------------- Sets the max results that this Criteria should return. .. code-block:: php $criteria->setMaxResults(20); getMaxResults ------------- Gets the current max results option of this Criteria. .. code-block:: php $criteria->setMaxResults(20); echo $criteria->getMaxResults(); // 20 php-doctrine-collections-1.6.4/docs/en/index.rst000066400000000000000000000176301356401024400216330ustar00rootroot00000000000000Introduction ============ Doctrine Collections is a library that contains classes for working with arrays of data. Here is an example using the simple ``Doctrine\Common\Collections\ArrayCollection`` class: .. code-block:: php filter(function($count) { return $count > 1; }); // [2, 3] Collection Methods ================== Doctrine Collections provides an interface named ``Doctrine\Common\Collections\Collection`` that resembles the nature of a regular PHP array. That is, it is essentially an **ordered map** that can also be used like a list. A Collection has an internal iterator just like a PHP array. In addition, a Collection can be iterated with external iterators, which is preferable. To use an external iterator simply use the foreach language construct to iterate over the collection, which calls ``getIterator()`` internally, or explicitly retrieve an iterator though ``getIterator()`` which can then be used to iterate over the collection. You can not rely on the internal iterator of the collection being at a certain position unless you explicitly positioned it before. The methods available on the interface are: add --- Adds an element at the end of the collection. .. code-block:: php $collection->add('test'); clear ----- Clears the collection, removing all elements. .. code-block:: php $collection->clear(); contains -------- Checks whether an element is contained in the collection. This is an O(n) operation, where n is the size of the collection. .. code-block:: php $collection = new Collection(['test']); $contains = $collection->contains('test'); // true containsKey ----------- Checks whether the collection contains an element with the specified key/index. .. code-block:: php $collection = new Collection(['test' => true]); $contains = $collection->containsKey('test'); // true current ------- Gets the element of the collection at the current iterator position. .. code-block:: php $collection = new Collection(['first', 'second', 'third']); $current = $collection->current(); // first get --- Gets the element at the specified key/index. .. code-block:: php $collection = new Collection([ 'key' => 'value', ]); $value = $collection->get('key'); // value getKeys ------- Gets all keys/indices of the collection. .. code-block:: php $collection = new Collection(['a', 'b', 'c']); $keys = $collection->getKeys(); // [0, 1, 2] getValues --------- Gets all values of the collection. .. code-block:: php $collection = new Collection([ 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3', ]); $values = $collection->getValues(); // ['value1', 'value2', 'value3'] isEmpty ------- Checks whether the collection is empty (contains no elements). .. code-block:: php $collection = new Collection(['a', 'b', 'c']); $isEmpty = $collection->isEmpty(); // false first ----- Sets the internal iterator to the first element in the collection and returns this element. .. code-block:: php $collection = new Collection(['first', 'second', 'third']); $first = $collection->first(); // first exists ------ Tests for the existence of an element that satisfies the given predicate. .. code-block:: php $collection = new Collection(['first', 'second', 'third']); $exists = $collection->exists(function($key, $value) { return $value === 'first'; }); // true filter ------ Returns all the elements of this collection that satisfy the predicate. The order of the elements is preserved. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $filteredCollection = $collection->filter(function($count) { return $count > 1; }); // [2, 3] forAll ------ Tests whether the given predicate holds for all elements of this collection. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $forAll = $collection->forAll(function($key, $value) { return $value > 1; }); // false indexOf ------- Gets the index/key of a given element. The comparison of two elements is strict, that means not only the value but also the type must match. For objects this means reference equality. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $indexOf = $collection->indexOf(3); // 2 key --- Gets the key/index of the element at the current iterator position. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $collection->next(); $key = $collection->key(); // 1 last ---- Sets the internal iterator to the last element in the collection and returns this element. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $last = $collection->last(); // 3 map --- Applies the given function to each element in the collection and returns a new collection with the elements returned by the function. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $mappedCollection = $collection->map(function($value) { return $value + 1; }); // [2, 3, 4] next ---- Moves the internal iterator position to the next element and returns this element. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $next = $collection->next(); // 2 partition --------- Partitions this collection in two collections according to a predicate. Keys are preserved in the resulting collections. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $mappedCollection = $collection->partition(function($key, $value) { return $value > 1 }); // [[2, 3], [1]] remove ------ Removes the element at the specified index from the collection. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $collection->remove(0); // [2, 3] removeElement ------------- Removes the specified element from the collection, if it is found. .. code-block:: php $collection = new ArrayCollection([1, 2, 3]); $collection->removeElement(3); // [1, 2] set --- Sets an element in the collection at the specified key/index. .. code-block:: php $collection = new ArrayCollection(); $collection->set('name', 'jwage'); slice ----- Extracts a slice of $length elements starting at position $offset from the Collection. If $length is null it returns all elements from $offset to the end of the Collection. Keys have to be preserved by this method. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on. .. code-block:: php $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); $slice = $collection->slice(1, 2); // [1, 2] toArray ------- Gets a native PHP array representation of the collection. .. code-block:: php $collection = new ArrayCollection([0, 1, 2, 3, 4, 5]); $array = $collection->toArray(); // [0, 1, 2, 3, 4, 5] Selectable Methods ================== Some Doctrine Collections, like ``Doctrine\Common\Collections\ArrayCollection``, implement an interface named ``Doctrine\Common\Collections\Selectable`` that offers the usage of a powerful expressions API, where conditions can be applied to a collection to get a result with matching elements only. matching -------- Selects all elements from a selectable that match the expression and returns a new collection containing these elements. .. code-block:: php use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\Expr\Comparison; $collection = new ArrayCollection([ [ 'name' => 'jwage', ], [ 'name' => 'romanb', ], ]); $expr = new Comparison('name', '=', 'jwage'); $criteria = new Criteria(); $criteria->where($expr); $matched = $collection->matching($criteria); // ['jwage'] You can read more about expressions :ref:`here `. php-doctrine-collections-1.6.4/docs/en/lazy-collections.rst000066400000000000000000000013441356401024400240120ustar00rootroot00000000000000Lazy Collections ================ To create a lazy collection you can extend the ``Doctrine\Common\Collections\AbstractLazyCollection`` class and define the ``doInitialize`` method. Here is an example where we lazily query the database for a collection of user records: .. code-block:: php use Doctrine\DBAL\Connection; class UsersLazyCollection extends AbstractLazyCollection { /** @var Connection */ private $connection; public function __construct(Connection $connection) { $this->connection = $connection; } protected function doInitialize() : void { $this->collection = $this->connection->fetchAll('SELECT * FROM users'); } } php-doctrine-collections-1.6.4/docs/en/sidebar.rst000066400000000000000000000001721356401024400221260ustar00rootroot00000000000000.. toctree:: :depth: 3 index expressions expression-builder derived-collections lazy-collections php-doctrine-collections-1.6.4/lib/000077500000000000000000000000001356401024400171775ustar00rootroot00000000000000php-doctrine-collections-1.6.4/lib/Doctrine/000077500000000000000000000000001356401024400207465ustar00rootroot00000000000000php-doctrine-collections-1.6.4/lib/Doctrine/Common/000077500000000000000000000000001356401024400221765ustar00rootroot00000000000000php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/000077500000000000000000000000001356401024400244545ustar00rootroot00000000000000php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/AbstractLazyCollection.php000066400000000000000000000135041356401024400316070ustar00rootroot00000000000000 */ abstract class AbstractLazyCollection implements Collection { /** * The backed collection to use * * @psalm-var Collection * @var Collection */ protected $collection; /** @var bool */ protected $initialized = false; /** * {@inheritDoc} */ public function count() { $this->initialize(); return $this->collection->count(); } /** * {@inheritDoc} */ public function add($element) { $this->initialize(); return $this->collection->add($element); } /** * {@inheritDoc} */ public function clear() { $this->initialize(); $this->collection->clear(); } /** * {@inheritDoc} */ public function contains($element) { $this->initialize(); return $this->collection->contains($element); } /** * {@inheritDoc} */ public function isEmpty() { $this->initialize(); return $this->collection->isEmpty(); } /** * {@inheritDoc} */ public function remove($key) { $this->initialize(); return $this->collection->remove($key); } /** * {@inheritDoc} */ public function removeElement($element) { $this->initialize(); return $this->collection->removeElement($element); } /** * {@inheritDoc} */ public function containsKey($key) { $this->initialize(); return $this->collection->containsKey($key); } /** * {@inheritDoc} */ public function get($key) { $this->initialize(); return $this->collection->get($key); } /** * {@inheritDoc} */ public function getKeys() { $this->initialize(); return $this->collection->getKeys(); } /** * {@inheritDoc} */ public function getValues() { $this->initialize(); return $this->collection->getValues(); } /** * {@inheritDoc} */ public function set($key, $value) { $this->initialize(); $this->collection->set($key, $value); } /** * {@inheritDoc} */ public function toArray() { $this->initialize(); return $this->collection->toArray(); } /** * {@inheritDoc} */ public function first() { $this->initialize(); return $this->collection->first(); } /** * {@inheritDoc} */ public function last() { $this->initialize(); return $this->collection->last(); } /** * {@inheritDoc} */ public function key() { $this->initialize(); return $this->collection->key(); } /** * {@inheritDoc} */ public function current() { $this->initialize(); return $this->collection->current(); } /** * {@inheritDoc} */ public function next() { $this->initialize(); return $this->collection->next(); } /** * {@inheritDoc} */ public function exists(Closure $p) { $this->initialize(); return $this->collection->exists($p); } /** * {@inheritDoc} */ public function filter(Closure $p) { $this->initialize(); return $this->collection->filter($p); } /** * {@inheritDoc} */ public function forAll(Closure $p) { $this->initialize(); return $this->collection->forAll($p); } /** * {@inheritDoc} */ public function map(Closure $func) { $this->initialize(); return $this->collection->map($func); } /** * {@inheritDoc} */ public function partition(Closure $p) { $this->initialize(); return $this->collection->partition($p); } /** * {@inheritDoc} */ public function indexOf($element) { $this->initialize(); return $this->collection->indexOf($element); } /** * {@inheritDoc} */ public function slice($offset, $length = null) { $this->initialize(); return $this->collection->slice($offset, $length); } /** * {@inheritDoc} */ public function getIterator() { $this->initialize(); return $this->collection->getIterator(); } /** * {@inheritDoc} */ public function offsetExists($offset) { $this->initialize(); return $this->collection->offsetExists($offset); } /** * {@inheritDoc} */ public function offsetGet($offset) { $this->initialize(); return $this->collection->offsetGet($offset); } /** * {@inheritDoc} */ public function offsetSet($offset, $value) { $this->initialize(); $this->collection->offsetSet($offset, $value); } /** * {@inheritDoc} */ public function offsetUnset($offset) { $this->initialize(); $this->collection->offsetUnset($offset); } /** * Is the lazy collection already initialized? * * @return bool */ public function isInitialized() { return $this->initialized; } /** * Initialize the collection * * @return void */ protected function initialize() { if ($this->initialized) { return; } $this->doInitialize(); $this->initialized = true; } /** * Do the initialization logic * * @return void */ abstract protected function doInitialize(); } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/ArrayCollection.php000066400000000000000000000207321356401024400302630ustar00rootroot00000000000000 * @template-implements Selectable */ class ArrayCollection implements Collection, Selectable { /** * An array containing the entries of this collection. * * @psalm-var array * @var array */ private $elements; /** * Initializes a new ArrayCollection. * * @param array $elements * * @psalm-param array $elements */ public function __construct(array $elements = []) { $this->elements = $elements; } /** * {@inheritDoc} */ public function toArray() { return $this->elements; } /** * {@inheritDoc} */ public function first() { return reset($this->elements); } /** * Creates a new instance from the specified elements. * * This method is provided for derived classes to specify how a new * instance should be created when constructor semantics have changed. * * @param array $elements Elements. * * @return static * * @psalm-param array $elements * @psalm-return static */ protected function createFrom(array $elements) { return new static($elements); } /** * {@inheritDoc} */ public function last() { return end($this->elements); } /** * {@inheritDoc} */ public function key() { return key($this->elements); } /** * {@inheritDoc} */ public function next() { return next($this->elements); } /** * {@inheritDoc} */ public function current() { return current($this->elements); } /** * {@inheritDoc} */ public function remove($key) { if (! isset($this->elements[$key]) && ! array_key_exists($key, $this->elements)) { return null; } $removed = $this->elements[$key]; unset($this->elements[$key]); return $removed; } /** * {@inheritDoc} */ public function removeElement($element) { $key = array_search($element, $this->elements, true); if ($key === false) { return false; } unset($this->elements[$key]); return true; } /** * Required by interface ArrayAccess. * * {@inheritDoc} */ public function offsetExists($offset) { return $this->containsKey($offset); } /** * Required by interface ArrayAccess. * * {@inheritDoc} */ public function offsetGet($offset) { return $this->get($offset); } /** * Required by interface ArrayAccess. * * {@inheritDoc} */ public function offsetSet($offset, $value) { if (! isset($offset)) { $this->add($value); return; } $this->set($offset, $value); } /** * Required by interface ArrayAccess. * * {@inheritDoc} */ public function offsetUnset($offset) { $this->remove($offset); } /** * {@inheritDoc} */ public function containsKey($key) { return isset($this->elements[$key]) || array_key_exists($key, $this->elements); } /** * {@inheritDoc} */ public function contains($element) { return in_array($element, $this->elements, true); } /** * {@inheritDoc} */ public function exists(Closure $p) { foreach ($this->elements as $key => $element) { if ($p($key, $element)) { return true; } } return false; } /** * {@inheritDoc} */ public function indexOf($element) { return array_search($element, $this->elements, true); } /** * {@inheritDoc} */ public function get($key) { return $this->elements[$key] ?? null; } /** * {@inheritDoc} */ public function getKeys() { return array_keys($this->elements); } /** * {@inheritDoc} */ public function getValues() { return array_values($this->elements); } /** * {@inheritDoc} */ public function count() { return count($this->elements); } /** * {@inheritDoc} */ public function set($key, $value) { $this->elements[$key] = $value; } /** * {@inheritDoc} */ public function add($element) { $this->elements[] = $element; return true; } /** * {@inheritDoc} */ public function isEmpty() { return empty($this->elements); } /** * Required by interface IteratorAggregate. * * {@inheritDoc} */ public function getIterator() { return new ArrayIterator($this->elements); } /** * {@inheritDoc} * * @return static * * @psalm-template U * @psalm-param Closure(T=):U $func * @psalm-return static */ public function map(Closure $func) { return $this->createFrom(array_map($func, $this->elements)); } /** * {@inheritDoc} * * @return static * * @psalm-return static */ public function filter(Closure $p) { return $this->createFrom(array_filter($this->elements, $p, ARRAY_FILTER_USE_BOTH)); } /** * {@inheritDoc} */ public function forAll(Closure $p) { foreach ($this->elements as $key => $element) { if (! $p($key, $element)) { return false; } } return true; } /** * {@inheritDoc} */ public function partition(Closure $p) { $matches = $noMatches = []; foreach ($this->elements as $key => $element) { if ($p($key, $element)) { $matches[$key] = $element; } else { $noMatches[$key] = $element; } } return [$this->createFrom($matches), $this->createFrom($noMatches)]; } /** * Returns a string representation of this object. * * @return string */ public function __toString() { return self::class . '@' . spl_object_hash($this); } /** * {@inheritDoc} */ public function clear() { $this->elements = []; } /** * {@inheritDoc} */ public function slice($offset, $length = null) { return array_slice($this->elements, $offset, $length, true); } /** * {@inheritDoc} */ public function matching(Criteria $criteria) { $expr = $criteria->getWhereExpression(); $filtered = $this->elements; if ($expr) { $visitor = new ClosureExpressionVisitor(); $filter = $visitor->dispatch($expr); $filtered = array_filter($filtered, $filter); } $orderings = $criteria->getOrderings(); if ($orderings) { $next = null; foreach (array_reverse($orderings) as $field => $ordering) { $next = ClosureExpressionVisitor::sortByField($field, $ordering === Criteria::DESC ? -1 : 1, $next); } uasort($filtered, $next); } $offset = $criteria->getFirstResult(); $length = $criteria->getMaxResults(); if ($offset || $length) { $filtered = array_slice($filtered, (int) $offset, $length); } return $this->createFrom($filtered); } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Collection.php000066400000000000000000000212661356401024400272670ustar00rootroot00000000000000ordered map that can also be used * like a list. * * A Collection has an internal iterator just like a PHP array. In addition, * a Collection can be iterated with external iterators, which is preferable. * To use an external iterator simply use the foreach language construct to * iterate over the collection (which calls {@link getIterator()} internally) or * explicitly retrieve an iterator though {@link getIterator()} which can then be * used to iterate over the collection. * You can not rely on the internal iterator of the collection being at a certain * position unless you explicitly positioned it before. Prefer iteration with * external iterators. * * @psalm-template TKey of array-key * @psalm-template T * @template-extends IteratorAggregate * @template-extends ArrayAccess */ interface Collection extends Countable, IteratorAggregate, ArrayAccess { /** * Adds an element at the end of the collection. * * @param mixed $element The element to add. * * @return true Always TRUE. * * @psalm-param T $element */ public function add($element); /** * Clears the collection, removing all elements. * * @return void */ public function clear(); /** * Checks whether an element is contained in the collection. * This is an O(n) operation, where n is the size of the collection. * * @param mixed $element The element to search for. * * @return bool TRUE if the collection contains the element, FALSE otherwise. * * @psalm-param T $element */ public function contains($element); /** * Checks whether the collection is empty (contains no elements). * * @return bool TRUE if the collection is empty, FALSE otherwise. */ public function isEmpty(); /** * Removes the element at the specified index from the collection. * * @param string|int $key The key/index of the element to remove. * * @return mixed The removed element or NULL, if the collection did not contain the element. * * @psalm-param TKey $key * @psalm-return T|null */ public function remove($key); /** * Removes the specified element from the collection, if it is found. * * @param mixed $element The element to remove. * * @return bool TRUE if this collection contained the specified element, FALSE otherwise. * * @psalm-param T $element */ public function removeElement($element); /** * Checks whether the collection contains an element with the specified key/index. * * @param string|int $key The key/index to check for. * * @return bool TRUE if the collection contains an element with the specified key/index, * FALSE otherwise. * * @psalm-param TKey $key */ public function containsKey($key); /** * Gets the element at the specified key/index. * * @param string|int $key The key/index of the element to retrieve. * * @return mixed * * @psalm-param TKey $key * @psalm-return T|null */ public function get($key); /** * Gets all keys/indices of the collection. * * @return int[]|string[] The keys/indices of the collection, in the order of the corresponding * elements in the collection. * * @psalm-return TKey[] */ public function getKeys(); /** * Gets all values of the collection. * * @return array The values of all elements in the collection, in the order they * appear in the collection. * * @psalm-return T[] */ public function getValues(); /** * Sets an element in the collection at the specified key/index. * * @param string|int $key The key/index of the element to set. * @param mixed $value The element to set. * * @return void * * @psalm-param TKey $key * @psalm-param T $value */ public function set($key, $value); /** * Gets a native PHP array representation of the collection. * * @return array * * @psalm-return array */ public function toArray(); /** * Sets the internal iterator to the first element in the collection and returns this element. * * @return mixed * * @psalm-return T|false */ public function first(); /** * Sets the internal iterator to the last element in the collection and returns this element. * * @return mixed * * @psalm-return T|false */ public function last(); /** * Gets the key/index of the element at the current iterator position. * * @return int|string * * @psalm-return TKey */ public function key(); /** * Gets the element of the collection at the current iterator position. * * @return mixed * * @psalm-return T|false */ public function current(); /** * Moves the internal iterator position to the next element and returns this element. * * @return mixed * * @psalm-return T|false */ public function next(); /** * Tests for the existence of an element that satisfies the given predicate. * * @param Closure $p The predicate. * * @return bool TRUE if the predicate is TRUE for at least one element, FALSE otherwise. * * @psalm-param Closure(TKey=, T=):bool $p */ public function exists(Closure $p); /** * Returns all the elements of this collection that satisfy the predicate p. * The order of the elements is preserved. * * @param Closure $p The predicate used for filtering. * * @return Collection A collection with the results of the filter operation. * * @psalm-param Closure(T=):bool $p * @psalm-return Collection */ public function filter(Closure $p); /** * Tests whether the given predicate p holds for all elements of this collection. * * @param Closure $p The predicate. * * @return bool TRUE, if the predicate yields TRUE for all elements, FALSE otherwise. * * @psalm-param Closure(TKey=, T=):bool $p */ public function forAll(Closure $p); /** * Applies the given function to each element in the collection and returns * a new collection with the elements returned by the function. * * @return Collection * * @psalm-template U * @psalm-param Closure(T=):U $func * @psalm-return Collection */ public function map(Closure $func); /** * Partitions this collection in two collections according to a predicate. * Keys are preserved in the resulting collections. * * @param Closure $p The predicate on which to partition. * * @return Collection[] An array with two elements. The first element contains the collection * of elements where the predicate returned TRUE, the second element * contains the collection of elements where the predicate returned FALSE. * * @psalm-param Closure(TKey=, T=):bool $p * @psalm-return array{0: Collection, 1: Collection} */ public function partition(Closure $p); /** * Gets the index/key of a given element. The comparison of two elements is strict, * that means not only the value but also the type must match. * For objects this means reference equality. * * @param mixed $element The element to search for. * * @return int|string|bool The key/index of the element or FALSE if the element was not found. * * @psalm-param T $element * @psalm-return TKey|false */ public function indexOf($element); /** * Extracts a slice of $length elements starting at position $offset from the Collection. * * If $length is null it returns all elements from $offset to the end of the Collection. * Keys have to be preserved by this method. Calling this method will only return the * selected slice and NOT change the elements contained in the collection slice is called on. * * @param int $offset The offset to start from. * @param int|null $length The maximum number of elements to return, or null for no limit. * * @return array * * @psalm-return array */ public function slice($offset, $length = null); } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Criteria.php000066400000000000000000000114671356401024400267400ustar00rootroot00000000000000expression = $expression; $this->setFirstResult($firstResult); $this->setMaxResults($maxResults); if ($orderings === null) { return; } $this->orderBy($orderings); } /** * Sets the where expression to evaluate when this Criteria is searched for. * * @return Criteria */ public function where(Expression $expression) { $this->expression = $expression; return $this; } /** * Appends the where expression to evaluate when this Criteria is searched for * using an AND with previous expression. * * @return Criteria */ public function andWhere(Expression $expression) { if ($this->expression === null) { return $this->where($expression); } $this->expression = new CompositeExpression( CompositeExpression::TYPE_AND, [$this->expression, $expression] ); return $this; } /** * Appends the where expression to evaluate when this Criteria is searched for * using an OR with previous expression. * * @return Criteria */ public function orWhere(Expression $expression) { if ($this->expression === null) { return $this->where($expression); } $this->expression = new CompositeExpression( CompositeExpression::TYPE_OR, [$this->expression, $expression] ); return $this; } /** * Gets the expression attached to this Criteria. * * @return Expression|null */ public function getWhereExpression() { return $this->expression; } /** * Gets the current orderings of this Criteria. * * @return string[] */ public function getOrderings() { return $this->orderings; } /** * Sets the ordering of the result of this Criteria. * * Keys are field and values are the order, being either ASC or DESC. * * @see Criteria::ASC * @see Criteria::DESC * * @param string[] $orderings * * @return Criteria */ public function orderBy(array $orderings) { $this->orderings = array_map( static function (string $ordering) : string { return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC; }, $orderings ); return $this; } /** * Gets the current first result option of this Criteria. * * @return int|null */ public function getFirstResult() { return $this->firstResult; } /** * Set the number of first result that this Criteria should return. * * @param int|null $firstResult The value to set. * * @return Criteria */ public function setFirstResult($firstResult) { $this->firstResult = $firstResult === null ? null : (int) $firstResult; return $this; } /** * Gets maxResults. * * @return int|null */ public function getMaxResults() { return $this->maxResults; } /** * Sets maxResults. * * @param int|null $maxResults The value to set. * * @return Criteria */ public function setMaxResults($maxResults) { $this->maxResults = $maxResults === null ? null : (int) $maxResults; return $this; } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/000077500000000000000000000000001356401024400253725ustar00rootroot00000000000000php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php000066400000000000000000000200171356401024400331570ustar00rootroot00000000000000$accessor(); } } if (preg_match('/^is[A-Z]+/', $field) === 1 && method_exists($object, $field)) { return $object->$field(); } // __call should be triggered for get. $accessor = $accessors[0] . $field; if (method_exists($object, '__call')) { return $object->$accessor(); } if ($object instanceof ArrayAccess) { return $object[$field]; } if (isset($object->$field)) { return $object->$field; } // camelcase field name to support different variable naming conventions $ccField = preg_replace_callback('/_(.?)/', static function ($matches) { return strtoupper($matches[1]); }, $field); foreach ($accessors as $accessor) { $accessor .= $ccField; if (method_exists($object, $accessor)) { return $object->$accessor(); } } return $object->$field; } /** * Helper for sorting arrays of objects based on multiple fields + orientations. * * @param string $name * @param int $orientation * * @return Closure */ public static function sortByField($name, $orientation = 1, ?Closure $next = null) { if (! $next) { $next = static function () : int { return 0; }; } return static function ($a, $b) use ($name, $next, $orientation) : int { $aValue = ClosureExpressionVisitor::getObjectFieldValue($a, $name); $bValue = ClosureExpressionVisitor::getObjectFieldValue($b, $name); if ($aValue === $bValue) { return $next($a, $b); } return ($aValue > $bValue ? 1 : -1) * $orientation; }; } /** * {@inheritDoc} */ public function walkComparison(Comparison $comparison) { $field = $comparison->getField(); $value = $comparison->getValue()->getValue(); // shortcut for walkValue() switch ($comparison->getOperator()) { case Comparison::EQ: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) === $value; }; case Comparison::NEQ: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) !== $value; }; case Comparison::LT: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) < $value; }; case Comparison::LTE: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) <= $value; }; case Comparison::GT: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) > $value; }; case Comparison::GTE: return static function ($object) use ($field, $value) : bool { return ClosureExpressionVisitor::getObjectFieldValue($object, $field) >= $value; }; case Comparison::IN: return static function ($object) use ($field, $value) : bool { return in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value, true); }; case Comparison::NIN: return static function ($object) use ($field, $value) : bool { return ! in_array(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value, true); }; case Comparison::CONTAINS: return static function ($object) use ($field, $value) { return strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value) !== false; }; case Comparison::MEMBER_OF: return static function ($object) use ($field, $value) : bool { $fieldValues = ClosureExpressionVisitor::getObjectFieldValue($object, $field); if (! is_array($fieldValues)) { $fieldValues = iterator_to_array($fieldValues); } return in_array($value, $fieldValues, true); }; case Comparison::STARTS_WITH: return static function ($object) use ($field, $value) : bool { return strpos(ClosureExpressionVisitor::getObjectFieldValue($object, $field), $value) === 0; }; case Comparison::ENDS_WITH: return static function ($object) use ($field, $value) : bool { return $value === substr(ClosureExpressionVisitor::getObjectFieldValue($object, $field), -strlen($value)); }; default: throw new RuntimeException('Unknown comparison operator: ' . $comparison->getOperator()); } } /** * {@inheritDoc} */ public function walkValue(Value $value) { return $value->getValue(); } /** * {@inheritDoc} */ public function walkCompositeExpression(CompositeExpression $expr) { $expressionList = []; foreach ($expr->getExpressionList() as $child) { $expressionList[] = $this->dispatch($child); } switch ($expr->getType()) { case CompositeExpression::TYPE_AND: return $this->andExpressions($expressionList); case CompositeExpression::TYPE_OR: return $this->orExpressions($expressionList); default: throw new RuntimeException('Unknown composite ' . $expr->getType()); } } /** * @param array $expressions */ private function andExpressions(array $expressions) : callable { return static function ($object) use ($expressions) : bool { foreach ($expressions as $expression) { if (! $expression($object)) { return false; } } return true; }; } /** * @param array $expressions */ private function orExpressions(array $expressions) : callable { return static function ($object) use ($expressions) : bool { foreach ($expressions as $expression) { if ($expression($object)) { return true; } } return false; }; } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/Comparison.php000066400000000000000000000032111356401024400302120ustar00rootroot00000000000000'; public const LT = '<'; public const LTE = '<='; public const GT = '>'; public const GTE = '>='; public const IS = '='; // no difference with EQ public const IN = 'IN'; public const NIN = 'NIN'; public const CONTAINS = 'CONTAINS'; public const MEMBER_OF = 'MEMBER_OF'; public const STARTS_WITH = 'STARTS_WITH'; public const ENDS_WITH = 'ENDS_WITH'; /** @var string */ private $field; /** @var string */ private $op; /** @var Value */ private $value; /** * @param string $field * @param string $operator * @param mixed $value */ public function __construct($field, $operator, $value) { if (! ($value instanceof Value)) { $value = new Value($value); } $this->field = $field; $this->op = $operator; $this->value = $value; } /** * @return string */ public function getField() { return $this->field; } /** * @return Value */ public function getValue() { return $this->value; } /** * @return string */ public function getOperator() { return $this->op; } /** * {@inheritDoc} */ public function visit(ExpressionVisitor $visitor) { return $visitor->walkComparison($this); } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php000066400000000000000000000027201356401024400321260ustar00rootroot00000000000000type = $type; foreach ($expressions as $expr) { if ($expr instanceof Value) { throw new RuntimeException('Values are not supported expressions as children of and/or expressions.'); } if (! ($expr instanceof Expression)) { throw new RuntimeException('No expression given to CompositeExpression.'); } $this->expressions[] = $expr; } } /** * Returns the list of expressions nested in this composite. * * @return Expression[] */ public function getExpressionList() { return $this->expressions; } /** * @return string */ public function getType() { return $this->type; } /** * {@inheritDoc} */ public function visit(ExpressionVisitor $visitor) { return $visitor->walkCompositeExpression($this); } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/Expression.php000066400000000000000000000003451356401024400302440ustar00rootroot00000000000000walkComparison($expr); case $expr instanceof Value: return $this->walkValue($expr); case $expr instanceof CompositeExpression: return $this->walkCompositeExpression($expr); default: throw new RuntimeException('Unknown Expression ' . get_class($expr)); } } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/Expr/Value.php000066400000000000000000000010041356401024400271520ustar00rootroot00000000000000value = $value; } /** * @return mixed */ public function getValue() { return $this->value; } /** * {@inheritDoc} */ public function visit(ExpressionVisitor $visitor) { return $visitor->walkValue($this); } } php-doctrine-collections-1.6.4/lib/Doctrine/Common/Collections/ExpressionBuilder.php000066400000000000000000000076741356401024400306510ustar00rootroot00000000000000 */ public function matching(Criteria $criteria); } php-doctrine-collections-1.6.4/phpcs.xml.dist000066400000000000000000000033351356401024400212360ustar00rootroot00000000000000 lib tests tests/* tests/* tests/* lib/Doctrine/Common/Collections/AbstractLazyCollection.php php-doctrine-collections-1.6.4/phpunit.xml.dist000066400000000000000000000011321356401024400216010ustar00rootroot00000000000000 ./tests/Doctrine/ ./lib/Doctrine/ php-doctrine-collections-1.6.4/psalm.xml.dist000066400000000000000000000035401356401024400212330ustar00rootroot00000000000000 php-doctrine-collections-1.6.4/tests/000077500000000000000000000000001356401024400175735ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/000077500000000000000000000000001356401024400213425ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/000077500000000000000000000000001356401024400224445ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/000077500000000000000000000000001356401024400236745ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/000077500000000000000000000000001356401024400261525ustar00rootroot00000000000000AbstractLazyArrayCollectionTest.php000066400000000000000000000015131356401024400350620ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/CollectionsbuildCollection(['a', 'b', 'c']); self::assertFalse($collection->isInitialized()); self::assertCount(3, $collection); } } AbstractLazyCollectionTest.php000066400000000000000000000007401356401024400340640ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collectionscollection = new LazyArrayCollection(new ArrayCollection()); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php000066400000000000000000000007331356401024400326200ustar00rootroot00000000000000buildCollection($elements); self::assertSame($elements, $collection->toArray()); } /** * @dataProvider provideDifferentElements */ public function testFirst($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(reset($elements), $collection->first()); } /** * @dataProvider provideDifferentElements */ public function testLast($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(end($elements), $collection->last()); } /** * @dataProvider provideDifferentElements */ public function testKey($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(key($elements), $collection->key()); next($elements); $collection->next(); self::assertSame(key($elements), $collection->key()); } /** * @dataProvider provideDifferentElements */ public function testNext($elements) : void { $collection = $this->buildCollection($elements); while (true) { $collectionNext = $collection->next(); $arrayNext = next($elements); if (! $collectionNext || ! $arrayNext) { break; } self::assertSame($arrayNext, $collectionNext, 'Returned value of ArrayCollection::next() and next() not match'); self::assertSame(key($elements), $collection->key(), 'Keys not match'); self::assertSame(current($elements), $collection->current(), 'Current values not match'); } } /** * @dataProvider provideDifferentElements */ public function testCurrent($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(current($elements), $collection->current()); next($elements); $collection->next(); self::assertSame(current($elements), $collection->current()); } /** * @dataProvider provideDifferentElements */ public function testGetKeys($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(array_keys($elements), $collection->getKeys()); } /** * @dataProvider provideDifferentElements */ public function testGetValues($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(array_values($elements), $collection->getValues()); } /** * @dataProvider provideDifferentElements */ public function testCount($elements) : void { $collection = $this->buildCollection($elements); self::assertSame(count($elements), $collection->count()); } /** * @dataProvider provideDifferentElements */ public function testIterator($elements) : void { $collection = $this->buildCollection($elements); $iterations = 0; foreach ($collection->getIterator() as $key => $item) { self::assertSame($elements[$key], $item, 'Item ' . $key . ' not match'); ++$iterations; } self::assertEquals(count($elements), $iterations, 'Number of iterations not match'); } public function provideDifferentElements() : array { return [ 'indexed' => [[1, 2, 3, 4, 5]], 'associative' => [['A' => 'a', 'B' => 'b', 'C' => 'c']], 'mixed' => [['A' => 'a', 1, 'B' => 'b', 2, 3]], ]; } public function testRemove() : void { $elements = [1, 'A' => 'a', 2, 'B' => 'b', 3]; $collection = $this->buildCollection($elements); self::assertEquals(1, $collection->remove(0)); unset($elements[0]); self::assertEquals(null, $collection->remove('non-existent')); unset($elements['non-existent']); self::assertEquals(2, $collection->remove(1)); unset($elements[1]); self::assertEquals('a', $collection->remove('A')); unset($elements['A']); self::assertEquals($elements, $collection->toArray()); } public function testRemoveElement() : void { $elements = [1, 'A' => 'a', 2, 'B' => 'b', 3, 'A2' => 'a', 'B2' => 'b']; $collection = $this->buildCollection($elements); self::assertTrue($collection->removeElement(1)); unset($elements[0]); self::assertFalse($collection->removeElement('non-existent')); self::assertTrue($collection->removeElement('a')); unset($elements['A']); self::assertTrue($collection->removeElement('a')); unset($elements['A2']); self::assertEquals($elements, $collection->toArray()); } public function testContainsKey() : void { $elements = [1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'B2' => 'b']; $collection = $this->buildCollection($elements); self::assertTrue($collection->containsKey(0), 'Contains index 0'); self::assertTrue($collection->containsKey('A'), 'Contains key "A"'); self::assertTrue($collection->containsKey('null'), 'Contains key "null", with value null'); self::assertFalse($collection->containsKey('non-existent'), "Doesn't contain key"); } public function testEmpty() : void { $collection = $this->buildCollection(); self::assertTrue($collection->isEmpty(), 'Empty collection'); $collection->add(1); self::assertFalse($collection->isEmpty(), 'Not empty collection'); } public function testContains() : void { $elements = [1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0]; $collection = $this->buildCollection($elements); self::assertTrue($collection->contains(0), 'Contains Zero'); self::assertTrue($collection->contains('a'), 'Contains "a"'); self::assertTrue($collection->contains(null), 'Contains Null'); self::assertFalse($collection->contains('non-existent'), "Doesn't contain an element"); } public function testExists() : void { $elements = [1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0]; $collection = $this->buildCollection($elements); self::assertTrue($collection->exists(static function ($key, $element) { return $key === 'A' && $element === 'a'; }), 'Element exists'); self::assertFalse($collection->exists(static function ($key, $element) { return $key === 'non-existent' && $element === 'non-existent'; }), 'Element not exists'); } public function testIndexOf() : void { $elements = [1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0]; $collection = $this->buildCollection($elements); self::assertSame(array_search(2, $elements, true), $collection->indexOf(2), 'Index of 2'); self::assertSame(array_search(null, $elements, true), $collection->indexOf(null), 'Index of null'); self::assertSame(array_search('non-existent', $elements, true), $collection->indexOf('non-existent'), 'Index of non existent'); } public function testGet() : void { $elements = [1, 'A' => 'a', 2, 'null' => null, 3, 'A2' => 'a', 'zero' => 0]; $collection = $this->buildCollection($elements); self::assertSame(2, $collection->get(1), 'Get element by index'); self::assertSame('a', $collection->get('A'), 'Get element by name'); self::assertSame(null, $collection->get('non-existent'), 'Get non existent element'); } public function testMatchingWithSortingPreservesyKeys() : void { $object1 = new stdClass(); $object2 = new stdClass(); $object1->sortField = 2; $object2->sortField = 1; $collection = $this->buildCollection([ 'object1' => $object1, 'object2' => $object2, ]); if (! $this->isSelectable($collection)) { $this->markTestSkipped('Collection does not support Selectable interface'); } self::assertSame( [ 'object2' => $object2, 'object1' => $object1, ], $collection ->matching(new Criteria(null, ['sortField' => Criteria::ASC])) ->toArray() ); } public function testMultiColumnSortAppliesAllSorts() : void { $collection = $this->buildCollection([ ['foo' => 1, 'bar' => 2], ['foo' => 2, 'bar' => 4], ['foo' => 2, 'bar' => 3], ]); $expected = [ 1 => ['foo' => 2, 'bar' => 4], 2 => ['foo' => 2, 'bar' => 3], 0 => ['foo' => 1, 'bar' => 2], ]; if (! $this->isSelectable($collection)) { $this->markTestSkipped('Collection does not support Selectable interface'); } self::assertSame( $expected, $collection ->matching(new Criteria(null, ['foo' => Criteria::DESC, 'bar' => Criteria::DESC])) ->toArray() ); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/BaseCollectionTest.php000066400000000000000000000156501356401024400324200ustar00rootroot00000000000000collection[0])); $this->collection->add('testing'); self::assertTrue(isset($this->collection[0])); unset($this->collection[0]); self::assertFalse(isset($this->collection[0])); } public function testRemovingNonExistentEntryReturnsNull() : void { self::assertEquals(null, $this->collection->remove('testing_does_not_exist')); } public function testExists() : void { $this->collection->add('one'); $this->collection->add('two'); $exists = $this->collection->exists(static function ($k, $e) { return $e === 'one'; }); self::assertTrue($exists); $exists = $this->collection->exists(static function ($k, $e) { return $e === 'other'; }); self::assertFalse($exists); } public function testMap() : void { $this->collection->add(1); $this->collection->add(2); $res = $this->collection->map(static function ($e) { return $e * 2; }); self::assertEquals([2, 4], $res->toArray()); } public function testFilter() : void { $this->collection->add(1); $this->collection->add('foo'); $this->collection->add(3); $res = $this->collection->filter(static function ($e) { return is_numeric($e); }); self::assertEquals([0 => 1, 2 => 3], $res->toArray()); } public function testFilterByValueAndKey() : void { $this->collection->add(1); $this->collection->add('foo'); $this->collection->add(3); $this->collection->add(4); $this->collection->add(5); $res = $this->collection->filter(static function ($v, $k) { return is_numeric($v) && $k % 2 === 0; }); self::assertSame([0 => 1, 2 => 3, 4 => 5], $res->toArray()); } public function testFirstAndLast() : void { $this->collection->add('one'); $this->collection->add('two'); self::assertEquals($this->collection->first(), 'one'); self::assertEquals($this->collection->last(), 'two'); } public function testArrayAccess() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertEquals($this->collection[0], 'one'); self::assertEquals($this->collection[1], 'two'); unset($this->collection[0]); self::assertEquals($this->collection->count(), 1); } public function testContainsKey() : void { $this->collection[5] = 'five'; self::assertTrue($this->collection->containsKey(5)); } public function testContains() : void { $this->collection[0] = 'test'; self::assertTrue($this->collection->contains('test')); } public function testSearch() : void { $this->collection[0] = 'test'; self::assertEquals(0, $this->collection->indexOf('test')); } public function testGet() : void { $this->collection[0] = 'test'; self::assertEquals('test', $this->collection->get(0)); } public function testGetKeys() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertEquals([0, 1], $this->collection->getKeys()); } public function testGetValues() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertEquals(['one', 'two'], $this->collection->getValues()); } public function testCount() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertEquals($this->collection->count(), 2); self::assertEquals(count($this->collection), 2); } public function testForAll() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertEquals($this->collection->forAll(static function ($k, $e) { return is_string($e); }), true); self::assertEquals($this->collection->forAll(static function ($k, $e) { return is_array($e); }), false); } public function testPartition() : void { $this->collection[] = true; $this->collection[] = false; $partition = $this->collection->partition(static function ($k, $e) { return $e === true; }); self::assertEquals($partition[0][0], true); self::assertEquals($partition[1][0], false); } public function testClear() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; $this->collection->clear(); self::assertEquals($this->collection->isEmpty(), true); } public function testRemove() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; $el = $this->collection->remove(0); self::assertEquals('one', $el); self::assertEquals($this->collection->contains('one'), false); self::assertNull($this->collection->remove(0)); } public function testRemoveElement() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; self::assertTrue($this->collection->removeElement('two')); self::assertFalse($this->collection->contains('two')); self::assertFalse($this->collection->removeElement('two')); } public function testSlice() : void { $this->collection[] = 'one'; $this->collection[] = 'two'; $this->collection[] = 'three'; $slice = $this->collection->slice(0, 1); self::assertInternalType('array', $slice); self::assertEquals(['one'], $slice); $slice = $this->collection->slice(1); self::assertEquals([1 => 'two', 2 => 'three'], $slice); $slice = $this->collection->slice(1, 1); self::assertEquals([1 => 'two'], $slice); } protected function fillMatchingFixture() : void { $std1 = new stdClass(); $std1->foo = 'bar'; $this->collection[] = $std1; $std2 = new stdClass(); $std2->foo = 'baz'; $this->collection[] = $std2; } public function testCanRemoveNullValuesByKey() : void { $this->collection->add(null); $this->collection->remove(0); self::assertTrue($this->collection->isEmpty()); } public function testCanVerifyExistingKeysWithNullValues() : void { $this->collection->set('key', null); self::assertTrue($this->collection->containsKey('key')); } } ClosureExpressionVisitorTest.php000066400000000000000000000263341356401024400345300ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collectionsvisitor = new ClosureExpressionVisitor(); $this->builder = new ExpressionBuilder(); } public function testGetObjectFieldValueIsAccessor() : void { $object = new TestObject(1, 2, true); self::assertTrue($this->visitor->getObjectFieldValue($object, 'baz')); } public function testGetObjectFieldValueIsAccessorWithIsPrefix() : void { $object = new TestObject(1, 2, true); self::assertTrue($this->visitor->getObjectFieldValue($object, 'isBaz')); } public function testGetObjectFieldValueIsAccessorCamelCase() : void { $object = new TestObjectNotCamelCase(1); self::assertEquals(1, $this->visitor->getObjectFieldValue($object, 'foo_bar')); self::assertEquals(1, $this->visitor->getObjectFieldValue($object, 'foobar')); self::assertEquals(1, $this->visitor->getObjectFieldValue($object, 'fooBar')); } public function testGetObjectFieldValueIsAccessorBoth() : void { $object = new TestObjectBothCamelCaseAndUnderscore(1, 2); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foo_bar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foobar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'fooBar')); } public function testGetObjectFieldValueIsAccessorOnePublic() : void { $object = new TestObjectPublicCamelCaseAndPrivateUnderscore(1, 2); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foo_bar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foobar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'fooBar')); } public function testGetObjectFieldValueIsAccessorBothPublic() : void { $object = new TestObjectPublicCamelCaseAndPrivateUnderscore(1, 2); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foo_bar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'foobar')); self::assertEquals(2, $this->visitor->getObjectFieldValue($object, 'fooBar')); } public function testGetObjectFieldValueMagicCallMethod() : void { $object = new TestObject(1, 2, true, 3); self::assertEquals(3, $this->visitor->getObjectFieldValue($object, 'qux')); } public function testWalkEqualsComparison() : void { $closure = $this->visitor->walkComparison($this->builder->eq('foo', 1)); self::assertTrue($closure(new TestObject(1))); self::assertFalse($closure(new TestObject(2))); } public function testWalkNotEqualsComparison() : void { $closure = $this->visitor->walkComparison($this->builder->neq('foo', 1)); self::assertFalse($closure(new TestObject(1))); self::assertTrue($closure(new TestObject(2))); } public function testWalkLessThanComparison() : void { $closure = $this->visitor->walkComparison($this->builder->lt('foo', 1)); self::assertFalse($closure(new TestObject(1))); self::assertTrue($closure(new TestObject(0))); } public function testWalkLessThanEqualsComparison() : void { $closure = $this->visitor->walkComparison($this->builder->lte('foo', 1)); self::assertFalse($closure(new TestObject(2))); self::assertTrue($closure(new TestObject(1))); self::assertTrue($closure(new TestObject(0))); } public function testWalkGreaterThanEqualsComparison() : void { $closure = $this->visitor->walkComparison($this->builder->gte('foo', 1)); self::assertTrue($closure(new TestObject(2))); self::assertTrue($closure(new TestObject(1))); self::assertFalse($closure(new TestObject(0))); } public function testWalkGreaterThanComparison() : void { $closure = $this->visitor->walkComparison($this->builder->gt('foo', 1)); self::assertTrue($closure(new TestObject(2))); self::assertFalse($closure(new TestObject(1))); self::assertFalse($closure(new TestObject(0))); } public function testWalkInComparison() : void { $closure = $this->visitor->walkComparison($this->builder->in('foo', [1, 2, 3, '04'])); self::assertTrue($closure(new TestObject(2))); self::assertTrue($closure(new TestObject(1))); self::assertFalse($closure(new TestObject(0))); self::assertFalse($closure(new TestObject(4))); self::assertTrue($closure(new TestObject('04'))); } public function testWalkNotInComparison() : void { $closure = $this->visitor->walkComparison($this->builder->notIn('foo', [1, 2, 3, '04'])); self::assertFalse($closure(new TestObject(1))); self::assertFalse($closure(new TestObject(2))); self::assertTrue($closure(new TestObject(0))); self::assertTrue($closure(new TestObject(4))); self::assertFalse($closure(new TestObject('04'))); } public function testWalkContainsComparison() : void { $closure = $this->visitor->walkComparison($this->builder->contains('foo', 'hello')); self::assertTrue($closure(new TestObject('hello world'))); self::assertFalse($closure(new TestObject('world'))); } public function testWalkMemberOfComparisonWithObject() : void { $closure = $this->visitor->walkComparison($this->builder->memberof('foo', 2)); self::assertTrue($closure(new TestObject([1, 2, 3]))); self::assertTrue($closure(new TestObject([2]))); self::assertFalse($closure(new TestObject([1, 3, 5]))); self::assertFalse($closure(new TestObject([1, '02']))); } public function testWalkStartsWithComparison() : void { $closure = $this->visitor->walkComparison($this->builder->startsWith('foo', 'hello')); self::assertTrue($closure(new TestObject('hello world'))); self::assertFalse($closure(new TestObject('world'))); } public function testWalkEndsWithComparison() : void { $closure = $this->visitor->walkComparison($this->builder->endsWith('foo', 'world')); self::assertTrue($closure(new TestObject('hello world'))); self::assertFalse($closure(new TestObject('hello'))); } public function testWalkAndCompositeExpression() : void { $closure = $this->visitor->walkCompositeExpression( $this->builder->andX( $this->builder->eq('foo', 1), $this->builder->eq('bar', 1) ) ); self::assertTrue($closure(new TestObject(1, 1))); self::assertFalse($closure(new TestObject(1, 0))); self::assertFalse($closure(new TestObject(0, 1))); self::assertFalse($closure(new TestObject(0, 0))); } public function testWalkOrCompositeExpression() : void { $closure = $this->visitor->walkCompositeExpression( $this->builder->orX( $this->builder->eq('foo', 1), $this->builder->eq('bar', 1) ) ); self::assertTrue($closure(new TestObject(1, 1))); self::assertTrue($closure(new TestObject(1, 0))); self::assertTrue($closure(new TestObject(0, 1))); self::assertFalse($closure(new TestObject(0, 0))); } public function testSortByFieldAscending() : void { $objects = [new TestObject('b'), new TestObject('a'), new TestObject('c')]; $sort = ClosureExpressionVisitor::sortByField('foo'); usort($objects, $sort); self::assertEquals('a', $objects[0]->getFoo()); self::assertEquals('b', $objects[1]->getFoo()); self::assertEquals('c', $objects[2]->getFoo()); } public function testSortByFieldDescending() : void { $objects = [new TestObject('b'), new TestObject('a'), new TestObject('c')]; $sort = ClosureExpressionVisitor::sortByField('foo', -1); usort($objects, $sort); self::assertEquals('c', $objects[0]->getFoo()); self::assertEquals('b', $objects[1]->getFoo()); self::assertEquals('a', $objects[2]->getFoo()); } public function testSortDelegate() : void { $objects = [new TestObject('a', 'c'), new TestObject('a', 'b'), new TestObject('a', 'a')]; $sort = ClosureExpressionVisitor::sortByField('bar', 1); $sort = ClosureExpressionVisitor::sortByField('foo', 1, $sort); usort($objects, $sort); self::assertEquals('a', $objects[0]->getBar()); self::assertEquals('b', $objects[1]->getBar()); self::assertEquals('c', $objects[2]->getBar()); } public function testArrayComparison() : void { $closure = $this->visitor->walkComparison($this->builder->eq('foo', 42)); self::assertTrue($closure(['foo' => 42])); } } class TestObject { /** @var mixed */ private $foo; /** @var mixed */ private $bar; /** @var mixed */ private $baz; /** @var mixed */ private $qux; public function __construct($foo = null, $bar = null, $baz = null, $qux = null) { $this->foo = $foo; $this->bar = $bar; $this->baz = $baz; $this->qux = $qux; } public function __call(string $name, array $arguments) { if ($name === 'getqux') { return $this->qux; } } public function getFoo() { return $this->foo; } public function getBar() { return $this->bar; } public function isBaz() { return $this->baz; } } class TestObjectNotCamelCase { /** @var int|null */ private $foo_bar; public function __construct(?int $foo_bar) { $this->foo_bar = $foo_bar; } public function getFooBar() { return $this->foo_bar; } } class TestObjectBothCamelCaseAndUnderscore { /** @var int|null */ private $foo_bar; /** @var int|null */ private $fooBar; public function __construct(?int $foo_bar = null, ?int $fooBar = null) { $this->foo_bar = $foo_bar; $this->fooBar = $fooBar; } public function getFooBar() : ?int { return $this->fooBar; } } class TestObjectPublicCamelCaseAndPrivateUnderscore { /** @var int|null */ private $foo_bar; /** @var int|null */ public $fooBar; public function __construct(?int $foo_bar = null, ?int $fooBar = null) { $this->foo_bar = $foo_bar; $this->fooBar = $fooBar; } public function getFooBar() : ?int { return $this->fooBar; } } class TestObjectBothPublic { /** @var mixed */ public $foo_bar; /** @var mixed */ public $fooBar; public function __construct($foo_bar = null, $fooBar = null) { $this->foo_bar = $foo_bar; $this->fooBar = $fooBar; } public function getFooBar() { return $this->foo_bar; } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/CollectionTest.php000066400000000000000000000034571356401024400316270ustar00rootroot00000000000000collection = new ArrayCollection(); } public function testToString() : void { $this->collection->add('testing'); self::assertTrue(is_string((string) $this->collection)); } /** * @group DDC-1637 */ public function testMatching() : void { $this->fillMatchingFixture(); $col = $this->collection->matching(new Criteria(Criteria::expr()->eq('foo', 'bar'))); self::assertInstanceOf(Collection::class, $col); self::assertNotSame($col, $this->collection); self::assertEquals(1, count($col)); } /** * @group DDC-1637 */ public function testMatchingOrdering() : void { $this->fillMatchingFixture(); $col = $this->collection->matching(new Criteria(null, ['foo' => 'DESC'])); self::assertInstanceOf(Collection::class, $col); self::assertNotSame($col, $this->collection); self::assertEquals(2, count($col)); self::assertEquals('baz', $col->first()->foo); self::assertEquals('bar', $col->last()->foo); } /** * @group DDC-1637 */ public function testMatchingSlice() : void { $this->fillMatchingFixture(); $col = $this->collection->matching(new Criteria(null, null, 1, 1)); self::assertInstanceOf(Collection::class, $col); self::assertNotSame($col, $this->collection); self::assertEquals(1, count($col)); self::assertEquals('baz', $col[0]->foo); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php000066400000000000000000000060501356401024400312660ustar00rootroot00000000000000 'ASC'], 10, 20); self::assertSame($expr, $criteria->getWhereExpression()); self::assertEquals(['foo' => 'ASC'], $criteria->getOrderings()); self::assertEquals(10, $criteria->getFirstResult()); self::assertEquals(20, $criteria->getMaxResults()); } public function testWhere() : void { $expr = new Comparison('field', '=', 'value'); $criteria = new Criteria(); $criteria->where($expr); self::assertSame($expr, $criteria->getWhereExpression()); } public function testAndWhere() : void { $expr = new Comparison('field', '=', 'value'); $criteria = new Criteria(); $criteria->where($expr); $expr = $criteria->getWhereExpression(); $criteria->andWhere($expr); $where = $criteria->getWhereExpression(); self::assertInstanceOf(CompositeExpression::class, $where); self::assertEquals(CompositeExpression::TYPE_AND, $where->getType()); self::assertSame([$expr, $expr], $where->getExpressionList()); } public function testAndWhereWithoutWhere() : void { $expr = new Comparison('field', '=', 'value'); $criteria = new Criteria(); $criteria->andWhere($expr); self::assertSame($expr, $criteria->getWhereExpression()); } public function testOrWhere() : void { $expr = new Comparison('field', '=', 'value'); $criteria = new Criteria(); $criteria->where($expr); $expr = $criteria->getWhereExpression(); $criteria->orWhere($expr); $where = $criteria->getWhereExpression(); self::assertInstanceOf(CompositeExpression::class, $where); self::assertEquals(CompositeExpression::TYPE_OR, $where->getType()); self::assertSame([$expr, $expr], $where->getExpressionList()); } public function testOrWhereWithoutWhere() : void { $expr = new Comparison('field', '=', 'value'); $criteria = new Criteria(); $criteria->orWhere($expr); self::assertSame($expr, $criteria->getWhereExpression()); } public function testOrderings() : void { $criteria = Criteria::create() ->orderBy(['foo' => 'ASC']); self::assertEquals(['foo' => 'ASC'], $criteria->getOrderings()); } public function testExpr() : void { self::assertInstanceOf(ExpressionBuilder::class, Criteria::expr()); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/DerivedCollectionTest.php000066400000000000000000000017701356401024400331260ustar00rootroot00000000000000map($closure)); self::assertInstanceOf(DerivedArrayCollection::class, $collection->filter($closure)); self::assertContainsOnlyInstancesOf(DerivedArrayCollection::class, $collection->partition($closure)); self::assertInstanceOf(DerivedArrayCollection::class, $collection->matching(new Criteria())); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/Expr/000077500000000000000000000000001356401024400270705ustar00rootroot00000000000000CompositeExpressionTest.php000066400000000000000000000043371356401024400344130ustar00rootroot00000000000000php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/Expr new Value('value')], ['expression' => 'wrong-type'], ]; } /** * @dataProvider invalidDataProvider */ public function testExceptions($expression) : void { $type = CompositeExpression::TYPE_AND; $expressions = [$expression]; $this->expectException(RuntimeException::class); new CompositeExpression($type, $expressions); } public function testGetType() : void { $compositeExpression = $this->createCompositeExpression(); $expectedType = CompositeExpression::TYPE_AND; $actualType = $compositeExpression->getType(); self::assertSame($expectedType, $actualType); } protected function createCompositeExpression() : CompositeExpression { $type = CompositeExpression::TYPE_AND; $expressions = [$this->createMock(Expression::class)]; return new CompositeExpression($type, $expressions); } public function testGetExpressionList() : void { $compositeExpression = $this->createCompositeExpression(); $expectedExpressionList = [$this->createMock(Expression::class)]; $actualExpressionList = $compositeExpression->getExpressionList(); self::assertEquals($expectedExpressionList, $actualExpressionList); } public function testVisitor() : void { $compositeExpression = $this->createCompositeExpression(); $visitor = $this->getMockForAbstractClass(ExpressionVisitor::class); $visitor ->expects($this->once()) ->method('walkCompositeExpression'); /** @var ExpressionVisitor $visitor */ $compositeExpression->visit($visitor); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/Expr/ValueTest.php000066400000000000000000000016241356401024400315200ustar00rootroot00000000000000getValue(); self::assertEquals($value, $actualValue); } public function testVisitor() : void { $visitor = $this->getMockForAbstractClass(ExpressionVisitor::class); $visitor ->expects($this->once()) ->method('walkValue'); /** @var ExpressionVisitor $visitor */ $value = 'foo'; $valueExpression = new Value($value); $valueExpression->visit($visitor); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/Common/Collections/ExpressionBuilderTest.php000066400000000000000000000100661356401024400331740ustar00rootroot00000000000000builder = new ExpressionBuilder(); } public function testAndX() : void { $expr = $this->builder->andX($this->builder->eq('a', 'b')); self::assertInstanceOf(CompositeExpression::class, $expr); self::assertEquals(CompositeExpression::TYPE_AND, $expr->getType()); } public function testOrX() : void { $expr = $this->builder->orX($this->builder->eq('a', 'b')); self::assertInstanceOf(CompositeExpression::class, $expr); self::assertEquals(CompositeExpression::TYPE_OR, $expr->getType()); } public function testInvalidAndXArgument() : void { $this->expectException(RuntimeException::class); $this->builder->andX('foo'); } public function testEq() : void { $expr = $this->builder->eq('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::EQ, $expr->getOperator()); } public function testNeq() : void { $expr = $this->builder->neq('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::NEQ, $expr->getOperator()); } public function testLt() : void { $expr = $this->builder->lt('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::LT, $expr->getOperator()); } public function testGt() : void { $expr = $this->builder->gt('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::GT, $expr->getOperator()); } public function testGte() : void { $expr = $this->builder->gte('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::GTE, $expr->getOperator()); } public function testLte() : void { $expr = $this->builder->lte('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::LTE, $expr->getOperator()); } public function testIn() : void { $expr = $this->builder->in('a', ['b']); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::IN, $expr->getOperator()); } public function testNotIn() : void { $expr = $this->builder->notIn('a', ['b']); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::NIN, $expr->getOperator()); } public function testIsNull() : void { $expr = $this->builder->isNull('a'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::EQ, $expr->getOperator()); } public function testContains() : void { $expr = $this->builder->contains('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::CONTAINS, $expr->getOperator()); } public function testMemberOf() : void { $expr = $this->builder->memberOf('b', ['a']); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::MEMBER_OF, $expr->getOperator()); } public function testStartsWith() : void { $expr = $this->builder->startsWith('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::STARTS_WITH, $expr->getOperator()); } public function testEndsWith() : void { $expr = $this->builder->endsWith('a', 'b'); self::assertInstanceOf(Comparison::class, $expr); self::assertEquals(Comparison::ENDS_WITH, $expr->getOperator()); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/DerivedArrayCollection.php000066400000000000000000000010441356401024400275510ustar00rootroot00000000000000foo = $foo; parent::__construct($elements); } protected function createFrom(array $elements) : self { return new static($this->foo, $elements); } } php-doctrine-collections-1.6.4/tests/Doctrine/Tests/LazyArrayCollection.php000066400000000000000000000014101356401024400271030ustar00rootroot00000000000000collectionOnInitialization = $collection; } /** * Do the initialization logic. */ protected function doInitialize() : void { $this->collection = $this->collectionOnInitialization; } }