diff --git a/.github/workflows/php-test.yml b/.github/workflows/php-test.yml new file mode 100644 index 0000000..85e4dd7 --- /dev/null +++ b/.github/workflows/php-test.yml @@ -0,0 +1,97 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later +name: Test PHP tools + +on: + push: + branches: + - master + paths: + - '**.php' + - '**/composer.json' + - '**/composer.lock' + - '.github/workflows/php-test.yml' + pull_request: + paths: + - '**.php' + - '**/composer.json' + - '**/composer.lock' + - '.github/workflows/php-test.yml' + +permissions: + contents: read + +concurrency: + group: php-test-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + # Discover every PHP tool (any directory with a composer.json) so new tools + # are picked up automatically without touching this workflow. + discover: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.find.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Find composer projects + id: find + run: | + dirs=$(find . -mindepth 2 -maxdepth 2 -name composer.json -not -path '*/vendor/*' \ + -printf '%h\n' | sed 's#^\./##' | sort -u | jq -R . | jq -sc .) + echo "matrix=$dirs" >> "$GITHUB_OUTPUT" + echo "Discovered: $dirs" + + test: + needs: discover + if: needs.discover.outputs.matrix != '[]' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + dir: ${{ fromJson(needs.discover.outputs.matrix) }} + + defaults: + run: + working-directory: ${{ matrix.dir }} + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + # Matches the PHP version used by the release changelog workflow. + - name: Set up PHP + uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 + with: + php-version: '8.4' + coverage: none + + - name: Install dependencies + run: composer install --no-progress + + - name: Lint PHP files + run: find . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l + + # Runs the test suite only for tools that define a "test" composer script. + - name: Run tests + run: | + if composer run-script --list 2>/dev/null | grep -qE '^\s*test\b'; then + composer test + else + echo "No 'test' script in ${{ matrix.dir }}/composer.json, skipping." + fi + + # Single fixed-name check that aggregates the dynamic matrix, so branch + # protection can require one status regardless of how many tools exist. + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: [discover, test] + if: always() + name: php-test-summary + steps: + - name: Summary status + run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi diff --git a/.gitignore b/.gitignore index 1faf017..55d81e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ vendor credentials.json .DS_Store -milestone_move_progress.json \ No newline at end of file +milestone_move_progress.json +.phpunit.result.cache \ No newline at end of file diff --git a/changelog/composer.json b/changelog/composer.json index 43401db..a46cbd1 100644 --- a/changelog/composer.json +++ b/changelog/composer.json @@ -3,5 +3,11 @@ "symfony/console": "^8.1", "knplabs/github-api": "^3.16", "guzzlehttp/guzzle": "^7.13" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "scripts": { + "test": "phpunit" } } diff --git a/changelog/composer.lock b/changelog/composer.lock index 077b63a..4cae4d0 100644 --- a/changelog/composer.lock +++ b/changelog/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "42f479f4f3ac0e74ead113515d230d0e", + "content-hash": "c05211ec07272666a09bd3a0ba98c87c", "packages": [ { "name": "clue/stream-filter", @@ -2151,7 +2151,1772 @@ "time": "2026-05-29T05:06:50+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.8.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + }, + "time": "2026-07-04T14:30:18+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "11.0.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2c1ed04922802c15e1de5d7447b4856de949cf56", + "reference": "2c1ed04922802c15e1de5d7447b4856de949cf56", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^5.7.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.1", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.3.1" + }, + "require-dev": { + "phpunit/phpunit": "^11.5.46" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.12" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" + } + ], + "time": "2025-12-24T07:01:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/2f3a64888c814fc235386b7387dd5b5ed92ad903", + "reference": "2f3a64888c814fc235386b7387dd5b5ed92ad903", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" + } + ], + "time": "2026-02-02T13:52:54+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2", + "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^11.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:07:44+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:08:43+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "7.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:09:35+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "11.5.56", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "5f83edffa6967c3db468d48a695ec7bcb02e9256" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5f83edffa6967c3db468d48a695ec7bcb02e9256", + "reference": "5f83edffa6967c3db468d48a695ec7bcb02e9256", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-filter": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0.12", + "phpunit/php-file-iterator": "^5.1.1", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.3", + "sebastian/comparator": "^6.3.3", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.1", + "sebastian/exporter": "^6.3.2", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/recursion-context": "^6.0.3", + "sebastian/type": "^5.1.3", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.56" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsoring.html", + "type": "other" + } + ], + "time": "2026-07-06T14:52:39+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180", + "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:41:36+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "reference": "54391c61e4af8078e5b276ab082b6d3c54c9ad64", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2025-03-19T07:56:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e", + "reference": "183a9b2632194febd219bb9246eee421dad8d45e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:45:54+00:00" + }, + { + "name": "sebastian/comparator", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "reference": "2c95e1e86cb8dd41beb8d502057d1081ccc8eca9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:26:40+00:00" + }, + { + "name": "sebastian/complexity", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0", + "reference": "ee41d384ab1906c68852636b6de493846e13e5a0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:49:50+00:00" + }, + { + "name": "sebastian/diff", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:53:05+00:00" + }, + { + "name": "sebastian/environment", + "version": "7.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" + } + ], + "time": "2025-05-21T11:55:47+00:00" + }, + { + "name": "sebastian/exporter", + "version": "6.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/70a298763b40b213ec087c51c739efcaa90bcd74", + "reference": "70a298763b40b213ec087c51c739efcaa90bcd74", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:12:51+00:00" + }, + { + "name": "sebastian/global-state", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7", + "reference": "3be331570a721f9a4b5917f4209773de17f747d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:57:36+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^5.0", + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T04:58:38+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "6.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa", + "reference": "f5b498e631a74204185071eb41f33f38d64608aa", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:00:13+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-07-03T05:01:32+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "6.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-13T04:42:22+00:00" + }, + { + "name": "sebastian/type", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "reference": "f77d2d4e78738c98d9a68d2596fe5e8fa380f449", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "phpunit/phpunit": "^11.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" + } + ], + "time": "2025-08-09T06:55:48+00:00" + }, + { + "name": "sebastian/version", + "version": "5.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874", + "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-10-09T05:16:32+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": {}, diff --git a/changelog/index.php b/changelog/index.php index da30dd6..7fe8c93 100644 --- a/changelog/index.php +++ b/changelog/index.php @@ -716,7 +716,10 @@ public function groupPRsByRepo($prs) } } -$application = new Application(); - -$application->add(new GenerateChangelogCommand()); -$application->run(); +// Only bootstrap and run the application when executed directly on the CLI, +// so the command class can be loaded by tests without running the app. +if (PHP_SAPI === 'cli' && isset($_SERVER['SCRIPT_FILENAME']) && realpath($_SERVER['SCRIPT_FILENAME']) === __FILE__) { + $application = new Application(); + $application->addCommand(new GenerateChangelogCommand()); + $application->run(); +} diff --git a/changelog/phpunit.xml b/changelog/phpunit.xml new file mode 100644 index 0000000..8112c8d --- /dev/null +++ b/changelog/phpunit.xml @@ -0,0 +1,13 @@ + + + + + tests + + + diff --git a/changelog/tests/GenerateChangelogCommandTest.php b/changelog/tests/GenerateChangelogCommandTest.php new file mode 100644 index 0000000..1ce4068 --- /dev/null +++ b/changelog/tests/GenerateChangelogCommandTest.php @@ -0,0 +1,82 @@ +assertTrue( + class_exists(GenerateChangelogCommand::class), + 'GenerateChangelogCommand must be declared by index.php', + ); + $this->assertInstanceOf(Command::class, new GenerateChangelogCommand()); + } + + public function testCommandCanBeRegisteredAndResolved(): void + { + $application = new Application(); + $application->addCommand(new GenerateChangelogCommand()); + + $command = $application->find('generate:changelog'); + $this->assertInstanceOf(GenerateChangelogCommand::class, $command); + } + + /** + * Runs the real entrypoint the release workflow invokes. This is the only + * test that exercises index.php's own bootstrap (Application creation and + * command registration), so it catches a removed/renamed Console API used + * there, not just in this test's own setup. + */ + public function testEntrypointBootstrapsWithoutFatalError(): void + { + $index = escapeshellarg(dirname(__DIR__) . '/index.php'); + exec(PHP_BINARY . " $index generate:changelog --help 2>&1", $output, $exitCode); + $out = implode("\n", $output); + + $this->assertSame(0, $exitCode, "index.php exited non-zero:\n$out"); + $this->assertStringContainsString('generate:changelog', $out); + } + + public function testCommandDefinitionMatchesConfigure(): void + { + $command = new GenerateChangelogCommand(); + $definition = $command->getDefinition(); + + foreach (['repo', 'base', 'head'] as $argument) { + $this->assertTrue( + $definition->hasArgument($argument), + "Missing expected argument: $argument", + ); + } + + foreach (['format', 'no-bots', 'skip-label', 'skip-drafts'] as $option) { + $this->assertTrue( + $definition->hasOption($option), + "Missing expected option: $option", + ); + } + } +} diff --git a/sensitive-issue-searcher/composer.json b/sensitive-issue-searcher/composer.json index 65d92f3..21a97f7 100644 --- a/sensitive-issue-searcher/composer.json +++ b/sensitive-issue-searcher/composer.json @@ -1,7 +1,7 @@ { "require": { - "knplabs/github-api": "^2.1", - "php-http/guzzle6-adapter": "^1.1", - "cache/redis-adapter": "^0.5.0" + "knplabs/github-api": "^3.16", + "guzzlehttp/guzzle": "^7.13", + "http-interop/http-factory-guzzle": "^1.2" } } diff --git a/sensitive-issue-searcher/composer.lock b/sensitive-issue-searcher/composer.lock index b46a293..6789901 100644 --- a/sensitive-issue-searcher/composer.lock +++ b/sensitive-issue-searcher/composer.lock @@ -4,283 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8babc3e847c1633f8d0d38507813fe6e", + "content-hash": "fc489e5df29f317da6dbc5b0a48044d4", "packages": [ - { - "name": "cache/adapter-common", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/adapter-common.git", - "reference": "2adecd1375fe2ce15b1679349965d7fa73f2676b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/2adecd1375fe2ce15b1679349965d7fa73f2676b", - "reference": "2adecd1375fe2ce15b1679349965d7fa73f2676b", - "shasum": "" - }, - "require": { - "cache/tag-interop": "^1.0", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Common\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "Common classes for PSR-6 adapters", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr-6", - "tag" - ], - "time": "2017-03-13T08:24:04+00:00" - }, - { - "name": "cache/hierarchical-cache", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/hierarchical-cache.git", - "reference": "201c6d67ff451642ce62d3bab193936361618776" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/hierarchical-cache/zipball/201c6d67ff451642ce62d3bab193936361618776", - "reference": "201c6d67ff451642ce62d3bab193936361618776", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^0.4", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Hierarchy\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "hierarchical", - "hierarchy", - "psr-6" - ], - "time": "2017-03-13T10:43:18+00:00" - }, - { - "name": "cache/redis-adapter", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/redis-adapter.git", - "reference": "8f0bea394ea1ea36faf8a0b886028233c7e472b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/redis-adapter/zipball/8f0bea394ea1ea36faf8a0b886028233c7e472b8", - "reference": "8f0bea394ea1ea36faf8a0b886028233c7e472b8", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^0.4", - "cache/hierarchical-cache": "^0.4", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0" - }, - "provide": { - "psr/cache-implementation": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "suggest": { - "ext-redis": "The extension required to use this pool." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.6-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Redis\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "phpredis", - "psr-6", - "redis", - "tag" - ], - "time": "2017-03-13T09:25:46+00:00" - }, - { - "name": "cache/tag-interop", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/tag-interop.git", - "reference": "c7496dd81530f538af27b4f2713cde97bc292832" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/tag-interop/zipball/c7496dd81530f538af27b4f2713cde97bc292832", - "reference": "c7496dd81530f538af27b4f2713cde97bc292832", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "psr/cache": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\TagInterop\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "homepage": "https://github.com/nicolas-grekas" - } - ], - "description": "Framework interoperable interfaces for tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr", - "psr6", - "tag" - ], - "time": "2017-03-13T09:14:27+00:00" - }, { "name": "clue/stream-filter", - "version": "v1.3.0", + "version": "v1.7.0", "source": { "type": "git", - "url": "https://github.com/clue/php-stream-filter.git", - "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785" + "url": "https://github.com/clue/stream-filter.git", + "reference": "049509fef80032cb3f051595029ab75b49a3c2f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785", - "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/049509fef80032cb3f051595029ab75b49a3c2f7", + "reference": "049509fef80032cb3f051595029ab75b49a3c2f7", "shasum": "" }, "require": { "php": ">=5.3" }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { "Clue\\StreamFilter\\": "src/" - }, - "files": [ - "src/functions.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -289,11 +42,11 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], "description": "A simple and modern approach to stream filtering in PHP", - "homepage": "https://github.com/clue/php-stream-filter", + "homepage": "https://github.com/clue/stream-filter", "keywords": [ "bucket brigade", "callback", @@ -303,41 +56,67 @@ "stream_filter_append", "stream_filter_register" ], - "time": "2015-11-08T23:41:30+00:00" + "support": { + "issues": "https://github.com/clue/stream-filter/issues", + "source": "https://github.com/clue/stream-filter/tree/v1.7.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2023-12-20T15:40:13+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.5.8", + "version": "7.15.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + "reference": "61443dfb33c62f308ee8add20f45b4d6e4bf8d2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/61443dfb33c62f308ee8add20f45b4d6e4bf8d2f", + "reference": "61443dfb33c62f308ee8add20f45b4d6e4bf8d2f", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.9", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17" + "guzzlehttp/promises": "^2.5.1", + "guzzlehttp/psr7": "^2.13", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.25" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "guzzle/client-integration-tests": "3.0.3", + "guzzlehttp/test-server": "^0.7", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -390,19 +169,20 @@ } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + "source": "https://github.com/guzzle/guzzle/tree/7.15.1" }, "funding": [ { @@ -418,38 +198,38 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:07+00:00" + "time": "2026-07-18T11:23:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "9ad1e4fc607446a055b95870c7f668e93b5cff29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/9ad1e4fc607446a055b95870c7f668e93b5cff29", + "reference": "9ad1e4fc607446a055b95870c7f668e93b5cff29", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -486,7 +266,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/2.5.1" }, "funding": [ { @@ -502,42 +282,51 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2026-07-08T15:48:39+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.9.1", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b" + "reference": "dad89620b7a6edb60c15858442eb2e408b45d8f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b", - "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dad89620b7a6edb60c15858442eb2e408b45d8f4", + "reference": "dad89620b7a6edb60c15858442eb2e408b45d8f4", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", + "symfony/polyfill-php80": "^1.25" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "1.1.0", + "jshttp/mime-db": "1.54.0.1", + "phpunit/phpunit": "^8.5.52 || ^9.6.34" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -576,6 +365,11 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -591,7 +385,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.1" + "source": "https://github.com/guzzle/psr7/tree/2.13.0" }, "funding": [ { @@ -607,47 +401,41 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:00:37+00:00" + "time": "2026-07-16T22:23:49+00:00" }, { - "name": "knplabs/github-api", - "version": "2.1.0", + "name": "http-interop/http-factory-guzzle", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "0feb0760f1f04197ccfd02d377eddb0a31f26d5e" + "url": "https://github.com/http-interop/http-factory-guzzle.git", + "reference": "c2c859ceb05c3f42e710b60555f4c35b6a4a3995" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/0feb0760f1f04197ccfd02d377eddb0a31f26d5e", - "reference": "0feb0760f1f04197ccfd02d377eddb0a31f26d5e", + "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/c2c859ceb05c3f42e710b60555f4c35b6a4a3995", + "reference": "c2c859ceb05c3f42e710b60555f4c35b6a4a3995", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "php-http/cache-plugin": "^1.2", - "php-http/client-common": "^1.3", - "php-http/client-implementation": "^1.0", - "php-http/discovery": "^1.0", - "php-http/httplug": "^1.1", - "psr/cache": "^1.0", - "psr/http-message": "^1.0" + "guzzlehttp/psr7": "^1.7||^2.0", + "php": ">=7.3", + "psr/http-factory": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "^1.0" }, "require-dev": { - "guzzlehttp/psr7": "^1.2", - "php-http/guzzle6-adapter": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.5", - "sllh/php-cs-fixer-styleci-bridge": "^1.3" + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^9.5" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } + "suggest": { + "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0" }, + "type": "library", "autoload": { "psr-4": { - "Github\\": "lib/Github/" + "Http\\Factory\\Guzzle\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -656,59 +444,74 @@ ], "authors": [ { - "name": "Thibault Duplessis", - "email": "thibault.duplessis@gmail.com", - "homepage": "http://ornicar.github.com" - }, - { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "GitHub API v3 client", - "homepage": "https://github.com/KnpLabs/php-github-api", + "description": "An HTTP Factory using Guzzle PSR7", "keywords": [ - "api", - "gh", - "gist", - "github" + "factory", + "http", + "psr-17", + "psr-7" ], - "time": "2017-03-23T08:15:40+00:00" + "support": { + "issues": "https://github.com/http-interop/http-factory-guzzle/issues", + "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.1" + }, + "time": "2025-12-15T11:28:16+00:00" }, { - "name": "php-http/cache-plugin", - "version": "v1.2.0", + "name": "knplabs/github-api", + "version": "v3.16.0", "source": { "type": "git", - "url": "https://github.com/php-http/cache-plugin.git", - "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356" + "url": "https://github.com/KnpLabs/php-github-api.git", + "reference": "25d7bafd6b0dd088d4850aef7fcc74dc4fba8b28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", - "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/25d7bafd6b0dd088d4850aef7fcc74dc4fba8b28", + "reference": "25d7bafd6b0dd088d4850aef7fcc74dc4fba8b28", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "php-http/client-common": "^1.1", - "php-http/message-factory": "^1.0", - "psr/cache": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0" + "ext-json": "*", + "php": "^7.2.5 || ^8.0", + "php-http/cache-plugin": "^1.7.1|^2.0", + "php-http/client-common": "^2.3", + "php-http/discovery": "^1.12", + "php-http/httplug": "^2.2", + "php-http/multipart-stream-builder": "^1.1.2", + "psr/cache": "^1.0|^2.0|^3.0", + "psr/http-client-implementation": "^1.0", + "psr/http-factory-implementation": "^1.0", + "psr/http-message": "^1.0|^2.0", + "symfony/deprecation-contracts": "^2.2|^3.0", + "symfony/polyfill-php80": "^1.17" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.5" + "guzzlehttp/guzzle": "^7.2", + "guzzlehttp/psr7": "^2.7", + "http-interop/http-factory-guzzle": "^1.0", + "php-http/mock-client": "^1.4.1", + "phpstan/extension-installer": "^1.0.5", + "phpstan/phpstan": "^0.12.57", + "phpstan/phpstan-deprecation-rules": "^0.12.5", + "phpunit/phpunit": "^8.5 || ^9.4", + "symfony/cache": "^5.1.8", + "symfony/phpunit-bridge": "^5.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-2.x": "2.20.x-dev", + "dev-master": "3.15-dev" } }, "autoload": { "psr-4": { - "Http\\Client\\Common\\Plugin\\": "src/" + "Github\\": "lib/Github/" } }, "notification-url": "https://packagist.org/downloads/", @@ -717,59 +520,64 @@ ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" + "name": "KnpLabs Team", + "homepage": "http://knplabs.com" + }, + { + "name": "Thibault Duplessis", + "email": "thibault.duplessis@gmail.com", + "homepage": "http://ornicar.github.com" } ], - "description": "PSR-6 Cache plugin for HTTPlug", - "homepage": "http://httplug.io", + "description": "GitHub API v3 client", + "homepage": "https://github.com/KnpLabs/php-github-api", "keywords": [ - "cache", - "http", - "httplug", - "plugin" + "api", + "gh", + "gist", + "github" ], - "time": "2016-08-16T12:12:50+00:00" + "support": { + "issues": "https://github.com/KnpLabs/php-github-api/issues", + "source": "https://github.com/KnpLabs/php-github-api/tree/v3.16.0" + }, + "funding": [ + { + "url": "https://github.com/acrobat", + "type": "github" + } + ], + "time": "2024-11-07T19:35:30+00:00" }, { - "name": "php-http/client-common", - "version": "v1.4.2", + "name": "php-http/cache-plugin", + "version": "2.1.0", "source": { "type": "git", - "url": "https://github.com/php-http/client-common.git", - "reference": "85b2501ad96a8746918527f34c0d7977424b2bb3" + "url": "https://github.com/php-http/cache-plugin.git", + "reference": "1443d3882c4c18556fe9b409f664ebc8c021940c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/85b2501ad96a8746918527f34c0d7977424b2bb3", - "reference": "85b2501ad96a8746918527f34c0d7977424b2bb3", + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/1443d3882c4c18556fe9b409f664ebc8c021940c", + "reference": "1443d3882c4c18556fe9b409f664ebc8c021940c", "shasum": "" }, "require": { - "php": ">=5.4", - "php-http/httplug": "^1.1", - "php-http/message": "^1.2", - "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0" + "php": "^7.1 || ^8.0", + "php-http/client-common": "^1.9 || ^2.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "psr/http-factory-implementation": "^1.0", + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "suggest": { - "php-http/cache-plugin": "PSR-6 Cache plugin", - "php-http/logger-plugin": "PSR-3 Logger plugin", - "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" + "nyholm/psr7": "^1.6.1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, "autoload": { "psr-4": { - "Http\\Client\\Common\\": "src/" + "Http\\Client\\Common\\Plugin\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -782,53 +590,61 @@ "email": "mark.sagikazar@gmail.com" } ], - "description": "Common HTTP Client implementations and tools for HTTPlug", + "description": "PSR-6 Cache plugin for HTTPlug", "homepage": "http://httplug.io", "keywords": [ - "client", - "common", + "cache", "http", - "httplug" + "httplug", + "plugin" ], - "time": "2017-03-18T11:14:35+00:00" + "support": { + "issues": "https://github.com/php-http/cache-plugin/issues", + "source": "https://github.com/php-http/cache-plugin/tree/2.1.0" + }, + "time": "2026-05-12T09:44:11+00:00" }, { - "name": "php-http/discovery", - "version": "1.2.1", + "name": "php-http/client-common", + "version": "2.7.3", "source": { "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "6b33475a3239439bc7ced287d0de0bb82e04d2f0" + "url": "https://github.com/php-http/client-common.git", + "reference": "dcc6de29c90dd74faab55f71b79d89409c4bf0c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/6b33475a3239439bc7ced287d0de0bb82e04d2f0", - "reference": "6b33475a3239439bc7ced287d0de0bb82e04d2f0", + "url": "https://api.github.com/repos/php-http/client-common/zipball/dcc6de29c90dd74faab55f71b79d89409c4bf0c1", + "reference": "dcc6de29c90dd74faab55f71b79d89409c4bf0c1", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^7.1 || ^8.0", + "php-http/httplug": "^2.0", + "php-http/message": "^1.6", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0 || ^2.0", + "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.17" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^2.0.2", - "php-http/httplug": "^1.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^2.4", - "puli/composer-plugin": "1.0.0-beta10" + "doctrine/instantiator": "^1.1", + "guzzlehttp/psr7": "^1.4", + "nyholm/psr7": "^1.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7" }, "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + "ext-json": "To detect JSON responses with the ContentTypePlugin", + "ext-libxml": "To detect XML responses with the ContentTypePlugin", + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { - "Http\\Discovery\\": "src/" + "Http\\Client\\Common\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -841,56 +657,70 @@ "email": "mark.sagikazar@gmail.com" } ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", - "homepage": "http://php-http.org", + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", "keywords": [ - "adapter", "client", - "discovery", - "factory", + "common", "http", - "message", - "psr7" + "httplug" ], - "time": "2017-03-02T06:56:00+00:00" + "support": { + "issues": "https://github.com/php-http/client-common/issues", + "source": "https://github.com/php-http/client-common/tree/2.7.3" + }, + "time": "2025-11-29T19:12:34+00:00" }, { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", + "name": "php-http/discovery", + "version": "1.20.0", "source": { "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + "url": "https://github.com/php-http/discovery.git", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" + "composer-plugin-api": "^1.0|^2.0", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" }, "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" }, "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" + "composer/composer": "^1.0.2|^2.0", + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "sebastian/comparator": "^3.0.5 || ^4.0.8", + "symfony/phpunit-bridge": "^6.4.4 || ^7.0.1" }, - "type": "library", + "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true }, "autoload": { "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } + "Http\\Discovery\\": "src/" + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -900,49 +730,51 @@ { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" } ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", + "homepage": "http://php-http.org", "keywords": [ - "Guzzle", - "http" + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr17", + "psr7" ], - "time": "2016-05-10T06:13:32+00:00" + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.20.0" + }, + "time": "2024-10-02T11:20:13+00:00" }, { "name": "php-http/httplug", - "version": "v1.1.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "url": "https://api.github.com/repos/php-http/httplug/zipball/5cad731844891a4c282f3f3e1b582c46839d22f4", + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4", "shasum": "" }, "require": { - "php": ">=5.4", - "php-http/promise": "^1.0", - "psr/http-message": "^1.0" + "php": "^7.1 || ^8.0", + "php-http/promise": "^1.1", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" + "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0", + "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { "Http\\Client\\": "src/" @@ -959,7 +791,8 @@ }, { "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "HTTPlug, the HTTP client abstraction for PHP", @@ -968,57 +801,57 @@ "client", "http" ], - "time": "2016-08-31T08:30:17+00:00" + "support": { + "issues": "https://github.com/php-http/httplug/issues", + "source": "https://github.com/php-http/httplug/tree/2.4.1" + }, + "time": "2024-09-23T11:39:58+00:00" }, { "name": "php-http/message", - "version": "1.5.0", + "version": "1.16.2", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "13df8c48f40ca7925303aa336f19be4b80984f01" + "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/13df8c48f40ca7925303aa336f19be4b80984f01", - "reference": "13df8c48f40ca7925303aa336f19be4b80984f01", + "url": "https://api.github.com/repos/php-http/message/zipball/06dd5e8562f84e641bf929bfe699ee0f5ce8080a", + "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a", "shasum": "" }, "require": { - "clue/stream-filter": "^1.3", - "php": ">=5.4", - "php-http/message-factory": "^1.0.2", - "psr/http-message": "^1.0" + "clue/stream-filter": "^1.5", + "php": "^7.2 || ^8.0", + "psr/http-message": "^1.1 || ^2.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" }, "require-dev": { - "akeneo/phpspec-skip-example-extension": "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", + "ergebnis/composer-normalize": "^2.6", "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0", - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" + "guzzlehttp/psr7": "^1.0 || ^2.0", + "laminas/laminas-diactoros": "^2.0 || ^3.0", + "php-http/message-factory": "^1.0.2", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", + "slim/slim": "^3.0" }, "suggest": { "ext-zlib": "Used with compressor/decompressor streams", "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, "files": [ "src/filters.php" - ] + ], + "psr-4": { + "Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1037,35 +870,41 @@ "message", "psr-7" ], - "time": "2017-02-14T08:58:37+00:00" + "support": { + "issues": "https://github.com/php-http/message/issues", + "source": "https://github.com/php-http/message/tree/1.16.2" + }, + "time": "2024-10-02T11:34:13+00:00" }, { - "name": "php-http/message-factory", - "version": "v1.0.2", + "name": "php-http/multipart-stream-builder", + "version": "1.4.2", "source": { "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + "url": "https://github.com/php-http/multipart-stream-builder.git", + "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/10086e6de6f53489cca5ecc45b6f468604d3460e", + "reference": "10086e6de6f53489cca5ecc45b6f468604d3460e", "shasum": "" }, "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" + "php": "^7.1 || ^8.0", + "php-http/discovery": "^1.15", + "psr/http-factory-implementation": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } + "require-dev": { + "nyholm/psr7": "^1.0", + "php-http/message": "^1.5", + "php-http/message-factory": "^1.0.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" }, + "type": "library", "autoload": { "psr-4": { - "Http\\Message\\": "src/" + "Http\\Message\\MultipartStream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1074,45 +913,47 @@ ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" } ], - "description": "Factory interfaces for PSR-7 HTTP Message", + "description": "A builder class that help you create a multipart stream", "homepage": "http://php-http.org", "keywords": [ "factory", "http", "message", - "stream", - "uri" + "multipart stream", + "stream" ], - "time": "2015-12-19T14:08:53+00:00" + "support": { + "issues": "https://github.com/php-http/multipart-stream-builder/issues", + "source": "https://github.com/php-http/multipart-stream-builder/tree/1.4.2" + }, + "time": "2024-09-04T13:22:54+00:00" }, { "name": "php-http/promise", - "version": "v1.0.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "url": "https://api.github.com/repos/php-http/promise/zipball/fc85b1fba37c169a69a07ef0d5a8075770cc1f83", + "reference": "fc85b1fba37c169a69a07ef0d5a8075770cc1f83", "shasum": "" }, + "require": { + "php": "^7.1 || ^8.0" + }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2 || ^6.3", + "phpspec/phpspec": "^5.1.2 || ^6.2 || ^7.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { "Http\\Promise\\": "src/" @@ -1123,13 +964,13 @@ "MIT" ], "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, { "name": "Joel Wurtz", "email": "joel.wurtz@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" } ], "description": "Promise used for asynchronous HTTP requests", @@ -1137,24 +978,28 @@ "keywords": [ "promise" ], - "time": "2016-01-26T13:27:02+00:00" + "support": { + "issues": "https://github.com/php-http/promise/issues", + "source": "https://github.com/php-http/promise/tree/1.3.1" + }, + "time": "2024-03-15T13:55:21+00:00" }, { "name": "psr/cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -1174,7 +1019,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -1183,34 +1028,38 @@ "psr", "psr-6" ], - "time": "2016-08-06T20:24:11+00:00" + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" }, { - "name": "psr/http-message", - "version": "1.1", + "name": "psr/http-client", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1220,40 +1069,39 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ "http", - "http-message", + "http-client", "psr", - "psr-7", - "request", - "response" + "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { - "name": "psr/log", - "version": "1.0.2", + "name": "psr/http-factory", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -1263,7 +1111,7 @@ }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1273,44 +1121,51 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "log", + "factory", + "http", + "message", "psr", - "psr-3" + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2016-10-10T12:19:37+00:00" + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" }, { - "name": "psr/simple-cache", - "version": "1.0.0", + "name": "psr/http-message", + "version": "2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\SimpleCache\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1320,18 +1175,23 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for simple caching", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "cache", - "caching", + "http", + "http-message", "psr", - "psr-16", - "simple-cache" + "psr-7", + "request", + "response" ], - "time": "2017-01-02T13:31:39+00:00" + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" }, { "name": "ralouphie/getallheaders", @@ -1378,98 +1238,36 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "symfony/options-resolver", - "version": "v3.2.6", + "name": "symfony/deprecation-contracts", + "version": "v3.7.1", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "56e3d0a41313f8a54326851f10690d591e62a24c" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/56e3d0a41313f8a54326851f10690d591e62a24c", - "reference": "56e3d0a41313f8a54326851f10690d591e62a24c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=8.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "time": "2017-02-21T09:12:04+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-main": "3.7-dev" } }, "autoload": { "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } + "function.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1477,30 +1275,18 @@ ], "authors": [ { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1" }, "funding": [ { @@ -1511,52 +1297,42 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "name": "symfony/options-resolver", + "version": "v8.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "url": "https://github.com/symfony/options-resolver.git", + "reference": "88f9c561f678a02d54b897014049fa839e33ff82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/88f9c561f678a02d54b897014049fa839e33ff82", + "reference": "88f9c561f678a02d54b897014049fa839e33ff82", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + "Symfony\\Component\\OptionsResolver\\": "" }, - "classmap": [ - "Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1565,26 +1341,23 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "Provides an improved replacement for the array_replace PHP function", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" + "config", + "configuration", + "options" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/options-resolver/tree/v8.1.0" }, "funding": [ { @@ -1595,38 +1368,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "name": "symfony/polyfill-php80", + "version": "v1.37.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411", + "reference": "dfb55726c3a76ea3b6459fcfda1ec2d80a682411", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1634,14 +1408,21 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -1651,7 +1432,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -1660,7 +1441,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.37.0" }, "funding": [ { @@ -1671,21 +1452,25 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2026-04-10T16:19:22+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.9.0" } diff --git a/sensitive-issue-searcher/search.php b/sensitive-issue-searcher/search.php index b1f306e..3e1d88d 100644 --- a/sensitive-issue-searcher/search.php +++ b/sensitive-issue-searcher/search.php @@ -38,13 +38,12 @@ $client = new \Github\Client(); -$client->authenticate($token, '', \Github\Client::AUTH_HTTP_TOKEN); +$client->authenticate($token, \Github\AuthMethod::ACCESS_TOKEN); -$paginator = new Github\ResultPager($client); +$paginator = new Github\ResultPager($client, 100); /** @var \Github\Api\Issue $issues */ $issueApi = $client->api('issue'); -$issueApi->setPerPage(100); /** @var array $issues */ $issues = $paginator->fetchAll($issueApi, 'all', [$owner, $repository , ['state' => 'all']]); foreach($issues as $issue) { diff --git a/sensitive-issue-searcher/vendor/autoload.php b/sensitive-issue-searcher/vendor/autoload.php deleted file mode 100644 index 6efec6e..0000000 --- a/sensitive-issue-searcher/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -use Cache\Adapter\Common\Exception\CacheException; -use Cache\Adapter\Common\Exception\CachePoolException; -use Cache\Adapter\Common\Exception\InvalidArgumentException; -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Psr\SimpleCache\CacheInterface; - -/** - * @author Aaron Scherer - * @author Tobias Nyholm - */ -abstract class AbstractCachePool implements PhpCachePool, LoggerAwareInterface, CacheInterface -{ - const SEPARATOR_TAG = '!'; - - /** - * @type LoggerInterface - */ - private $logger; - - /** - * @type PhpCacheItem[] deferred - */ - protected $deferred = []; - - /** - * @param PhpCacheItem $item - * @param int|null $ttl seconds from now - * - * @return bool true if saved - */ - abstract protected function storeItemInCache(PhpCacheItem $item, $ttl); - - /** - * Fetch an object from the cache implementation. - * - * If it is a cache miss, it MUST return [false, null, [], null] - * - * @param string $key - * - * @return array with [isHit, value, tags[], expirationTimestamp] - */ - abstract protected function fetchObjectFromCache($key); - - /** - * Clear all objects from cache. - * - * @return bool false if error - */ - abstract protected function clearAllObjectsFromCache(); - - /** - * Remove one object from cache. - * - * @param string $key - * - * @return bool - */ - abstract protected function clearOneObjectFromCache($key); - - /** - * Get an array with all the values in the list named $name. - * - * @param string $name - * - * @return array - */ - abstract protected function getList($name); - - /** - * Remove the list. - * - * @param string $name - * - * @return bool - */ - abstract protected function removeList($name); - - /** - * Add a item key on a list named $name. - * - * @param string $name - * @param string $key - */ - abstract protected function appendListItem($name, $key); - - /** - * Remove an item from the list. - * - * @param string $name - * @param string $key - */ - abstract protected function removeListItem($name, $key); - - /** - * Make sure to commit before we destruct. - */ - public function __destruct() - { - $this->commit(); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $this->validateKey($key); - if (isset($this->deferred[$key])) { - /** @type CacheItem $item */ - $item = clone $this->deferred[$key]; - $item->moveTagsToPrevious(); - - return $item; - } - - $func = function () use ($key) { - try { - return $this->fetchObjectFromCache($key); - } catch (\Exception $e) { - $this->handleException($e, __FUNCTION__); - } - }; - - return new CacheItem($key, $func); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $items = []; - foreach ($keys as $key) { - $items[$key] = $this->getItem($key); - } - - return $items; - } - - /** - * {@inheritdoc} - */ - public function hasItem($key) - { - try { - return $this->getItem($key)->isHit(); - } catch (\Exception $e) { - $this->handleException($e, __FUNCTION__); - } - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // Clear the deferred items - $this->deferred = []; - - try { - return $this->clearAllObjectsFromCache(); - } catch (\Exception $e) { - $this->handleException($e, __FUNCTION__); - } - } - - /** - * {@inheritdoc} - */ - public function deleteItem($key) - { - try { - return $this->deleteItems([$key]); - } catch (\Exception $e) { - $this->handleException($e, __FUNCTION__); - } - } - - /** - * {@inheritdoc} - */ - public function deleteItems(array $keys) - { - $deleted = true; - foreach ($keys as $key) { - $this->validateKey($key); - - // Delete form deferred - unset($this->deferred[$key]); - - // We have to commit here to be able to remove deferred hierarchy items - $this->commit(); - $this->preRemoveItem($key); - - if (!$this->clearOneObjectFromCache($key)) { - $deleted = false; - } - } - - return $deleted; - } - - /** - * {@inheritdoc} - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof PhpCacheItem) { - $e = new InvalidArgumentException('Cache items are not transferable between pools. Item MUST implement PhpCacheItem.'); - $this->handleException($e, __FUNCTION__); - } - - $this->removeTagEntries($item); - $this->saveTags($item); - $timeToLive = null; - if (null !== $timestamp = $item->getExpirationTimestamp()) { - $timeToLive = $timestamp - time(); - - if ($timeToLive < 0) { - return $this->deleteItem($item->getKey()); - } - } - - try { - return $this->storeItemInCache($item, $timeToLive); - } catch (\Exception $e) { - $this->handleException($e, __FUNCTION__); - } - } - - /** - * {@inheritdoc} - */ - public function saveDeferred(CacheItemInterface $item) - { - $this->deferred[$item->getKey()] = $item; - - return true; - } - - /** - * {@inheritdoc} - */ - public function commit() - { - $saved = true; - foreach ($this->deferred as $item) { - if (!$this->save($item)) { - $saved = false; - } - } - $this->deferred = []; - - return $saved; - } - - /** - * @param string $key - * - * @throws InvalidArgumentException - */ - protected function validateKey($key) - { - if (!is_string($key)) { - $e = new InvalidArgumentException(sprintf( - 'Cache key must be string, "%s" given', gettype($key) - )); - $this->handleException($e, __FUNCTION__); - } - if (!isset($key[0])) { - $e = new InvalidArgumentException('Cache key cannot be an empty string'); - $this->handleException($e, __FUNCTION__); - } - if (preg_match('|[\{\}\(\)/\\\@\:]|', $key)) { - $e = new InvalidArgumentException(sprintf( - 'Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\@:', - $key - )); - $this->handleException($e, __FUNCTION__); - } - } - - /** - * @param LoggerInterface $logger - */ - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * Logs with an arbitrary level if the logger exists. - * - * @param mixed $level - * @param string $message - * @param array $context - */ - protected function log($level, $message, array $context = []) - { - if ($this->logger !== null) { - $this->logger->log($level, $message, $context); - } - } - - /** - * Log exception and rethrow it. - * - * @param \Exception $e - * @param string $function - * - * @throws CachePoolException - */ - private function handleException(\Exception $e, $function) - { - $level = 'alert'; - if ($e instanceof InvalidArgumentException) { - $level = 'warning'; - } - - $this->log($level, $e->getMessage(), ['exception' => $e]); - if (!$e instanceof CacheException) { - $e = new CachePoolException(sprintf('Exception thrown when executing "%s". ', $function), 0, $e); - } - - throw $e; - } - - /** - * @param array $tags - * - * @return bool - */ - public function invalidateTags(array $tags) - { - $itemIds = []; - foreach ($tags as $tag) { - $itemIds = array_merge($itemIds, $this->getList($this->getTagKey($tag))); - } - - // Remove all items with the tag - $success = $this->deleteItems($itemIds); - - if ($success) { - // Remove the tag list - foreach ($tags as $tag) { - $this->removeList($this->getTagKey($tag)); - $l = $this->getList($this->getTagKey($tag)); - } - } - - return $success; - } - - public function invalidateTag($tag) - { - return $this->invalidateTags([$tag]); - } - - /** - * @param PhpCacheItem $item - */ - protected function saveTags(PhpCacheItem $item) - { - $tags = $item->getTags(); - foreach ($tags as $tag) { - $this->appendListItem($this->getTagKey($tag), $item->getKey()); - } - } - - /** - * Removes the key form all tag lists. When an item with tags is removed - * we MUST remove the tags. If we fail to remove the tags a new item with - * the same key will automatically get the previous tags. - * - * @param string $key - * - * @return $this - */ - protected function preRemoveItem($key) - { - $item = $this->getItem($key); - $this->removeTagEntries($item); - - return $this; - } - - /** - * @param PhpCacheItem $item - */ - private function removeTagEntries(PhpCacheItem $item) - { - $tags = $item->getPreviousTags(); - foreach ($tags as $tag) { - $this->removeListItem($this->getTagKey($tag), $item->getKey()); - } - } - - /** - * @param string $tag - * - * @return string - */ - protected function getTagKey($tag) - { - return 'tag'.self::SEPARATOR_TAG.$tag; - } - - /** - * {@inheritdoc} - */ - public function get($key, $default = null) - { - $item = $this->getItem($key); - if (!$item->isHit()) { - return $default; - } - - return $item->get(); - } - - /** - * {@inheritdoc} - */ - public function set($key, $value, $ttl = null) - { - $item = $this->getItem($key); - $item->set($value); - $item->expiresAfter($ttl); - - return $this->save($item); - } - - /** - * {@inheritdoc} - */ - public function delete($key) - { - return $this->deleteItem($key); - } - - /** - * {@inheritdoc} - */ - public function getMultiple($keys, $default = null) - { - if (!is_array($keys)) { - if (!$keys instanceof \Traversable) { - throw new InvalidArgumentException('$keys is neither an array nor Traversable'); - } - - // Since we need to throw an exception if *any* key is invalid, it doesn't - // make sense to wrap iterators or something like that. - $keys = iterator_to_array($keys, false); - } - - $items = $this->getItems($keys); - - return $this->generateValues($default, $items); - } - - /** - * @param $default - * @param $items - * - * @return \Generator - */ - private function generateValues($default, $items) - { - foreach ($items as $key => $item) { - /** @type $item CacheItemInterface */ - if (!$item->isHit()) { - yield $key => $default; - } else { - yield $key => $item->get(); - } - } - } - - /** - * {@inheritdoc} - */ - public function setMultiple($values, $ttl = null) - { - if (!is_array($values)) { - if (!$values instanceof \Traversable) { - throw new InvalidArgumentException('$values is neither an array nor Traversable'); - } - } - - $keys = []; - $arrayValues = []; - foreach ($values as $key => $value) { - if (is_int($key)) { - $key = (string) $key; - } - $this->validateKey($key); - $keys[] = $key; - $arrayValues[$key] = $value; - } - - $items = $this->getItems($keys); - $itemSuccess = true; - foreach ($items as $key => $item) { - $item->set($arrayValues[$key]); - - try { - $item->expiresAfter($ttl); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - - $itemSuccess = $itemSuccess && $this->saveDeferred($item); - } - - return $itemSuccess && $this->commit(); - } - - /** - * {@inheritdoc} - */ - public function deleteMultiple($keys) - { - if (!is_array($keys)) { - if (!$keys instanceof \Traversable) { - throw new InvalidArgumentException('$keys is neither an array nor Traversable'); - } - - // Since we need to throw an exception if *any* key is invalid, it doesn't - // make sense to wrap iterators or something like that. - $keys = iterator_to_array($keys, false); - } - - return $this->deleteItems($keys); - } - - /** - * {@inheritdoc} - */ - public function has($key) - { - return $this->hasItem($key); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/CacheItem.php b/sensitive-issue-searcher/vendor/cache/adapter-common/CacheItem.php deleted file mode 100644 index 5b37807..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/CacheItem.php +++ /dev/null @@ -1,266 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -use Cache\Adapter\Common\Exception\InvalidArgumentException; -use Cache\TagInterop\TaggableCacheItemInterface; - -/** - * @author Aaron Scherer - * @author Tobias Nyholm - */ -class CacheItem implements PhpCacheItem -{ - /** - * @type array - */ - private $prevTags = []; - - /** - * @type array - */ - private $tags = []; - - /** - * @type \Closure - */ - private $callable; - - /** - * @type string - */ - private $key; - - /** - * @type mixed - */ - private $value; - - /** - * The expiration timestamp is the source of truth. This is the UTC timestamp - * when the cache item expire. A value of zero means it never expires. A nullvalue - * means that no expiration is set. - * - * @type int|null - */ - private $expirationTimestamp = null; - - /** - * @type bool - */ - private $hasValue = false; - - /** - * @param string $key - * @param \Closure|bool $callable or boolean hasValue - */ - public function __construct($key, $callable = null, $value = null) - { - $this->key = $key; - - if ($callable === true) { - $this->hasValue = true; - $this->value = $value; - } elseif ($callable !== false) { - // This must be a callable or null - $this->callable = $callable; - } - } - - /** - * {@inheritdoc} - */ - public function getKey() - { - return $this->key; - } - - /** - * {@inheritdoc} - */ - public function set($value) - { - $this->value = $value; - $this->hasValue = true; - $this->callable = null; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function get() - { - if (!$this->isHit()) { - return; - } - - return $this->value; - } - - /** - * {@inheritdoc} - */ - public function isHit() - { - $this->initialize(); - - if (!$this->hasValue) { - return false; - } - - if ($this->expirationTimestamp !== null) { - return $this->expirationTimestamp > time(); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function getExpirationTimestamp() - { - return $this->expirationTimestamp; - } - - /** - * {@inheritdoc} - */ - public function expiresAt($expiration) - { - if ($expiration instanceof \DateTimeInterface) { - $this->expirationTimestamp = $expiration->getTimestamp(); - } elseif (is_int($expiration) || null === $expiration) { - $this->expirationTimestamp = $expiration; - } else { - throw new InvalidArgumentException('Cache item ttl/expiresAt must be of type integer or \DateTimeInterface.'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function expiresAfter($time) - { - if ($time === null) { - $this->expirationTimestamp = null; - } elseif ($time instanceof \DateInterval) { - $date = new \DateTime(); - $date->add($time); - $this->expirationTimestamp = $date->getTimestamp(); - } elseif (is_int($time)) { - $this->expirationTimestamp = time() + $time; - } else { - throw new InvalidArgumentException('Cache item ttl/expiresAfter must be of type integer or \DateInterval.'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getPreviousTags() - { - $this->initialize(); - - return $this->prevTags; - } - - public function getTags() - { - return $this->tags; - } - - /** - * {@inheritdoc} - */ - public function setTags(array $tags) - { - $this->tags = []; - $this->tag($tags); - - return $this; - } - - /** - * Adds a tag to a cache item. - * - * @param string|string[] $tags A tag or array of tags - * - * @throws InvalidArgumentException When $tag is not valid. - * - * @return TaggableCacheItemInterface - */ - private function tag($tags) - { - $this->initialize(); - - if (!is_array($tags)) { - $tags = [$tags]; - } - foreach ($tags as $tag) { - if (!is_string($tag)) { - throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given', is_object($tag) ? get_class($tag) : gettype($tag))); - } - if (isset($this->tags[$tag])) { - continue; - } - if (!isset($tag[0])) { - throw new InvalidArgumentException('Cache tag length must be greater than zero'); - } - if (isset($tag[strcspn($tag, '{}()/\@:')])) { - throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters {}()/\@:', $tag)); - } - $this->tags[$tag] = $tag; - } - - return $this; - } - - /** - * If callable is not null, execute it an populate this object with values. - */ - private function initialize() - { - if ($this->callable !== null) { - // $f will be $adapter->fetchObjectFromCache(); - $f = $this->callable; - $result = $f(); - $this->hasValue = $result[0]; - $this->value = $result[1]; - $this->prevTags = isset($result[2]) ? $result[2] : []; - $this->expirationTimestamp = null; - - if (isset($result[3]) && is_int($result[3])) { - $this->expirationTimestamp = $result[3]; - } - - $this->callable = null; - } - } - - /** - * @internal This function should never be used and considered private. - * - * Move tags from $tags to $prevTags - */ - public function moveTagsToPrevious() - { - $this->prevTags = $this->tags; - $this->tags = []; - } -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/Changelog.md b/sensitive-issue-searcher/vendor/cache/adapter-common/Changelog.md deleted file mode 100644 index 8a8db57..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/Changelog.md +++ /dev/null @@ -1,43 +0,0 @@ -# Change Log - -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. - -## 0.4.0 - -### Added - -* `AbstractCachePool` has 4 new abstract methods: `getList`, `removeList`, `appendListItem` and `removeListItem`. -* `AbstractCachePool::invalidateTags` and `AbstractCachePool::invalidateTags` -* Added interfaces for our items and pools `PhpCachePool` and `PhpCacheItem` -* Trait to help adapters to support tags. `TagSupportWithArray`. - -### Changed - -* First parameter to `AbstractCachePool::storeItemInCache` must be a `PhpCacheItem`. -* Return value from `AbstractCachePool::fetchObjectFromCache` must be a an array with 4 values. Added expiration timestamp. -* `HasExpirationDateInterface` is replaced by `HasExpirationTimestampInterface` -* We do not work with `\DateTime` internally anymore. We work with timestamps. - -## 0.3.3 - -### Fixed - -* Bugfix when you fetch data from the cache storage that was saved as "non-tagging item" but fetch as a tagging item. - -## 0.3.2 - -### Added - -* Cache pools do implement `LoggerAwareInterface` - -## 0.3.0 - -### Changed - -* The `AbstractCachePool` does not longer implement `TaggablePoolInterface`. However, the `CacheItem` does still implement `TaggableItemInterface`. -* `CacheItem::getKeyFromTaggedKey` has been removed -* The `CacheItem`'s second parameter is a callable that must return an array with 3 elements; [`hasValue`, `value`, `tags`]. - -## 0.2.0 - -No changelog before this version diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CacheException.php b/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CacheException.php deleted file mode 100644 index 54fbb11..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CacheException.php +++ /dev/null @@ -1,23 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common\Exception; - -use Psr\Cache\CacheException as CacheExceptionInterface; - -/** - * A base exception. All exceptions in this organization will extend this exception. - * - * @author Tobias Nyholm - */ -abstract class CacheException extends \RuntimeException implements CacheExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CachePoolException.php b/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CachePoolException.php deleted file mode 100644 index c0b7e59..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/CachePoolException.php +++ /dev/null @@ -1,21 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common\Exception; - -/** - * If an exception is caused by a pool or by the cache storage. - * - * @author Tobias Nyholm - */ -class CachePoolException extends CacheException -{ -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/InvalidArgumentException.php b/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/InvalidArgumentException.php deleted file mode 100644 index e3cc8f4..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common\Exception; - -use Psr\Cache\InvalidArgumentException as CacheInvalidArgumentException; -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInvalidArgumentException; - -class InvalidArgumentException extends CacheException implements CacheInvalidArgumentException, SimpleCacheInvalidArgumentException -{ -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/HasExpirationTimestampInterface.php b/sensitive-issue-searcher/vendor/cache/adapter-common/HasExpirationTimestampInterface.php deleted file mode 100644 index 22f0adf..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/HasExpirationTimestampInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -/** - * @author Aaron Scherer - * @author Tobias Nyholm - */ -interface HasExpirationTimestampInterface -{ - /** - * The timestamp when the object expires. - * - * @return int|null - */ - public function getExpirationTimestamp(); -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/LICENSE b/sensitive-issue-searcher/vendor/cache/adapter-common/LICENSE deleted file mode 100644 index 82f8fee..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Aaron Scherer, Tobias Nyholm - -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. - diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCacheItem.php b/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCacheItem.php deleted file mode 100644 index 477bddc..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCacheItem.php +++ /dev/null @@ -1,27 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -use Cache\TagInterop\TaggableCacheItemInterface; - -/** - * @author Tobias Nyholm - */ -interface PhpCacheItem extends HasExpirationTimestampInterface, TaggableCacheItemInterface -{ - /** - * Get the current tags. These are not the same tags as getPrevious tags. - * - * @return array - */ - public function getTags(); -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCachePool.php b/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCachePool.php deleted file mode 100644 index 5ccfb67..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/PhpCachePool.php +++ /dev/null @@ -1,34 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -use Cache\TagInterop\TaggableCacheItemPoolInterface; - -/** - * @author Tobias Nyholm - */ -interface PhpCachePool extends TaggableCacheItemPoolInterface -{ - /** - * {@inheritdoc} - * - * @return PhpCacheItem - */ - public function getItem($key); - - /** - * {@inheritdoc} - * - * @return array|\Traversable|PhpCacheItem[] - */ - public function getItems(array $keys = []); -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/README.md b/sensitive-issue-searcher/vendor/cache/adapter-common/README.md deleted file mode 100644 index 4a80677..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Common PSR-6 Cache pool -[![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Latest Stable Version](https://poser.pugx.org/cache/adapter-common/v/stable)](https://packagist.org/packages/cache/adapter-common) -[![codecov.io](https://codecov.io/github/php-cache/adapter-common/coverage.svg?branch=master)](https://codecov.io/github/php-cache/adapter-common?branch=master) -[![Total Downloads](https://poser.pugx.org/cache/adapter-common/downloads)](https://packagist.org/packages/cache/adapter-common) -[![Monthly Downloads](https://poser.pugx.org/cache/adapter-common/d/monthly.png)](https://packagist.org/packages/cache/adapter-common) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - -This repository contains shared classes and interfaces used by the PHP Cache organisation. To read about -features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](http://www.php-cache.com). - - -### Contribute - -Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or -report any issues you find on the [issue tracker](http://issues.php-cache.com). diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/TagSupportWithArray.php b/sensitive-issue-searcher/vendor/cache/adapter-common/TagSupportWithArray.php deleted file mode 100644 index 81859d2..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/TagSupportWithArray.php +++ /dev/null @@ -1,88 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common; - -/** - * This trait could be used by adapters that do not have a native support for lists. - * - * @author Tobias Nyholm - */ -trait TagSupportWithArray -{ - /** - * Get a value from the storage. - * - * @param string $name - * - * @return mixed - */ - abstract public function getDirectValue($name); - - /** - * Set a value to the storage. - * - * @param string $name - * @param mixed $value - */ - abstract public function setDirectValue($name, $value); - - /** - * {@inheritdoc} - */ - protected function appendListItem($name, $value) - { - $data = $this->getDirectValue($name); - if (!is_array($data)) { - $data = []; - } - $data[] = $value; - $this->setDirectValue($name, $data); - } - - /** - * {@inheritdoc} - */ - protected function getList($name) - { - $data = $this->getDirectValue($name); - if (!is_array($data)) { - $data = []; - } - - return $data; - } - - /** - * {@inheritdoc} - */ - protected function removeList($name) - { - $this->setDirectValue($name, []); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function removeListItem($name, $key) - { - $data = $this->getList($name); - foreach ($data as $i => $value) { - if ($key === $value) { - unset($data[$i]); - } - } - - return $this->setDirectValue($name, $data); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/Tests/CacheItemTest.php b/sensitive-issue-searcher/vendor/cache/adapter-common/Tests/CacheItemTest.php deleted file mode 100755 index e452315..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/Tests/CacheItemTest.php +++ /dev/null @@ -1,125 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Common\Tests; - -use Cache\Adapter\Common\CacheItem; -use Psr\Cache\CacheItemInterface; - -class CacheItemTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $item = new CacheItem('test_key'); - - $this->assertInstanceOf(CacheItem::class, $item); - $this->assertInstanceOf(CacheItemInterface::class, $item); - } - - public function testGetKey() - { - $item = new CacheItem('test_key'); - $this->assertEquals('test_key', $item->getKey()); - } - - public function testSet() - { - $item = new CacheItem('test_key'); - - $ref = new \ReflectionObject($item); - $valueProp = $ref->getProperty('value'); - $valueProp->setAccessible(true); - $hasValueProp = $ref->getProperty('hasValue'); - $hasValueProp->setAccessible(true); - - $this->assertEquals(null, $valueProp->getValue($item)); - $this->assertFalse($hasValueProp->getValue($item)); - - $item->set('value'); - - $this->assertEquals('value', $valueProp->getValue($item)); - $this->assertTrue($hasValueProp->getValue($item)); - } - - public function testGet() - { - $item = new CacheItem('test_key'); - $this->assertNull($item->get()); - - $item->set('test'); - $this->assertEquals('test', $item->get()); - } - - public function testHit() - { - $item = new CacheItem('test_key', true, 'value'); - $this->assertTrue($item->isHit()); - - $item = new CacheItem('test_key', false, 'value'); - $this->assertFalse($item->isHit()); - - $closure = function () { - return [true, 'value', []]; - }; - $item = new CacheItem('test_key', $closure); - $this->assertTrue($item->isHit()); - - $closure = function () { - return [false, null, []]; - }; - $item = new CacheItem('test_key', $closure); - $this->assertFalse($item->isHit()); - } - - public function testGetExpirationTimestamp() - { - $item = new CacheItem('test_key'); - - $this->assertNull($item->getExpirationTimestamp()); - - $timestamp = time(); - - $ref = new \ReflectionObject($item); - $prop = $ref->getProperty('expirationTimestamp'); - $prop->setAccessible(true); - $prop->setValue($item, $timestamp); - - $this->assertEquals($timestamp, $item->getExpirationTimestamp()); - } - - public function testExpiresAt() - { - $item = new CacheItem('test_key'); - - $this->assertNull($item->getExpirationTimestamp()); - - $time = time() + 1; - $item->expiresAt($time); - - $this->assertEquals($time, $item->getExpirationTimestamp()); - } - - public function testExpiresAfter() - { - $item = new CacheItem('test_key'); - - $this->assertNull($item->getExpirationTimestamp()); - - $item->expiresAfter(null); - $this->assertNull($this->getExpectedException()); - - $item->expiresAfter(new \DateInterval('PT1S')); - $this->assertEquals((new \DateTime('+1 second'))->getTimestamp(), $item->getExpirationTimestamp()); - - $item->expiresAfter(1); - $this->assertEquals((new \DateTime('+1 second'))->getTimestamp(), $item->getExpirationTimestamp()); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/composer.json b/sensitive-issue-searcher/vendor/cache/adapter-common/composer.json deleted file mode 100644 index a07763a..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "cache/adapter-common", - "description": "Common classes for PSR-6 adapters", - "type": "library", - "license": "MIT", - "minimum-stability": "dev", - "keywords": [ - "cache", - "psr-6", - "tag" - ], - "homepage": "http://www.php-cache.com/en/latest/", - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "psr/log": "^1.0", - "cache/tag-interop": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.1", - "cache/integration-tests": "^0.16" - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Common\\": "" - } - }, - "autoload-dev": { - "psr-4": { - "Cache\\Adapter\\Common\\Tests\\": "Tests/" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/cache/adapter-common/phpunit.xml.dist b/sensitive-issue-searcher/vendor/cache/adapter-common/phpunit.xml.dist deleted file mode 100644 index 61b3e0f..0000000 --- a/sensitive-issue-searcher/vendor/cache/adapter-common/phpunit.xml.dist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - ./Tests/ - - - - - - benchmark - - - - - - ./ - - ./Tests - ./vendor - - - - diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.github/PULL_REQUEST_TEMPLATE.md b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4a339b4..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a READ ONLY repository. - -Please make your pull request to https://github.com/php-cache/cache - -Thank you for contributing. diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.gitignore b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.gitignore deleted file mode 100644 index 8180267..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/vendor/ -composer.lock - diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.travis.yml b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.travis.yml deleted file mode 100644 index 942fe27..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Changelog.md b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Changelog.md deleted file mode 100644 index 6c77e37..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Changelog.md +++ /dev/null @@ -1,25 +0,0 @@ -# Change Log - -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. - -## UNRELEASED - -## 0.4.0 - -### Changed - -* `HierarchicalCachePoolTrait::getValueFormStore` was renamed to `HierarchicalCachePoolTrait::getDirectValue` - -### Removed - -* Dependency to `cache/taggable-cache`. - -## 0.3.0 - -### Changed - -The `HierarchicalPoolInterface` extends `CacheItemPoolInterface` - -## 0.2.1 - -No changelog before this version diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalCachePoolTrait.php b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalCachePoolTrait.php deleted file mode 100644 index 0a4a4a1..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalCachePoolTrait.php +++ /dev/null @@ -1,125 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Hierarchy; - -use Cache\Adapter\Common\AbstractCachePool; - -/** - * @author Tobias Nyholm - */ -trait HierarchicalCachePoolTrait -{ - /** - * A temporary cache for keys. - * - * @type array - */ - private $keyCache = []; - - /** - * Get a value from the storage. - * - * @param string $name - * - * @return mixed - */ - abstract public function getDirectValue($name); - - /** - * Get a key to use with the hierarchy. If the key does not start with HierarchicalPoolInterface::SEPARATOR - * this will return an unalterered key. This function supports a tagged key. Ie "foo:bar". - * - * @param string $key The original key - * @param string &$pathKey A cache key for the path. If this key is changed everything beyond that path is changed. - * - * @return string - */ - protected function getHierarchyKey($key, &$pathKey = null) - { - if (!$this->isHierarchyKey($key)) { - return $key; - } - - $key = $this->explodeKey($key); - - $keyString = ''; - // The comments below is for a $key = ["foo!tagHash", "bar!tagHash"] - foreach ($key as $name) { - // 1) $keyString = "foo!tagHash" - // 2) $keyString = "foo!tagHash![foo_index]!bar!tagHash" - $keyString .= $name; - $pathKey = sha1('path'.AbstractCachePool::SEPARATOR_TAG.$keyString); - - if (isset($this->keyCache[$pathKey])) { - $index = $this->keyCache[$pathKey]; - } else { - $index = $this->getDirectValue($pathKey); - $this->keyCache[$pathKey] = $index; - } - - // 1) $keyString = "foo!tagHash![foo_index]!" - // 2) $keyString = "foo!tagHash![foo_index]!bar!tagHash![bar_index]!" - $keyString .= AbstractCachePool::SEPARATOR_TAG.$index.AbstractCachePool::SEPARATOR_TAG; - } - - // Assert: $pathKey = "path!foo!tagHash![foo_index]!bar!tagHash" - // Assert: $keyString = "foo!tagHash![foo_index]!bar!tagHash![bar_index]!" - - // Make sure we do not get awfully long (>250 chars) keys - return sha1($keyString); - } - - /** - * Clear the cache for the keys. - */ - protected function clearHierarchyKeyCache() - { - $this->keyCache = []; - } - - /** - * A hierarchy key MUST begin with the separator. - * - * @param string $key - * - * @return bool - */ - private function isHierarchyKey($key) - { - return substr($key, 0, 1) === HierarchicalPoolInterface::HIERARCHY_SEPARATOR; - } - - /** - * This will take a hierarchy key ("|foo|bar") with tags ("|foo|bar!tagHash") and return an array with - * each level in the hierarchy appended with the tags. ["foo!tagHash", "bar!tagHash"]. - * - * @param string $key - * - * @return array - */ - private function explodeKey($string) - { - list($key, $tag) = explode(AbstractCachePool::SEPARATOR_TAG, $string.AbstractCachePool::SEPARATOR_TAG); - - if ($key === HierarchicalPoolInterface::HIERARCHY_SEPARATOR) { - $parts = ['root']; - } else { - $parts = explode(HierarchicalPoolInterface::HIERARCHY_SEPARATOR, $key); - // remove first element since it is always empty and replace it with 'root' - $parts[0] = 'root'; - } - - return array_map(function ($level) use ($tag) { - return $level.AbstractCachePool::SEPARATOR_TAG.$tag; - }, $parts); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalPoolInterface.php b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalPoolInterface.php deleted file mode 100644 index 4646c66..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/HierarchicalPoolInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Hierarchy; - -use Psr\Cache\CacheItemPoolInterface; - -/** - * Let you use hierarchy if you start your tag key with the HIERARCHY_SEPARATOR. - * - * @author Tobias Nyholm - */ -interface HierarchicalPoolInterface extends CacheItemPoolInterface -{ - const HIERARCHY_SEPARATOR = '|'; -} diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/LICENSE b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/LICENSE deleted file mode 100644 index 82f8fee..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Aaron Scherer, Tobias Nyholm - -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. - diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/README.md b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/README.md deleted file mode 100644 index 63d275e..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Hierarchical PSR-6 cache pool -[![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Latest Stable Version](https://poser.pugx.org/cache/hierarchical-cache/v/stable)](https://packagist.org/packages/cache/hierarchical-cache) -[![codecov.io](https://codecov.io/github/php-cache/hierarchical-cache/coverage.svg?branch=master)](https://codecov.io/github/php-cache/hierarchical-cache?branch=master) -[![Total Downloads](https://poser.pugx.org/cache/hierarchical-cache/downloads)](https://packagist.org/packages/cache/hierarchical-cache) -[![Monthly Downloads](https://poser.pugx.org/cache/hierarchical-cache/d/monthly.png)](https://packagist.org/packages/cache/hierarchical-cache) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - -This is an implementation for the PSR-6 for an hierarchical cache architecture. - -If you have a cache key like `|users|:uid|followers|:fid|likes` where `:uid` and `:fid` are arbitrary integers. You - may flush all followers by flushing `|users|:uid|followers`. - -It is a part of the PHP Cache organisation. To read about features like tagging and hierarchy support please read -the shared documentation at [www.php-cache.com](http://www.php-cache.com). - -### Install - -```bash -composer require cache/hierarchical-cache -``` - -### Use - -Read the [documentation on usage](http://www.php-cache.com/en/latest/hierarchy/). - -### Implement - -Read the [documentation on implementation](http://www.php-cache.com/en/latest/implementing-cache-pools/hierarchy/). - -### Contribute - -Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or -report any issues you find on the [issue tracker](http://issues.php-cache.com). - diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/Helper/CachePool.php b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/Helper/CachePool.php deleted file mode 100644 index 6ce7fe2..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/Helper/CachePool.php +++ /dev/null @@ -1,49 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Hierarchy\Tests\Helper; - -use Cache\Hierarchy\HierarchicalCachePoolTrait; - -/** - * A cache pool used in tests. - * - * @author Tobias Nyholm - */ -class CachePool -{ - use HierarchicalCachePoolTrait; - - private $storeValues = []; - - /** - * @param array $storeValues - */ - public function __construct(array $storeValues = []) - { - $this->storeValues = $storeValues; - } - - public function exposeClearHierarchyKeyCache() - { - $this->clearHierarchyKeyCache(); - } - - public function exposeGetHierarchyKey($key, &$pathKey = null) - { - return $this->getHierarchyKey($key, $pathKey); - } - - protected function getDirectValue($key) - { - return array_shift($this->storeValues); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/HierarchicalCachePoolTest.php b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/HierarchicalCachePoolTest.php deleted file mode 100644 index 497e612..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/Tests/HierarchicalCachePoolTest.php +++ /dev/null @@ -1,162 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Hierarchy\Tests; - -use Cache\Hierarchy\Tests\Helper\CachePool; - -/** - * We should not use constants on interfaces in the tests. Tests should break if the constant is changed. - * - * @author Tobias Nyholm - */ -class HierarchicalCachePoolTest extends \PHPUnit_Framework_TestCase -{ - private function assertEqualsSha1($expected, $result, $message = '') - { - $this->assertEquals(sha1($expected), $result, $message); - } - - public function testGetHierarchyKey() - { - $path = null; - - $pool = new CachePool(); - $result = $pool->exposeGetHierarchyKey('key', $path); - $this->assertEquals('key', $result); - $this->assertNull($path); - - $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']); - $result = $pool->exposeGetHierarchyKey('|foo|bar', $path); - $this->assertEqualsSha1('root!!idx_1!foo!!idx_2!bar!!idx_3!', $result); - $this->assertEqualsSha1('path!root!!idx_1!foo!!idx_2!bar!', $path); - - $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']); - $result = $pool->exposeGetHierarchyKey('|', $path); - $this->assertEqualsSha1('path!root!', $path); - $this->assertEqualsSha1('root!!idx_1!', $result); - } - - public function testGetHierarchyKeyWithTags() - { - $path = null; - - $pool = new CachePool(); - $result = $pool->exposeGetHierarchyKey('key!tagHash', $path); - $this->assertEquals('key!tagHash', $result); - $this->assertNull($path); - - $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']); - $result = $pool->exposeGetHierarchyKey('|foo|bar!tagHash', $path); - $this->assertEqualsSha1('root!tagHash!idx_1!foo!tagHash!idx_2!bar!tagHash!idx_3!', $result); - $this->assertEqualsSha1('path!root!tagHash!idx_1!foo!tagHash!idx_2!bar!tagHash', $path); - - $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']); - $result = $pool->exposeGetHierarchyKey('|!tagHash', $path); - $this->assertEqualsSha1('path!root!tagHash', $path); - $this->assertEqualsSha1('root!tagHash!idx_1!', $result); - } - - public function testGetHierarchyKeyEmptyCache() - { - $pool = new CachePool(); - $path = null; - - $result = $pool->exposeGetHierarchyKey('key', $path); - $this->assertEquals('key', $result); - $this->assertNull($path); - - $result = $pool->exposeGetHierarchyKey('|foo|bar', $path); - $this->assertEqualsSha1('root!!!foo!!!bar!!!', $result); - $this->assertEqualsSha1('path!root!!!foo!!!bar!', $path); - - $result = $pool->exposeGetHierarchyKey('|', $path); - $this->assertEqualsSha1('path!root!', $path); - $this->assertEqualsSha1('root!!!', $result); - } - - public function testKeyCache() - { - $path = null; - - $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']); - $result = $pool->exposeGetHierarchyKey('|foo', $path); - $this->assertEqualsSha1('root!!idx_1!foo!!idx_2!', $result); - $this->assertEqualsSha1('path!root!!idx_1!foo!', $path); - - // Make sure re reuse the old index value we already looked up for 'root'. - $result = $pool->exposeGetHierarchyKey('|bar', $path); - $this->assertEqualsSha1('root!!idx_1!bar!!idx_3!', $result); - $this->assertEqualsSha1('path!root!!idx_1!bar!', $path); - } - - public function testClearHierarchyKeyCache() - { - $pool = new CachePool(); - $prop = new \ReflectionProperty('Cache\Hierarchy\Tests\Helper\CachePool', 'keyCache'); - $prop->setAccessible(true); - - // add some values to the prop and make sure they are beeing cleared - $prop->setValue($pool, ['foo' => 'bar', 'baz' => 'biz']); - $pool->exposeClearHierarchyKeyCache(); - $this->assertEmpty($prop->getValue($pool), 'The key cache must be cleared after ::ClearHierarchyKeyCache'); - } - - public function testIsHierarchyKey() - { - $pool = new CachePool(); - $method = new \ReflectionMethod('Cache\Hierarchy\Tests\Helper\CachePool', 'isHierarchyKey'); - $method->setAccessible(true); - - $this->assertFalse($method->invoke($pool, 'key')); - $this->assertFalse($method->invoke($pool, 'key|bar')); - $this->assertFalse($method->invoke($pool, 'key|')); - $this->assertTrue($method->invoke($pool, '|key')); - $this->assertTrue($method->invoke($pool, '|key|bar')); - } - - public function testExplodeKey() - { - $pool = new CachePool(); - $method = new \ReflectionMethod('Cache\Hierarchy\Tests\Helper\CachePool', 'explodeKey'); - $method->setAccessible(true); - - $result = $method->invoke($pool, '|key'); - $this->assertCount(2, $result); - $this->assertEquals('key!', $result[1]); - $this->assertTrue(in_array('key!', $result)); - - $result = $method->invoke($pool, '|key|bar'); - $this->assertCount(3, $result); - $this->assertTrue(in_array('key!', $result)); - $this->assertTrue(in_array('bar!', $result)); - - $result = $method->invoke($pool, '|'); - $this->assertCount(1, $result); - } - - public function testExplodeKeyWithTags() - { - $pool = new CachePool(); - $method = new \ReflectionMethod('Cache\Hierarchy\Tests\Helper\CachePool', 'explodeKey'); - $method->setAccessible(true); - - $result = $method->invoke($pool, '|key|bar!hash'); - $this->assertCount(3, $result); - foreach ($result as $r) { - $this->assertRegExp('|.*!hash|s', $r, 'Tag hash must be on every level in hierarchy key'); - } - - $result = $method->invoke($pool, '|!hash'); - $this->assertCount(1, $result); - $this->assertRegExp('|.*!hash|s', $result[0], 'Tag hash must on root level in hierarchy key'); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/composer.json b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/composer.json deleted file mode 100644 index 9d2e254..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "cache/hierarchical-cache", - "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", - "type": "library", - "license": "MIT", - "keywords": [ - "cache", - "psr-6", - "hierarchy", - "hierarchical" - ], - "homepage": "http://www.php-cache.com/en/latest/", - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "cache/adapter-common": "^0.4" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "autoload": { - "psr-4": { - "Cache\\Hierarchy\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/phpunit.xml.dist b/sensitive-issue-searcher/vendor/cache/hierarchical-cache/phpunit.xml.dist deleted file mode 100644 index 61b3e0f..0000000 --- a/sensitive-issue-searcher/vendor/cache/hierarchical-cache/phpunit.xml.dist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - ./Tests/ - - - - - - benchmark - - - - - - ./ - - ./Tests - ./vendor - - - - diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/.github/PULL_REQUEST_TEMPLATE.md b/sensitive-issue-searcher/vendor/cache/redis-adapter/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4a339b4..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a READ ONLY repository. - -Please make your pull request to https://github.com/php-cache/cache - -Thank you for contributing. diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/.gitignore b/sensitive-issue-searcher/vendor/cache/redis-adapter/.gitignore deleted file mode 100644 index 8180267..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/vendor/ -composer.lock - diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/.travis.yml b/sensitive-issue-searcher/vendor/cache/redis-adapter/.travis.yml deleted file mode 100644 index 7e05db9..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -services: - - redis - -cache: - directories: - - "$HOME/.composer/cache" - -before_install: - - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d - - bash <(curl -s https://raw.githubusercontent.com/php-cache/cache/master/build/php/7.0/Redis.sh) - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Changelog.md b/sensitive-issue-searcher/vendor/cache/redis-adapter/Changelog.md deleted file mode 100644 index 754c347..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Changelog.md +++ /dev/null @@ -1,33 +0,0 @@ -# Change Log - -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. - -## UNRELEASED - -## 0.5.0 - -### Added - -* Support for the new `TaggableCacheItemPoolInterface`. -* Support for PSR-16 SimpleCache - -### Changed - -* The behavior of `CacheItem::getTags()` has changed. It will not return the tags stored in the cache storage. - -### Removed - -* `CacheItem::getExpirationDate()`. Use `CacheItem::getExpirationTimestamp()` -* `CacheItem::getTags()`. Use `CacheItem::getPreviousTags()` -* `CacheItem::addTag()`. Use `CacheItem::setTags()` - -## 0.4.2 - -### Changed - -* The `RedisCachePool::$cache` is now protected instead of private -* Using `cache/hierarchical-cache:^0.3` - -## 0.4.1 - -No changelog before this version diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/LICENSE b/sensitive-issue-searcher/vendor/cache/redis-adapter/LICENSE deleted file mode 100644 index 82f8fee..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Aaron Scherer, Tobias Nyholm - -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. - diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/README.md b/sensitive-issue-searcher/vendor/cache/redis-adapter/README.md deleted file mode 100644 index d85e55f..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Redis PSR-6 Cache pool -[![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Latest Stable Version](https://poser.pugx.org/cache/redis-adapter/v/stable)](https://packagist.org/packages/cache/redis-adapter) -[![codecov.io](https://codecov.io/github/php-cache/redis-adapter/coverage.svg?branch=master)](https://codecov.io/github/php-cache/redis-adapter?branch=master) -[![Total Downloads](https://poser.pugx.org/cache/redis-adapter/downloads)](https://packagist.org/packages/cache/redis-adapter) -[![Monthly Downloads](https://poser.pugx.org/cache/redis-adapter/d/monthly.png)](https://packagist.org/packages/cache/redis-adapter) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - -This is a PSR-6 cache implementation using Redis. It is a part of the PHP Cache organisation. To read about -features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](http://www.php-cache.com). - -This implementation is using [PhpRedis](https://github.com/phpredis/phpredis). If you want an adapter with -[Predis](https://github.com/nrk/predis) you should look at our [Predis adapter](https://github.com/php-cache/predis-adapter). - -### Install - -```bash -composer require cache/redis-adapter -``` - -### Use - -To create an instance of `RedisCachePool` you need to configure a `\Redis` client. - -```php -$client = new \Redis(); -$client->connect('127.0.0.1', 6379); -$pool = new RedisCachePool($client); -``` - - -### Contribute - -Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or -report any issues you find on the [issue tracker](http://issues.php-cache.com). diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/RedisCachePool.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/RedisCachePool.php deleted file mode 100644 index df24b1a..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/RedisCachePool.php +++ /dev/null @@ -1,126 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis; - -use Cache\Adapter\Common\AbstractCachePool; -use Cache\Adapter\Common\PhpCacheItem; -use Cache\Hierarchy\HierarchicalCachePoolTrait; -use Cache\Hierarchy\HierarchicalPoolInterface; - -/** - * @author Tobias Nyholm - */ -class RedisCachePool extends AbstractCachePool implements HierarchicalPoolInterface -{ - use HierarchicalCachePoolTrait; - - /** - * @type \Redis - */ - protected $cache; - - /** - * @param \Redis $cache - */ - public function __construct(\Redis $cache) - { - $this->cache = $cache; - } - - /** - * {@inheritdoc} - */ - protected function fetchObjectFromCache($key) - { - if (false === $result = unserialize($this->cache->get($this->getHierarchyKey($key)))) { - return [false, null, [], null]; - } - - return $result; - } - - /** - * {@inheritdoc} - */ - protected function clearAllObjectsFromCache() - { - return $this->cache->flushDb(); - } - - /** - * {@inheritdoc} - */ - protected function clearOneObjectFromCache($key) - { - $keyString = $this->getHierarchyKey($key, $path); - if ($path) { - $this->cache->incr($path); - } - $this->clearHierarchyKeyCache(); - - return $this->cache->del($keyString) >= 0; - } - - /** - * {@inheritdoc} - */ - protected function storeItemInCache(PhpCacheItem $item, $ttl) - { - $key = $this->getHierarchyKey($item->getKey()); - $data = serialize([true, $item->get(), $item->getTags(), $item->getExpirationTimestamp()]); - if ($ttl === null || $ttl === 0) { - return $this->cache->set($key, $data); - } - - return $this->cache->setex($key, $ttl, $data); - } - - /** - * {@inheritdoc} - */ - protected function getDirectValue($key) - { - return $this->cache->get($key); - } - - /** - * {@inheritdoc} - */ - protected function appendListItem($name, $value) - { - $this->cache->lPush($name, $value); - } - - /** - * {@inheritdoc} - */ - protected function getList($name) - { - return $this->cache->lRange($name, 0, -1); - } - - /** - * {@inheritdoc} - */ - protected function removeList($name) - { - return $this->cache->del($name); - } - - /** - * {@inheritdoc} - */ - protected function removeListItem($name, $key) - { - return $this->cache->lrem($name, $key, 0); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/CreatePoolTrait.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/CreatePoolTrait.php deleted file mode 100644 index 009b01a..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/CreatePoolTrait.php +++ /dev/null @@ -1,39 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis\Tests; - -use Cache\Adapter\Redis\RedisCachePool; - -trait CreatePoolTrait -{ - private $client = null; - - public function createCachePool() - { - return new RedisCachePool($this->getClient()); - } - - private function getClient() - { - if ($this->client === null) { - $this->client = new \Redis(); - $this->client->connect('127.0.0.1', 6379); - } - - return $this->client; - } - - public function createSimpleCache() - { - return $this->createCachePool(); - } -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationHierarchyTest.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationHierarchyTest.php deleted file mode 100644 index 7d858d0..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationHierarchyTest.php +++ /dev/null @@ -1,19 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis\Tests; - -use Cache\IntegrationTests\HierarchicalCachePoolTest; - -class IntegrationHierarchyTest extends HierarchicalCachePoolTest -{ - use CreatePoolTrait; -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationPoolTest.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationPoolTest.php deleted file mode 100644 index bc7ce51..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationPoolTest.php +++ /dev/null @@ -1,19 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis\Tests; - -use Cache\IntegrationTests\CachePoolTest as BaseTest; - -class IntegrationPoolTest extends BaseTest -{ - use CreatePoolTrait; -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationSimpleCacheTest.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationSimpleCacheTest.php deleted file mode 100644 index 316bb61..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationSimpleCacheTest.php +++ /dev/null @@ -1,19 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis\Tests; - -use Cache\IntegrationTests\SimpleCacheTest as BaseTest; - -class IntegrationSimpleCacheTest extends BaseTest -{ - use CreatePoolTrait; -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationTagTest.php b/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationTagTest.php deleted file mode 100644 index 036b5d5..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/Tests/IntegrationTagTest.php +++ /dev/null @@ -1,19 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\Adapter\Redis\Tests; - -use Cache\IntegrationTests\TaggableCachePoolTest; - -class IntegrationTagTest extends TaggableCachePoolTest -{ - use CreatePoolTrait; -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/composer.json b/sensitive-issue-searcher/vendor/cache/redis-adapter/composer.json deleted file mode 100644 index 3e5ec0e..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/composer.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "cache/redis-adapter", - "description": "A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags", - "type": "library", - "license": "MIT", - "minimum-stability": "dev", - "keywords": [ - "cache", - "psr-6", - "phpredis", - "redis", - "tag" - ], - "homepage": "http://www.php-cache.com/en/latest/", - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "require": { - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "cache/adapter-common": "^0.4", - "cache/hierarchical-cache": "^0.4" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.1", - "cache/integration-tests": "^0.16" - }, - "suggest": { - "ext-redis": "The extension required to use this pool." - }, - "provide": { - "psr/cache-implementation": "^1.0" - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Redis\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "0.6-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/cache/redis-adapter/phpunit.xml.dist b/sensitive-issue-searcher/vendor/cache/redis-adapter/phpunit.xml.dist deleted file mode 100644 index 61b3e0f..0000000 --- a/sensitive-issue-searcher/vendor/cache/redis-adapter/phpunit.xml.dist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - ./Tests/ - - - - - - benchmark - - - - - - ./ - - ./Tests - ./vendor - - - - diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/.github/PULL_REQUEST_TEMPLATE.md b/sensitive-issue-searcher/vendor/cache/tag-interop/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 4a339b4..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a READ ONLY repository. - -Please make your pull request to https://github.com/php-cache/cache - -Thank you for contributing. diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/.gitignore b/sensitive-issue-searcher/vendor/cache/tag-interop/.gitignore deleted file mode 100644 index 987e2a2..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -composer.lock -vendor diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/.travis.yml b/sensitive-issue-searcher/vendor/cache/tag-interop/.travis.yml deleted file mode 100644 index 942fe27..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php -sudo: false - -matrix: - include: - - php: 7.0 - -cache: - directories: - - "$HOME/.composer/cache" - -install: - - composer update --prefer-dist --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - pip install --user codecov && codecov - -notifications: - email: false diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/Changelog.md b/sensitive-issue-searcher/vendor/cache/tag-interop/Changelog.md deleted file mode 100644 index 1596519..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/Changelog.md +++ /dev/null @@ -1,9 +0,0 @@ -# Change Log - -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. - -## 1.0.0 - -First release - - diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/LICENSE b/sensitive-issue-searcher/vendor/cache/tag-interop/LICENSE deleted file mode 100644 index 82f8fee..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Aaron Scherer, Tobias Nyholm - -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. - diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/README.md b/sensitive-issue-searcher/vendor/cache/tag-interop/README.md deleted file mode 100644 index 28511c9..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Tag support for PSR-6 Cache -[![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Latest Stable Version](https://poser.pugx.org/cache/tag-interop/v/stable)](https://packagist.org/packages/cache/tag-interop) -[![Total Downloads](https://poser.pugx.org/cache/tag-interop/downloads)](https://packagist.org/packages/cache/tag-interop) -[![Monthly Downloads](https://poser.pugx.org/cache/tag-interop/d/monthly.png)](https://packagist.org/packages/cache/tag-interop) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) - -This repository holds two interfaces for tagging. These interfaces will make their -way into PHP Fig. Representatives from Symfony, PHP-cache and Drupal has worked -together to agree on these interfaces. - -### Install - -```bash -composer require cache/tag-interop -``` - -### Use - -Read the [documentation on usage](http://www.php-cache.com/). - -### Contribute - -Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or -report any issues you find on the [issue tracker](http://issues.php-cache.com). diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemInterface.php b/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemInterface.php deleted file mode 100644 index 5823b0b..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemInterface.php +++ /dev/null @@ -1,43 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\TagInterop; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * An item that supports tags. This interface is a soon-to-be-PSR. - * - * @author Tobias Nyholm - * @author Nicolas Grekas - */ -interface TaggableCacheItemInterface extends CacheItemInterface -{ - /** - * Get all existing tags. These are the tags the item has when the item is - * returned from the pool. - * - * @return array - */ - public function getPreviousTags(); - - /** - * Overwrite all tags with a new set of tags. - * - * @param string[] $tags An array of tags - * - * @throws InvalidArgumentException When a tag is not valid. - * - * @return TaggableCacheItemInterface - */ - public function setTags(array $tags); -} diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemPoolInterface.php b/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemPoolInterface.php deleted file mode 100644 index 055bf4b..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/TaggableCacheItemPoolInterface.php +++ /dev/null @@ -1,60 +0,0 @@ -, Tobias Nyholm - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Cache\TagInterop; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Interface for invalidating cached items using tags. This interface is a soon-to-be-PSR. - * - * @author Tobias Nyholm - * @author Nicolas Grekas - */ -interface TaggableCacheItemPoolInterface extends CacheItemPoolInterface -{ - /** - * Invalidates cached items using a tag. - * - * @param string $tag The tag to invalidate - * - * @throws InvalidArgumentException When $tags is not valid - * - * @return bool True on success - */ - public function invalidateTag($tag); - - /** - * Invalidates cached items using tags. - * - * @param string[] $tags An array of tags to invalidate - * - * @throws InvalidArgumentException When $tags is not valid - * - * @return bool True on success - */ - public function invalidateTags(array $tags); - - /** - * {@inheritdoc} - * - * @return TaggableCacheItemInterface - */ - public function getItem($key); - - /** - * {@inheritdoc} - * - * @return array|\Traversable|TaggableCacheItemInterface[] - */ - public function getItems(array $keys = []); -} diff --git a/sensitive-issue-searcher/vendor/cache/tag-interop/composer.json b/sensitive-issue-searcher/vendor/cache/tag-interop/composer.json deleted file mode 100644 index d0f7467..0000000 --- a/sensitive-issue-searcher/vendor/cache/tag-interop/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "cache/tag-interop", - "type": "library", - "description": "Framework interoperable interfaces for tags", - "keywords": [ - "cache", - "psr6", - "tag", - "psr" - ], - "homepage": "http://www.php-cache.com/en/latest/", - "license": "MIT", - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - }, - { - "name": "Nicolas Grekas ", - "email": "p@tchwork.com", - "homepage": "https://github.com/nicolas-grekas" - } - ], - "require": { - "php": "^5.5 || ^7.0", - "psr/cache": "^1.0" - }, - "autoload": { - "psr-4": { - "Cache\\TagInterop\\": "" - } - }, - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/.gitignore b/sensitive-issue-searcher/vendor/clue/stream-filter/.gitignore deleted file mode 100644 index de4a392..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/vendor -/composer.lock diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/.travis.yml b/sensitive-issue-searcher/vendor/clue/stream-filter/.travis.yml deleted file mode 100644 index 061b6ee..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: php -php: - - 5.3 - - 5.6 - - 7 - - hhvm -install: - - composer install --prefer-source --no-interaction -script: - - phpunit --coverage-text diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/CHANGELOG.md b/sensitive-issue-searcher/vendor/clue/stream-filter/CHANGELOG.md deleted file mode 100644 index a7ebf75..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -# Changelog - -## 1.3.0 (2015-11-08) - -* Feature: Support accessing built-in filters as callbacks - (#5 by @clue) - - ```php -$fun = Filter\fun('zlib.deflate'); - -$ret = $fun('hello') . $fun('world') . $fun(); -assert('helloworld' === gzinflate($ret)); -``` - -## 1.2.0 (2015-10-23) - -* Feature: Invoke close event when closing filter (flush buffer) - (#9 by @clue) - -## 1.1.0 (2015-10-22) - -* Feature: Abort filter operation when catching an Exception - (#10 by @clue) - -* Feature: Additional safeguards to prevent filter state corruption - (#7 by @clue) - -## 1.0.0 (2015-10-18) - -* First tagged release diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/LICENSE b/sensitive-issue-searcher/vendor/clue/stream-filter/LICENSE deleted file mode 100644 index dc09d1e..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Christian Lück - -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. diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/README.md b/sensitive-issue-searcher/vendor/clue/stream-filter/README.md deleted file mode 100644 index 5881145..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/README.md +++ /dev/null @@ -1,252 +0,0 @@ -# clue/stream-filter [![Build Status](https://travis-ci.org/clue/php-stream-filter.svg?branch=master)](https://travis-ci.org/clue/php-stream-filter) - -A simple and modern approach to stream filtering in PHP - -**Table of contents** - -* [Why?](#why) -* [Usage](#usage) - * [append()](#append) - * [prepend()](#prepend) - * [fun()](#fun) - * [remove()](#remove) -* [Install](#install) -* [License](#license) - -## Why? - -PHP's stream filtering system is great! - -It offers very powerful stream filtering options and comes with a useful set of built-in filters. -These filters can be used to easily and efficiently perform various transformations on-the-fly, such as: - -* read from a gzip'ed input file, -* transcode from ISO-8859-1 (Latin1) to UTF-8, -* write to a bzip output file -* and much more. - -But let's face it: -Its API is [*difficult to work with*](http://php.net/manual/en/php-user-filter.filter.php) -and its documentation is [*subpar*](http://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade). -This combined means its powerful features are often neglected. - -This project aims to make these features more accessible to a broader audience. -* **Lightweight, SOLID design** - - Provides a thin abstraction that is [*just good enough*](http://en.wikipedia.org/wiki/Principle_of_good_enough) - and does not get in your way. - Custom filters require trivial effort. -* **Good test coverage** - - Comes with an automated tests suite and is regularly tested in the *real world* - -## Usage - -This lightweight library consists only of a few simple functions. -All functions reside under the `Clue\StreamFilter` namespace. - -The below examples assume you use an import statement similar to this: - -```php -use Clue\StreamFilter as Filter; - -Filter\append(…); -``` - -Alternatively, you can also refer to them with their fully-qualified name: - -```php -\Clue\StreamFilter\append(…); -``` - -### append() - -The `append($stream, $callback, $read_write = STREAM_FILTER_ALL)` function can be used to -append a filter callback to the given stream. - -Each stream can have a list of filters attached. -This function appends a filter to the end of this list. - -This function returns a filter resource which can be passed to [`remove()`](#remove). -If the given filter can not be added, it throws an `Exception`. - -The `$stream` can be any valid stream resource, such as: - -```php -$stream = fopen('demo.txt', 'w+'); -``` - -The `$callback` should be a valid callable function which accepts an individual chunk of data -and should return the updated chunk: - -```php -$filter = Filter\append($stream, function ($chunk) { - // will be called each time you read or write a $chunk to/from the stream - return $chunk; -}); -``` - -As such, you can also use native PHP functions or any other `callable`: - -```php -Filter\append($stream, 'strtoupper'); - -// will write "HELLO" to the underlying stream -fwrite($stream, 'hello'); -``` - -If the `$callback` accepts invocation without parameters, then this signature -will be invoked once ending (flushing) the filter: - -```php -Filter\append($stream, function ($chunk = null) { - if ($chunk === null) { - // will be called once ending the filter - return 'end'; - } - // will be called each time you read or write a $chunk to/from the stream - return $chunk; -}); - -fclose($stream); -``` - -> Note: Legacy PHP versions (PHP < 5.4) do not support passing additional data -from the end signal handler if the stream is being closed. - -If your callback throws an `Exception`, then the filter process will be aborted. -In order to play nice with PHP's stream handling, the `Exception` will be -transformed to a PHP warning instead: - -```php -Filter\append($stream, function ($chunk) { - throw new \RuntimeException('Unexpected chunk'); -}); - -// raises an E_USER_WARNING with "Error invoking filter: Unexpected chunk" -fwrite($stream, 'hello'); -``` - -The optional `$read_write` parameter can be used to only invoke the `$callback` when either writing to the stream or only when reading from the stream: - -```php -Filter\append($stream, function ($chunk) { - // will be called each time you write to the stream - return $chunk; -}, STREAM_FILTER_WRITE); - -Filter\append($stream, function ($chunk) { - // will be called each time you read from the stream - return $chunk; -}, STREAM_FILTER_READ); -``` - -### prepend() - -The `prepend($stream, $callback, $read_write = STREAM_FILTER_ALL)` function can be used to -prepend a filter callback to the given stream. - -Each stream can have a list of filters attached. -This function prepends a filter to the start of this list. - -This function returns a filter resource which can be passed to [`remove()`](#remove). -If the given filter can not be added, it throws an `Exception`. - -```php -$filter = Filter\prepend($stream, function ($chunk) { - // will be called each time you read or write a $chunk to/from the stream - return $chunk; -}); -``` - -### fun() - -The `fun($filter, $parameters = null)` function can be used to -create a filter function which uses the given built-in `$filter`. - -PHP comes with a useful set of [built-in filters](http://php.net/manual/en/filters.php). -Using `fun()` makes accessing these as easy as passing an input string to filter -and getting the filtered output string. - -```php -$fun = Filter\fun('string.rot13'); - -assert('grfg' === $fun('test')); -assert('test' === $fun($fun('test')); -``` - -Please note that not all filter functions may be available depending on installed -PHP extensions and the PHP version in use. -In particular, [HHVM](http://hhvm.com/) may not offer the same filter functions -or parameters as Zend PHP. -Accessing an unknown filter function will result in a `RuntimeException`: - -```php -Filter\fun('unknown'); // throws RuntimeException -``` - -Some filters may accept or require additional filter parameters. -The optional `$parameters` argument will be passed to the filter handler as-is. -Please refer to the individual filter definition for more details. -For example, the `string.strip_tags` filter can be invoked like this: - -```php -$fun = Filter\fun('string.strip_tags', ''); - -$ret = $fun('h
i
'); -assert('hi' === $ret); -``` - -Under the hood, this function allocates a temporary memory stream, so it's -recommended to clean up the filter function after use. -Also, some filter functions (in particular the -[zlib compression filters](http://php.net/manual/en/filters.compression.php)) -may use internal buffers and may emit a final data chunk on close. -The filter function can be closed by invoking without any arguments: - -```php -$fun = Filter\fun('zlib.deflate'); - -$ret = $fun('hello') . $fun('world') . $fun(); -assert('helloworld' === gzinflate($ret)); -``` - -The filter function must not be used anymore after it has been closed. -Doing so will result in a `RuntimeException`: - -```php -$fun = Filter\fun('string.rot13'); -$fun(); - -$fun('test'); // throws RuntimeException -``` - -> Note: If you're using the zlib compression filters, then you should be wary -about engine inconsistencies between different PHP versions and HHVM. -These inconsistencies exist in the underlying PHP engines and there's little we -can do about this in this library. -[Our test suite](tests/) contains several test cases that exhibit these issues. -If you feel some test case is missing or outdated, we're happy to accept PRs! :) - -### remove() - -The `remove($filter)` function can be used to -remove a filter previously added via [`append()`](#append) or [`prepend()`](#prepend). - -```php -$filter = Filter\append($stream, function () { - // … -}); -Filter\remove($filter); -``` - -## Install - -The recommended way to install this library is [through composer](https://getcomposer.org). -[New to composer?](https://getcomposer.org/doc/00-intro.md) - -```bash -$ composer require clue/stream-filter:~1.3 -``` - -## License - -MIT diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/composer.json b/sensitive-issue-searcher/vendor/clue/stream-filter/composer.json deleted file mode 100644 index 3397dd8..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/composer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "clue/stream-filter", - "description": "A simple and modern approach to stream filtering in PHP", - "keywords": ["stream", "callback", "filter", "php_user_filter", "stream_filter_append", "stream_filter_register", "bucket brigade"], - "homepage": "https://github.com/clue/php-stream-filter", - "license": "MIT", - "authors": [ - { - "name": "Christian Lück", - "email": "christian@lueck.tv" - } - ], - "require": { - "php": ">=5.3" - }, - "autoload": { - "psr-4": { "Clue\\StreamFilter\\": "src/" }, - "files": [ "src/functions.php" ] - } -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/phpunit.xml.dist b/sensitive-issue-searcher/vendor/clue/stream-filter/phpunit.xml.dist deleted file mode 100644 index f373698..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/phpunit.xml.dist +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - ./tests/ - - - - - ./src/ - - - \ No newline at end of file diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/src/CallbackFilter.php b/sensitive-issue-searcher/vendor/clue/stream-filter/src/CallbackFilter.php deleted file mode 100644 index 710940b..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/src/CallbackFilter.php +++ /dev/null @@ -1,120 +0,0 @@ -closed = false; - - if (!is_callable($this->params)) { - throw new InvalidArgumentException('No valid callback parameter given to stream_filter_(append|prepend)'); - } - $this->callback = $this->params; - - // callback supports end event if it accepts invocation without arguments - $ref = new ReflectionFunction($this->callback); - $this->supportsClose = ($ref->getNumberOfRequiredParameters() === 0); - - return true; - } - - public function onClose() - { - $this->closed = true; - - // callback supports closing and is not already closed - if ($this->supportsClose) { - $this->supportsClose = false; - // invoke without argument to signal end and discard resulting buffer - try { - call_user_func($this->callback); - } catch (Exception $ignored) { - // this might be called during engine shutdown, so it's not safe - // to raise any errors or exceptions here - // trigger_error('Error closing filter: ' . $ignored->getMessage(), E_USER_WARNING); - } - } - - $this->callback = null; - } - - public function filter($in, $out, &$consumed, $closing) - { - // concatenate whole buffer from input brigade - $data = ''; - while ($bucket = stream_bucket_make_writeable($in)) { - $consumed += $bucket->datalen; - $data .= $bucket->data; - } - - // skip processing callback that already ended - if ($this->closed) { - return PSFS_FEED_ME; - } - - // only invoke filter function if buffer is not empty - // this may skip flushing a closing filter - if ($data !== '') { - try { - $data = call_user_func($this->callback, $data); - } catch (Exception $e) { - // exception should mark filter as closed - $this->onClose(); - trigger_error('Error invoking filter: ' . $e->getMessage(), E_USER_WARNING); - - return PSFS_ERR_FATAL; - } - } - - // mark filter as closed after processing closing chunk - if ($closing) { - $this->closed = true; - - // callback supports closing and is not already closed - if ($this->supportsClose) { - $this->supportsClose = false; - - // invoke without argument to signal end and append resulting buffer - try { - $data .= call_user_func($this->callback); - } catch (Exception $e) { - trigger_error('Error ending filter: ' . $e->getMessage(), E_USER_WARNING); - - return PSFS_ERR_FATAL; - } - } - } - - if ($data !== '') { - // create a new bucket for writing the resulting buffer to the output brigade - // reusing an existing bucket turned out to be bugged in some environments (ancient PHP versions and HHVM) - $bucket = @stream_bucket_new($this->stream, $data); - - // legacy PHP versions (PHP < 5.4) do not support passing data from the event signal handler - // because closing the stream invalidates the stream and its stream bucket brigade before - // invoking the filter close handler. - if ($bucket !== false) { - stream_bucket_append($out, $bucket); - } - } - - return PSFS_PASS_ON; - } -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/src/functions.php b/sensitive-issue-searcher/vendor/clue/stream-filter/src/functions.php deleted file mode 100644 index 6c8125b..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/src/functions.php +++ /dev/null @@ -1,133 +0,0 @@ - ''); - throw new RuntimeException('Unable to append filter: ' . $error['message']); - } - - return $ret; -} - -/** - * prepend a callback filter to the given stream - * - * @param resource $stream - * @param callable $callback - * @param int $read_write - * @return resource filter resource which can be used for `remove()` - * @throws Exception on error - * @uses stream_filter_prepend() - */ -function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL) -{ - $ret = @stream_filter_prepend($stream, register(), $read_write, $callback); - - if ($ret === false) { - $error = error_get_last() + array('message' => ''); - throw new RuntimeException('Unable to prepend filter: ' . $error['message']); - } - - return $ret; -} - -/** - * Creates filter fun (function) which uses the given built-in $filter - * - * @param string $filter built-in filter name, see stream_get_filters() - * @param mixed $params additional parameters to pass to the built-in filter - * @return callable a filter callback which can be append()'ed or prepend()'ed - * @throws RuntimeException on error - * @see stream_get_filters() - * @see append() - */ -function fun($filter, $params = null) -{ - $fp = fopen('php://memory', 'w'); - $filter = @stream_filter_append($fp, $filter, STREAM_FILTER_WRITE, $params); - - if ($filter === false) { - fclose($fp); - $error = error_get_last() + array('message' => ''); - throw new RuntimeException('Unable to access built-in filter: ' . $error['message']); - } - - // append filter function which buffers internally - $buffer = ''; - append($fp, function ($chunk) use (&$buffer) { - $buffer .= $chunk; - - // always return empty string in order to skip actually writing to stream resource - return ''; - }, STREAM_FILTER_WRITE); - - $closed = false; - - return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed) { - if ($closed) { - throw new \RuntimeException('Unable to perform operation on closed stream'); - } - if ($chunk === null) { - $closed = true; - $buffer = ''; - fclose($fp); - return $buffer; - } - // initialize buffer and invoke filters by attempting to write to stream - $buffer = ''; - fwrite($fp, $chunk); - - // buffer now contains everything the filter function returned - return $buffer; - }; -} - -/** - * remove a callback filter from the given stream - * - * @param resource $filter - * @return boolean true on success or false on error - * @throws Exception on error - * @uses stream_filter_remove() - */ -function remove($filter) -{ - if (@stream_filter_remove($filter) === false) { - throw new RuntimeException('Unable to remove given filter'); - } -} - -/** - * registers the callback filter and returns the resulting filter name - * - * There should be little reason to call this function manually. - * - * @return string filter name - * @uses CallbackFilter - */ -function register() -{ - static $registered = null; - if ($registered === null) { - $registered = 'stream-callback'; - stream_filter_register($registered, __NAMESPACE__ . '\CallbackFilter'); - } - return $registered; -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FilterTest.php b/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FilterTest.php deleted file mode 100644 index 02aa3a4..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FilterTest.php +++ /dev/null @@ -1,386 +0,0 @@ -createStream(); - - StreamFilter\append($stream, function ($chunk) { - return strtoupper($chunk); - }); - - fwrite($stream, 'hello'); - fwrite($stream, 'world'); - rewind($stream); - - $this->assertEquals('HELLOWORLD', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendNativePhpFunction() - { - $stream = $this->createStream(); - - StreamFilter\append($stream, 'strtoupper'); - - fwrite($stream, 'hello'); - fwrite($stream, 'world'); - rewind($stream); - - $this->assertEquals('HELLOWORLD', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendChangingChunkSize() - { - $stream = $this->createStream(); - - StreamFilter\append($stream, function ($chunk) { - return str_replace(array('a','e','i','o','u'), '', $chunk); - }); - - fwrite($stream, 'hello'); - fwrite($stream, 'world'); - rewind($stream); - - $this->assertEquals('hllwrld', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendReturningEmptyStringWillNotPassThrough() - { - $stream = $this->createStream(); - - StreamFilter\append($stream, function ($chunk) { - return ''; - }); - - fwrite($stream, 'hello'); - fwrite($stream, 'world'); - rewind($stream); - - $this->assertEquals('', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendEndEventCanBeBufferedOnClose() - { - if (PHP_VERSION < 5.4) $this->markTestSkipped('Not supported on legacy PHP'); - - $stream = $this->createStream(); - - StreamFilter\append($stream, function ($chunk = null) { - if ($chunk === null) { - // this signals the end event - return '!'; - } - return $chunk . ' '; - }, STREAM_FILTER_WRITE); - - $buffered = ''; - StreamFilter\append($stream, function ($chunk) use (&$buffered) { - $buffered .= $chunk; - return ''; - }); - - fwrite($stream, 'hello'); - fwrite($stream, 'world'); - - fclose($stream); - - $this->assertEquals('hello world !', $buffered); - } - - public function testAppendEndEventWillBeCalledOnRemove() - { - $stream = $this->createStream(); - - $ended = false; - $filter = StreamFilter\append($stream, function ($chunk = null) use (&$ended) { - if ($chunk === null) { - $ended = true; - } - return $chunk; - }, STREAM_FILTER_WRITE); - - $this->assertEquals(0, $ended); - StreamFilter\remove($filter); - $this->assertEquals(1, $ended); - } - - public function testAppendEndEventWillBeCalledOnClose() - { - $stream = $this->createStream(); - - $ended = false; - StreamFilter\append($stream, function ($chunk = null) use (&$ended) { - if ($chunk === null) { - $ended = true; - } - return $chunk; - }, STREAM_FILTER_WRITE); - - $this->assertEquals(0, $ended); - fclose($stream); - $this->assertEquals(1, $ended); - } - - public function testAppendWriteOnly() - { - $stream = $this->createStream(); - - $invoked = 0; - - StreamFilter\append($stream, function ($chunk) use (&$invoked) { - ++$invoked; - - return $chunk; - }, STREAM_FILTER_WRITE); - - fwrite($stream, 'a'); - fwrite($stream, 'b'); - fwrite($stream, 'c'); - rewind($stream); - - $this->assertEquals(3, $invoked); - $this->assertEquals('abc', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendReadOnly() - { - $stream = $this->createStream(); - - $invoked = 0; - - StreamFilter\append($stream, function ($chunk) use (&$invoked) { - ++$invoked; - - return $chunk; - }, STREAM_FILTER_READ); - - fwrite($stream, 'a'); - fwrite($stream, 'b'); - fwrite($stream, 'c'); - rewind($stream); - - $this->assertEquals(0, $invoked); - $this->assertEquals('abc', stream_get_contents($stream)); - $this->assertEquals(1, $invoked); - - fclose($stream); - } - - public function testOrderCallingAppendAfterPrepend() - { - $stream = $this->createStream(); - - StreamFilter\append($stream, function ($chunk) { - return '[' . $chunk . ']'; - }, STREAM_FILTER_WRITE); - - StreamFilter\prepend($stream, function ($chunk) { - return '(' . $chunk . ')'; - }, STREAM_FILTER_WRITE); - - fwrite($stream, 'hello'); - rewind($stream); - - $this->assertEquals('[(hello)]', stream_get_contents($stream)); - - fclose($stream); - } - - public function testRemoveFilter() - { - $stream = $this->createStream(); - - $first = StreamFilter\append($stream, function ($chunk) { - return $chunk . '?'; - }, STREAM_FILTER_WRITE); - - StreamFilter\append($stream, function ($chunk) { - return $chunk . '!'; - }, STREAM_FILTER_WRITE); - - StreamFilter\remove($first); - - fwrite($stream, 'hello'); - rewind($stream); - - $this->assertEquals('hello!', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendFunDechunk() - { - if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (dechunk filter does not exist)'); - - $stream = $this->createStream(); - - StreamFilter\append($stream, StreamFilter\fun('dechunk'), STREAM_FILTER_WRITE); - - fwrite($stream, "2\r\nhe\r\n"); - fwrite($stream, "3\r\nllo\r\n"); - fwrite($stream, "0\r\n\r\n"); - rewind($stream); - - $this->assertEquals('hello', stream_get_contents($stream)); - - fclose($stream); - } - - public function testAppendThrows() - { - $this->createErrorHandler($errors); - - $stream = $this->createStream(); - $this->createErrorHandler($errors); - - StreamFilter\append($stream, function ($chunk) { - throw new \DomainException($chunk); - }); - - fwrite($stream, 'test'); - - $this->removeErrorHandler(); - $this->assertCount(1, $errors); - $this->assertContains('test', $errors[0]); - } - - public function testAppendThrowsDuringEnd() - { - $stream = $this->createStream(); - $this->createErrorHandler($errors); - - StreamFilter\append($stream, function ($chunk = null) { - if ($chunk === null) { - throw new \DomainException('end'); - } - return $chunk; - }); - - fclose($stream); - - $this->removeErrorHandler(); - - // We can only assert we're not seeing an exception here… - // * php 5.3-5.6 sees one error here - // * php 7 does not see any error here - // * hhvm sees the same error twice - // - // If you're curious: - // - // var_dump($errors); - // $this->assertCount(1, $errors); - // $this->assertContains('end', $errors[0]); - } - - public function testAppendThrowsShouldTriggerEnd() - { - $stream = $this->createStream(); - $this->createErrorHandler($errors); - - $ended = false; - StreamFilter\append($stream, function ($chunk = null) use (&$ended) { - if ($chunk === null) { - $ended = true; - return ''; - } - throw new \DomainException($chunk); - }); - - $this->assertEquals(false, $ended); - fwrite($stream, 'test'); - $this->assertEquals(true, $ended); - - $this->removeErrorHandler(); - $this->assertCount(1, $errors); - $this->assertContains('test', $errors[0]); - } - - public function testAppendThrowsShouldTriggerEndButIgnoreExceptionDuringEnd() - { - //$this->markTestIncomplete(); - $stream = $this->createStream(); - $this->createErrorHandler($errors); - - StreamFilter\append($stream, function ($chunk = null) { - if ($chunk === null) { - $chunk = 'end'; - //return ''; - } - throw new \DomainException($chunk); - }); - - fwrite($stream, 'test'); - - $this->removeErrorHandler(); - $this->assertCount(1, $errors); - $this->assertContains('test', $errors[0]); - } - - /** - * @expectedException RuntimeException - */ - public function testAppendInvalidStreamIsRuntimeError() - { - if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)'); - StreamFilter\append(false, function () { }); - } - - /** - * @expectedException RuntimeException - */ - public function testPrependInvalidStreamIsRuntimeError() - { - if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)'); - StreamFilter\prepend(false, function () { }); - } - - /** - * @expectedException RuntimeException - */ - public function testRemoveInvalidFilterIsRuntimeError() - { - if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid filters)'); - StreamFilter\remove(false); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testInvalidCallbackIsInvalidArgument() - { - $stream = $this->createStream(); - - StreamFilter\append($stream, 'a-b-c'); - } - - private function createStream() - { - return fopen('php://memory', 'r+'); - } - - private function createErrorHandler(&$errors) - { - $errors = array(); - set_error_handler(function ($_, $message) use (&$errors) { - $errors []= $message; - }); - } - - private function removeErrorHandler() - { - restore_error_handler(); - } -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunTest.php b/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunTest.php deleted file mode 100644 index 2eb1dd9..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertEquals('grfg', $rot('test')); - $this->assertEquals('test', $rot($rot('test'))); - $this->assertEquals(null, $rot()); - } - - /** - * @expectedException RuntimeException - */ - public function testFunWriteAfterCloseRot13() - { - $rot = Filter\fun('string.rot13'); - - $this->assertEquals(null, $rot()); - $rot('test'); - } - - /** - * @expectedException RuntimeException - */ - public function testFunInvalid() - { - Filter\fun('unknown'); - } -} diff --git a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunZlibTest.php b/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunZlibTest.php deleted file mode 100644 index 752c8a2..0000000 --- a/sensitive-issue-searcher/vendor/clue/stream-filter/tests/FunZlibTest.php +++ /dev/null @@ -1,79 +0,0 @@ -assertEquals(gzdeflate('hello world'), $data); - } - - public function testFunZlibDeflateEmpty() - { - if (PHP_VERSION >= 7) $this->markTestSkipped('Not supported on PHP7 (empty string does not invoke filter)'); - - $deflate = StreamFilter\fun('zlib.deflate'); - - //$data = gzdeflate(''); - $data = $deflate(); - - $this->assertEquals("\x03\x00", $data); - } - - public function testFunZlibDeflateBig() - { - $deflate = StreamFilter\fun('zlib.deflate'); - - $n = 1000; - $expected = str_repeat('hello', $n); - - $bytes = ''; - for ($i = 0; $i < $n; ++$i) { - $bytes .= $deflate('hello'); - } - $bytes .= $deflate(); - - $this->assertEquals($expected, gzinflate($bytes)); - } - - public function testFunZlibInflateHelloWorld() - { - $inflate = StreamFilter\fun('zlib.inflate'); - - $data = $inflate(gzdeflate('hello world')) . $inflate(); - - $this->assertEquals('hello world', $data); - } - - public function testFunZlibInflateEmpty() - { - $inflate = StreamFilter\fun('zlib.inflate'); - - $data = $inflate("\x03\x00") . $inflate(); - - $this->assertEquals('', $data); - } - - public function testFunZlibInflateBig() - { - if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (final chunk will not be emitted)'); - - $inflate = StreamFilter\fun('zlib.inflate'); - - $expected = str_repeat('hello', 10); - $bytes = gzdeflate($expected); - - $ret = ''; - foreach (str_split($bytes, 2) as $chunk) { - $ret .= $inflate($chunk); - } - $ret .= $inflate(); - - $this->assertEquals($expected, $ret); - } -} diff --git a/sensitive-issue-searcher/vendor/composer/ClassLoader.php b/sensitive-issue-searcher/vendor/composer/ClassLoader.php deleted file mode 100644 index 4626994..0000000 --- a/sensitive-issue-searcher/vendor/composer/ClassLoader.php +++ /dev/null @@ -1,441 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/sensitive-issue-searcher/vendor/composer/LICENSE b/sensitive-issue-searcher/vendor/composer/LICENSE deleted file mode 100644 index 1a28124..0000000 --- a/sensitive-issue-searcher/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) 2016 Nils Adermann, Jordi Boggiano - -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. - diff --git a/sensitive-issue-searcher/vendor/composer/autoload_classmap.php b/sensitive-issue-searcher/vendor/composer/autoload_classmap.php deleted file mode 100644 index 7a91153..0000000 --- a/sensitive-issue-searcher/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - 'ddc0a4d7e61c0286f0f8593b1903e894' => $vendorDir . '/clue/stream-filter/src/functions.php', - '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', -); diff --git a/sensitive-issue-searcher/vendor/composer/autoload_namespaces.php b/sensitive-issue-searcher/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc012..0000000 --- a/sensitive-issue-searcher/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/symfony/options-resolver'), - 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), - 'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'), - 'Http\\Message\\' => array($vendorDir . '/php-http/message-factory/src', $vendorDir . '/php-http/message/src'), - 'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'), - 'Http\\Client\\Common\\Plugin\\' => array($vendorDir . '/php-http/cache-plugin/src'), - 'Http\\Client\\Common\\' => array($vendorDir . '/php-http/client-common/src'), - 'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'), - 'Http\\Adapter\\Guzzle6\\' => array($vendorDir . '/php-http/guzzle6-adapter/src'), - 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), - 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), - 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), - 'Github\\' => array($vendorDir . '/knplabs/github-api/lib/Github'), - 'Clue\\StreamFilter\\' => array($vendorDir . '/clue/stream-filter/src'), - 'Cache\\TagInterop\\' => array($vendorDir . '/cache/tag-interop'), - 'Cache\\Hierarchy\\' => array($vendorDir . '/cache/hierarchical-cache'), - 'Cache\\Adapter\\Redis\\' => array($vendorDir . '/cache/redis-adapter'), - 'Cache\\Adapter\\Common\\' => array($vendorDir . '/cache/adapter-common'), -); diff --git a/sensitive-issue-searcher/vendor/composer/autoload_real.php b/sensitive-issue-searcher/vendor/composer/autoload_real.php deleted file mode 100644 index de4cd32..0000000 --- a/sensitive-issue-searcher/vendor/composer/autoload_real.php +++ /dev/null @@ -1,70 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit6702936fae3c52d36155812d411daf91::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit6702936fae3c52d36155812d411daf91::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire6702936fae3c52d36155812d411daf91($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequire6702936fae3c52d36155812d411daf91($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/sensitive-issue-searcher/vendor/composer/autoload_static.php b/sensitive-issue-searcher/vendor/composer/autoload_static.php deleted file mode 100644 index 95c4922..0000000 --- a/sensitive-issue-searcher/vendor/composer/autoload_static.php +++ /dev/null @@ -1,152 +0,0 @@ - __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - 'ddc0a4d7e61c0286f0f8593b1903e894' => __DIR__ . '/..' . '/clue/stream-filter/src/functions.php', - '8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'S' => - array ( - 'Symfony\\Component\\OptionsResolver\\' => 34, - ), - 'P' => - array ( - 'Psr\\SimpleCache\\' => 16, - 'Psr\\Log\\' => 8, - 'Psr\\Http\\Message\\' => 17, - 'Psr\\Cache\\' => 10, - ), - 'H' => - array ( - 'Http\\Promise\\' => 13, - 'Http\\Message\\' => 13, - 'Http\\Discovery\\' => 15, - 'Http\\Client\\Common\\Plugin\\' => 26, - 'Http\\Client\\Common\\' => 19, - 'Http\\Client\\' => 12, - 'Http\\Adapter\\Guzzle6\\' => 21, - ), - 'G' => - array ( - 'GuzzleHttp\\Psr7\\' => 16, - 'GuzzleHttp\\Promise\\' => 19, - 'GuzzleHttp\\' => 11, - 'Github\\' => 7, - ), - 'C' => - array ( - 'Clue\\StreamFilter\\' => 18, - 'Cache\\TagInterop\\' => 17, - 'Cache\\Hierarchy\\' => 16, - 'Cache\\Adapter\\Redis\\' => 20, - 'Cache\\Adapter\\Common\\' => 21, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Symfony\\Component\\OptionsResolver\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/options-resolver', - ), - 'Psr\\SimpleCache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/simple-cache/src', - ), - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', - ), - 'Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), - 'Http\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/promise/src', - ), - 'Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/message-factory/src', - 1 => __DIR__ . '/..' . '/php-http/message/src', - ), - 'Http\\Discovery\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/discovery/src', - ), - 'Http\\Client\\Common\\Plugin\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/cache-plugin/src', - ), - 'Http\\Client\\Common\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/client-common/src', - ), - 'Http\\Client\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/httplug/src', - ), - 'Http\\Adapter\\Guzzle6\\' => - array ( - 0 => __DIR__ . '/..' . '/php-http/guzzle6-adapter/src', - ), - 'GuzzleHttp\\Psr7\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', - ), - 'GuzzleHttp\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', - ), - 'GuzzleHttp\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', - ), - 'Github\\' => - array ( - 0 => __DIR__ . '/..' . '/knplabs/github-api/lib/Github', - ), - 'Clue\\StreamFilter\\' => - array ( - 0 => __DIR__ . '/..' . '/clue/stream-filter/src', - ), - 'Cache\\TagInterop\\' => - array ( - 0 => __DIR__ . '/..' . '/cache/tag-interop', - ), - 'Cache\\Hierarchy\\' => - array ( - 0 => __DIR__ . '/..' . '/cache/hierarchical-cache', - ), - 'Cache\\Adapter\\Redis\\' => - array ( - 0 => __DIR__ . '/..' . '/cache/redis-adapter', - ), - 'Cache\\Adapter\\Common\\' => - array ( - 0 => __DIR__ . '/..' . '/cache/adapter-common', - ), - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit6702936fae3c52d36155812d411daf91::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit6702936fae3c52d36155812d411daf91::$prefixDirsPsr4; - - }, null, ClassLoader::class); - } -} diff --git a/sensitive-issue-searcher/vendor/composer/installed.json b/sensitive-issue-searcher/vendor/composer/installed.json deleted file mode 100644 index bb86a15..0000000 --- a/sensitive-issue-searcher/vendor/composer/installed.json +++ /dev/null @@ -1,1298 +0,0 @@ -[ - { - "name": "symfony/options-resolver", - "version": "v3.2.6", - "version_normalized": "3.2.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "56e3d0a41313f8a54326851f10690d591e62a24c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/56e3d0a41313f8a54326851f10690d591e62a24c", - "reference": "56e3d0a41313f8a54326851f10690d591e62a24c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "time": "2017-02-21T09:12:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "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 OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ] - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T14:39:51+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ] - }, - { - "name": "php-http/message-factory", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "time": "2015-12-19T14:08:53+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ] - }, - { - "name": "clue/stream-filter", - "version": "v1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/clue/php-stream-filter.git", - "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785", - "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "time": "2015-11-08T23:41:30+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@lueck.tv" - } - ], - "description": "A simple and modern approach to stream filtering in PHP", - "homepage": "https://github.com/clue/php-stream-filter", - "keywords": [ - "bucket brigade", - "callback", - "filter", - "php_user_filter", - "stream", - "stream_filter_append", - "stream_filter_register" - ] - }, - { - "name": "php-http/message", - "version": "1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message.git", - "reference": "13df8c48f40ca7925303aa336f19be4b80984f01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/13df8c48f40ca7925303aa336f19be4b80984f01", - "reference": "13df8c48f40ca7925303aa336f19be4b80984f01", - "shasum": "" - }, - "require": { - "clue/stream-filter": "^1.3", - "php": ">=5.4", - "php-http/message-factory": "^1.0.2", - "psr/http-message": "^1.0" - }, - "require-dev": { - "akeneo/phpspec-skip-example-extension": "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", - "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0", - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" - }, - "suggest": { - "ext-zlib": "Used with compressor/decompressor streams", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" - }, - "time": "2017-02-14T08:58:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, - "files": [ - "src/filters.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTP Message related tools", - "homepage": "http://php-http.org", - "keywords": [ - "http", - "message", - "psr-7" - ] - }, - { - "name": "php-http/promise", - "version": "v1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", - "shasum": "" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "time": "2016-01-26T13:27:02+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - } - ], - "description": "Promise used for asynchronous HTTP requests", - "homepage": "http://httplug.io", - "keywords": [ - "promise" - ] - }, - { - "name": "php-http/httplug", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "php-http/promise": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "time": "2016-08-31T08:30:17+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTPlug, the HTTP client abstraction for PHP", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "http" - ] - }, - { - "name": "php-http/client-common", - "version": "v1.4.2", - "version_normalized": "1.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/client-common.git", - "reference": "85b2501ad96a8746918527f34c0d7977424b2bb3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/85b2501ad96a8746918527f34c0d7977424b2bb3", - "reference": "85b2501ad96a8746918527f34c0d7977424b2bb3", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "php-http/httplug": "^1.1", - "php-http/message": "^1.2", - "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "suggest": { - "php-http/cache-plugin": "PSR-6 Cache plugin", - "php-http/logger-plugin": "PSR-3 Logger plugin", - "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" - }, - "time": "2017-03-18T11:14:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Client\\Common\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Common HTTP Client implementations and tools for HTTPlug", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "common", - "http", - "httplug" - ] - }, - { - "name": "psr/cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T20:24:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ] - }, - { - "name": "php-http/cache-plugin", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/cache-plugin.git", - "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", - "reference": "b4e421cb5214ad9ef8b25bb32214ed4b71a8b356", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0", - "php-http/client-common": "^1.1", - "php-http/message-factory": "^1.0", - "psr/cache": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.5" - }, - "time": "2016-08-16T12:12:50+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Client\\Common\\Plugin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "PSR-6 Cache plugin for HTTPlug", - "homepage": "http://httplug.io", - "keywords": [ - "cache", - "http", - "httplug", - "plugin" - ] - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "version_normalized": "1.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "time": "2016-12-20T10:07:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ] - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "version_normalized": "1.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2017-03-20T17:10:46+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ] - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.2.3", - "version_normalized": "6.2.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", - "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "time": "2017-02-28T22:50:30+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, - { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" - }, - "time": "2016-05-10T06:13:32+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - } - ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", - "keywords": [ - "Guzzle", - "http" - ] - }, - { - "name": "php-http/discovery", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "6b33475a3239439bc7ced287d0de0bb82e04d2f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/6b33475a3239439bc7ced287d0de0bb82e04d2f0", - "reference": "6b33475a3239439bc7ced287d0de0bb82e04d2f0", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^2.0.2", - "php-http/httplug": "^1.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^2.4", - "puli/composer-plugin": "1.0.0-beta10" - }, - "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." - }, - "time": "2017-03-02T06:56:00+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr7" - ] - }, - { - "name": "knplabs/github-api", - "version": "2.1.0", - "version_normalized": "2.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "0feb0760f1f04197ccfd02d377eddb0a31f26d5e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/0feb0760f1f04197ccfd02d377eddb0a31f26d5e", - "reference": "0feb0760f1f04197ccfd02d377eddb0a31f26d5e", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "php-http/cache-plugin": "^1.2", - "php-http/client-common": "^1.3", - "php-http/client-implementation": "^1.0", - "php-http/discovery": "^1.0", - "php-http/httplug": "^1.1", - "psr/cache": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "guzzlehttp/psr7": "^1.2", - "php-http/guzzle6-adapter": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.5", - "sllh/php-cs-fixer-styleci-bridge": "^1.3" - }, - "time": "2017-03-23T08:15:40+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Github\\": "lib/Github/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Thibault Duplessis", - "email": "thibault.duplessis@gmail.com", - "homepage": "http://ornicar.github.com" - }, - { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" - } - ], - "description": "GitHub API v3 client", - "homepage": "https://github.com/KnpLabs/php-github-api", - "keywords": [ - "api", - "gh", - "gist", - "github" - ] - }, - { - "name": "psr/simple-cache", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", - "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2017-01-02T13:31:39+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ] - }, - { - "name": "cache/tag-interop", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/tag-interop.git", - "reference": "c7496dd81530f538af27b4f2713cde97bc292832" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/tag-interop/zipball/c7496dd81530f538af27b4f2713cde97bc292832", - "reference": "c7496dd81530f538af27b4f2713cde97bc292832", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "psr/cache": "^1.0" - }, - "time": "2017-03-13T09:14:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Cache\\TagInterop\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "homepage": "https://github.com/nicolas-grekas" - } - ], - "description": "Framework interoperable interfaces for tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr", - "psr6", - "tag" - ] - }, - { - "name": "psr/log", - "version": "1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-10-10T12:19:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "cache/adapter-common", - "version": "0.4.0", - "version_normalized": "0.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/adapter-common.git", - "reference": "2adecd1375fe2ce15b1679349965d7fa73f2676b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/2adecd1375fe2ce15b1679349965d7fa73f2676b", - "reference": "2adecd1375fe2ce15b1679349965d7fa73f2676b", - "shasum": "" - }, - "require": { - "cache/tag-interop": "^1.0", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "time": "2017-03-13T08:24:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Cache\\Adapter\\Common\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "Common classes for PSR-6 adapters", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr-6", - "tag" - ] - }, - { - "name": "cache/hierarchical-cache", - "version": "0.4.0", - "version_normalized": "0.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/hierarchical-cache.git", - "reference": "201c6d67ff451642ce62d3bab193936361618776" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/hierarchical-cache/zipball/201c6d67ff451642ce62d3bab193936361618776", - "reference": "201c6d67ff451642ce62d3bab193936361618776", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^0.4", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "time": "2017-03-13T10:43:18+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Cache\\Hierarchy\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "hierarchical", - "hierarchy", - "psr-6" - ] - }, - { - "name": "cache/redis-adapter", - "version": "0.5.0", - "version_normalized": "0.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/redis-adapter.git", - "reference": "8f0bea394ea1ea36faf8a0b886028233c7e472b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/redis-adapter/zipball/8f0bea394ea1ea36faf8a0b886028233c7e472b8", - "reference": "8f0bea394ea1ea36faf8a0b886028233c7e472b8", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^0.4", - "cache/hierarchical-cache": "^0.4", - "php": "^5.6 || ^7.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0" - }, - "provide": { - "psr/cache-implementation": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "suggest": { - "ext-redis": "The extension required to use this pool." - }, - "time": "2017-03-13T09:25:46+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Cache\\Adapter\\Redis\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "phpredis", - "psr-6", - "redis", - "tag" - ] - } -] diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/.travis.yml b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/.travis.yml deleted file mode 100644 index e2f4f70..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: php - -sudo: false - -php: - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - hhvm - -before_script: - - curl --version - - composer install --no-interaction --prefer-source --dev - - ~/.nvm/nvm.sh install v0.6.14 - - ~/.nvm/nvm.sh run v0.6.14 - - '[ "$TRAVIS_PHP_VERSION" != "7.0" ] || echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini' - -script: make test - -matrix: - allow_failures: - - php: hhvm - fast_finish: true - -before_deploy: - - rvm 1.9.3 do gem install mime-types -v 2.6.2 - - make package - -deploy: - provider: releases - api_key: - secure: UpypqlYgsU68QT/x40YzhHXvzWjFwCNo9d+G8KAdm7U9+blFfcWhV1aMdzugvPMl6woXgvJj7qHq5tAL4v6oswCORhpSBfLgOQVFaica5LiHsvWlAedOhxGmnJqMTwuepjBCxXhs3+I8Kof1n4oUL9gKytXjOVCX/f7XU1HiinU= - file: - - build/artifacts/guzzle.phar - - build/artifacts/guzzle.zip - on: - repo: guzzle/guzzle - tags: true - all_branches: true - php: 5.5 diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/CHANGELOG.md b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/CHANGELOG.md deleted file mode 100644 index dbce4ac..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ /dev/null @@ -1,1243 +0,0 @@ -# CHANGELOG - -## 6.2.3 - 2017-02-28 - -* Fix deprecations with guzzle/psr7 version 1.4 - -## 6.2.2 - 2016-10-08 - -* Allow to pass nullable Response to delay callable -* Only add scheme when host is present -* Fix drain case where content-length is the literal string zero -* Obfuscate in-URL credentials in exceptions - -## 6.2.1 - 2016-07-18 - -* Address HTTP_PROXY security vulnerability, CVE-2016-5385: - https://httpoxy.org/ -* Fixing timeout bug with StreamHandler: - https://github.com/guzzle/guzzle/pull/1488 -* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when - a server does not honor `Connection: close`. -* Ignore URI fragment when sending requests. - -## 6.2.0 - 2016-03-21 - -* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. - https://github.com/guzzle/guzzle/pull/1389 -* Bug fix: Fix sleep calculation when waiting for delayed requests. - https://github.com/guzzle/guzzle/pull/1324 -* Feature: More flexible history containers. - https://github.com/guzzle/guzzle/pull/1373 -* Bug fix: defer sink stream opening in StreamHandler. - https://github.com/guzzle/guzzle/pull/1377 -* Bug fix: do not attempt to escape cookie values. - https://github.com/guzzle/guzzle/pull/1406 -* Feature: report original content encoding and length on decoded responses. - https://github.com/guzzle/guzzle/pull/1409 -* Bug fix: rewind seekable request bodies before dispatching to cURL. - https://github.com/guzzle/guzzle/pull/1422 -* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. - https://github.com/guzzle/guzzle/pull/1367 - -## 6.1.1 - 2015-11-22 - -* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler - https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 -* Feature: HandlerStack is now more generic. - https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e -* Bug fix: setting verify to false in the StreamHandler now disables peer - verification. https://github.com/guzzle/guzzle/issues/1256 -* Feature: Middleware now uses an exception factory, including more error - context. https://github.com/guzzle/guzzle/pull/1282 -* Feature: better support for disabled functions. - https://github.com/guzzle/guzzle/pull/1287 -* Bug fix: fixed regression where MockHandler was not using `sink`. - https://github.com/guzzle/guzzle/pull/1292 - -## 6.1.0 - 2015-09-08 - -* Feature: Added the `on_stats` request option to provide access to transfer - statistics for requests. https://github.com/guzzle/guzzle/pull/1202 -* Feature: Added the ability to persist session cookies in CookieJars. - https://github.com/guzzle/guzzle/pull/1195 -* Feature: Some compatibility updates for Google APP Engine - https://github.com/guzzle/guzzle/pull/1216 -* Feature: Added support for NO_PROXY to prevent the use of a proxy based on - a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 -* Feature: Cookies can now contain square brackets. - https://github.com/guzzle/guzzle/pull/1237 -* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. - https://github.com/guzzle/guzzle/pull/1232 -* Bug fix: Cusotm cURL options now correctly override curl options of the - same name. https://github.com/guzzle/guzzle/pull/1221 -* Bug fix: Content-Type header is now added when using an explicitly provided - multipart body. https://github.com/guzzle/guzzle/pull/1218 -* Bug fix: Now ignoring Set-Cookie headers that have no name. -* Bug fix: Reason phrase is no longer cast to an int in some cases in the - cURL handler. https://github.com/guzzle/guzzle/pull/1187 -* Bug fix: Remove the Authorization header when redirecting if the Host - header changes. https://github.com/guzzle/guzzle/pull/1207 -* Bug fix: Cookie path matching fixes - https://github.com/guzzle/guzzle/issues/1129 -* Bug fix: Fixing the cURL `body_as_string` setting - https://github.com/guzzle/guzzle/pull/1201 -* Bug fix: quotes are no longer stripped when parsing cookies. - https://github.com/guzzle/guzzle/issues/1172 -* Bug fix: `form_params` and `query` now always uses the `&` separator. - https://github.com/guzzle/guzzle/pull/1163 -* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. - https://github.com/guzzle/guzzle/pull/1189 - -## 6.0.2 - 2015-07-04 - -* Fixed a memory leak in the curl handlers in which references to callbacks - were not being removed by `curl_reset`. -* Cookies are now extracted properly before redirects. -* Cookies now allow more character ranges. -* Decoded Content-Encoding responses are now modified to correctly reflect - their state if the encoding was automatically removed by a handler. This - means that the `Content-Encoding` header may be removed an the - `Content-Length` modified to reflect the message size after removing the - encoding. -* Added a more explicit error message when trying to use `form_params` and - `multipart` in the same request. -* Several fixes for HHVM support. -* Functions are now conditionally required using an additional level of - indirection to help with global Composer installations. - -## 6.0.1 - 2015-05-27 - -* Fixed a bug with serializing the `query` request option where the `&` - separator was missing. -* Added a better error message for when `body` is provided as an array. Please - use `form_params` or `multipart` instead. -* Various doc fixes. - -## 6.0.0 - 2015-05-26 - -* See the UPGRADING.md document for more information. -* Added `multipart` and `form_params` request options. -* Added `synchronous` request option. -* Added the `on_headers` request option. -* Fixed `expect` handling. -* No longer adding default middlewares in the client ctor. These need to be - present on the provided handler in order to work. -* Requests are no longer initiated when sending async requests with the - CurlMultiHandler. This prevents unexpected recursion from requests completing - while ticking the cURL loop. -* Removed the semantics of setting `default` to `true`. This is no longer - required now that the cURL loop is not ticked for async requests. -* Added request and response logging middleware. -* No longer allowing self signed certificates when using the StreamHandler. -* Ensuring that `sink` is valid if saving to a file. -* Request exceptions now include a "handler context" which provides handler - specific contextual information. -* Added `GuzzleHttp\RequestOptions` to allow request options to be applied - using constants. -* `$maxHandles` has been removed from CurlMultiHandler. -* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. - -## 5.3.0 - 2015-05-19 - -* Mock now supports `save_to` -* Marked `AbstractRequestEvent::getTransaction()` as public. -* Fixed a bug in which multiple headers using different casing would overwrite - previous headers in the associative array. -* Added `Utils::getDefaultHandler()` -* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. -* URL scheme is now always lowercased. - -## 6.0.0-beta.1 - -* Requires PHP >= 5.5 -* Updated to use PSR-7 - * Requires immutable messages, which basically means an event based system - owned by a request instance is no longer possible. - * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). - * Removed the dependency on `guzzlehttp/streams`. These stream abstractions - are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` - namespace. -* Added middleware and handler system - * Replaced the Guzzle event and subscriber system with a middleware system. - * No longer depends on RingPHP, but rather places the HTTP handlers directly - in Guzzle, operating on PSR-7 messages. - * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which - means the `guzzlehttp/retry-subscriber` is now obsolete. - * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. -* Asynchronous responses - * No longer supports the `future` request option to send an async request. - Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, - `getAsync`, etc.). - * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid - recursion required by chaining and forwarding react promises. See - https://github.com/guzzle/promises - * Added `requestAsync` and `sendAsync` to send request asynchronously. - * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests - asynchronously. -* Request options - * POST and form updates - * Added the `form_fields` and `form_files` request options. - * Removed the `GuzzleHttp\Post` namespace. - * The `body` request option no longer accepts an array for POST requests. - * The `exceptions` request option has been deprecated in favor of the - `http_errors` request options. - * The `save_to` request option has been deprecated in favor of `sink` request - option. -* Clients no longer accept an array of URI template string and variables for - URI variables. You will need to expand URI templates before passing them - into a client constructor or request method. -* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are - now magic methods that will send synchronous requests. -* Replaced `Utils.php` with plain functions in `functions.php`. -* Removed `GuzzleHttp\Collection`. -* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as - an array. -* Removed `GuzzleHttp\Query`. Query string handling is now handled using an - associative array passed into the `query` request option. The query string - is serialized using PHP's `http_build_query`. If you need more control, you - can pass the query string in as a string. -* `GuzzleHttp\QueryParser` has been replaced with the - `GuzzleHttp\Psr7\parse_query`. - -## 5.2.0 - 2015-01-27 - -* Added `AppliesHeadersInterface` to make applying headers to a request based - on the body more generic and not specific to `PostBodyInterface`. -* Reduced the number of stack frames needed to send requests. -* Nested futures are now resolved in the client rather than the RequestFsm -* Finishing state transitions is now handled in the RequestFsm rather than the - RingBridge. -* Added a guard in the Pool class to not use recursion for request retries. - -## 5.1.0 - 2014-12-19 - -* Pool class no longer uses recursion when a request is intercepted. -* The size of a Pool can now be dynamically adjusted using a callback. - See https://github.com/guzzle/guzzle/pull/943. -* Setting a request option to `null` when creating a request with a client will - ensure that the option is not set. This allows you to overwrite default - request options on a per-request basis. - See https://github.com/guzzle/guzzle/pull/937. -* Added the ability to limit which protocols are allowed for redirects by - specifying a `protocols` array in the `allow_redirects` request option. -* Nested futures due to retries are now resolved when waiting for synchronous - responses. See https://github.com/guzzle/guzzle/pull/947. -* `"0"` is now an allowed URI path. See - https://github.com/guzzle/guzzle/pull/935. -* `Query` no longer typehints on the `$query` argument in the constructor, - allowing for strings and arrays. -* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle - specific exceptions if necessary. - -## 5.0.3 - 2014-11-03 - -This change updates query strings so that they are treated as un-encoded values -by default where the value represents an un-encoded value to send over the -wire. A Query object then encodes the value before sending over the wire. This -means that even value query string values (e.g., ":") are url encoded. This -makes the Query class match PHP's http_build_query function. However, if you -want to send requests over the wire using valid query string characters that do -not need to be encoded, then you can provide a string to Url::setQuery() and -pass true as the second argument to specify that the query string is a raw -string that should not be parsed or encoded (unless a call to getQuery() is -subsequently made, forcing the query-string to be converted into a Query -object). - -## 5.0.2 - 2014-10-30 - -* Added a trailing `\r\n` to multipart/form-data payloads. See - https://github.com/guzzle/guzzle/pull/871 -* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. -* Status codes are now returned as integers. See - https://github.com/guzzle/guzzle/issues/881 -* No longer overwriting an existing `application/x-www-form-urlencoded` header - when sending POST requests, allowing for customized headers. See - https://github.com/guzzle/guzzle/issues/877 -* Improved path URL serialization. - - * No longer double percent-encoding characters in the path or query string if - they are already encoded. - * Now properly encoding the supplied path to a URL object, instead of only - encoding ' ' and '?'. - * Note: This has been changed in 5.0.3 to now encode query string values by - default unless the `rawString` argument is provided when setting the query - string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A - -## 5.0.1 - 2014-10-16 - -Bugfix release. - -* Fixed an issue where connection errors still returned response object in - error and end events event though the response is unusable. This has been - corrected so that a response is not returned in the `getResponse` method of - these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 -* Fixed an issue where transfer statistics were not being populated in the - RingBridge. https://github.com/guzzle/guzzle/issues/866 - -## 5.0.0 - 2014-10-12 - -Adding support for non-blocking responses and some minor API cleanup. - -### New Features - -* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. -* Added a public API for creating a default HTTP adapter. -* Updated the redirect plugin to be non-blocking so that redirects are sent - concurrently. Other plugins like this can now be updated to be non-blocking. -* Added a "progress" event so that you can get upload and download progress - events. -* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers - requests concurrently using a capped pool size as efficiently as possible. -* Added `hasListeners()` to EmitterInterface. -* Removed `GuzzleHttp\ClientInterface::sendAll` and marked - `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the - recommended way). - -### Breaking changes - -The breaking changes in this release are relatively minor. The biggest thing to -look out for is that request and response objects no longer implement fluent -interfaces. - -* Removed the fluent interfaces (i.e., `return $this`) from requests, - responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, - `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and - `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of - why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. - This also makes the Guzzle message interfaces compatible with the current - PSR-7 message proposal. -* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except - for the HTTP request functions from function.php, these functions are now - implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` - moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to - `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to - `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be - `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php - caused problems for many users: they aren't PSR-4 compliant, require an - explicit include, and needed an if-guard to ensure that the functions are not - declared multiple times. -* Rewrote adapter layer. - * Removing all classes from `GuzzleHttp\Adapter`, these are now - implemented as callables that are stored in `GuzzleHttp\Ring\Client`. - * Removed the concept of "parallel adapters". Sending requests serially or - concurrently is now handled using a single adapter. - * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The - Transaction object now exposes the request, response, and client as public - properties. The getters and setters have been removed. -* Removed the "headers" event. This event was only useful for changing the - body a response once the headers of the response were known. You can implement - a similar behavior in a number of ways. One example might be to use a - FnStream that has access to the transaction being sent. For example, when the - first byte is written, you could check if the response headers match your - expectations, and if so, change the actual stream body that is being - written to. -* Removed the `asArray` parameter from - `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header - value as an array, then use the newly added `getHeaderAsArray()` method of - `MessageInterface`. This change makes the Guzzle interfaces compatible with - the PSR-7 interfaces. -* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add - custom request options using double-dispatch (this was an implementation - detail). Instead, you should now provide an associative array to the - constructor which is a mapping of the request option name mapping to a - function that applies the option value to a request. -* Removed the concept of "throwImmediately" from exceptions and error events. - This control mechanism was used to stop a transfer of concurrent requests - from completing. This can now be handled by throwing the exception or by - cancelling a pool of requests or each outstanding future request individually. -* Updated to "GuzzleHttp\Streams" 3.0. - * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a - `maxLen` parameter. This update makes the Guzzle streams project - compatible with the current PSR-7 proposal. - * `GuzzleHttp\Stream\Stream::__construct`, - `GuzzleHttp\Stream\Stream::factory`, and - `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second - argument. They now accept an associative array of options, including the - "size" key and "metadata" key which can be used to provide custom metadata. - -## 4.2.2 - 2014-09-08 - -* Fixed a memory leak in the CurlAdapter when reusing cURL handles. -* No longer using `request_fulluri` in stream adapter proxies. -* Relative redirects are now based on the last response, not the first response. - -## 4.2.1 - 2014-08-19 - -* Ensuring that the StreamAdapter does not always add a Content-Type header -* Adding automated github releases with a phar and zip - -## 4.2.0 - 2014-08-17 - -* Now merging in default options using a case-insensitive comparison. - Closes https://github.com/guzzle/guzzle/issues/767 -* Added the ability to automatically decode `Content-Encoding` response bodies - using the `decode_content` request option. This is set to `true` by default - to decode the response body if it comes over the wire with a - `Content-Encoding`. Set this value to `false` to disable decoding the - response content, and pass a string to provide a request `Accept-Encoding` - header and turn on automatic response decoding. This feature now allows you - to pass an `Accept-Encoding` header in the headers of a request but still - disable automatic response decoding. - Closes https://github.com/guzzle/guzzle/issues/764 -* Added the ability to throw an exception immediately when transferring - requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 -* Updating guzzlehttp/streams dependency to ~2.1 -* No longer utilizing the now deprecated namespaced methods from the stream - package. - -## 4.1.8 - 2014-08-14 - -* Fixed an issue in the CurlFactory that caused setting the `stream=false` - request option to throw an exception. - See: https://github.com/guzzle/guzzle/issues/769 -* TransactionIterator now calls rewind on the inner iterator. - See: https://github.com/guzzle/guzzle/pull/765 -* You can now set the `Content-Type` header to `multipart/form-data` - when creating POST requests to force multipart bodies. - See https://github.com/guzzle/guzzle/issues/768 - -## 4.1.7 - 2014-08-07 - -* Fixed an error in the HistoryPlugin that caused the same request and response - to be logged multiple times when an HTTP protocol error occurs. -* Ensuring that cURL does not add a default Content-Type when no Content-Type - has been supplied by the user. This prevents the adapter layer from modifying - the request that is sent over the wire after any listeners may have already - put the request in a desired state (e.g., signed the request). -* Throwing an exception when you attempt to send requests that have the - "stream" set to true in parallel using the MultiAdapter. -* Only calling curl_multi_select when there are active cURL handles. This was - previously changed and caused performance problems on some systems due to PHP - always selecting until the maximum select timeout. -* Fixed a bug where multipart/form-data POST fields were not correctly - aggregated (e.g., values with "&"). - -## 4.1.6 - 2014-08-03 - -* Added helper methods to make it easier to represent messages as strings, - including getting the start line and getting headers as a string. - -## 4.1.5 - 2014-08-02 - -* Automatically retrying cURL "Connection died, retrying a fresh connect" - errors when possible. -* cURL implementation cleanup -* Allowing multiple event subscriber listeners to be registered per event by - passing an array of arrays of listener configuration. - -## 4.1.4 - 2014-07-22 - -* Fixed a bug that caused multi-part POST requests with more than one field to - serialize incorrectly. -* Paths can now be set to "0" -* `ResponseInterface::xml` now accepts a `libxml_options` option and added a - missing default argument that was required when parsing XML response bodies. -* A `save_to` stream is now created lazily, which means that files are not - created on disk unless a request succeeds. - -## 4.1.3 - 2014-07-15 - -* Various fixes to multipart/form-data POST uploads -* Wrapping function.php in an if-statement to ensure Guzzle can be used - globally and in a Composer install -* Fixed an issue with generating and merging in events to an event array -* POST headers are only applied before sending a request to allow you to change - the query aggregator used before uploading -* Added much more robust query string parsing -* Fixed various parsing and normalization issues with URLs -* Fixing an issue where multi-valued headers were not being utilized correctly - in the StreamAdapter - -## 4.1.2 - 2014-06-18 - -* Added support for sending payloads with GET requests - -## 4.1.1 - 2014-06-08 - -* Fixed an issue related to using custom message factory options in subclasses -* Fixed an issue with nested form fields in a multi-part POST -* Fixed an issue with using the `json` request option for POST requests -* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` - -## 4.1.0 - 2014-05-27 - -* Added a `json` request option to easily serialize JSON payloads. -* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. -* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. -* Added the ability to provide an emitter to a client in the client constructor. -* Added the ability to persist a cookie session using $_SESSION. -* Added a trait that can be used to add event listeners to an iterator. -* Removed request method constants from RequestInterface. -* Fixed warning when invalid request start-lines are received. -* Updated MessageFactory to work with custom request option methods. -* Updated cacert bundle to latest build. - -4.0.2 (2014-04-16) ------------------- - -* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) -* Added the ability to set scalars as POST fields (#628) - -## 4.0.1 - 2014-04-04 - -* The HTTP status code of a response is now set as the exception code of - RequestException objects. -* 303 redirects will now correctly switch from POST to GET requests. -* The default parallel adapter of a client now correctly uses the MultiAdapter. -* HasDataTrait now initializes the internal data array as an empty array so - that the toArray() method always returns an array. - -## 4.0.0 - 2014-03-29 - -* For more information on the 4.0 transition, see: - http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ -* For information on changes and upgrading, see: - https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 -* Added `GuzzleHttp\batch()` as a convenience function for sending requests in - parallel without needing to write asynchronous code. -* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. - You can now pass a callable or an array of associative arrays where each - associative array contains the "fn", "priority", and "once" keys. - -## 4.0.0.rc-2 - 2014-03-25 - -* Removed `getConfig()` and `setConfig()` from clients to avoid confusion - around whether things like base_url, message_factory, etc. should be able to - be retrieved or modified. -* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface -* functions.php functions were renamed using snake_case to match PHP idioms -* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and - `GUZZLE_CURL_SELECT_TIMEOUT` environment variables -* Added the ability to specify custom `sendAll()` event priorities -* Added the ability to specify custom stream context options to the stream - adapter. -* Added a functions.php function for `get_path()` and `set_path()` -* CurlAdapter and MultiAdapter now use a callable to generate curl resources -* MockAdapter now properly reads a body and emits a `headers` event -* Updated Url class to check if a scheme and host are set before adding ":" - and "//". This allows empty Url (e.g., "") to be serialized as "". -* Parsing invalid XML no longer emits warnings -* Curl classes now properly throw AdapterExceptions -* Various performance optimizations -* Streams are created with the faster `Stream\create()` function -* Marked deprecation_proxy() as internal -* Test server is now a collection of static methods on a class - -## 4.0.0-rc.1 - 2014-03-15 - -* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 - -## 3.8.1 - 2014-01-28 - -* Bug: Always using GET requests when redirecting from a 303 response -* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in - `Guzzle\Http\ClientInterface::setSslVerification()` -* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL -* Bug: The body of a request can now be set to `"0"` -* Sending PHP stream requests no longer forces `HTTP/1.0` -* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of - each sub-exception -* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than - clobbering everything). -* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) -* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. - For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. -* Now properly escaping the regular expression delimiter when matching Cookie domains. -* Network access is now disabled when loading XML documents - -## 3.8.0 - 2013-12-05 - -* Added the ability to define a POST name for a file -* JSON response parsing now properly walks additionalProperties -* cURL error code 18 is now retried automatically in the BackoffPlugin -* Fixed a cURL error when URLs contain fragments -* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were - CurlExceptions -* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) -* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` -* Fixed a bug that was encountered when parsing empty header parameters -* UriTemplate now has a `setRegex()` method to match the docs -* The `debug` request parameter now checks if it is truthy rather than if it exists -* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin -* Added the ability to combine URLs using strict RFC 3986 compliance -* Command objects can now return the validation errors encountered by the command -* Various fixes to cache revalidation (#437 and 29797e5) -* Various fixes to the AsyncPlugin -* Cleaned up build scripts - -## 3.7.4 - 2013-10-02 - -* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) -* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp - (see https://github.com/aws/aws-sdk-php/issues/147) -* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots -* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) -* Updated the bundled cacert.pem (#419) -* OauthPlugin now supports adding authentication to headers or query string (#425) - -## 3.7.3 - 2013-09-08 - -* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and - `CommandTransferException`. -* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description -* Schemas are only injected into response models when explicitly configured. -* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of - an EntityBody. -* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. -* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. -* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() -* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin -* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests -* Bug fix: Properly parsing headers that contain commas contained in quotes -* Bug fix: mimetype guessing based on a filename is now case-insensitive - -## 3.7.2 - 2013-08-02 - -* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander - See https://github.com/guzzle/guzzle/issues/371 -* Bug fix: Cookie domains are now matched correctly according to RFC 6265 - See https://github.com/guzzle/guzzle/issues/377 -* Bug fix: GET parameters are now used when calculating an OAuth signature -* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted -* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched -* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. - See https://github.com/guzzle/guzzle/issues/379 -* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See - https://github.com/guzzle/guzzle/pull/380 -* cURL multi cleanup and optimizations - -## 3.7.1 - 2013-07-05 - -* Bug fix: Setting default options on a client now works -* Bug fix: Setting options on HEAD requests now works. See #352 -* Bug fix: Moving stream factory before send event to before building the stream. See #353 -* Bug fix: Cookies no longer match on IP addresses per RFC 6265 -* Bug fix: Correctly parsing header parameters that are in `<>` and quotes -* Added `cert` and `ssl_key` as request options -* `Host` header can now diverge from the host part of a URL if the header is set manually -* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter -* OAuth parameters are only added via the plugin if they aren't already set -* Exceptions are now thrown when a URL cannot be parsed -* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails -* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin - -## 3.7.0 - 2013-06-10 - -* See UPGRADING.md for more information on how to upgrade. -* Requests now support the ability to specify an array of $options when creating a request to more easily modify a - request. You can pass a 'request.options' configuration setting to a client to apply default request options to - every request created by a client (e.g. default query string variables, headers, curl options, etc.). -* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. - See `Guzzle\Http\StaticClient::mount`. -* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests - created by a command (e.g. custom headers, query string variables, timeout settings, etc.). -* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the - headers of a response -* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key - (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) -* ServiceBuilders now support storing and retrieving arbitrary data -* CachePlugin can now purge all resources for a given URI -* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource -* CachePlugin now uses the Vary header to determine if a resource is a cache hit -* `Guzzle\Http\Message\Response` now implements `\Serializable` -* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters -* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable -* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` -* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size -* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message -* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older - Symfony users can still use the old version of Monolog. -* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. - Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. -* Several performance improvements to `Guzzle\Common\Collection` -* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -* Added `Guzzle\Stream\StreamInterface::isRepeatable` -* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. -* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. -* Removed `Guzzle\Http\ClientInterface::expandTemplate()` -* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` -* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` -* Removed `Guzzle\Http\Message\RequestInterface::canCache` -* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` -* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` -* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. -* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting - `Guzzle\Common\Version::$emitWarnings` to true. -* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use - `$request->getResponseBody()->isRepeatable()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use - `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. - These will work through Guzzle 4.0 -* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. -* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. -* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. -* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -* Marked `Guzzle\Common\Collection::inject()` as deprecated. -* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` -* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -* Always setting X-cache headers on cached responses -* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -* Added `CacheStorageInterface::purge($url)` -* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -## 3.6.0 - 2013-05-29 - -* ServiceDescription now implements ToArrayInterface -* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters -* Guzzle can now correctly parse incomplete URLs -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess -* Added the ability to cast Model objects to a string to view debug information. - -## 3.5.0 - 2013-05-13 - -* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times -* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove - itself from the EventDispatcher) -* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values -* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too -* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a - non-existent key -* Bug: All __call() method arguments are now required (helps with mocking frameworks) -* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference - to help with refcount based garbage collection of resources created by sending a request -* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the - HistoryPlugin for a history. -* Added a `responseBody` alias for the `response_body` location -* Refactored internals to no longer rely on Response::getRequest() -* HistoryPlugin can now be cast to a string -* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests - and responses that are sent over the wire -* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects - -## 3.4.3 - 2013-04-30 - -* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response -* Added a check to re-extract the temp cacert bundle from the phar before sending each request - -## 3.4.2 - 2013-04-29 - -* Bug fix: Stream objects now work correctly with "a" and "a+" modes -* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present -* Bug fix: AsyncPlugin no longer forces HEAD requests -* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter -* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails -* Setting a response on a request will write to the custom request body from the response body if one is specified -* LogPlugin now writes to php://output when STDERR is undefined -* Added the ability to set multiple POST files for the same key in a single call -* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default -* Added the ability to queue CurlExceptions to the MockPlugin -* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) -* Configuration loading now allows remote files - -## 3.4.1 - 2013-04-16 - -* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti - handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. -* Exceptions are now properly grouped when sending requests in parallel -* Redirects are now properly aggregated when a multi transaction fails -* Redirects now set the response on the original object even in the event of a failure -* Bug fix: Model names are now properly set even when using $refs -* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax -* Added support for oauth_callback in OAuth signatures -* Added support for oauth_verifier in OAuth signatures -* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection - -## 3.4.0 - 2013-04-11 - -* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 -* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 -* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 -* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. -* Bug fix: Added `number` type to service descriptions. -* Bug fix: empty parameters are removed from an OAuth signature -* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header -* Bug fix: Fixed "array to string" error when validating a union of types in a service description -* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream -* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. -* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. -* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. -* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if - the Content-Type can be determined based on the entity body or the path of the request. -* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. -* Added support for a PSR-3 LogAdapter. -* Added a `command.after_prepare` event -* Added `oauth_callback` parameter to the OauthPlugin -* Added the ability to create a custom stream class when using a stream factory -* Added a CachingEntityBody decorator -* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. -* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. -* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies -* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This - means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use - POST fields or files (the latter is only used when emulating a form POST in the browser). -* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest - -## 3.3.1 - 2013-03-10 - -* Added the ability to create PHP streaming responses from HTTP requests -* Bug fix: Running any filters when parsing response headers with service descriptions -* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing -* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across - response location visitors. -* Bug fix: Removed the possibility of creating configuration files with circular dependencies -* RequestFactory::create() now uses the key of a POST file when setting the POST file name -* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set - -## 3.3.0 - 2013-03-03 - -* A large number of performance optimizations have been made -* Bug fix: Added 'wb' as a valid write mode for streams -* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned -* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` -* BC: Removed `Guzzle\Http\Utils` class -* BC: Setting a service description on a client will no longer modify the client's command factories. -* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using - the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' -* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to - lowercase -* Operation parameter objects are now lazy loaded internally -* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses -* Added support for instantiating responseType=class responseClass classes. Classes must implement - `Guzzle\Service\Command\ResponseClassInterface` -* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These - additional properties also support locations and can be used to parse JSON responses where the outermost part of the - JSON is an array -* Added support for nested renaming of JSON models (rename sentAs to name) -* CachePlugin - * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error - * Debug headers can now added to cached response in the CachePlugin - -## 3.2.0 - 2013-02-14 - -* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. -* URLs with no path no longer contain a "/" by default -* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. -* BadResponseException no longer includes the full request and response message -* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface -* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface -* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription -* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list -* xmlEncoding can now be customized for the XML declaration of a XML service description operation -* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value - aggregation and no longer uses callbacks -* The URL encoding implementation of Guzzle\Http\QueryString can now be customized -* Bug fix: Filters were not always invoked for array service description parameters -* Bug fix: Redirects now use a target response body rather than a temporary response body -* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded -* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives - -## 3.1.2 - 2013-01-27 - -* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the - response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. -* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent -* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) -* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() -* Setting default headers on a client after setting the user-agent will not erase the user-agent setting - -## 3.1.1 - 2013-01-20 - -* Adding wildcard support to Guzzle\Common\Collection::getPath() -* Adding alias support to ServiceBuilder configs -* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface - -## 3.1.0 - 2013-01-12 - -* BC: CurlException now extends from RequestException rather than BadResponseException -* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() -* Added getData to ServiceDescriptionInterface -* Added context array to RequestInterface::setState() -* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http -* Bug: Adding required content-type when JSON request visitor adds JSON to a command -* Bug: Fixing the serialization of a service description with custom data -* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing - an array of successful and failed responses -* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection -* Added Guzzle\Http\IoEmittingEntityBody -* Moved command filtration from validators to location visitors -* Added `extends` attributes to service description parameters -* Added getModels to ServiceDescriptionInterface - -## 3.0.7 - 2012-12-19 - -* Fixing phar detection when forcing a cacert to system if null or true -* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` -* Cleaning up `Guzzle\Common\Collection::inject` method -* Adding a response_body location to service descriptions - -## 3.0.6 - 2012-12-09 - -* CurlMulti performance improvements -* Adding setErrorResponses() to Operation -* composer.json tweaks - -## 3.0.5 - 2012-11-18 - -* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin -* Bug: Response body can now be a string containing "0" -* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert -* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs -* Added support for XML attributes in service description responses -* DefaultRequestSerializer now supports array URI parameter values for URI template expansion -* Added better mimetype guessing to requests and post files - -## 3.0.4 - 2012-11-11 - -* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value -* Bug: Cookies can now be added that have a name, domain, or value set to "0" -* Bug: Using the system cacert bundle when using the Phar -* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures -* Enhanced cookie jar de-duplication -* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added -* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies -* Added the ability to create any sort of hash for a stream rather than just an MD5 hash - -## 3.0.3 - 2012-11-04 - -* Implementing redirects in PHP rather than cURL -* Added PECL URI template extension and using as default parser if available -* Bug: Fixed Content-Length parsing of Response factory -* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. -* Adding ToArrayInterface throughout library -* Fixing OauthPlugin to create unique nonce values per request - -## 3.0.2 - 2012-10-25 - -* Magic methods are enabled by default on clients -* Magic methods return the result of a command -* Service clients no longer require a base_url option in the factory -* Bug: Fixed an issue with URI templates where null template variables were being expanded - -## 3.0.1 - 2012-10-22 - -* Models can now be used like regular collection objects by calling filter, map, etc. -* Models no longer require a Parameter structure or initial data in the constructor -* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` - -## 3.0.0 - 2012-10-15 - -* Rewrote service description format to be based on Swagger - * Now based on JSON schema - * Added nested input structures and nested response models - * Support for JSON and XML input and output models - * Renamed `commands` to `operations` - * Removed dot class notation - * Removed custom types -* Broke the project into smaller top-level namespaces to be more component friendly -* Removed support for XML configs and descriptions. Use arrays or JSON files. -* Removed the Validation component and Inspector -* Moved all cookie code to Guzzle\Plugin\Cookie -* Magic methods on a Guzzle\Service\Client now return the command un-executed. -* Calling getResult() or getResponse() on a command will lazily execute the command if needed. -* Now shipping with cURL's CA certs and using it by default -* Added previousResponse() method to response objects -* No longer sending Accept and Accept-Encoding headers on every request -* Only sending an Expect header by default when a payload is greater than 1MB -* Added/moved client options: - * curl.blacklist to curl.option.blacklist - * Added ssl.certificate_authority -* Added a Guzzle\Iterator component -* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin -* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) -* Added a more robust caching plugin -* Added setBody to response objects -* Updating LogPlugin to use a more flexible MessageFormatter -* Added a completely revamped build process -* Cleaning up Collection class and removing default values from the get method -* Fixed ZF2 cache adapters - -## 2.8.8 - 2012-10-15 - -* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did - -## 2.8.7 - 2012-09-30 - -* Bug: Fixed config file aliases for JSON includes -* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests -* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload -* Bug: Hardening request and response parsing to account for missing parts -* Bug: Fixed PEAR packaging -* Bug: Fixed Request::getInfo -* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail -* Adding the ability for the namespace Iterator factory to look in multiple directories -* Added more getters/setters/removers from service descriptions -* Added the ability to remove POST fields from OAuth signatures -* OAuth plugin now supports 2-legged OAuth - -## 2.8.6 - 2012-09-05 - -* Added the ability to modify and build service descriptions -* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command -* Added a `json` parameter location -* Now allowing dot notation for classes in the CacheAdapterFactory -* Using the union of two arrays rather than an array_merge when extending service builder services and service params -* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references - in service builder config files. -* Services defined in two different config files that include one another will by default replace the previously - defined service, but you can now create services that extend themselves and merge their settings over the previous -* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like - '_default' with a default JSON configuration file. - -## 2.8.5 - 2012-08-29 - -* Bug: Suppressed empty arrays from URI templates -* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching -* Added support for HTTP responses that do not contain a reason phrase in the start-line -* AbstractCommand commands are now invokable -* Added a way to get the data used when signing an Oauth request before a request is sent - -## 2.8.4 - 2012-08-15 - -* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin -* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. -* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream -* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream -* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) -* Added additional response status codes -* Removed SSL information from the default User-Agent header -* DELETE requests can now send an entity body -* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries -* Added the ability of the MockPlugin to consume mocked request bodies -* LogPlugin now exposes request and response objects in the extras array - -## 2.8.3 - 2012-07-30 - -* Bug: Fixed a case where empty POST requests were sent as GET requests -* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body -* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new -* Added multiple inheritance to service description commands -* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` -* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything -* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles - -## 2.8.2 - 2012-07-24 - -* Bug: Query string values set to 0 are no longer dropped from the query string -* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` -* Bug: `+` is now treated as an encoded space when parsing query strings -* QueryString and Collection performance improvements -* Allowing dot notation for class paths in filters attribute of a service descriptions - -## 2.8.1 - 2012-07-16 - -* Loosening Event Dispatcher dependency -* POST redirects can now be customized using CURLOPT_POSTREDIR - -## 2.8.0 - 2012-07-15 - -* BC: Guzzle\Http\Query - * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) - * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() - * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) - * Changed the aggregation functions of QueryString to be static methods - * Can now use fromString() with querystrings that have a leading ? -* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters -* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body -* Cookies are no longer URL decoded by default -* Bug: URI template variables set to null are no longer expanded - -## 2.7.2 - 2012-07-02 - -* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. -* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() -* CachePlugin now allows for a custom request parameter function to check if a request can be cached -* Bug fix: CachePlugin now only caches GET and HEAD requests by default -* Bug fix: Using header glue when transferring headers over the wire -* Allowing deeply nested arrays for composite variables in URI templates -* Batch divisors can now return iterators or arrays - -## 2.7.1 - 2012-06-26 - -* Minor patch to update version number in UA string -* Updating build process - -## 2.7.0 - 2012-06-25 - -* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. -* BC: Removed magic setX methods from commands -* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method -* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. -* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) -* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace -* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin -* Added the ability to set POST fields and files in a service description -* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method -* Adding a command.before_prepare event to clients -* Added BatchClosureTransfer and BatchClosureDivisor -* BatchTransferException now includes references to the batch divisor and transfer strategies -* Fixed some tests so that they pass more reliably -* Added Guzzle\Common\Log\ArrayLogAdapter - -## 2.6.6 - 2012-06-10 - -* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin -* BC: Removing Guzzle\Service\Command\CommandSet -* Adding generic batching system (replaces the batch queue plugin and command set) -* Updating ZF cache and log adapters and now using ZF's composer repository -* Bug: Setting the name of each ApiParam when creating through an ApiCommand -* Adding result_type, result_doc, deprecated, and doc_url to service descriptions -* Bug: Changed the default cookie header casing back to 'Cookie' - -## 2.6.5 - 2012-06-03 - -* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() -* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from -* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data -* BC: Renaming methods in the CookieJarInterface -* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations -* Making the default glue for HTTP headers ';' instead of ',' -* Adding a removeValue to Guzzle\Http\Message\Header -* Adding getCookies() to request interface. -* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() - -## 2.6.4 - 2012-05-30 - -* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. -* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand -* Bug: Fixing magic method command calls on clients -* Bug: Email constraint only validates strings -* Bug: Aggregate POST fields when POST files are present in curl handle -* Bug: Fixing default User-Agent header -* Bug: Only appending or prepending parameters in commands if they are specified -* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes -* Allowing the use of dot notation for class namespaces when using instance_of constraint -* Added any_match validation constraint -* Added an AsyncPlugin -* Passing request object to the calculateWait method of the ExponentialBackoffPlugin -* Allowing the result of a command object to be changed -* Parsing location and type sub values when instantiating a service description rather than over and over at runtime - -## 2.6.3 - 2012-05-23 - -* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. -* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. -* You can now use an array of data when creating PUT request bodies in the request factory. -* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. -* [Http] Adding support for Content-Type in multipart POST uploads per upload -* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) -* Adding more POST data operations for easier manipulation of POST data. -* You can now set empty POST fields. -* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. -* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. -* CS updates - -## 2.6.2 - 2012-05-19 - -* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. - -## 2.6.1 - 2012-05-19 - -* [BC] Removing 'path' support in service descriptions. Use 'uri'. -* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. -* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. -* [BC] Removing Guzzle\Common\XmlElement. -* All commands, both dynamic and concrete, have ApiCommand objects. -* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. -* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. -* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. - -## 2.6.0 - 2012-05-15 - -* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder -* [BC] Executing a Command returns the result of the command rather than the command -* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. -* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. -* [BC] Moving ResourceIterator* to Guzzle\Service\Resource -* [BC] Completely refactored ResourceIterators to iterate over a cloned command object -* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate -* [BC] Guzzle\Guzzle is now deprecated -* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject -* Adding Guzzle\Version class to give version information about Guzzle -* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() -* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data -* ServiceDescription and ServiceBuilder are now cacheable using similar configs -* Changing the format of XML and JSON service builder configs. Backwards compatible. -* Cleaned up Cookie parsing -* Trimming the default Guzzle User-Agent header -* Adding a setOnComplete() method to Commands that is called when a command completes -* Keeping track of requests that were mocked in the MockPlugin -* Fixed a caching bug in the CacheAdapterFactory -* Inspector objects can be injected into a Command object -* Refactoring a lot of code and tests to be case insensitive when dealing with headers -* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL -* Adding the ability to set global option overrides to service builder configs -* Adding the ability to include other service builder config files from within XML and JSON files -* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. - -## 2.5.0 - 2012-05-08 - -* Major performance improvements -* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. -* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. -* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" -* Added the ability to passed parameters to all requests created by a client -* Added callback functionality to the ExponentialBackoffPlugin -* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. -* Rewinding request stream bodies when retrying requests -* Exception is thrown when JSON response body cannot be decoded -* Added configurable magic method calls to clients and commands. This is off by default. -* Fixed a defect that added a hash to every parsed URL part -* Fixed duplicate none generation for OauthPlugin. -* Emitting an event each time a client is generated by a ServiceBuilder -* Using an ApiParams object instead of a Collection for parameters of an ApiCommand -* cache.* request parameters should be renamed to params.cache.* -* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. -* Added the ability to disable type validation of service descriptions -* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/LICENSE b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/LICENSE deleted file mode 100644 index ea7f07c..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2016 Michael Dowling, https://github.com/mtdowling - -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. diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/README.md b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/README.md deleted file mode 100644 index 772b18d..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/README.md +++ /dev/null @@ -1,90 +0,0 @@ -Guzzle, PHP HTTP client -======================= - -[![Build Status](https://travis-ci.org/guzzle/guzzle.svg?branch=master)](https://travis-ci.org/guzzle/guzzle) - -Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and -trivial to integrate with web services. - -- Simple interface for building query strings, POST requests, streaming large - uploads, streaming large downloads, using HTTP cookies, uploading JSON data, - etc... -- Can send both synchronous and asynchronous requests using the same interface. -- Uses PSR-7 interfaces for requests, responses, and streams. This allows you - to utilize other PSR-7 compatible libraries with Guzzle. -- Abstracts away the underlying HTTP transport, allowing you to write - environment and transport agnostic code; i.e., no hard dependency on cURL, - PHP streams, sockets, or non-blocking event loops. -- Middleware system allows you to augment and compose client behavior. - -```php -$client = new \GuzzleHttp\Client(); -$res = $client->request('GET', 'https://api.github.com/user', [ - 'auth' => ['user', 'pass'] -]); -echo $res->getStatusCode(); -// 200 -echo $res->getHeaderLine('content-type'); -// 'application/json; charset=utf8' -echo $res->getBody(); -// {"type":"User"...' - -// Send an asynchronous request. -$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); -$promise = $client->sendAsync($request)->then(function ($response) { - echo 'I completed! ' . $response->getBody(); -}); -$promise->wait(); -``` - -## Help and docs - -- [Documentation](http://guzzlephp.org/) -- [stackoverflow](http://stackoverflow.com/questions/tagged/guzzle) -- [Gitter](https://gitter.im/guzzle/guzzle) - - -## Installing Guzzle - -The recommended way to install Guzzle is through -[Composer](http://getcomposer.org). - -```bash -# Install Composer -curl -sS https://getcomposer.org/installer | php -``` - -Next, run the Composer command to install the latest stable version of Guzzle: - -```bash -php composer.phar require guzzlehttp/guzzle -``` - -After installing, you need to require Composer's autoloader: - -```php -require 'vendor/autoload.php'; -``` - -You can then later update Guzzle using composer: - - ```bash -composer.phar update - ``` - - -## Version Guidance - -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | -|---------|-------------|---------------------|--------------|---------------------|---------------------|-------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | N/A | N/A | No | -| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | -| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | - -[guzzle-3-repo]: https://github.com/guzzle/guzzle3 -[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 -[guzzle-6-repo]: https://github.com/guzzle/guzzle -[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/ -[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ -[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/UPGRADING.md b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/UPGRADING.md deleted file mode 100644 index 91d1dcc..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/UPGRADING.md +++ /dev/null @@ -1,1203 +0,0 @@ -Guzzle Upgrade Guide -==================== - -5.0 to 6.0 ----------- - -Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. -Due to the fact that these messages are immutable, this prompted a refactoring -of Guzzle to use a middleware based system rather than an event system. Any -HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be -updated to work with the new immutable PSR-7 request and response objects. Any -event listeners or subscribers need to be updated to become middleware -functions that wrap handlers (or are injected into a -`GuzzleHttp\HandlerStack`). - -- Removed `GuzzleHttp\BatchResults` -- Removed `GuzzleHttp\Collection` -- Removed `GuzzleHttp\HasDataTrait` -- Removed `GuzzleHttp\ToArrayInterface` -- The `guzzlehttp/streams` dependency has been removed. Stream functionality - is now present in the `GuzzleHttp\Psr7` namespace provided by the - `guzzlehttp/psr7` package. -- Guzzle no longer uses ReactPHP promises and now uses the - `guzzlehttp/promises` library. We use a custom promise library for three - significant reasons: - 1. React promises (at the time of writing this) are recursive. Promise - chaining and promise resolution will eventually blow the stack. Guzzle - promises are not recursive as they use a sort of trampolining technique. - Note: there has been movement in the React project to modify promises to - no longer utilize recursion. - 2. Guzzle needs to have the ability to synchronously block on a promise to - wait for a result. Guzzle promises allows this functionality (and does - not require the use of recursion). - 3. Because we need to be able to wait on a result, doing so using React - promises requires wrapping react promises with RingPHP futures. This - overhead is no longer needed, reducing stack sizes, reducing complexity, - and improving performance. -- `GuzzleHttp\Mimetypes` has been moved to a function in - `GuzzleHttp\Psr7\mimetype_from_extension` and - `GuzzleHttp\Psr7\mimetype_from_filename`. -- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query - strings must now be passed into request objects as strings, or provided to - the `query` request option when creating requests with clients. The `query` - option uses PHP's `http_build_query` to convert an array to a string. If you - need a different serialization technique, you will need to pass the query - string in as a string. There are a couple helper functions that will make - working with query strings easier: `GuzzleHttp\Psr7\parse_query` and - `GuzzleHttp\Psr7\build_query`. -- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware - system based on PSR-7, using RingPHP and it's middleware system as well adds - more complexity than the benefits it provides. All HTTP handlers that were - present in RingPHP have been modified to work directly with PSR-7 messages - and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces - complexity in Guzzle, removes a dependency, and improves performance. RingPHP - will be maintained for Guzzle 5 support, but will no longer be a part of - Guzzle 6. -- As Guzzle now uses a middleware based systems the event system and RingPHP - integration has been removed. Note: while the event system has been removed, - it is possible to add your own type of event system that is powered by the - middleware system. - - Removed the `Event` namespace. - - Removed the `Subscriber` namespace. - - Removed `Transaction` class - - Removed `RequestFsm` - - Removed `RingBridge` - - `GuzzleHttp\Subscriber\Cookie` is now provided by - `GuzzleHttp\Middleware::cookies` - - `GuzzleHttp\Subscriber\HttpError` is now provided by - `GuzzleHttp\Middleware::httpError` - - `GuzzleHttp\Subscriber\History` is now provided by - `GuzzleHttp\Middleware::history` - - `GuzzleHttp\Subscriber\Mock` is now provided by - `GuzzleHttp\Handler\MockHandler` - - `GuzzleHttp\Subscriber\Prepare` is now provided by - `GuzzleHttp\PrepareBodyMiddleware` - - `GuzzleHttp\Subscriber\Redirect` is now provided by - `GuzzleHttp\RedirectMiddleware` -- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in - `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. -- Static functions in `GuzzleHttp\Utils` have been moved to namespaced - functions under the `GuzzleHttp` namespace. This requires either a Composer - based autoloader or you to include functions.php. -- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to - `GuzzleHttp\ClientInterface::getConfig`. -- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. -- The `json` and `xml` methods of response objects has been removed. With the - migration to strictly adhering to PSR-7 as the interface for Guzzle messages, - adding methods to message interfaces would actually require Guzzle messages - to extend from PSR-7 messages rather then work with them directly. - -## Migrating to middleware - -The change to PSR-7 unfortunately required significant refactoring to Guzzle -due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event -system from plugins. The event system relied on mutability of HTTP messages and -side effects in order to work. With immutable messages, you have to change your -workflow to become more about either returning a value (e.g., functional -middlewares) or setting a value on an object. Guzzle v6 has chosen the -functional middleware approach. - -Instead of using the event system to listen for things like the `before` event, -you now create a stack based middleware function that intercepts a request on -the way in and the promise of the response on the way out. This is a much -simpler and more predictable approach than the event system and works nicely -with PSR-7 middleware. Due to the use of promises, the middleware system is -also asynchronous. - -v5: - -```php -use GuzzleHttp\Event\BeforeEvent; -$client = new GuzzleHttp\Client(); -// Get the emitter and listen to the before event. -$client->getEmitter()->on('before', function (BeforeEvent $e) { - // Guzzle v5 events relied on mutation - $e->getRequest()->setHeader('X-Foo', 'Bar'); -}); -``` - -v6: - -In v6, you can modify the request before it is sent using the `mapRequest` -middleware. The idiomatic way in v6 to modify the request/response lifecycle is -to setup a handler middleware stack up front and inject the handler into a -client. - -```php -use GuzzleHttp\Middleware; -// Create a handler stack that has all of the default middlewares attached -$handler = GuzzleHttp\HandlerStack::create(); -// Push the handler onto the handler stack -$handler->push(Middleware::mapRequest(function (RequestInterface $request) { - // Notice that we have to return a request object - return $request->withHeader('X-Foo', 'Bar'); -})); -// Inject the handler into the client -$client = new GuzzleHttp\Client(['handler' => $handler]); -``` - -## POST Requests - -This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) -and `multipart` request options. `form_params` is an associative array of -strings or array of strings and is used to serialize an -`application/x-www-form-urlencoded` POST request. The -[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) -option is now used to send a multipart/form-data POST request. - -`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add -POST files to a multipart/form-data request. - -The `body` option no longer accepts an array to send POST requests. Please use -`multipart` or `form_params` instead. - -The `base_url` option has been renamed to `base_uri`. - -4.x to 5.0 ----------- - -## Rewritten Adapter Layer - -Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send -HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor -is still supported, but it has now been renamed to `handler`. Instead of -passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP -`callable` that follows the RingPHP specification. - -## Removed Fluent Interfaces - -[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) -from the following classes: - -- `GuzzleHttp\Collection` -- `GuzzleHttp\Url` -- `GuzzleHttp\Query` -- `GuzzleHttp\Post\PostBody` -- `GuzzleHttp\Cookie\SetCookie` - -## Removed functions.php - -Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following -functions can be used as replacements. - -- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` -- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` -- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` -- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, - deprecated in favor of using `GuzzleHttp\Pool::batch()`. - -The "procedural" global client has been removed with no replacement (e.g., -`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` -object as a replacement. - -## `throwImmediately` has been removed - -The concept of "throwImmediately" has been removed from exceptions and error -events. This control mechanism was used to stop a transfer of concurrent -requests from completing. This can now be handled by throwing the exception or -by cancelling a pool of requests or each outstanding future request -individually. - -## headers event has been removed - -Removed the "headers" event. This event was only useful for changing the -body a response once the headers of the response were known. You can implement -a similar behavior in a number of ways. One example might be to use a -FnStream that has access to the transaction being sent. For example, when the -first byte is written, you could check if the response headers match your -expectations, and if so, change the actual stream body that is being -written to. - -## Updates to HTTP Messages - -Removed the `asArray` parameter from -`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header -value as an array, then use the newly added `getHeaderAsArray()` method of -`MessageInterface`. This change makes the Guzzle interfaces compatible with -the PSR-7 interfaces. - -3.x to 4.0 ----------- - -## Overarching changes: - -- Now requires PHP 5.4 or greater. -- No longer requires cURL to send requests. -- Guzzle no longer wraps every exception it throws. Only exceptions that are - recoverable are now wrapped by Guzzle. -- Various namespaces have been removed or renamed. -- No longer requiring the Symfony EventDispatcher. A custom event dispatcher - based on the Symfony EventDispatcher is - now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant - speed and functionality improvements). - -Changes per Guzzle 3.x namespace are described below. - -## Batch - -The `Guzzle\Batch` namespace has been removed. This is best left to -third-parties to implement on top of Guzzle's core HTTP library. - -## Cache - -The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement -has been implemented yet, but hoping to utilize a PSR cache interface). - -## Common - -- Removed all of the wrapped exceptions. It's better to use the standard PHP - library for unrecoverable exceptions. -- `FromConfigInterface` has been removed. -- `Guzzle\Common\Version` has been removed. The VERSION constant can be found - at `GuzzleHttp\ClientInterface::VERSION`. - -### Collection - -- `getAll` has been removed. Use `toArray` to convert a collection to an array. -- `inject` has been removed. -- `keySearch` has been removed. -- `getPath` no longer supports wildcard expressions. Use something better like - JMESPath for this. -- `setPath` now supports appending to an existing array via the `[]` notation. - -### Events - -Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses -`GuzzleHttp\Event\Emitter`. - -- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by - `GuzzleHttp\Event\EmitterInterface`. -- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by - `GuzzleHttp\Event\Emitter`. -- `Symfony\Component\EventDispatcher\Event` is replaced by - `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in - `GuzzleHttp\Event\EventInterface`. -- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and - `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the - event emitter of a request, client, etc. now uses the `getEmitter` method - rather than the `getDispatcher` method. - -#### Emitter - -- Use the `once()` method to add a listener that automatically removes itself - the first time it is invoked. -- Use the `listeners()` method to retrieve a list of event listeners rather than - the `getListeners()` method. -- Use `emit()` instead of `dispatch()` to emit an event from an emitter. -- Use `attach()` instead of `addSubscriber()` and `detach()` instead of - `removeSubscriber()`. - -```php -$mock = new Mock(); -// 3.x -$request->getEventDispatcher()->addSubscriber($mock); -$request->getEventDispatcher()->removeSubscriber($mock); -// 4.x -$request->getEmitter()->attach($mock); -$request->getEmitter()->detach($mock); -``` - -Use the `on()` method to add a listener rather than the `addListener()` method. - -```php -// 3.x -$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); -// 4.x -$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); -``` - -## Http - -### General changes - -- The cacert.pem certificate has been moved to `src/cacert.pem`. -- Added the concept of adapters that are used to transfer requests over the - wire. -- Simplified the event system. -- Sending requests in parallel is still possible, but batching is no longer a - concept of the HTTP layer. Instead, you must use the `complete` and `error` - events to asynchronously manage parallel request transfers. -- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. -- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. -- QueryAggregators have been rewritten so that they are simply callable - functions. -- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in - `functions.php` for an easy to use static client instance. -- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from - `GuzzleHttp\Exception\TransferException`. - -### Client - -Calling methods like `get()`, `post()`, `head()`, etc. no longer create and -return a request, but rather creates a request, sends the request, and returns -the response. - -```php -// 3.0 -$request = $client->get('/'); -$response = $request->send(); - -// 4.0 -$response = $client->get('/'); - -// or, to mirror the previous behavior -$request = $client->createRequest('GET', '/'); -$response = $client->send($request); -``` - -`GuzzleHttp\ClientInterface` has changed. - -- The `send` method no longer accepts more than one request. Use `sendAll` to - send multiple requests in parallel. -- `setUserAgent()` has been removed. Use a default request option instead. You - could, for example, do something like: - `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. -- `setSslVerification()` has been removed. Use default request options instead, - like `$client->setConfig('defaults/verify', true)`. - -`GuzzleHttp\Client` has changed. - -- The constructor now accepts only an associative array. You can include a - `base_url` string or array to use a URI template as the base URL of a client. - You can also specify a `defaults` key that is an associative array of default - request options. You can pass an `adapter` to use a custom adapter, - `batch_adapter` to use a custom adapter for sending requests in parallel, or - a `message_factory` to change the factory used to create HTTP requests and - responses. -- The client no longer emits a `client.create_request` event. -- Creating requests with a client no longer automatically utilize a URI - template. You must pass an array into a creational method (e.g., - `createRequest`, `get`, `put`, etc.) in order to expand a URI template. - -### Messages - -Messages no longer have references to their counterparts (i.e., a request no -longer has a reference to it's response, and a response no loger has a -reference to its request). This association is now managed through a -`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to -these transaction objects using request events that are emitted over the -lifecycle of a request. - -#### Requests with a body - -- `GuzzleHttp\Message\EntityEnclosingRequest` and - `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The - separation between requests that contain a body and requests that do not - contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` - handles both use cases. -- Any method that previously accepts a `GuzzleHttp\Response` object now accept a - `GuzzleHttp\Message\ResponseInterface`. -- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to - `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create - both requests and responses and is implemented in - `GuzzleHttp\Message\MessageFactory`. -- POST field and file methods have been removed from the request object. You - must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` - to control the format of a POST body. Requests that are created using a - standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use - a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if - the method is POST and no body is provided. - -```php -$request = $client->createRequest('POST', '/'); -$request->getBody()->setField('foo', 'bar'); -$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); -``` - -#### Headers - -- `GuzzleHttp\Message\Header` has been removed. Header values are now simply - represented by an array of values or as a string. Header values are returned - as a string by default when retrieving a header value from a message. You can - pass an optional argument of `true` to retrieve a header value as an array - of strings instead of a single concatenated string. -- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to - `GuzzleHttp\Post`. This interface has been simplified and now allows the - addition of arbitrary headers. -- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most - of the custom headers are now handled separately in specific - subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has - been updated to properly handle headers that contain parameters (like the - `Link` header). - -#### Responses - -- `GuzzleHttp\Message\Response::getInfo()` and - `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event - system to retrieve this type of information. -- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. -- `GuzzleHttp\Message\Response::getMessage()` has been removed. -- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific - methods have moved to the CacheSubscriber. -- Header specific helper functions like `getContentMd5()` have been removed. - Just use `getHeader('Content-MD5')` instead. -- `GuzzleHttp\Message\Response::setRequest()` and - `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event - system to work with request and response objects as a transaction. -- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the - Redirect subscriber instead. -- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have - been removed. Use `getStatusCode()` instead. - -#### Streaming responses - -Streaming requests can now be created by a client directly, returning a -`GuzzleHttp\Message\ResponseInterface` object that contains a body stream -referencing an open PHP HTTP stream. - -```php -// 3.0 -use Guzzle\Stream\PhpStreamRequestFactory; -$request = $client->get('/'); -$factory = new PhpStreamRequestFactory(); -$stream = $factory->fromRequest($request); -$data = $stream->read(1024); - -// 4.0 -$response = $client->get('/', ['stream' => true]); -// Read some data off of the stream in the response body -$data = $response->getBody()->read(1024); -``` - -#### Redirects - -The `configureRedirects()` method has been removed in favor of a -`allow_redirects` request option. - -```php -// Standard redirects with a default of a max of 5 redirects -$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); - -// Strict redirects with a custom number of redirects -$request = $client->createRequest('GET', '/', [ - 'allow_redirects' => ['max' => 5, 'strict' => true] -]); -``` - -#### EntityBody - -EntityBody interfaces and classes have been removed or moved to -`GuzzleHttp\Stream`. All classes and interfaces that once required -`GuzzleHttp\EntityBodyInterface` now require -`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no -longer uses `GuzzleHttp\EntityBody::factory` but now uses -`GuzzleHttp\Stream\Stream::factory` or even better: -`GuzzleHttp\Stream\create()`. - -- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` -- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` -- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` -- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` -- `Guzzle\Http\IoEmittyinEntityBody` has been removed. - -#### Request lifecycle events - -Requests previously submitted a large number of requests. The number of events -emitted over the lifecycle of a request has been significantly reduced to make -it easier to understand how to extend the behavior of a request. All events -emitted during the lifecycle of a request now emit a custom -`GuzzleHttp\Event\EventInterface` object that contains context providing -methods and a way in which to modify the transaction at that specific point in -time (e.g., intercept the request and set a response on the transaction). - -- `request.before_send` has been renamed to `before` and now emits a - `GuzzleHttp\Event\BeforeEvent` -- `request.complete` has been renamed to `complete` and now emits a - `GuzzleHttp\Event\CompleteEvent`. -- `request.sent` has been removed. Use `complete`. -- `request.success` has been removed. Use `complete`. -- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. -- `request.exception` has been removed. Use `error`. -- `request.receive.status_line` has been removed. -- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to - maintain a status update. -- `curl.callback.write` has been removed. Use a custom `StreamInterface` to - intercept writes. -- `curl.callback.read` has been removed. Use a custom `StreamInterface` to - intercept reads. - -`headers` is a new event that is emitted after the response headers of a -request have been received before the body of the response is downloaded. This -event emits a `GuzzleHttp\Event\HeadersEvent`. - -You can intercept a request and inject a response using the `intercept()` event -of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and -`GuzzleHttp\Event\ErrorEvent` event. - -See: http://docs.guzzlephp.org/en/latest/events.html - -## Inflection - -The `Guzzle\Inflection` namespace has been removed. This is not a core concern -of Guzzle. - -## Iterator - -The `Guzzle\Iterator` namespace has been removed. - -- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and - `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of - Guzzle itself. -- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent - class is shipped with PHP 5.4. -- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because - it's easier to just wrap an iterator in a generator that maps values. - -For a replacement of these iterators, see https://github.com/nikic/iter - -## Log - -The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The -`Guzzle\Log` namespace has been removed. Guzzle now relies on -`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been -moved to `GuzzleHttp\Subscriber\Log\Formatter`. - -## Parser - -The `Guzzle\Parser` namespace has been removed. This was previously used to -make it possible to plug in custom parsers for cookies, messages, URI -templates, and URLs; however, this level of complexity is not needed in Guzzle -so it has been removed. - -- Cookie: Cookie parsing logic has been moved to - `GuzzleHttp\Cookie\SetCookie::fromString`. -- Message: Message parsing logic for both requests and responses has been moved - to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only - used in debugging or deserializing messages, so it doesn't make sense for - Guzzle as a library to add this level of complexity to parsing messages. -- UriTemplate: URI template parsing has been moved to - `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL - URI template library if it is installed. -- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously - it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, - then developers are free to subclass `GuzzleHttp\Url`. - -## Plugin - -The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. -Several plugins are shipping with the core Guzzle library under this namespace. - -- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar - code has moved to `GuzzleHttp\Cookie`. -- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. -- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is - received. -- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. -- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before - sending. This subscriber is attached to all requests by default. -- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. - -The following plugins have been removed (third-parties are free to re-implement -these if needed): - -- `GuzzleHttp\Plugin\Async` has been removed. -- `GuzzleHttp\Plugin\CurlAuth` has been removed. -- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This - functionality should instead be implemented with event listeners that occur - after normal response parsing occurs in the guzzle/command package. - -The following plugins are not part of the core Guzzle package, but are provided -in separate repositories: - -- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler - to build custom retry policies using simple functions rather than various - chained classes. See: https://github.com/guzzle/retry-subscriber -- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to - https://github.com/guzzle/cache-subscriber -- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to - https://github.com/guzzle/log-subscriber -- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to - https://github.com/guzzle/message-integrity-subscriber -- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to - `GuzzleHttp\Subscriber\MockSubscriber`. -- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to - https://github.com/guzzle/oauth-subscriber - -## Service - -The service description layer of Guzzle has moved into two separate packages: - -- http://github.com/guzzle/command Provides a high level abstraction over web - services by representing web service operations using commands. -- http://github.com/guzzle/guzzle-services Provides an implementation of - guzzle/command that provides request serialization and response parsing using - Guzzle service descriptions. - -## Stream - -Stream have moved to a separate package available at -https://github.com/guzzle/streams. - -`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take -on the responsibilities of `Guzzle\Http\EntityBody` and -`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number -of methods implemented by the `StreamInterface` has been drastically reduced to -allow developers to more easily extend and decorate stream behavior. - -## Removed methods from StreamInterface - -- `getStream` and `setStream` have been removed to better encapsulate streams. -- `getMetadata` and `setMetadata` have been removed in favor of - `GuzzleHttp\Stream\MetadataStreamInterface`. -- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been - removed. This data is accessible when - using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. -- `rewind` has been removed. Use `seek(0)` for a similar behavior. - -## Renamed methods - -- `detachStream` has been renamed to `detach`. -- `feof` has been renamed to `eof`. -- `ftell` has been renamed to `tell`. -- `readLine` has moved from an instance method to a static class method of - `GuzzleHttp\Stream\Stream`. - -## Metadata streams - -`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams -that contain additional metadata accessible via `getMetadata()`. -`GuzzleHttp\Stream\StreamInterface::getMetadata` and -`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. - -## StreamRequestFactory - -The entire concept of the StreamRequestFactory has been removed. The way this -was used in Guzzle 3 broke the actual interface of sending streaming requests -(instead of getting back a Response, you got a StreamInterface). Streaming -PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. - -3.6 to 3.7 ----------- - -### Deprecations - -- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: - -```php -\Guzzle\Common\Version::$emitWarnings = true; -``` - -The following APIs and options have been marked as deprecated: - -- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. -- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. -- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated -- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. -- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. -- Marked `Guzzle\Common\Collection::inject()` as deprecated. -- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use - `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or - `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` - -3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational -request methods. When paired with a client's configuration settings, these options allow you to specify default settings -for various aspects of a request. Because these options make other previous configuration options redundant, several -configuration options and methods of a client and AbstractCommand have been deprecated. - -- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. -- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. -- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` -- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 - - $command = $client->getCommand('foo', array( - 'command.headers' => array('Test' => '123'), - 'command.response_body' => '/path/to/file' - )); - - // Should be changed to: - - $command = $client->getCommand('foo', array( - 'command.request_options' => array( - 'headers' => array('Test' => '123'), - 'save_as' => '/path/to/file' - ) - )); - -### Interface changes - -Additions and changes (you will need to update any implementations or subclasses you may have created): - -- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: - createRequest, head, delete, put, patch, post, options, prepareRequest -- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` -- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` -- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to - `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a - resource, string, or EntityBody into the $options parameter to specify the download location of the response. -- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a - default `array()` -- Added `Guzzle\Stream\StreamInterface::isRepeatable` -- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. - -The following methods were removed from interfaces. All of these methods are still available in the concrete classes -that implement them, but you should update your code to use alternative methods: - -- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use - `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or - `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or - `$client->setDefaultOption('headers/{header_name}', 'value')`. or - `$client->setDefaultOption('headers', array('header_name' => 'value'))`. -- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. -- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. -- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. -- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. -- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. -- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. - -### Cache plugin breaking changes - -- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a - CacheStorageInterface. These two objects and interface will be removed in a future version. -- Always setting X-cache headers on cached responses -- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin -- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface - $request, Response $response);` -- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` -- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` -- Added `CacheStorageInterface::purge($url)` -- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin - $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, - CanCacheStrategyInterface $canCache = null)` -- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` - -3.5 to 3.6 ----------- - -* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. -* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution -* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). - For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). - Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. -* Specific header implementations can be created for complex headers. When a message creates a header, it uses a - HeaderFactory which can map specific headers to specific header classes. There is now a Link header and - CacheControl header implementation. -* Moved getLinks() from Response to just be used on a Link header object. - -If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the -HeaderInterface (e.g. toArray(), getAll(), etc.). - -### Interface changes - -* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate -* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() -* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in - Guzzle\Http\Curl\RequestMediator -* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. -* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface -* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() - -### Removed deprecated functions - -* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() -* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). - -### Deprecations - -* The ability to case-insensitively search for header values -* Guzzle\Http\Message\Header::hasExactHeader -* Guzzle\Http\Message\Header::raw. Use getAll() -* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object - instead. - -### Other changes - -* All response header helper functions return a string rather than mixing Header objects and strings inconsistently -* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle - directly via interfaces -* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist - but are a no-op until removed. -* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a - `Guzzle\Service\Command\ArrayCommandInterface`. -* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response - on a request while the request is still being transferred -* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess - -3.3 to 3.4 ----------- - -Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. - -3.2 to 3.3 ----------- - -### Response::getEtag() quote stripping removed - -`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header - -### Removed `Guzzle\Http\Utils` - -The `Guzzle\Http\Utils` class was removed. This class was only used for testing. - -### Stream wrapper and type - -`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. - -### curl.emit_io became emit_io - -Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the -'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' - -3.1 to 3.2 ----------- - -### CurlMulti is no longer reused globally - -Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added -to a single client can pollute requests dispatched from other clients. - -If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the -ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is -created. - -```php -$multi = new Guzzle\Http\Curl\CurlMulti(); -$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); -$builder->addListener('service_builder.create_client', function ($event) use ($multi) { - $event['client']->setCurlMulti($multi); -} -}); -``` - -### No default path - -URLs no longer have a default path value of '/' if no path was specified. - -Before: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com/ -``` - -After: - -```php -$request = $client->get('http://www.foo.com'); -echo $request->getUrl(); -// >> http://www.foo.com -``` - -### Less verbose BadResponseException - -The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and -response information. You can, however, get access to the request and response object by calling `getRequest()` or -`getResponse()` on the exception object. - -### Query parameter aggregation - -Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a -setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is -responsible for handling the aggregation of multi-valued query string variables into a flattened hash. - -2.8 to 3.x ----------- - -### Guzzle\Service\Inspector - -Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` - -**Before** - -```php -use Guzzle\Service\Inspector; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Inspector::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -**After** - -```php -use Guzzle\Common\Collection; - -class YourClient extends \Guzzle\Service\Client -{ - public static function factory($config = array()) - { - $default = array(); - $required = array('base_url', 'username', 'api_key'); - $config = Collection::fromConfig($config, $default, $required); - - $client = new self( - $config->get('base_url'), - $config->get('username'), - $config->get('api_key') - ); - $client->setConfig($config); - - $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); - - return $client; - } -``` - -### Convert XML Service Descriptions to JSON - -**Before** - -```xml - - - - - - Get a list of groups - - - Uses a search query to get a list of groups - - - - Create a group - - - - - Delete a group by ID - - - - - - - Update a group - - - - - - -``` - -**After** - -```json -{ - "name": "Zendesk REST API v2", - "apiVersion": "2012-12-31", - "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", - "operations": { - "list_groups": { - "httpMethod":"GET", - "uri": "groups.json", - "summary": "Get a list of groups" - }, - "search_groups":{ - "httpMethod":"GET", - "uri": "search.json?query=\"{query} type:group\"", - "summary": "Uses a search query to get a list of groups", - "parameters":{ - "query":{ - "location": "uri", - "description":"Zendesk Search Query", - "type": "string", - "required": true - } - } - }, - "create_group": { - "httpMethod":"POST", - "uri": "groups.json", - "summary": "Create a group", - "parameters":{ - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - }, - "delete_group": { - "httpMethod":"DELETE", - "uri": "groups/{id}.json", - "summary": "Delete a group", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to delete by ID", - "type": "integer", - "required": true - } - } - }, - "get_group": { - "httpMethod":"GET", - "uri": "groups/{id}.json", - "summary": "Get a ticket", - "parameters":{ - "id":{ - "location": "uri", - "description":"Group to get by ID", - "type": "integer", - "required": true - } - } - }, - "update_group": { - "httpMethod":"PUT", - "uri": "groups/{id}.json", - "summary": "Update a group", - "parameters":{ - "id": { - "location": "uri", - "description":"Group to update by ID", - "type": "integer", - "required": true - }, - "data": { - "type": "array", - "location": "body", - "description":"Group JSON", - "filters": "json_encode", - "required": true - }, - "Content-Type":{ - "type": "string", - "location":"header", - "static": "application/json" - } - } - } -} -``` - -### Guzzle\Service\Description\ServiceDescription - -Commands are now called Operations - -**Before** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getCommands(); // @returns ApiCommandInterface[] -$sd->hasCommand($name); -$sd->getCommand($name); // @returns ApiCommandInterface|null -$sd->addCommand($command); // @param ApiCommandInterface $command -``` - -**After** - -```php -use Guzzle\Service\Description\ServiceDescription; - -$sd = new ServiceDescription(); -$sd->getOperations(); // @returns OperationInterface[] -$sd->hasOperation($name); -$sd->getOperation($name); // @returns OperationInterface|null -$sd->addOperation($operation); // @param OperationInterface $operation -``` - -### Guzzle\Common\Inflection\Inflector - -Namespace is now `Guzzle\Inflection\Inflector` - -### Guzzle\Http\Plugin - -Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. - -### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log - -Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. - -**Before** - -```php -use Guzzle\Common\Log\ClosureLogAdapter; -use Guzzle\Http\Plugin\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $verbosity is an integer indicating desired message verbosity level -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); -``` - -**After** - -```php -use Guzzle\Log\ClosureLogAdapter; -use Guzzle\Log\MessageFormatter; -use Guzzle\Plugin\Log\LogPlugin; - -/** @var \Guzzle\Http\Client */ -$client; - -// $format is a string indicating desired message format -- @see MessageFormatter -$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); -``` - -### Guzzle\Http\Plugin\CurlAuthPlugin - -Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. - -### Guzzle\Http\Plugin\ExponentialBackoffPlugin - -Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. - -**Before** - -```php -use Guzzle\Http\Plugin\ExponentialBackoffPlugin; - -$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( - ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) - )); - -$client->addSubscriber($backoffPlugin); -``` - -**After** - -```php -use Guzzle\Plugin\Backoff\BackoffPlugin; -use Guzzle\Plugin\Backoff\HttpBackoffStrategy; - -// Use convenient factory method instead -- see implementation for ideas of what -// you can do with chaining backoff strategies -$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( - HttpBackoffStrategy::getDefaultFailureCodes(), array(429) - )); -$client->addSubscriber($backoffPlugin); -``` - -### Known Issues - -#### [BUG] Accept-Encoding header behavior changed unintentionally. - -(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) - -In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to -properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. -See issue #217 for a workaround, or use a version containing the fix. diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/composer.json b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/composer.json deleted file mode 100644 index 0f4f94a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "guzzlehttp/guzzle", - "type": "library", - "description": "Guzzle is a PHP HTTP client library", - "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], - "homepage": "http://guzzlephp.org/", - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.5", - "guzzlehttp/psr7": "^1.4", - "guzzlehttp/promises": "^1.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "autoload": { - "files": ["src/functions_include.php"], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "GuzzleHttp\\Tests\\": "tests/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Client.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Client.php deleted file mode 100644 index 2e4cead..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Client.php +++ /dev/null @@ -1,408 +0,0 @@ - 'http://www.foo.com/1.0/', - * 'timeout' => 0, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ]); - * - * Client configuration settings include the following options: - * - * - handler: (callable) Function that transfers HTTP requests over the - * wire. The function is called with a Psr7\Http\Message\RequestInterface - * and array of transfer options, and must return a - * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. "handler" is a - * constructor only option that cannot be overridden in per/request - * options. If no handler is provided, a default handler will be created - * that enables all of the request options below by attaching all of the - * default middleware to the handler. - * - base_uri: (string|UriInterface) Base URI of the client that is merged - * into relative URIs. Can be a string or instance of UriInterface. - * - **: any request option - * - * @param array $config Client configuration settings. - * - * @see \GuzzleHttp\RequestOptions for a list of available request options. - */ - public function __construct(array $config = []) - { - if (!isset($config['handler'])) { - $config['handler'] = HandlerStack::create(); - } - - // Convert the base_uri to a UriInterface - if (isset($config['base_uri'])) { - $config['base_uri'] = Psr7\uri_for($config['base_uri']); - } - - $this->configureDefaults($config); - } - - public function __call($method, $args) - { - if (count($args) < 1) { - throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); - } - - $uri = $args[0]; - $opts = isset($args[1]) ? $args[1] : []; - - return substr($method, -5) === 'Async' - ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) - : $this->request($method, $uri, $opts); - } - - public function sendAsync(RequestInterface $request, array $options = []) - { - // Merge the base URI into the request URI if needed. - $options = $this->prepareDefaults($options); - - return $this->transfer( - $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), - $options - ); - } - - public function send(RequestInterface $request, array $options = []) - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->sendAsync($request, $options)->wait(); - } - - public function requestAsync($method, $uri = '', array $options = []) - { - $options = $this->prepareDefaults($options); - // Remove request modifying parameter because it can be done up-front. - $headers = isset($options['headers']) ? $options['headers'] : []; - $body = isset($options['body']) ? $options['body'] : null; - $version = isset($options['version']) ? $options['version'] : '1.1'; - // Merge the URI into the base URI. - $uri = $this->buildUri($uri, $options); - if (is_array($body)) { - $this->invalidBody(); - } - $request = new Psr7\Request($method, $uri, $headers, $body, $version); - // Remove the option so that they are not doubly-applied. - unset($options['headers'], $options['body'], $options['version']); - - return $this->transfer($request, $options); - } - - public function request($method, $uri = '', array $options = []) - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->requestAsync($method, $uri, $options)->wait(); - } - - public function getConfig($option = null) - { - return $option === null - ? $this->config - : (isset($this->config[$option]) ? $this->config[$option] : null); - } - - private function buildUri($uri, array $config) - { - // for BC we accept null which would otherwise fail in uri_for - $uri = Psr7\uri_for($uri === null ? '' : $uri); - - if (isset($config['base_uri'])) { - $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); - } - - return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; - } - - /** - * Configures the default options for a client. - * - * @param array $config - */ - private function configureDefaults(array $config) - { - $defaults = [ - 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false - ]; - - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. - - // We can only trust the HTTP_PROXY environment variable in a CLI - // process due to the fact that PHP has no reliable mechanism to - // get environment variables that start with "HTTP_". - if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) { - $defaults['proxy']['http'] = getenv('HTTP_PROXY'); - } - - if ($proxy = getenv('HTTPS_PROXY')) { - $defaults['proxy']['https'] = $proxy; - } - - if ($noProxy = getenv('NO_PROXY')) { - $cleanedNoProxy = str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); - } - - $this->config = $config + $defaults; - - if (!empty($config['cookies']) && $config['cookies'] === true) { - $this->config['cookies'] = new CookieJar(); - } - - // Add the default user-agent header. - if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => default_user_agent()]; - } else { - // Add the User-Agent header if one was not already set. - foreach (array_keys($this->config['headers']) as $name) { - if (strtolower($name) === 'user-agent') { - return; - } - } - $this->config['headers']['User-Agent'] = default_user_agent(); - } - } - - /** - * Merges default options into the array. - * - * @param array $options Options to modify by reference - * - * @return array - */ - private function prepareDefaults($options) - { - $defaults = $this->config; - - if (!empty($defaults['headers'])) { - // Default headers are only added if they are not present. - $defaults['_conditional'] = $defaults['headers']; - unset($defaults['headers']); - } - - // Special handling for headers is required as they are added as - // conditional headers and as headers passed to a request ctor. - if (array_key_exists('headers', $options)) { - // Allows default headers to be unset. - if ($options['headers'] === null) { - $defaults['_conditional'] = null; - unset($options['headers']); - } elseif (!is_array($options['headers'])) { - throw new \InvalidArgumentException('headers must be an array'); - } - } - - // Shallow merge defaults underneath options. - $result = $options + $defaults; - - // Remove null values. - foreach ($result as $k => $v) { - if ($v === null) { - unset($result[$k]); - } - } - - return $result; - } - - /** - * Transfers the given request and applies request options. - * - * The URI of the request is not modified and the request options are used - * as-is without merging in default options. - * - * @param RequestInterface $request - * @param array $options - * - * @return Promise\PromiseInterface - */ - private function transfer(RequestInterface $request, array $options) - { - // save_to -> sink - if (isset($options['save_to'])) { - $options['sink'] = $options['save_to']; - unset($options['save_to']); - } - - // exceptions -> http_errors - if (isset($options['exceptions'])) { - $options['http_errors'] = $options['exceptions']; - unset($options['exceptions']); - } - - $request = $this->applyOptions($request, $options); - $handler = $options['handler']; - - try { - return Promise\promise_for($handler($request, $options)); - } catch (\Exception $e) { - return Promise\rejection_for($e); - } - } - - /** - * Applies the array of request options to a request. - * - * @param RequestInterface $request - * @param array $options - * - * @return RequestInterface - */ - private function applyOptions(RequestInterface $request, array &$options) - { - $modify = []; - - if (isset($options['form_params'])) { - if (isset($options['multipart'])) { - throw new \InvalidArgumentException('You cannot use ' - . 'form_params and multipart at the same time. Use the ' - . 'form_params option if you want to send application/' - . 'x-www-form-urlencoded requests, and the multipart ' - . 'option to send multipart/form-data requests.'); - } - $options['body'] = http_build_query($options['form_params'], '', '&'); - unset($options['form_params']); - $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (isset($options['multipart'])) { - $options['body'] = new Psr7\MultipartStream($options['multipart']); - unset($options['multipart']); - } - - if (isset($options['json'])) { - $options['body'] = \GuzzleHttp\json_encode($options['json']); - unset($options['json']); - $options['_conditional']['Content-Type'] = 'application/json'; - } - - if (!empty($options['decode_content']) - && $options['decode_content'] !== true - ) { - $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; - } - - if (isset($options['headers'])) { - if (isset($modify['set_headers'])) { - $modify['set_headers'] = $options['headers'] + $modify['set_headers']; - } else { - $modify['set_headers'] = $options['headers']; - } - unset($options['headers']); - } - - if (isset($options['body'])) { - if (is_array($options['body'])) { - $this->invalidBody(); - } - $modify['body'] = Psr7\stream_for($options['body']); - unset($options['body']); - } - - if (!empty($options['auth']) && is_array($options['auth'])) { - $value = $options['auth']; - $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; - switch ($type) { - case 'basic': - $modify['set_headers']['Authorization'] = 'Basic ' - . base64_encode("$value[0]:$value[1]"); - break; - case 'digest': - // @todo: Do not rely on curl - $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; - $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - } - } - - if (isset($options['query'])) { - $value = $options['query']; - if (is_array($value)) { - $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); - } - if (!is_string($value)) { - throw new \InvalidArgumentException('query must be a string or array'); - } - $modify['query'] = $value; - unset($options['query']); - } - - // Ensure that sink is not an invalid value. - if (isset($options['sink'])) { - // TODO: Add more sink validation? - if (is_bool($options['sink'])) { - throw new \InvalidArgumentException('sink must not be a boolean'); - } - } - - $request = Psr7\modify_request($request, $modify); - if ($request->getBody() instanceof Psr7\MultipartStream) { - // Use a multipart/form-data POST if a Content-Type is not set. - $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - . $request->getBody()->getBoundary(); - } - - // Merge in conditional headers if they are not present. - if (isset($options['_conditional'])) { - // Build up the changes so it's in a single clone of the message. - $modify = []; - foreach ($options['_conditional'] as $k => $v) { - if (!$request->hasHeader($k)) { - $modify['set_headers'][$k] = $v; - } - } - $request = Psr7\modify_request($request, $modify); - // Don't pass this internal value along to middleware/handlers. - unset($options['_conditional']); - } - - return $request; - } - - private function invalidBody() - { - throw new \InvalidArgumentException('Passing in the "body" request ' - . 'option as an array to send a POST request has been deprecated. ' - . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or a the "multipart" ' - . 'request option to send a multipart/form-data request.'); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/ClientInterface.php deleted file mode 100644 index 5a67b66..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -strictMode = $strictMode; - - foreach ($cookieArray as $cookie) { - if (!($cookie instanceof SetCookie)) { - $cookie = new SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - * - * @return self - */ - public static function fromArray(array $cookies, $domain) - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true - ])); - } - - return $cookieJar; - } - - /** - * @deprecated - */ - public static function getCookieValue($value) - { - return $value; - } - - /** - * Evaluate if this cookie should be persisted to storage - * that survives between requests. - * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies - * @return bool - */ - public static function shouldPersist( - SetCookie $cookie, - $allowSessionCookies = false - ) { - if ($cookie->getExpires() || $allowSessionCookies) { - if (!$cookie->getDiscard()) { - return true; - } - } - - return false; - } - - public function toArray() - { - return array_map(function (SetCookie $cookie) { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - - public function clear($domain = null, $path = null, $name = null) - { - if (!$domain) { - $this->cookies = []; - return; - } elseif (!$path) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain) { - return !$cookie->matchesDomain($domain); - } - ); - } elseif (!$name) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain) { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } else { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } - } - - public function clearSessionCookies() - { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) { - return !$cookie->getDiscard() && $cookie->getExpires(); - } - ); - } - - public function setCookie(SetCookie $cookie) - { - // If the name string is empty (but not 0), ignore the set-cookie - // string entirely. - $name = $cookie->getName(); - if (!$name && $name !== '0') { - return false; - } - - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); - } else { - $this->removeCookieIfEmpty($cookie); - return false; - } - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - public function count() - { - return count($this->cookies); - } - - public function getIterator() - { - return new \ArrayIterator(array_values($this->cookies)); - } - - public function extractCookies( - RequestInterface $request, - ResponseInterface $response - ) { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getUri()->getHost()); - } - $this->setCookie($sc); - } - } - } - - public function withCookieHeader(RequestInterface $request) - { - $values = []; - $uri = $request->getUri(); - $scheme = $uri->getScheme(); - $host = $uri->getHost(); - $path = $uri->getPath() ?: '/'; - - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') - ) { - $values[] = $cookie->getName() . '=' - . $cookie->getValue(); - } - } - - return $values - ? $request->withHeader('Cookie', implode('; ', $values)) - : $request; - } - - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - * - * @param SetCookie $cookie - */ - private function removeCookieIfEmpty(SetCookie $cookie) - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear( - $cookie->getDomain(), - $cookie->getPath(), - $cookie->getName() - ); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 2cf298a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -filename = $cookieFile; - $this->storeSessionCookies = $storeSessionCookies; - - if (file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * @throws \RuntimeException if the file cannot be found or created - */ - public function save($filename) - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $jsonStr = \GuzzleHttp\json_encode($json); - if (false === file_put_contents($filename, $jsonStr)) { - throw new \RuntimeException("Unable to save file {$filename}"); - } - } - - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load($filename) - { - $json = file_get_contents($filename); - if (false === $json) { - throw new \RuntimeException("Unable to load file {$filename}"); - } elseif ($json === '') { - return; - } - - $data = \GuzzleHttp\json_decode($json, true); - if (is_array($data)) { - foreach (json_decode($json, true) as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index e4bfafd..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,71 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save() - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load() - { - if (!isset($_SESSION[$this->sessionKey])) { - return; - } - $data = json_decode($_SESSION[$this->sessionKey], true); - if (is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index c911e2a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,404 +0,0 @@ - null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false - ]; - - /** @var array Cookie data */ - private $data; - - /** - * Create a new SetCookie object from a string - * - * @param string $cookie Set-Cookie header string - * - * @return self - */ - public static function fromString($cookie) - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = array_filter(array_map('trim', explode(';', $cookie))); - // The name of the cookie (first kvp) must include an equal sign. - if (empty($pieces) || !strpos($pieces[0], '=')) { - return new self($data); - } - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - - $cookieParts = explode('=', $part, 2); - $key = trim($cookieParts[0]); - $value = isset($cookieParts[1]) - ? trim($cookieParts[1], " \n\r\t\0\x0B") - : true; - - // Only check for non-cookies when cookies have been found - if (empty($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (array_keys(self::$defaults) as $search) { - if (!strcasecmp($search, $key)) { - $data[$search] = $value; - continue 2; - } - } - $data[$key] = $value; - } - } - - return new self($data); - } - - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - $this->data = array_replace(self::$defaults, $data); - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(time() + $this->getMaxAge()); - } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { - $this->setExpires($this->getExpires()); - } - } - - public function __toString() - { - $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; - foreach ($this->data as $k => $v) { - if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { - if ($k === 'Expires') { - $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; - } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; - } - } - } - - return rtrim($str, '; '); - } - - public function toArray() - { - return $this->data; - } - - /** - * Get the cookie name - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - - /** - * Set the cookie name - * - * @param string $name Cookie name - */ - public function setName($name) - { - $this->data['Name'] = $name; - } - - /** - * Get the cookie value - * - * @return string - */ - public function getValue() - { - return $this->data['Value']; - } - - /** - * Set the cookie value - * - * @param string $value Cookie value - */ - public function setValue($value) - { - $this->data['Value'] = $value; - } - - /** - * Get the domain - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - - /** - * Set the domain of the cookie - * - * @param string $domain - */ - public function setDomain($domain) - { - $this->data['Domain'] = $domain; - } - - /** - * Get the path - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - - /** - * Set the path of the cookie - * - * @param string $path Path of the cookie - */ - public function setPath($path) - { - $this->data['Path'] = $path; - } - - /** - * Maximum lifetime of the cookie in seconds - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['Max-Age']; - } - - /** - * Set the max-age of the cookie - * - * @param int $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge) - { - $this->data['Max-Age'] = $maxAge; - } - - /** - * The UNIX timestamp when the cookie Expires - * - * @return mixed - */ - public function getExpires() - { - return $this->data['Expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire - * - * @param int $timestamp Unix timestamp - */ - public function setExpires($timestamp) - { - $this->data['Expires'] = is_numeric($timestamp) - ? (int) $timestamp - : strtotime($timestamp); - } - - /** - * Get whether or not this is a secure cookie - * - * @return null|bool - */ - public function getSecure() - { - return $this->data['Secure']; - } - - /** - * Set whether or not the cookie is secure - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure) - { - $this->data['Secure'] = $secure; - } - - /** - * Get whether or not this is a session cookie - * - * @return null|bool - */ - public function getDiscard() - { - return $this->data['Discard']; - } - - /** - * Set whether or not this is a session cookie - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard) - { - $this->data['Discard'] = $discard; - } - - /** - * Get whether or not this is an HTTP only cookie - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - - /** - * Set whether or not this is an HTTP only cookie - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly) - { - $this->data['HttpOnly'] = $httpOnly; - } - - /** - * Check if the cookie matches a path value. - * - * A request-path path-matches a given cookie-path if at least one of - * the following conditions holds: - * - * - The cookie-path and the request-path are identical. - * - The cookie-path is a prefix of the request-path, and the last - * character of the cookie-path is %x2F ("/"). - * - The cookie-path is a prefix of the request-path, and the first - * character of the request-path that is not included in the cookie- - * path is a %x2F ("/") character. - * - * @param string $requestPath Path to check against - * - * @return bool - */ - public function matchesPath($requestPath) - { - $cookiePath = $this->getPath(); - - // Match on exact matches or when path is the default empty "/" - if ($cookiePath === '/' || $cookiePath == $requestPath) { - return true; - } - - // Ensure that the cookie-path is a prefix of the request path. - if (0 !== strpos($requestPath, $cookiePath)) { - return false; - } - - // Match if the last character of the cookie-path is "/" - if (substr($cookiePath, -1, 1) === '/') { - return true; - } - - // Match if the first character not included in cookie path is "/" - return substr($requestPath, strlen($cookiePath), 1) === '/'; - } - - /** - * Check if the cookie matches a domain value - * - * @param string $domain Domain to check against - * - * @return bool - */ - public function matchesDomain($domain) - { - // Remove the leading '.' as per spec in RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = ltrim($this->getDomain(), '.'); - - // Domain not set or exact match. - if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { - return true; - } - - // Matching the subdomain according to RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.1.3 - if (filter_var($domain, FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/', $domain); - } - - /** - * Check if the cookie is expired - * - * @return bool - */ - public function isExpired() - { - return $this->getExpires() && time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265 - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - // Names must not be empty, but can be 0 - $name = $this->getName(); - if (empty($name) && !is_numeric($name)) { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (preg_match( - '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', - $name) - ) { - return 'Cookie name must not contain invalid characters: ASCII ' - . 'Control characters (0-31;127), space, tab and the ' - . 'following characters: ()<>@,;:\"/?={}'; - } - - // Value must not be empty, but can be 0 - $value = $this->getValue(); - if (empty($value) && !is_numeric($value)) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0 - // A "0" is not a valid internet domain, but may be used as server name - // in a private network. - $domain = $this->getDomain(); - if (empty($domain) && !is_numeric($domain)) { - return 'The cookie domain must not be empty'; - } - - return true; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index fd78431..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,7 +0,0 @@ -getStatusCode() - : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - $this->handlerContext = $handlerContext; - } - - /** - * Wrap non-RequestExceptions with a RequestException - * - * @param RequestInterface $request - * @param \Exception $e - * - * @return RequestException - */ - public static function wrapException(RequestInterface $request, \Exception $e) - { - return $e instanceof RequestException - ? $e - : new RequestException($e->getMessage(), $request, null, $e); - } - - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request - * @param ResponseInterface $response Response received - * @param \Exception $previous Previous exception - * @param array $ctx Optional handler context. - * - * @return self - */ - public static function create( - RequestInterface $request, - ResponseInterface $response = null, - \Exception $previous = null, - array $ctx = [] - ) { - if (!$response) { - return new self( - 'Error completing request', - $request, - null, - $previous, - $ctx - ); - } - - $level = (int) floor($response->getStatusCode() / 100); - if ($level === 4) { - $label = 'Client error'; - $className = __NAMESPACE__ . '\\ClientException'; - } elseif ($level === 5) { - $label = 'Server error'; - $className = __NAMESPACE__ . '\\ServerException'; - } else { - $label = 'Unsuccessful request'; - $className = __CLASS__; - } - - $uri = $request->getUri(); - $uri = static::obfuscateUri($uri); - - // Server Error: `GET /` resulted in a `404 Not Found` response: - // ... (truncated) - $message = sprintf( - '%s: `%s` resulted in a `%s` response', - $label, - $request->getMethod() . ' ' . $uri, - $response->getStatusCode() . ' ' . $response->getReasonPhrase() - ); - - $summary = static::getResponseBodySummary($response); - - if ($summary !== null) { - $message .= ":\n{$summary}\n"; - } - - return new $className($message, $request, $response, $previous, $ctx); - } - - /** - * Get a short summary of the response - * - * Will return `null` if the response is not printable. - * - * @param ResponseInterface $response - * - * @return string|null - */ - public static function getResponseBodySummary(ResponseInterface $response) - { - $body = $response->getBody(); - - if (!$body->isSeekable()) { - return null; - } - - $size = $body->getSize(); - $summary = $body->read(120); - $body->rewind(); - - if ($size > 120) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { - return null; - } - - return $summary; - } - - /** - * Obfuscates URI if there is an username and a password present - * - * @param UriInterface $uri - * - * @return UriInterface - */ - private static function obfuscateUri($uri) - { - $userInfo = $uri->getUserInfo(); - - if (false !== ($pos = strpos($userInfo, ':'))) { - return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); - } - - return $uri; - } - - /** - * Get the request that caused the exception - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - - /** - * Get the associated response - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Check if a response was received - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - * - * @return array - */ - public function getHandlerContext() - { - return $this->handlerContext; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php deleted file mode 100644 index a77c289..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +++ /dev/null @@ -1,27 +0,0 @@ -stream = $stream; - $msg = $msg ?: 'Could not seek the stream to position ' . $pos; - parent::__construct($msg); - } - - /** - * @return StreamInterface - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php deleted file mode 100644 index 7cdd340..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,7 +0,0 @@ -maxHandles = $maxHandles; - } - - public function create(RequestInterface $request, array $options) - { - if (isset($options['curl']['body_as_string'])) { - $options['_body_as_string'] = $options['curl']['body_as_string']; - unset($options['curl']['body_as_string']); - } - - $easy = new EasyHandle; - $easy->request = $request; - $easy->options = $options; - $conf = $this->getDefaultConf($easy); - $this->applyMethod($easy, $conf); - $this->applyHandlerOptions($easy, $conf); - $this->applyHeaders($easy, $conf); - unset($conf['_headers']); - - // Add handler options from the request configuration options - if (isset($options['curl'])) { - $conf = array_replace($conf, $options['curl']); - } - - $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles - ? array_pop($this->handles) - : curl_init(); - curl_setopt_array($easy->handle, $conf); - - return $easy; - } - - public function release(EasyHandle $easy) - { - $resource = $easy->handle; - unset($easy->handle); - - if (count($this->handles) >= $this->maxHandles) { - curl_close($resource); - } else { - // Remove all callback functions as they can hold onto references - // and are not cleaned up by curl_reset. Using curl_setopt_array - // does not work for some reason, so removing each one - // individually. - curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); - curl_setopt($resource, CURLOPT_READFUNCTION, null); - curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); - curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); - curl_reset($resource); - $this->handles[] = $resource; - } - } - - /** - * Completes a cURL transaction, either returning a response promise or a - * rejected promise. - * - * @param callable $handler - * @param EasyHandle $easy - * @param CurlFactoryInterface $factory Dictates how the handle is released - * - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public static function finish( - callable $handler, - EasyHandle $easy, - CurlFactoryInterface $factory - ) { - if (isset($easy->options['on_stats'])) { - self::invokeStats($easy); - } - - if (!$easy->response || $easy->errno) { - return self::finishError($handler, $easy, $factory); - } - - // Return the response if it is present and there is no error. - $factory->release($easy); - - // Rewind the body of the response if possible. - $body = $easy->response->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - - return new FulfilledPromise($easy->response); - } - - private static function invokeStats(EasyHandle $easy) - { - $curlStats = curl_getinfo($easy->handle); - $stats = new TransferStats( - $easy->request, - $easy->response, - $curlStats['total_time'], - $easy->errno, - $curlStats - ); - call_user_func($easy->options['on_stats'], $stats); - } - - private static function finishError( - callable $handler, - EasyHandle $easy, - CurlFactoryInterface $factory - ) { - // Get error information and release the handle to the factory. - $ctx = [ - 'errno' => $easy->errno, - 'error' => curl_error($easy->handle), - ] + curl_getinfo($easy->handle); - $factory->release($easy); - - // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) - && (!$easy->errno || $easy->errno == 65) - ) { - return self::retryFailedRewind($handler, $easy, $ctx); - } - - return self::createRejection($easy, $ctx); - } - - private static function createRejection(EasyHandle $easy, array $ctx) - { - static $connectionErrors = [ - CURLE_OPERATION_TIMEOUTED => true, - CURLE_COULDNT_RESOLVE_HOST => true, - CURLE_COULDNT_CONNECT => true, - CURLE_SSL_CONNECT_ERROR => true, - CURLE_GOT_NOTHING => true, - ]; - - // If an exception was encountered during the onHeaders event, then - // return a rejected promise that wraps that exception. - if ($easy->onHeadersException) { - return new RejectedPromise( - new RequestException( - 'An error was encountered during the on_headers event', - $easy->request, - $easy->response, - $easy->onHeadersException, - $ctx - ) - ); - } - - $message = sprintf( - 'cURL error %s: %s (%s)', - $ctx['errno'], - $ctx['error'], - 'see http://curl.haxx.se/libcurl/c/libcurl-errors.html' - ); - - // Create a connection exception if it was a specific error code. - $error = isset($connectionErrors[$easy->errno]) - ? new ConnectException($message, $easy->request, null, $ctx) - : new RequestException($message, $easy->request, $easy->response, null, $ctx); - - return new RejectedPromise($error); - } - - private function getDefaultConf(EasyHandle $easy) - { - $conf = [ - '_headers' => $easy->request->getHeaders(), - CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), - CURLOPT_RETURNTRANSFER => false, - CURLOPT_HEADER => false, - CURLOPT_CONNECTTIMEOUT => 150, - ]; - - if (defined('CURLOPT_PROTOCOLS')) { - $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $version = $easy->request->getProtocolVersion(); - if ($version == 1.1) { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; - } elseif ($version == 2.0) { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; - } else { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; - } - - return $conf; - } - - private function applyMethod(EasyHandle $easy, array &$conf) - { - $body = $easy->request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size > 0) { - $this->applyBody($easy->request, $easy->options, $conf); - return; - } - - $method = $easy->request->getMethod(); - if ($method === 'PUT' || $method === 'POST') { - // See http://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!$easy->request->hasHeader('Content-Length')) { - $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - } elseif ($method === 'HEAD') { - $conf[CURLOPT_NOBODY] = true; - unset( - $conf[CURLOPT_WRITEFUNCTION], - $conf[CURLOPT_READFUNCTION], - $conf[CURLOPT_FILE], - $conf[CURLOPT_INFILE] - ); - } - } - - private function applyBody(RequestInterface $request, array $options, array &$conf) - { - $size = $request->hasHeader('Content-Length') - ? (int) $request->getHeaderLine('Content-Length') - : null; - - // Send the body as a string if the size is less than 1MB OR if the - // [curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || - !empty($options['_body_as_string']) - ) { - $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $conf); - $this->removeHeader('Transfer-Encoding', $conf); - } else { - $conf[CURLOPT_UPLOAD] = true; - if ($size !== null) { - $conf[CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $conf); - } - $body = $request->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { - return $body->read($length); - }; - } - - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; - } - - // cURL sometimes adds a content-type by default. Prevent this. - if (!$request->hasHeader('Content-Type')) { - $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - - private function applyHeaders(EasyHandle $easy, array &$conf) - { - foreach ($conf['_headers'] as $name => $values) { - foreach ($values as $value) { - $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; - } - } - - // Remove the Accept header if one was not set - if (!$easy->request->hasHeader('Accept')) { - $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader($name, array &$options) - { - foreach (array_keys($options['_headers']) as $key) { - if (!strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - return; - } - } - } - - private function applyHandlerOptions(EasyHandle $easy, array &$conf) - { - $options = $easy->options; - if (isset($options['verify'])) { - if ($options['verify'] === false) { - unset($conf[CURLOPT_CAINFO]); - $conf[CURLOPT_SSL_VERIFYHOST] = 0; - $conf[CURLOPT_SSL_VERIFYPEER] = false; - } else { - $conf[CURLOPT_SSL_VERIFYHOST] = 2; - $conf[CURLOPT_SSL_VERIFYPEER] = true; - if (is_string($options['verify'])) { - $conf[CURLOPT_CAINFO] = $options['verify']; - if (!file_exists($options['verify'])) { - throw new \InvalidArgumentException( - "SSL CA bundle not found: {$options['verify']}" - ); - } - } - } - } - - if (!empty($options['decode_content'])) { - $accept = $easy->request->getHeaderLine('Accept-Encoding'); - if ($accept) { - $conf[CURLOPT_ENCODING] = $accept; - } else { - $conf[CURLOPT_ENCODING] = ''; - // Don't let curl send the header over the wire - $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - } - - if (isset($options['sink'])) { - $sink = $options['sink']; - if (!is_string($sink)) { - $sink = \GuzzleHttp\Psr7\stream_for($sink); - } elseif (!is_dir(dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(sprintf( - 'Directory %s does not exist for sink value of %s', - dirname($sink), - $sink - )); - } else { - $sink = new LazyOpenStream($sink, 'w+'); - } - $easy->sink = $sink; - $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { - return $sink->write($write); - }; - } else { - // Use a default temp stream if no sink was set. - $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); - $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); - } - - if (isset($options['timeout'])) { - $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; - } - - if (isset($options['connect_timeout'])) { - $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; - } - - if (isset($options['proxy'])) { - if (!is_array($options['proxy'])) { - $conf[CURLOPT_PROXY] = $options['proxy']; - } else { - $scheme = $easy->request->getUri()->getScheme(); - if (isset($options['proxy'][$scheme])) { - $host = $easy->request->getUri()->getHost(); - if (!isset($options['proxy']['no']) || - !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) - ) { - $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; - } - } - } - } - - if (isset($options['cert'])) { - $cert = $options['cert']; - if (is_array($cert)) { - $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; - $cert = $cert[0]; - } - if (!file_exists($cert)) { - throw new \InvalidArgumentException( - "SSL certificate not found: {$cert}" - ); - } - $conf[CURLOPT_SSLCERT] = $cert; - } - - if (isset($options['ssl_key'])) { - $sslKey = $options['ssl_key']; - if (is_array($sslKey)) { - $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1]; - $sslKey = $sslKey[0]; - } - if (!file_exists($sslKey)) { - throw new \InvalidArgumentException( - "SSL private key not found: {$sslKey}" - ); - } - $conf[CURLOPT_SSLKEY] = $sslKey; - } - - if (isset($options['progress'])) { - $progress = $options['progress']; - if (!is_callable($progress)) { - throw new \InvalidArgumentException( - 'progress client option must be callable' - ); - } - $conf[CURLOPT_NOPROGRESS] = false; - $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { - $args = func_get_args(); - // PHP 5.5 pushed the handle onto the start of the args - if (is_resource($args[0])) { - array_shift($args); - } - call_user_func_array($progress, $args); - }; - } - - if (!empty($options['debug'])) { - $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']); - $conf[CURLOPT_VERBOSE] = true; - } - } - - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - */ - private static function retryFailedRewind( - callable $handler, - EasyHandle $easy, - array $ctx - ) { - try { - // Only rewind if the body has been read from. - $body = $easy->request->getBody(); - if ($body->tell() > 0) { - $body->rewind(); - } - } catch (\RuntimeException $e) { - $ctx['error'] = 'The connection unexpectedly failed without ' - . 'providing an error. The request would have been retried, ' - . 'but attempting to rewind the request body failed. ' - . 'Exception: ' . $e; - return self::createRejection($easy, $ctx); - } - - // Retry no more than 3 times before giving up. - if (!isset($easy->options['_curl_retries'])) { - $easy->options['_curl_retries'] = 1; - } elseif ($easy->options['_curl_retries'] == 2) { - $ctx['error'] = 'The cURL request was retried 3 times ' - . 'and did not succeed. The most likely reason for the failure ' - . 'is that cURL was unable to rewind the body of the request ' - . 'and subsequent retries resulted in the same error. Turn on ' - . 'the debug option to see what went wrong. See ' - . 'https://bugs.php.net/bug.php?id=47204 for more information.'; - return self::createRejection($easy, $ctx); - } else { - $easy->options['_curl_retries']++; - } - - return $handler($easy->request, $easy->options); - } - - private function createHeaderFn(EasyHandle $easy) - { - if (isset($easy->options['on_headers'])) { - $onHeaders = $easy->options['on_headers']; - - if (!is_callable($onHeaders)) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - } else { - $onHeaders = null; - } - - return function ($ch, $h) use ( - $onHeaders, - $easy, - &$startingResponse - ) { - $value = trim($h); - if ($value === '') { - $startingResponse = true; - $easy->createResponse(); - if ($onHeaders !== null) { - try { - $onHeaders($easy->response); - } catch (\Exception $e) { - // Associate the exception with the handle and trigger - // a curl header write error by returning 0. - $easy->onHeadersException = $e; - return -1; - } - } - } elseif ($startingResponse) { - $startingResponse = false; - $easy->headers = [$value]; - } else { - $easy->headers[] = $value; - } - return strlen($h); - }; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php deleted file mode 100644 index b0fc236..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -factory = isset($options['handle_factory']) - ? $options['handle_factory'] - : new CurlFactory(3); - } - - public function __invoke(RequestInterface $request, array $options) - { - if (isset($options['delay'])) { - usleep($options['delay'] * 1000); - } - - $easy = $this->factory->create($request, $options); - curl_exec($easy->handle); - $easy->errno = curl_errno($easy->handle); - - return CurlFactory::finish($this, $easy, $this->factory); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php deleted file mode 100644 index 945d06e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ /dev/null @@ -1,197 +0,0 @@ -factory = isset($options['handle_factory']) - ? $options['handle_factory'] : new CurlFactory(50); - $this->selectTimeout = isset($options['select_timeout']) - ? $options['select_timeout'] : 1; - } - - public function __get($name) - { - if ($name === '_mh') { - return $this->_mh = curl_multi_init(); - } - - throw new \BadMethodCallException(); - } - - public function __destruct() - { - if (isset($this->_mh)) { - curl_multi_close($this->_mh); - unset($this->_mh); - } - } - - public function __invoke(RequestInterface $request, array $options) - { - $easy = $this->factory->create($request, $options); - $id = (int) $easy->handle; - - $promise = new Promise( - [$this, 'execute'], - function () use ($id) { return $this->cancel($id); } - ); - - $this->addRequest(['easy' => $easy, 'deferred' => $promise]); - - return $promise; - } - - /** - * Ticks the curl event loop. - */ - public function tick() - { - // Add any delayed handles if needed. - if ($this->delays) { - $currentTime = microtime(true); - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - curl_multi_add_handle( - $this->_mh, - $this->handles[$id]['easy']->handle - ); - } - } - } - - // Step through the task queue which may add additional requests. - P\queue()->run(); - - if ($this->active && - curl_multi_select($this->_mh, $this->selectTimeout) === -1 - ) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - usleep(250); - } - - while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); - - $this->processMessages(); - } - - /** - * Runs until all outstanding connections have completed. - */ - public function execute() - { - $queue = P\queue(); - - while ($this->handles || !$queue->isEmpty()) { - // If there are no transfers, then sleep for the next delay - if (!$this->active && $this->delays) { - usleep($this->timeToNext()); - } - $this->tick(); - } - } - - private function addRequest(array $entry) - { - $easy = $entry['easy']; - $id = (int) $easy->handle; - $this->handles[$id] = $entry; - if (empty($easy->options['delay'])) { - curl_multi_add_handle($this->_mh, $easy->handle); - } else { - $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000); - } - } - - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id) - { - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return false; - } - - $handle = $this->handles[$id]['easy']->handle; - unset($this->delays[$id], $this->handles[$id]); - curl_multi_remove_handle($this->_mh, $handle); - curl_close($handle); - - return true; - } - - private function processMessages() - { - while ($done = curl_multi_info_read($this->_mh)) { - $id = (int) $done['handle']; - curl_multi_remove_handle($this->_mh, $done['handle']); - - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - - $entry = $this->handles[$id]; - unset($this->handles[$id], $this->delays[$id]); - $entry['easy']->errno = $done['result']; - $entry['deferred']->resolve( - CurlFactory::finish( - $this, - $entry['easy'], - $this->factory - ) - ); - } - } - - private function timeToNext() - { - $currentTime = microtime(true); - $nextTime = PHP_INT_MAX; - foreach ($this->delays as $time) { - if ($time < $nextTime) { - $nextTime = $time; - } - } - - return max(0, $nextTime - $currentTime) * 1000000; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php deleted file mode 100644 index 7754e91..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ /dev/null @@ -1,92 +0,0 @@ -headers)) { - throw new \RuntimeException('No headers have been received'); - } - - // HTTP-version SP status-code SP reason-phrase - $startLine = explode(' ', array_shift($this->headers), 3); - $headers = \GuzzleHttp\headers_from_lines($this->headers); - $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); - - if (!empty($this->options['decode_content']) - && isset($normalizedKeys['content-encoding']) - ) { - $headers['x-encoded-content-encoding'] - = $headers[$normalizedKeys['content-encoding']]; - unset($headers[$normalizedKeys['content-encoding']]); - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] - = $headers[$normalizedKeys['content-length']]; - - $bodyLength = (int) $this->sink->getSize(); - if ($bodyLength) { - $headers[$normalizedKeys['content-length']] = $bodyLength; - } else { - unset($headers[$normalizedKeys['content-length']]); - } - } - } - - // Attach a response to the easy handle with the parsed headers. - $this->response = new Response( - $startLine[1], - $headers, - $this->sink, - substr($startLine[0], 5), - isset($startLine[2]) ? (string) $startLine[2] : null - ); - } - - public function __get($name) - { - $msg = $name === 'handle' - ? 'The EasyHandle has been released' - : 'Invalid property: ' . $name; - throw new \BadMethodCallException($msg); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php deleted file mode 100644 index 7bbe735..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ /dev/null @@ -1,176 +0,0 @@ -onFulfilled = $onFulfilled; - $this->onRejected = $onRejected; - - if ($queue) { - call_user_func_array([$this, 'append'], $queue); - } - } - - public function __invoke(RequestInterface $request, array $options) - { - if (!$this->queue) { - throw new \OutOfBoundsException('Mock queue is empty'); - } - - if (isset($options['delay'])) { - usleep($options['delay'] * 1000); - } - - $this->lastRequest = $request; - $this->lastOptions = $options; - $response = array_shift($this->queue); - - if (is_callable($response)) { - $response = call_user_func($response, $request, $options); - } - - $response = $response instanceof \Exception - ? new RejectedPromise($response) - : \GuzzleHttp\Promise\promise_for($response); - - return $response->then( - function ($value) use ($request, $options) { - $this->invokeStats($request, $options, $value); - if ($this->onFulfilled) { - call_user_func($this->onFulfilled, $value); - } - if (isset($options['sink'])) { - $contents = (string) $value->getBody(); - $sink = $options['sink']; - - if (is_resource($sink)) { - fwrite($sink, $contents); - } elseif (is_string($sink)) { - file_put_contents($sink, $contents); - } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { - $sink->write($contents); - } - } - - return $value; - }, - function ($reason) use ($request, $options) { - $this->invokeStats($request, $options, null, $reason); - if ($this->onRejected) { - call_user_func($this->onRejected, $reason); - } - return new RejectedPromise($reason); - } - ); - } - - /** - * Adds one or more variadic requests, exceptions, callables, or promises - * to the queue. - */ - public function append() - { - foreach (func_get_args() as $value) { - if ($value instanceof ResponseInterface - || $value instanceof \Exception - || $value instanceof PromiseInterface - || is_callable($value) - ) { - $this->queue[] = $value; - } else { - throw new \InvalidArgumentException('Expected a response or ' - . 'exception. Found ' . \GuzzleHttp\describe_type($value)); - } - } - } - - /** - * Get the last received request. - * - * @return RequestInterface - */ - public function getLastRequest() - { - return $this->lastRequest; - } - - /** - * Get the last received request options. - * - * @return RequestInterface - */ - public function getLastOptions() - { - return $this->lastOptions; - } - - /** - * Returns the number of remaining items in the queue. - * - * @return int - */ - public function count() - { - return count($this->queue); - } - - private function invokeStats( - RequestInterface $request, - array $options, - ResponseInterface $response = null, - $reason = null - ) { - if (isset($options['on_stats'])) { - $stats = new TransferStats($request, $response, 0, $reason); - call_user_func($options['on_stats'], $stats); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php deleted file mode 100644 index f8b00be..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +++ /dev/null @@ -1,55 +0,0 @@ -withoutHeader('Expect'); - - // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { - $request = $request->withHeader('Content-Length', 0); - } - - return $this->createResponse( - $request, - $options, - $this->createStream($request, $options), - $startTime - ); - } catch (\InvalidArgumentException $e) { - throw $e; - } catch (\Exception $e) { - // Determine if the error was a networking error. - $message = $e->getMessage(); - // This list can probably get more comprehensive. - if (strpos($message, 'getaddrinfo') // DNS lookup failed - || strpos($message, 'Connection refused') - || strpos($message, "couldn't connect to host") // error on HHVM - ) { - $e = new ConnectException($e->getMessage(), $request, $e); - } - $e = RequestException::wrapException($request, $e); - $this->invokeStats($options, $request, $startTime, null, $e); - - return new RejectedPromise($e); - } - } - - private function invokeStats( - array $options, - RequestInterface $request, - $startTime, - ResponseInterface $response = null, - $error = null - ) { - if (isset($options['on_stats'])) { - $stats = new TransferStats( - $request, - $response, - microtime(true) - $startTime, - $error, - [] - ); - call_user_func($options['on_stats'], $stats); - } - } - - private function createResponse( - RequestInterface $request, - array $options, - $stream, - $startTime - ) { - $hdrs = $this->lastHeaders; - $this->lastHeaders = []; - $parts = explode(' ', array_shift($hdrs), 3); - $ver = explode('/', $parts[0])[1]; - $status = $parts[1]; - $reason = isset($parts[2]) ? $parts[2] : null; - $headers = \GuzzleHttp\headers_from_lines($hdrs); - list ($stream, $headers) = $this->checkDecode($options, $headers, $stream); - $stream = Psr7\stream_for($stream); - $sink = $stream; - - if (strcasecmp('HEAD', $request->getMethod())) { - $sink = $this->createSink($stream, $options); - } - - $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); - - if (isset($options['on_headers'])) { - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $ex = new RequestException($msg, $request, $response, $e); - return new RejectedPromise($ex); - } - } - - // Do not drain when the request is a HEAD request because they have - // no body. - if ($sink !== $stream) { - $this->drain( - $stream, - $sink, - $response->getHeaderLine('Content-Length') - ); - } - - $this->invokeStats($options, $request, $startTime, $response, null); - - return new FulfilledPromise($response); - } - - private function createSink(StreamInterface $stream, array $options) - { - if (!empty($options['stream'])) { - return $stream; - } - - $sink = isset($options['sink']) - ? $options['sink'] - : fopen('php://temp', 'r+'); - - return is_string($sink) - ? new Psr7\LazyOpenStream($sink, 'w+') - : Psr7\stream_for($sink); - } - - private function checkDecode(array $options, array $headers, $stream) - { - // Automatically decode responses when instructed. - if (!empty($options['decode_content'])) { - $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); - if (isset($normalizedKeys['content-encoding'])) { - $encoding = $headers[$normalizedKeys['content-encoding']]; - if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new Psr7\InflateStream( - Psr7\stream_for($stream) - ); - $headers['x-encoded-content-encoding'] - = $headers[$normalizedKeys['content-encoding']]; - // Remove content-encoding header - unset($headers[$normalizedKeys['content-encoding']]); - // Fix content-length header - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] - = $headers[$normalizedKeys['content-length']]; - - $length = (int) $stream->getSize(); - if ($length === 0) { - unset($headers[$normalizedKeys['content-length']]); - } else { - $headers[$normalizedKeys['content-length']] = [$length]; - } - } - } - } - } - - return [$stream, $headers]; - } - - /** - * Drains the source stream into the "sink" client option. - * - * @param StreamInterface $source - * @param StreamInterface $sink - * @param string $contentLength Header specifying the amount of - * data to read. - * - * @return StreamInterface - * @throws \RuntimeException when the sink option is invalid. - */ - private function drain( - StreamInterface $source, - StreamInterface $sink, - $contentLength - ) { - // If a content-length header is provided, then stop reading once - // that number of bytes has been read. This can prevent infinitely - // reading from a stream when dealing with servers that do not honor - // Connection: Close headers. - Psr7\copy_to_stream( - $source, - $sink, - (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 - ); - - $sink->seek(0); - $source->close(); - - return $sink; - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - $errors = null; - set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { - $errors[] = [ - 'message' => $msg, - 'file' => $file, - 'line' => $line - ]; - return true; - }); - - $resource = $callback(); - restore_error_handler(); - - if (!$resource) { - $message = 'Error creating resource: '; - foreach ($errors as $err) { - foreach ($err as $key => $value) { - $message .= "[$key] $value" . PHP_EOL; - } - } - throw new \RuntimeException(trim($message)); - } - - return $resource; - } - - private function createStream(RequestInterface $request, array $options) - { - static $methods; - if (!$methods) { - $methods = array_flip(get_class_methods(__CLASS__)); - } - - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ($request->getProtocolVersion() == '1.1' - && !$request->hasHeader('Connection') - ) { - $request = $request->withHeader('Connection', 'close'); - } - - // Ensure SSL is verified by default - if (!isset($options['verify'])) { - $options['verify'] = true; - } - - $params = []; - $context = $this->getDefaultContext($request, $options); - - if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - - if (!empty($options)) { - foreach ($options as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $context, $value, $params); - } - } - } - - if (isset($options['stream_context'])) { - if (!is_array($options['stream_context'])) { - throw new \InvalidArgumentException('stream_context must be an array'); - } - $context = array_replace_recursive( - $context, - $options['stream_context'] - ); - } - - $context = $this->createResource( - function () use ($context, $params) { - return stream_context_create($context, $params); - } - ); - - return $this->createResource( - function () use ($request, &$http_response_header, $context) { - $resource = fopen((string) $request->getUri()->withFragment(''), 'r', null, $context); - $this->lastHeaders = $http_response_header; - return $resource; - } - ); - } - - private function getDefaultContext(RequestInterface $request) - { - $headers = ''; - foreach ($request->getHeaders() as $name => $value) { - foreach ($value as $val) { - $headers .= "$name: $val\r\n"; - } - } - - $context = [ - 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, - 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, - ], - ]; - - $body = (string) $request->getBody(); - - if (!empty($body)) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!$request->hasHeader('Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - - $context['http']['header'] = rtrim($context['http']['header']); - - return $context; - } - - private function add_proxy(RequestInterface $request, &$options, $value, &$params) - { - if (!is_array($value)) { - $options['http']['proxy'] = $value; - } else { - $scheme = $request->getUri()->getScheme(); - if (isset($value[$scheme])) { - if (!isset($value['no']) - || !\GuzzleHttp\is_host_in_noproxy( - $request->getUri()->getHost(), - $value['no'] - ) - ) { - $options['http']['proxy'] = $value[$scheme]; - } - } - } - } - - private function add_timeout(RequestInterface $request, &$options, $value, &$params) - { - if ($value > 0) { - $options['http']['timeout'] = $value; - } - } - - private function add_verify(RequestInterface $request, &$options, $value, &$params) - { - if ($value === true) { - // PHP 5.6 or greater will find the system cert by default. When - // < 5.6, use the Guzzle bundled cacert. - if (PHP_VERSION_ID < 50600) { - $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle(); - } - } elseif (is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!file_exists($value)) { - throw new \RuntimeException("SSL CA bundle not found: $value"); - } - } elseif ($value === false) { - $options['ssl']['verify_peer'] = false; - $options['ssl']['verify_peer_name'] = false; - return; - } else { - throw new \InvalidArgumentException('Invalid verify request option'); - } - - $options['ssl']['verify_peer'] = true; - $options['ssl']['verify_peer_name'] = true; - $options['ssl']['allow_self_signed'] = false; - } - - private function add_cert(RequestInterface $request, &$options, $value, &$params) - { - if (is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - - if (!file_exists($value)) { - throw new \RuntimeException("SSL certificate not found: {$value}"); - } - - $options['ssl']['local_cert'] = $value; - } - - private function add_progress(RequestInterface $request, &$options, $value, &$params) - { - $this->addNotification( - $params, - function ($code, $a, $b, $c, $transferred, $total) use ($value) { - if ($code == STREAM_NOTIFY_PROGRESS) { - $value($total, $transferred, null, null); - } - } - ); - } - - private function add_debug(RequestInterface $request, &$options, $value, &$params) - { - if ($value === false) { - return; - } - - static $map = [ - STREAM_NOTIFY_CONNECT => 'CONNECT', - STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - STREAM_NOTIFY_PROGRESS => 'PROGRESS', - STREAM_NOTIFY_FAILURE => 'FAILURE', - STREAM_NOTIFY_COMPLETED => 'COMPLETED', - STREAM_NOTIFY_RESOLVE => 'RESOLVE', - ]; - static $args = ['severity', 'message', 'message_code', - 'bytes_transferred', 'bytes_max']; - - $value = \GuzzleHttp\debug_resource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); - $this->addNotification( - $params, - function () use ($ident, $value, $map, $args) { - $passed = func_get_args(); - $code = array_shift($passed); - fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (array_filter($passed) as $i => $v) { - fwrite($value, $args[$i] . ': "' . $v . '" '); - } - fwrite($value, "\n"); - } - ); - } - - private function addNotification(array &$params, callable $notify) - { - // Wrap the existing function if needed. - if (!isset($params['notification'])) { - $params['notification'] = $notify; - } else { - $params['notification'] = $this->callArray([ - $params['notification'], - $notify - ]); - } - } - - private function callArray(array $functions) - { - return function () use ($functions) { - $args = func_get_args(); - foreach ($functions as $fn) { - call_user_func_array($fn, $args); - } - }; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/HandlerStack.php deleted file mode 100644 index a72e38a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,273 +0,0 @@ -push(Middleware::httpErrors(), 'http_errors'); - $stack->push(Middleware::redirect(), 'allow_redirects'); - $stack->push(Middleware::cookies(), 'cookies'); - $stack->push(Middleware::prepareBody(), 'prepare_body'); - - return $stack; - } - - /** - * @param callable $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - - /** - * Invokes the handler stack as a composed handler - * - * @param RequestInterface $request - * @param array $options - */ - public function __invoke(RequestInterface $request, array $options) - { - $handler = $this->resolve(); - - return $handler($request, $options); - } - - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - if ($this->handler) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); - } - - $result = ''; - foreach (array_reverse($this->stack) as $tuple) { - $depth++; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - - foreach (array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - - return $result; - } - - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler) - { - $this->handler = $handler; - $this->cached = null; - } - - /** - * Returns true if the builder has a handler. - * - * @return bool - */ - public function hasHandler() - { - return (bool) $this->handler; - } - - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, $name = null) - { - array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - - /** - * Push a middleware to the top of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, $name = '') - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, true); - } - - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, false); - } - - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove) - { - $this->cached = null; - $idx = is_callable($remove) ? 0 : 1; - $this->stack = array_values(array_filter( - $this->stack, - function ($tuple) use ($idx, $remove) { - return $tuple[$idx] !== $remove; - } - )); - } - - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable - */ - public function resolve() - { - if (!$this->cached) { - if (!($prev = $this->handler)) { - throw new \LogicException('No handler has been specified'); - } - - foreach (array_reverse($this->stack) as $fn) { - $prev = $fn[0]($prev); - } - - $this->cached = $prev; - } - - return $this->cached; - } - - /** - * @param $name - * @return int - */ - private function findByName($name) - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - - throw new \InvalidArgumentException("Middleware not found: $name"); - } - - /** - * Splices a function into the middleware list at a specific position. - * - * @param $findName - * @param $withName - * @param callable $middleware - * @param $before - */ - private function splice($findName, $withName, callable $middleware, $before) - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - - if ($before) { - if ($idx === 0) { - array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - array_splice($this->stack, $idx, 1, $replacement); - } - } - - /** - * Provides a debug string for a given callable. - * - * @param array|callable $fn Function to write as a string. - * - * @return string - */ - private function debugCallable($fn) - { - if (is_string($fn)) { - return "callable({$fn})"; - } - - if (is_array($fn)) { - return is_string($fn[0]) - ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; - } - - return 'callable(' . spl_object_hash($fn) . ')'; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/MessageFormatter.php deleted file mode 100644 index 6b090a9..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ /dev/null @@ -1,182 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - - /** @var string Template used to format log messages */ - private $template; - - /** - * @param string $template Log message template - */ - public function __construct($template = self::CLF) - { - $this->template = $template ?: self::CLF; - } - - /** - * Returns a formatted message string. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface $response Response that was received - * @param \Exception $error Exception that was received - * - * @return string - */ - public function format( - RequestInterface $request, - ResponseInterface $response = null, - \Exception $error = null - ) { - $cache = []; - - return preg_replace_callback( - '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', - function (array $matches) use ($request, $response, $error, &$cache) { - - if (isset($cache[$matches[1]])) { - return $cache[$matches[1]]; - } - - $result = ''; - switch ($matches[1]) { - case 'request': - $result = Psr7\str($request); - break; - case 'response': - $result = $response ? Psr7\str($response) : ''; - break; - case 'req_headers': - $result = trim($request->getMethod() - . ' ' . $request->getRequestTarget()) - . ' HTTP/' . $request->getProtocolVersion() . "\r\n" - . $this->headers($request); - break; - case 'res_headers': - $result = $response ? - sprintf( - 'HTTP/%s %d %s', - $response->getProtocolVersion(), - $response->getStatusCode(), - $response->getReasonPhrase() - ) . "\r\n" . $this->headers($response) - : 'NULL'; - break; - case 'req_body': - $result = $request->getBody(); - break; - case 'res_body': - $result = $response ? $response->getBody() : 'NULL'; - break; - case 'ts': - case 'date_iso_8601': - $result = gmdate('c'); - break; - case 'date_common_log': - $result = date('d/M/Y:H:i:s O'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'uri': - case 'url': - $result = $request->getUri(); - break; - case 'target': - $result = $request->getRequestTarget(); - break; - case 'req_version': - $result = $request->getProtocolVersion(); - break; - case 'res_version': - $result = $response - ? $response->getProtocolVersion() - : 'NULL'; - break; - case 'host': - $result = $request->getHeaderLine('Host'); - break; - case 'hostname': - $result = gethostname(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : 'NULL'; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : 'NULL'; - break; - case 'error': - $result = $error ? $error->getMessage() : 'NULL'; - break; - default: - // handle prefixed dynamic headers - if (strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(substr($matches[1], 11)); - } elseif (strpos($matches[1], 'res_header_') === 0) { - $result = $response - ? $response->getHeaderLine(substr($matches[1], 11)) - : 'NULL'; - } - } - - $cache[$matches[1]] = $result; - return $result; - }, - $this->template - ); - } - - private function headers(MessageInterface $message) - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . implode(', ', $values) . "\r\n"; - } - - return trim($result); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Middleware.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Middleware.php deleted file mode 100644 index 449ab4b..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Middleware.php +++ /dev/null @@ -1,254 +0,0 @@ -withCookieHeader($request); - return $handler($request, $options) - ->then(function ($response) use ($cookieJar, $request) { - $cookieJar->extractCookies($request, $response); - return $response; - } - ); - }; - }; - } - - /** - * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_error" request option is set to true. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function httpErrors() - { - return function (callable $handler) { - return function ($request, array $options) use ($handler) { - if (empty($options['http_errors'])) { - return $handler($request, $options); - } - return $handler($request, $options)->then( - function (ResponseInterface $response) use ($request, $handler) { - $code = $response->getStatusCode(); - if ($code < 400) { - return $response; - } - throw RequestException::create($request, $response); - } - ); - }; - }; - } - - /** - * Middleware that pushes history data to an ArrayAccess container. - * - * @param array $container Container to hold the history (by reference). - * - * @return callable Returns a function that accepts the next handler. - * @throws \InvalidArgumentException if container is not an array or ArrayAccess. - */ - public static function history(&$container) - { - if (!is_array($container) && !$container instanceof \ArrayAccess) { - throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); - } - - return function (callable $handler) use (&$container) { - return function ($request, array $options) use ($handler, &$container) { - return $handler($request, $options)->then( - function ($value) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => $value, - 'error' => null, - 'options' => $options - ]; - return $value; - }, - function ($reason) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => null, - 'error' => $reason, - 'options' => $options - ]; - return new RejectedPromise($reason); - } - ); - }; - }; - } - - /** - * Middleware that invokes a callback before and after sending a request. - * - * The provided listener cannot modify or alter the response. It simply - * "taps" into the chain to be notified before returning the promise. The - * before listener accepts a request and options array, and the after - * listener accepts a request, options array, and response promise. - * - * @param callable $before Function to invoke before forwarding the request. - * @param callable $after Function invoked after forwarding. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function tap(callable $before = null, callable $after = null) - { - return function (callable $handler) use ($before, $after) { - return function ($request, array $options) use ($handler, $before, $after) { - if ($before) { - $before($request, $options); - } - $response = $handler($request, $options); - if ($after) { - $after($request, $options, $response); - } - return $response; - }; - }; - } - - /** - * Middleware that handles request redirects. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function redirect() - { - return function (callable $handler) { - return new RedirectMiddleware($handler); - }; - } - - /** - * Middleware that retries requests based on the boolean result of - * invoking the provided "decider" function. - * - * If no delay function is provided, a simple implementation of exponential - * backoff will be utilized. - * - * @param callable $decider Function that accepts the number of retries, - * a request, [response], and [exception] and - * returns true if the request is to be retried. - * @param callable $delay Function that accepts the number of retries and - * returns the number of milliseconds to delay. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function retry(callable $decider, callable $delay = null) - { - return function (callable $handler) use ($decider, $delay) { - return new RetryMiddleware($decider, $handler, $delay); - }; - } - - /** - * Middleware that logs requests, responses, and errors using a message - * formatter. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) - { - return function (callable $handler) use ($logger, $formatter, $logLevel) { - return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { - return $handler($request, $options)->then( - function ($response) use ($logger, $request, $formatter, $logLevel) { - $message = $formatter->format($request, $response); - $logger->log($logLevel, $message); - return $response; - }, - function ($reason) use ($logger, $request, $formatter) { - $response = $reason instanceof RequestException - ? $reason->getResponse() - : null; - $message = $formatter->format($request, $response, $reason); - $logger->notice($message); - return \GuzzleHttp\Promise\rejection_for($reason); - } - ); - }; - }; - } - - /** - * This middleware adds a default content-type if possible, a default - * content-length or transfer-encoding header, and the expect header. - * - * @return callable - */ - public static function prepareBody() - { - return function (callable $handler) { - return new PrepareBodyMiddleware($handler); - }; - } - - /** - * Middleware that applies a map function to the request before passing to - * the next handler. - * - * @param callable $fn Function that accepts a RequestInterface and returns - * a RequestInterface. - * @return callable - */ - public static function mapRequest(callable $fn) - { - return function (callable $handler) use ($fn) { - return function ($request, array $options) use ($handler, $fn) { - return $handler($fn($request), $options); - }; - }; - } - - /** - * Middleware that applies a map function to the resolved promise's - * response. - * - * @param callable $fn Function that accepts a ResponseInterface and - * returns a ResponseInterface. - * @return callable - */ - public static function mapResponse(callable $fn) - { - return function (callable $handler) use ($fn) { - return function ($request, array $options) use ($handler, $fn) { - return $handler($request, $options)->then($fn); - }; - }; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Pool.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Pool.php deleted file mode 100644 index 8f1be33..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/Pool.php +++ /dev/null @@ -1,123 +0,0 @@ - $rfn) { - if ($rfn instanceof RequestInterface) { - yield $key => $client->sendAsync($rfn, $opts); - } elseif (is_callable($rfn)) { - yield $key => $rfn($opts); - } else { - throw new \InvalidArgumentException('Each value yielded by ' - . 'the iterator must be a Psr7\Http\Message\RequestInterface ' - . 'or a callable that returns a promise that fulfills ' - . 'with a Psr7\Message\Http\ResponseInterface object.'); - } - } - }; - - $this->each = new EachPromise($requests(), $config); - } - - public function promise() - { - return $this->each->promise(); - } - - /** - * Sends multiple requests concurrently and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send concurrently. - * @param array $options Passes through the options available in - * {@see GuzzleHttp\Pool::__construct} - * - * @return array Returns an array containing the response or an exception - * in the same order that the requests were sent. - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch( - ClientInterface $client, - $requests, - array $options = [] - ) { - $res = []; - self::cmpCallback($options, 'fulfilled', $res); - self::cmpCallback($options, 'rejected', $res); - $pool = new static($client, $requests, $options); - $pool->promise()->wait(); - ksort($res); - - return $res; - } - - private static function cmpCallback(array &$options, $name, array &$results) - { - if (!isset($options[$name])) { - $options[$name] = function ($v, $k) use (&$results) { - $results[$k] = $v; - }; - } else { - $currentFn = $options[$name]; - $options[$name] = function ($v, $k) use (&$results, $currentFn) { - $currentFn($v, $k); - $results[$k] = $v; - }; - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php deleted file mode 100644 index e6d176b..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ /dev/null @@ -1,112 +0,0 @@ - true, 'HEAD' => true]; - - /** - * @param callable $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - - // Don't do anything if the request has no body. - if (isset(self::$skipMethods[$request->getMethod()]) - || $request->getBody()->getSize() === 0 - ) { - return $fn($request, $options); - } - - $modify = []; - - // Add a default content-type if possible. - if (!$request->hasHeader('Content-Type')) { - if ($uri = $request->getBody()->getMetadata('uri')) { - if ($type = Psr7\mimetype_from_filename($uri)) { - $modify['set_headers']['Content-Type'] = $type; - } - } - } - - // Add a default content-length or transfer-encoding header. - if (!isset(self::$skipMethods[$request->getMethod()]) - && !$request->hasHeader('Content-Length') - && !$request->hasHeader('Transfer-Encoding') - ) { - $size = $request->getBody()->getSize(); - if ($size !== null) { - $modify['set_headers']['Content-Length'] = $size; - } else { - $modify['set_headers']['Transfer-Encoding'] = 'chunked'; - } - } - - // Add the expect header if needed. - $this->addExpectHeader($request, $options, $modify); - - return $fn(Psr7\modify_request($request, $modify), $options); - } - - private function addExpectHeader( - RequestInterface $request, - array $options, - array &$modify - ) { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - - $expect = isset($options['expect']) ? $options['expect'] : null; - - // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 - if ($expect === false || $request->getProtocolVersion() < 1.1) { - return; - } - - // The expect header is unconditionally enabled - if ($expect === true) { - $modify['set_headers']['Expect'] = '100-Continue'; - return; - } - - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $body = $request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $modify['set_headers']['Expect'] = '100-Continue'; - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php deleted file mode 100644 index 5613f6e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ /dev/null @@ -1,231 +0,0 @@ - 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, - 'track_redirects' => false, - ]; - - /** @var callable */ - private $nextHandler; - - /** - * @param callable $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - - if (empty($options['allow_redirects'])) { - return $fn($request, $options); - } - - if ($options['allow_redirects'] === true) { - $options['allow_redirects'] = self::$defaultSettings; - } elseif (!is_array($options['allow_redirects'])) { - throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); - } else { - // Merge the default settings with the provided settings - $options['allow_redirects'] += self::$defaultSettings; - } - - if (empty($options['allow_redirects']['max'])) { - return $fn($request, $options); - } - - return $fn($request, $options) - ->then(function (ResponseInterface $response) use ($request, $options) { - return $this->checkRedirect($request, $options, $response); - }); - } - - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface|PromiseInterface $response - * - * @return ResponseInterface|PromiseInterface - */ - public function checkRedirect( - RequestInterface $request, - array $options, - ResponseInterface $response - ) { - if (substr($response->getStatusCode(), 0, 1) != '3' - || !$response->hasHeader('Location') - ) { - return $response; - } - - $this->guardMax($request, $options); - $nextRequest = $this->modifyRequest($request, $options, $response); - - if (isset($options['allow_redirects']['on_redirect'])) { - call_user_func( - $options['allow_redirects']['on_redirect'], - $request, - $response, - $nextRequest->getUri() - ); - } - - /** @var PromiseInterface|ResponseInterface $promise */ - $promise = $this($nextRequest, $options); - - // Add headers to be able to track history of redirects. - if (!empty($options['allow_redirects']['track_redirects'])) { - return $this->withTracking( - $promise, - (string) $nextRequest->getUri() - ); - } - - return $promise; - } - - private function withTracking(PromiseInterface $promise, $uri) - { - return $promise->then( - function (ResponseInterface $response) use ($uri) { - // Note that we are pushing to the front of the list as this - // would be an earlier response than what is currently present - // in the history header. - $header = $response->getHeader(self::HISTORY_HEADER); - array_unshift($header, $uri); - return $response->withHeader(self::HISTORY_HEADER, $header); - } - ); - } - - private function guardMax(RequestInterface $request, array &$options) - { - $current = isset($options['__redirect_count']) - ? $options['__redirect_count'] - : 0; - $options['__redirect_count'] = $current + 1; - $max = $options['allow_redirects']['max']; - - if ($options['__redirect_count'] > $max) { - throw new TooManyRedirectsException( - "Will not follow more than {$max} redirects", - $request - ); - } - } - - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface $response - * - * @return RequestInterface - */ - public function modifyRequest( - RequestInterface $request, - array $options, - ResponseInterface $response - ) { - // Request modifications to apply. - $modify = []; - $protocols = $options['allow_redirects']['protocols']; - - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) - ) { - $modify['method'] = 'GET'; - $modify['body'] = ''; - } - - $modify['uri'] = $this->redirectUri($request, $response, $protocols); - Psr7\rewind_body($request); - - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($options['allow_redirects']['referer'] - && $modify['uri']->getScheme() === $request->getUri()->getScheme() - ) { - $uri = $request->getUri()->withUserInfo('', ''); - $modify['set_headers']['Referer'] = (string) $uri; - } else { - $modify['remove_headers'][] = 'Referer'; - } - - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { - $modify['remove_headers'][] = 'Authorization'; - } - - return Psr7\modify_request($request, $modify); - } - - /** - * Set the appropriate URL on the request based on the location header - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param array $protocols - * - * @return UriInterface - */ - private function redirectUri( - RequestInterface $request, - ResponseInterface $response, - array $protocols - ) { - $location = Psr7\UriResolver::resolve( - $request->getUri(), - new Psr7\Uri($response->getHeaderLine('Location')) - ); - - // Ensure that the redirect URI is allowed based on the protocols. - if (!in_array($location->getScheme(), $protocols)) { - throw new BadResponseException( - sprintf( - 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', - $location, - implode(', ', $protocols) - ), - $request, - $response - ); - } - - return $location; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RequestOptions.php deleted file mode 100644 index 60e53f5..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ /dev/null @@ -1,244 +0,0 @@ -decider = $decider; - $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; - } - - /** - * Default exponential backoff delay function. - * - * @param $retries - * - * @return int - */ - public static function exponentialDelay($retries) - { - return (int) pow(2, $retries - 1); - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - if (!isset($options['retries'])) { - $options['retries'] = 0; - } - - $fn = $this->nextHandler; - return $fn($request, $options) - ->then( - $this->onFulfilled($request, $options), - $this->onRejected($request, $options) - ); - } - - private function onFulfilled(RequestInterface $req, array $options) - { - return function ($value) use ($req, $options) { - if (!call_user_func( - $this->decider, - $options['retries'], - $req, - $value, - null - )) { - return $value; - } - return $this->doRetry($req, $options, $value); - }; - } - - private function onRejected(RequestInterface $req, array $options) - { - return function ($reason) use ($req, $options) { - if (!call_user_func( - $this->decider, - $options['retries'], - $req, - null, - $reason - )) { - return new RejectedPromise($reason); - } - return $this->doRetry($req, $options); - }; - } - - private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) - { - $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); - - return $this($request, $options); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/TransferStats.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/TransferStats.php deleted file mode 100644 index 15f717e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ /dev/null @@ -1,126 +0,0 @@ -request = $request; - $this->response = $response; - $this->transferTime = $transferTime; - $this->handlerErrorData = $handlerErrorData; - $this->handlerStats = $handlerStats; - } - - /** - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - - /** - * Returns the response that was received (if any). - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Returns true if a response was received. - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - - /** - * Gets handler specific error data. - * - * This might be an exception, a integer representing an error code, or - * anything else. Relying on this value assumes that you know what handler - * you are using. - * - * @return mixed - */ - public function getHandlerErrorData() - { - return $this->handlerErrorData; - } - - /** - * Get the effective URI the request was sent to. - * - * @return UriInterface - */ - public function getEffectiveUri() - { - return $this->request->getUri(); - } - - /** - * Get the estimated time the request was being transferred by the handler. - * - * @return float Time in seconds. - */ - public function getTransferTime() - { - return $this->transferTime; - } - - /** - * Gets an array of all of the handler specific transfer data. - * - * @return array - */ - public function getHandlerStats() - { - return $this->handlerStats; - } - - /** - * Get a specific handler statistic from the handler by name. - * - * @param string $stat Handler specific transfer stat to retrieve. - * - * @return mixed|null - */ - public function getHandlerStat($stat) - { - return isset($this->handlerStats[$stat]) - ? $this->handlerStats[$stat] - : null; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/UriTemplate.php deleted file mode 100644 index 0b1623e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/UriTemplate.php +++ /dev/null @@ -1,241 +0,0 @@ - ['prefix' => '', 'joiner' => ',', 'query' => false], - '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], - '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], - '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], - '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], - ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], - '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], - '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] - ]; - - /** @var array Delimiters */ - private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', - '&', '\'', '(', ')', '*', '+', ',', ';', '=']; - - /** @var array Percent encoded delimiters */ - private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', - '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', - '%3B', '%3D']; - - public function expand($template, array $variables) - { - if (false === strpos($template, '{')) { - return $template; - } - - $this->template = $template; - $this->variables = $variables; - - return preg_replace_callback( - '/\{([^\}]+)\}/', - [$this, 'expandMatch'], - $this->template - ); - } - - /** - * Parse an expression into parts - * - * @param string $expression Expression to parse - * - * @return array Returns an associative array of parts - */ - private function parseExpression($expression) - { - $result = []; - - if (isset(self::$operatorHash[$expression[0]])) { - $result['operator'] = $expression[0]; - $expression = substr($expression, 1); - } else { - $result['operator'] = ''; - } - - foreach (explode(',', $expression) as $value) { - $value = trim($value); - $varspec = []; - if ($colonPos = strpos($value, ':')) { - $varspec['value'] = substr($value, 0, $colonPos); - $varspec['modifier'] = ':'; - $varspec['position'] = (int) substr($value, $colonPos + 1); - } elseif (substr($value, -1) === '*') { - $varspec['modifier'] = '*'; - $varspec['value'] = substr($value, 0, -1); - } else { - $varspec['value'] = (string) $value; - $varspec['modifier'] = ''; - } - $result['values'][] = $varspec; - } - - return $result; - } - - /** - * Process an expansion - * - * @param array $matches Matches met in the preg_replace_callback - * - * @return string Returns the replacement string - */ - private function expandMatch(array $matches) - { - static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; - - $replacements = []; - $parsed = self::parseExpression($matches[1]); - $prefix = self::$operatorHash[$parsed['operator']]['prefix']; - $joiner = self::$operatorHash[$parsed['operator']]['joiner']; - $useQuery = self::$operatorHash[$parsed['operator']]['query']; - - foreach ($parsed['values'] as $value) { - - if (!isset($this->variables[$value['value']])) { - continue; - } - - $variable = $this->variables[$value['value']]; - $actuallyUseQuery = $useQuery; - $expanded = ''; - - if (is_array($variable)) { - - $isAssoc = $this->isAssoc($variable); - $kvp = []; - foreach ($variable as $key => $var) { - - if ($isAssoc) { - $key = rawurlencode($key); - $isNestedArray = is_array($var); - } else { - $isNestedArray = false; - } - - if (!$isNestedArray) { - $var = rawurlencode($var); - if ($parsed['operator'] === '+' || - $parsed['operator'] === '#' - ) { - $var = $this->decodeReserved($var); - } - } - - if ($value['modifier'] === '*') { - if ($isAssoc) { - if ($isNestedArray) { - // Nested arrays must allow for deeply nested - // structures. - $var = strtr( - http_build_query([$key => $var]), - $rfc1738to3986 - ); - } else { - $var = $key . '=' . $var; - } - } elseif ($key > 0 && $actuallyUseQuery) { - $var = $value['value'] . '=' . $var; - } - } - - $kvp[$key] = $var; - } - - if (empty($variable)) { - $actuallyUseQuery = false; - } elseif ($value['modifier'] === '*') { - $expanded = implode($joiner, $kvp); - if ($isAssoc) { - // Don't prepend the value name when using the explode - // modifier with an associative array. - $actuallyUseQuery = false; - } - } else { - if ($isAssoc) { - // When an associative array is encountered and the - // explode modifier is not set, then the result must be - // a comma separated list of keys followed by their - // respective values. - foreach ($kvp as $k => &$v) { - $v = $k . ',' . $v; - } - } - $expanded = implode(',', $kvp); - } - - } else { - if ($value['modifier'] === ':') { - $variable = substr($variable, 0, $value['position']); - } - $expanded = rawurlencode($variable); - if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { - $expanded = $this->decodeReserved($expanded); - } - } - - if ($actuallyUseQuery) { - if (!$expanded && $joiner !== '&') { - $expanded = $value['value']; - } else { - $expanded = $value['value'] . '=' . $expanded; - } - } - - $replacements[] = $expanded; - } - - $ret = implode($joiner, $replacements); - if ($ret && $prefix) { - return $prefix . $ret; - } - - return $ret; - } - - /** - * Determines if an array is associative. - * - * This makes the assumption that input arrays are sequences or hashes. - * This assumption is a tradeoff for accuracy in favor of speed, but it - * should work in almost every case where input is supplied for a URI - * template. - * - * @param array $array Array to check - * - * @return bool - */ - private function isAssoc(array $array) - { - return $array && array_keys($array)[0] !== 0; - } - - /** - * Removes percent encoding on reserved characters (used with + and # - * modifiers). - * - * @param string $string String to fix - * - * @return string - */ - private function decodeReserved($string) - { - return str_replace(self::$delimsPct, self::$delims, $string); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions.php deleted file mode 100644 index 85cf9c6..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions.php +++ /dev/null @@ -1,329 +0,0 @@ -expand($template, $variables); -} - -/** - * Debug function used to describe the provided value type and class. - * - * @param mixed $input - * - * @return string Returns a string containing the type of the variable and - * if a class is provided, the class name. - */ -function describe_type($input) -{ - switch (gettype($input)) { - case 'object': - return 'object(' . get_class($input) . ')'; - case 'array': - return 'array(' . count($input) . ')'; - default: - ob_start(); - var_dump($input); - // normalize float vs double - return str_replace('double(', 'float(', rtrim(ob_get_clean())); - } -} - -/** - * Parses an array of header lines into an associative array of headers. - * - * @param array $lines Header lines array of strings in the following - * format: "Name: Value" - * @return array - */ -function headers_from_lines($lines) -{ - $headers = []; - - foreach ($lines as $line) { - $parts = explode(':', $line, 2); - $headers[trim($parts[0])][] = isset($parts[1]) - ? trim($parts[1]) - : null; - } - - return $headers; -} - -/** - * Returns a debug stream based on the provided variable. - * - * @param mixed $value Optional value - * - * @return resource - */ -function debug_resource($value = null) -{ - if (is_resource($value)) { - return $value; - } elseif (defined('STDOUT')) { - return STDOUT; - } - - return fopen('php://output', 'w'); -} - -/** - * Chooses and creates a default handler to use based on the environment. - * - * The returned handler is not wrapped by any default middlewares. - * - * @throws \RuntimeException if no viable Handler is available. - * @return callable Returns the best handler for the given system. - */ -function choose_handler() -{ - $handler = null; - if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { - $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); - } elseif (function_exists('curl_exec')) { - $handler = new CurlHandler(); - } elseif (function_exists('curl_multi_exec')) { - $handler = new CurlMultiHandler(); - } - - if (ini_get('allow_url_fopen')) { - $handler = $handler - ? Proxy::wrapStreaming($handler, new StreamHandler()) - : new StreamHandler(); - } elseif (!$handler) { - throw new \RuntimeException('GuzzleHttp requires cURL, the ' - . 'allow_url_fopen ini setting, or a custom HTTP handler.'); - } - - return $handler; -} - -/** - * Get the default User-Agent string to use with Guzzle - * - * @return string - */ -function default_user_agent() -{ - static $defaultAgent = ''; - - if (!$defaultAgent) { - $defaultAgent = 'GuzzleHttp/' . Client::VERSION; - if (extension_loaded('curl') && function_exists('curl_version')) { - $defaultAgent .= ' curl/' . \curl_version()['version']; - } - $defaultAgent .= ' PHP/' . PHP_VERSION; - } - - return $defaultAgent; -} - -/** - * Returns the default cacert bundle for the current system. - * - * First, the openssl.cafile and curl.cainfo php.ini settings are checked. - * If those settings are not configured, then the common locations for - * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X - * and Windows are checked. If any of these file locations are found on - * disk, they will be utilized. - * - * Note: the result of this function is cached for subsequent calls. - * - * @return string - * @throws \RuntimeException if no bundle can be found. - */ -function default_ca_bundle() -{ - static $cached = null; - static $cafiles = [ - // Red Hat, CentOS, Fedora (provided by the ca-certificates package) - '/etc/pki/tls/certs/ca-bundle.crt', - // Ubuntu, Debian (provided by the ca-certificates package) - '/etc/ssl/certs/ca-certificates.crt', - // FreeBSD (provided by the ca_root_nss package) - '/usr/local/share/certs/ca-root-nss.crt', - // OS X provided by homebrew (using the default path) - '/usr/local/etc/openssl/cert.pem', - // Google app engine - '/etc/ca-certificates.crt', - // Windows? - 'C:\\windows\\system32\\curl-ca-bundle.crt', - 'C:\\windows\\curl-ca-bundle.crt', - ]; - - if ($cached) { - return $cached; - } - - if ($ca = ini_get('openssl.cafile')) { - return $cached = $ca; - } - - if ($ca = ini_get('curl.cainfo')) { - return $cached = $ca; - } - - foreach ($cafiles as $filename) { - if (file_exists($filename)) { - return $cached = $filename; - } - } - - throw new \RuntimeException(<<< EOT -No system CA bundle could be found in any of the the common system locations. -PHP versions earlier than 5.6 are not properly configured to use the system's -CA bundle by default. In order to verify peer certificates, you will need to -supply the path on disk to a certificate bundle to the 'verify' request -option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not -need a specific certificate bundle, then Mozilla provides a commonly used CA -bundle which can be downloaded here (provided by the maintainer of cURL): -https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once -you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP -ini setting to point to the path to the file, allowing you to omit the 'verify' -request option. See http://curl.haxx.se/docs/sslcerts.html for more -information. -EOT - ); -} - -/** - * Creates an associative array of lowercase header names to the actual - * header casing. - * - * @param array $headers - * - * @return array - */ -function normalize_header_keys(array $headers) -{ - $result = []; - foreach (array_keys($headers) as $key) { - $result[strtolower($key)] = $key; - } - - return $result; -} - -/** - * Returns true if the provided host matches any of the no proxy areas. - * - * This method will strip a port from the host if it is present. Each pattern - * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a - * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == - * "baz.foo.com", but ".foo.com" != "foo.com"). - * - * Areas are matched in the following cases: - * 1. "*" (without quotes) always matches any hosts. - * 2. An exact match. - * 3. The area starts with "." and the area is the last part of the host. e.g. - * '.mit.edu' will match any host that ends with '.mit.edu'. - * - * @param string $host Host to check against the patterns. - * @param array $noProxyArray An array of host patterns. - * - * @return bool - */ -function is_host_in_noproxy($host, array $noProxyArray) -{ - if (strlen($host) === 0) { - throw new \InvalidArgumentException('Empty host provided'); - } - - // Strip port if present. - if (strpos($host, ':')) { - $host = explode($host, ':', 2)[0]; - } - - foreach ($noProxyArray as $area) { - // Always match on wildcards. - if ($area === '*') { - return true; - } elseif (empty($area)) { - // Don't match on empty values. - continue; - } elseif ($area === $host) { - // Exact matches. - return true; - } else { - // Special match if the area when prefixed with ".". Remove any - // existing leading "." and add a new leading ".". - $area = '.' . ltrim($area, '.'); - if (substr($host, -(strlen($area))) === $area) { - return true; - } - } - } - - return false; -} - -/** - * Wrapper for json_decode that throws when an error occurs. - * - * @param string $json JSON data to parse - * @param bool $assoc When true, returned objects will be converted - * into associative arrays. - * @param int $depth User specified recursion depth. - * @param int $options Bitmask of JSON decode options. - * - * @return mixed - * @throws \InvalidArgumentException if the JSON cannot be decoded. - * @link http://www.php.net/manual/en/function.json-decode.php - */ -function json_decode($json, $assoc = false, $depth = 512, $options = 0) -{ - $data = \json_decode($json, $assoc, $depth, $options); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new \InvalidArgumentException( - 'json_decode error: ' . json_last_error_msg()); - } - - return $data; -} - -/** - * Wrapper for JSON encoding that throws when an error occurs. - * - * @param mixed $value The value being encoded - * @param int $options JSON encode option bitmask - * @param int $depth Set the maximum depth. Must be greater than zero. - * - * @return string - * @throws \InvalidArgumentException if the JSON cannot be encoded. - * @link http://www.php.net/manual/en/function.json-encode.php - */ -function json_encode($value, $options = 0, $depth = 512) -{ - $json = \json_encode($value, $options, $depth); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new \InvalidArgumentException( - 'json_encode error: ' . json_last_error_msg()); - } - - return $json; -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions_include.php b/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions_include.php deleted file mode 100644 index a93393a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/guzzle/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ - - -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. diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/Makefile b/sensitive-issue-searcher/vendor/guzzlehttp/promises/Makefile deleted file mode 100644 index 8d5b3ef..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: clean test - -test: - vendor/bin/phpunit - -coverage: - vendor/bin/phpunit --coverage-html=artifacts/coverage - -view-coverage: - open artifacts/coverage/index.html - -clean: - rm -rf artifacts/* diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/README.md b/sensitive-issue-searcher/vendor/guzzlehttp/promises/README.md deleted file mode 100644 index 7b607e2..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/README.md +++ /dev/null @@ -1,504 +0,0 @@ -# Guzzle Promises - -[Promises/A+](https://promisesaplus.com/) implementation that handles promise -chaining and resolution iteratively, allowing for "infinite" promise chaining -while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) -for a general introduction to promises. - -- [Features](#features) -- [Quick start](#quick-start) -- [Synchronous wait](#synchronous-wait) -- [Cancellation](#cancellation) -- [API](#api) - - [Promise](#promise) - - [FulfilledPromise](#fulfilledpromise) - - [RejectedPromise](#rejectedpromise) -- [Promise interop](#promise-interop) -- [Implementation notes](#implementation-notes) - - -# Features - -- [Promises/A+](https://promisesaplus.com/) implementation. -- Promise resolution and chaining is handled iteratively, allowing for - "infinite" promise chaining. -- Promises have a synchronous `wait` method. -- Promises can be cancelled. -- Works with any object that has a `then` function. -- C# style async/await coroutine promises using - `GuzzleHttp\Promise\coroutine()`. - - -# Quick start - -A *promise* represents the eventual result of an asynchronous operation. The -primary way of interacting with a promise is through its `then` method, which -registers callbacks to receive either a promise's eventual value or the reason -why the promise cannot be fulfilled. - - -## Callbacks - -Callbacks are registered with the `then` method by providing an optional -`$onFulfilled` followed by an optional `$onRejected` function. - - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then( - // $onFulfilled - function ($value) { - echo 'The promise was fulfilled.'; - }, - // $onRejected - function ($reason) { - echo 'The promise was rejected.'; - } -); -``` - -*Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promises triggers callbacks -registered with the promises's `then` method. These callbacks are triggered -only once and in the order in which they were added. - - -## Resolving a promise - -Promises are fulfilled using the `resolve($value)` method. Resolving a promise -with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger -all of the onFulfilled callbacks (resolving a promise with a rejected promise -will reject the promise and trigger the `$onRejected` callbacks). - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise - ->then(function ($value) { - // Return a value and don't break the chain - return "Hello, " . $value; - }) - // This then is executed after the first then and receives the value - // returned from the first then. - ->then(function ($value) { - echo $value; - }); - -// Resolving the promise triggers the $onFulfilled callbacks and outputs -// "Hello, reader". -$promise->resolve('reader.'); -``` - - -## Promise forwarding - -Promises can be chained one after the other. Each then in the chain is a new -promise. The return value of a promise is what's forwarded to the next -promise in the chain. Returning a promise in a `then` callback will cause the -subsequent promises in the chain to only be fulfilled when the returned promise -has been fulfilled. The next promise in the chain will be invoked with the -resolved value of the promise. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$nextPromise = new Promise(); - -$promise - ->then(function ($value) use ($nextPromise) { - echo $value; - return $nextPromise; - }) - ->then(function ($value) { - echo $value; - }); - -// Triggers the first callback and outputs "A" -$promise->resolve('A'); -// Triggers the second callback and outputs "B" -$nextPromise->resolve('B'); -``` - -## Promise rejection - -When a promise is rejected, the `$onRejected` callbacks are invoked with the -rejection reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - echo $reason; -}); - -$promise->reject('Error!'); -// Outputs "Error!" -``` - -## Rejection forwarding - -If an exception is thrown in an `$onRejected` callback, subsequent -`$onRejected` callbacks are invoked with the thrown exception as the reason. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - throw new \Exception($reason); -})->then(null, function ($reason) { - assert($reason->getMessage() === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -You can also forward a rejection down the promise chain by returning a -`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or -`$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new Promise(); -$promise->then(null, function ($reason) { - return new RejectedPromise($reason); -})->then(null, function ($reason) { - assert($reason === 'Error!'); -}); - -$promise->reject('Error!'); -``` - -If an exception is not thrown in a `$onRejected` callback and the callback -does not return a rejected promise, downstream `$onFulfilled` callbacks are -invoked using the value returned from the `$onRejected` callback. - -```php -use GuzzleHttp\Promise\Promise; -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new Promise(); -$promise - ->then(null, function ($reason) { - return "It's ok"; - }) - ->then(function ($value) { - assert($value === "It's ok"); - }); - -$promise->reject('Error!'); -``` - -# Synchronous wait - -You can synchronously force promises to complete using a promise's `wait` -method. When creating a promise, you can provide a wait function that is used -to synchronously force a promise to complete. When a wait function is invoked -it is expected to deliver a value to the promise or reject the promise. If the -wait function does not deliver a value, then an exception is thrown. The wait -function provided to a promise constructor is invoked when the `wait` function -of the promise is called. - -```php -$promise = new Promise(function () use (&$promise) { - $promise->resolve('foo'); -}); - -// Calling wait will return the value of the promise. -echo $promise->wait(); // outputs "foo" -``` - -If an exception is encountered while invoking the wait function of a promise, -the promise is rejected with the exception and the exception is thrown. - -```php -$promise = new Promise(function () use (&$promise) { - throw new \Exception('foo'); -}); - -$promise->wait(); // throws the exception. -``` - -Calling `wait` on a promise that has been fulfilled will not trigger the wait -function. It will simply return the previously resolved value. - -```php -$promise = new Promise(function () { die('this is not called!'); }); -$promise->resolve('foo'); -echo $promise->wait(); // outputs "foo" -``` - -Calling `wait` on a promise that has been rejected will throw an exception. If -the rejection reason is an instance of `\Exception` the reason is thrown. -Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason -can be obtained by calling the `getReason` method of the exception. - -```php -$promise = new Promise(); -$promise->reject('foo'); -$promise->wait(); -``` - -> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' - - -## Unwrapping a promise - -When synchronously waiting on a promise, you are joining the state of the -promise into the current state of execution (i.e., return the value of the -promise if it was fulfilled or throw an exception if it was rejected). This is -called "unwrapping" the promise. Waiting on a promise will by default unwrap -the promise state. - -You can force a promise to resolve and *not* unwrap the state of the promise -by passing `false` to the first argument of the `wait` function: - -```php -$promise = new Promise(); -$promise->reject('foo'); -// This will not throw an exception. It simply ensures the promise has -// been resolved. -$promise->wait(false); -``` - -When unwrapping a promise, the resolved value of the promise will be waited -upon until the unwrapped value is not a promise. This means that if you resolve -promise A with a promise B and unwrap promise A, the value returned by the -wait function will be the value delivered to promise B. - -**Note**: when you do not unwrap the promise, no value is returned. - - -# Cancellation - -You can cancel a promise that has not yet been fulfilled using the `cancel()` -method of a promise. When creating a promise you can provide an optional -cancel function that when invoked cancels the action of computing a resolution -of the promise. - - -# API - - -## Promise - -When creating a promise object, you can provide an optional `$waitFn` and -`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is -expected to resolve the promise. `$cancelFn` is a function with no arguments -that is expected to cancel the computation of a promise. It is invoked when the -`cancel()` method of a promise is called. - -```php -use GuzzleHttp\Promise\Promise; - -$promise = new Promise( - function () use (&$promise) { - $promise->resolve('waited'); - }, - function () { - // do something that will cancel the promise computation (e.g., close - // a socket, cancel a database query, etc...) - } -); - -assert('waited' === $promise->wait()); -``` - -A promise has the following methods: - -- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` - - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. - -- `otherwise(callable $onRejected) : PromiseInterface` - - Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. - -- `wait($unwrap = true) : mixed` - - Synchronously waits on the promise to complete. - - `$unwrap` controls whether or not the value of the promise is returned for a - fulfilled promise or if an exception is thrown if the promise is rejected. - This is set to `true` by default. - -- `cancel()` - - Attempts to cancel the promise if possible. The promise being cancelled and - the parent most ancestor that has not yet been resolved will also be - cancelled. Any promises waiting on the cancelled promise to resolve will also - be cancelled. - -- `getState() : string` - - Returns the state of the promise. One of `pending`, `fulfilled`, or - `rejected`. - -- `resolve($value)` - - Fulfills the promise with the given `$value`. - -- `reject($reason)` - - Rejects the promise with the given `$reason`. - - -## FulfilledPromise - -A fulfilled promise can be created to represent a promise that has been -fulfilled. - -```php -use GuzzleHttp\Promise\FulfilledPromise; - -$promise = new FulfilledPromise('value'); - -// Fulfilled callbacks are immediately invoked. -$promise->then(function ($value) { - echo $value; -}); -``` - - -## RejectedPromise - -A rejected promise can be created to represent a promise that has been -rejected. - -```php -use GuzzleHttp\Promise\RejectedPromise; - -$promise = new RejectedPromise('Error'); - -// Rejected callbacks are immediately invoked. -$promise->then(null, function ($reason) { - echo $reason; -}); -``` - - -# Promise interop - -This library works with foreign promises that have a `then` method. This means -you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) -for example. When a foreign promise is returned inside of a then method -callback, promise resolution will occur recursively. - -```php -// Create a React promise -$deferred = new React\Promise\Deferred(); -$reactPromise = $deferred->promise(); - -// Create a Guzzle promise that is fulfilled with a React promise. -$guzzlePromise = new \GuzzleHttp\Promise\Promise(); -$guzzlePromise->then(function ($value) use ($reactPromise) { - // Do something something with the value... - // Return the React promise - return $reactPromise; -}); -``` - -Please note that wait and cancel chaining is no longer possible when forwarding -a foreign promise. You will need to wrap a third-party promise with a Guzzle -promise in order to utilize wait and cancel functions with foreign promises. - - -## Event Loop Integration - -In order to keep the stack size constant, Guzzle promises are resolved -asynchronously using a task queue. When waiting on promises synchronously, the -task queue will be automatically run to ensure that the blocking promise and -any forwarded promises are resolved. When using promises asynchronously in an -event loop, you will need to run the task queue on each tick of the loop. If -you do not run the task queue, then promises will not be resolved. - -You can run the task queue using the `run()` method of the global task queue -instance. - -```php -// Get the global task queue -$queue = \GuzzleHttp\Promise\queue(); -$queue->run(); -``` - -For example, you could use Guzzle promises with React using a periodic timer: - -```php -$loop = React\EventLoop\Factory::create(); -$loop->addPeriodicTimer(0, [$queue, 'run']); -``` - -*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? - - -# Implementation notes - - -## Promise resolution and chaining is handled iteratively - -By shuffling pending handlers from one owner to another, promises are -resolved iteratively, allowing for "infinite" then chaining. - -```php -then(function ($v) { - // The stack size remains constant (a good thing) - echo xdebug_get_stack_depth() . ', '; - return $v + 1; - }); -} - -$parent->resolve(0); -var_dump($p->wait()); // int(1000) - -``` - -When a promise is fulfilled or rejected with a non-promise value, the promise -then takes ownership of the handlers of each child promise and delivers values -down the chain without using recursion. - -When a promise is resolved with another promise, the original promise transfers -all of its pending handlers to the new promise. When the new promise is -eventually resolved, all of the pending handlers are delivered the forwarded -value. - - -## A promise is the deferred. - -Some promise libraries implement promises using a deferred object to represent -a computation and a promise object to represent the delivery of the result of -the computation. This is a nice separation of computation and delivery because -consumers of the promise cannot modify the value that will be eventually -delivered. - -One side effect of being able to implement promise resolution and chaining -iteratively is that you need to be able for one promise to reach into the state -of another promise to shuffle around ownership of handlers. In order to achieve -this without making the handlers of a promise publicly mutable, a promise is -also the deferred value, allowing promises of the same parent class to reach -into and modify the private properties of promises of the same type. While this -does allow consumers of the value to modify the resolution or rejection of the -deferred, it is a small price to pay for keeping the stack size constant. - -```php -$promise = new Promise(); -$promise->then(function ($value) { echo $value; }); -// The promise is the deferred value, so you can deliver a value to it. -$promise->resolve('foo'); -// prints "foo" -``` diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/composer.json b/sensitive-issue-searcher/vendor/guzzlehttp/promises/composer.json deleted file mode 100644 index ec41a61..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "guzzlehttp/promises", - "description": "Guzzle promises library", - "keywords": ["promise"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": ["src/functions_include.php"] - }, - "scripts": { - "test": "vendor/bin/phpunit", - "test-ci": "vendor/bin/phpunit --coverage-text" - }, - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/AggregateException.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/AggregateException.php deleted file mode 100644 index 6a5690c..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/AggregateException.php +++ /dev/null @@ -1,16 +0,0 @@ -then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration - */ -final class Coroutine implements PromiseInterface -{ - /** - * @var PromiseInterface|null - */ - private $currentPromise; - - /** - * @var Generator - */ - private $generator; - - /** - * @var Promise - */ - private $result; - - public function __construct(callable $generatorFn) - { - $this->generator = $generatorFn(); - $this->result = new Promise(function () { - while (isset($this->currentPromise)) { - $this->currentPromise->wait(); - } - }); - $this->nextCoroutine($this->generator->current()); - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - return $this->result->then($onFulfilled, $onRejected); - } - - public function otherwise(callable $onRejected) - { - return $this->result->otherwise($onRejected); - } - - public function wait($unwrap = true) - { - return $this->result->wait($unwrap); - } - - public function getState() - { - return $this->result->getState(); - } - - public function resolve($value) - { - $this->result->resolve($value); - } - - public function reject($reason) - { - $this->result->reject($reason); - } - - public function cancel() - { - $this->currentPromise->cancel(); - $this->result->cancel(); - } - - private function nextCoroutine($yielded) - { - $this->currentPromise = promise_for($yielded) - ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); - } - - /** - * @internal - */ - public function _handleSuccess($value) - { - unset($this->currentPromise); - try { - $next = $this->generator->send($value); - if ($this->generator->valid()) { - $this->nextCoroutine($next); - } else { - $this->result->resolve($value); - } - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * @internal - */ - public function _handleFailure($reason) - { - unset($this->currentPromise); - try { - $nextYield = $this->generator->throw(exception_for($reason)); - // The throw was caught, so keep iterating on the coroutine - $this->nextCoroutine($nextYield); - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/EachPromise.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/EachPromise.php deleted file mode 100644 index d0ddf60..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/EachPromise.php +++ /dev/null @@ -1,229 +0,0 @@ -iterable = iter_for($iterable); - - if (isset($config['concurrency'])) { - $this->concurrency = $config['concurrency']; - } - - if (isset($config['fulfilled'])) { - $this->onFulfilled = $config['fulfilled']; - } - - if (isset($config['rejected'])) { - $this->onRejected = $config['rejected']; - } - } - - public function promise() - { - if ($this->aggregate) { - return $this->aggregate; - } - - try { - $this->createPromise(); - $this->iterable->rewind(); - $this->refillPending(); - } catch (\Throwable $e) { - $this->aggregate->reject($e); - } catch (\Exception $e) { - $this->aggregate->reject($e); - } - - return $this->aggregate; - } - - private function createPromise() - { - $this->mutex = false; - $this->aggregate = new Promise(function () { - reset($this->pending); - if (empty($this->pending) && !$this->iterable->valid()) { - $this->aggregate->resolve(null); - return; - } - - // Consume a potentially fluctuating list of promises while - // ensuring that indexes are maintained (precluding array_shift). - while ($promise = current($this->pending)) { - next($this->pending); - $promise->wait(); - if ($this->aggregate->getState() !== PromiseInterface::PENDING) { - return; - } - } - }); - - // Clear the references when the promise is resolved. - $clearFn = function () { - $this->iterable = $this->concurrency = $this->pending = null; - $this->onFulfilled = $this->onRejected = null; - }; - - $this->aggregate->then($clearFn, $clearFn); - } - - private function refillPending() - { - if (!$this->concurrency) { - // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()); - return; - } - - // Add only up to N pending promises. - $concurrency = is_callable($this->concurrency) - ? call_user_func($this->concurrency, count($this->pending)) - : $this->concurrency; - $concurrency = max($concurrency - count($this->pending), 0); - // Concurrency may be set to 0 to disallow new promises. - if (!$concurrency) { - return; - } - // Add the first pending promise. - $this->addPending(); - // Note this is special handling for concurrency=1 so that we do - // not advance the iterator after adding the first promise. This - // helps work around issues with generators that might not have the - // next value to yield until promise callbacks are called. - while (--$concurrency - && $this->advanceIterator() - && $this->addPending()); - } - - private function addPending() - { - if (!$this->iterable || !$this->iterable->valid()) { - return false; - } - - $promise = promise_for($this->iterable->current()); - $idx = $this->iterable->key(); - - $this->pending[$idx] = $promise->then( - function ($value) use ($idx) { - if ($this->onFulfilled) { - call_user_func( - $this->onFulfilled, $value, $idx, $this->aggregate - ); - } - $this->step($idx); - }, - function ($reason) use ($idx) { - if ($this->onRejected) { - call_user_func( - $this->onRejected, $reason, $idx, $this->aggregate - ); - } - $this->step($idx); - } - ); - - return true; - } - - private function advanceIterator() - { - // Place a lock on the iterator so that we ensure to not recurse, - // preventing fatal generator errors. - if ($this->mutex) { - return false; - } - - $this->mutex = true; - - try { - $this->iterable->next(); - $this->mutex = false; - return true; - } catch (\Throwable $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } - } - - private function step($idx) - { - // If the promise was already resolved, then ignore this step. - if ($this->aggregate->getState() !== PromiseInterface::PENDING) { - return; - } - - unset($this->pending[$idx]); - - // Only refill pending promises if we are not locked, preventing the - // EachPromise to recursively invoke the provided iterator, which - // cause a fatal error: "Cannot resume an already running generator" - if ($this->advanceIterator() && !$this->checkIfFinished()) { - // Add more pending promises if possible. - $this->refillPending(); - } - } - - private function checkIfFinished() - { - if (!$this->pending && !$this->iterable->valid()) { - // Resolve the promise if there's nothing left to do. - $this->aggregate->resolve(null); - return true; - } - - return false; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/FulfilledPromise.php deleted file mode 100644 index dbbeeb9..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ /dev/null @@ -1,82 +0,0 @@ -value = $value; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // Return itself if there is no onFulfilled function. - if (!$onFulfilled) { - return $this; - } - - $queue = queue(); - $p = new Promise([$queue, 'run']); - $value = $this->value; - $queue->add(static function () use ($p, $value, $onFulfilled) { - if ($p->getState() === self::PENDING) { - try { - $p->resolve($onFulfilled($value)); - } catch (\Throwable $e) { - $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - return $unwrap ? $this->value : null; - } - - public function getState() - { - return self::FULFILLED; - } - - public function resolve($value) - { - if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); - } - } - - public function reject($reason) - { - throw new \LogicException("Cannot reject a fulfilled promise"); - } - - public function cancel() - { - // pass - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/Promise.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/Promise.php deleted file mode 100644 index 844ada0..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/Promise.php +++ /dev/null @@ -1,280 +0,0 @@ -waitFn = $waitFn; - $this->cancelFn = $cancelFn; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - if ($this->state === self::PENDING) { - $p = new Promise(null, [$this, 'cancel']); - $this->handlers[] = [$p, $onFulfilled, $onRejected]; - $p->waitList = $this->waitList; - $p->waitList[] = $this; - return $p; - } - - // Return a fulfilled promise and immediately invoke any callbacks. - if ($this->state === self::FULFILLED) { - return $onFulfilled - ? promise_for($this->result)->then($onFulfilled) - : promise_for($this->result); - } - - // It's either cancelled or rejected, so return a rejected promise - // and immediately invoke any callbacks. - $rejection = rejection_for($this->result); - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true) - { - $this->waitIfPending(); - - $inner = $this->result instanceof PromiseInterface - ? $this->result->wait($unwrap) - : $this->result; - - if ($unwrap) { - if ($this->result instanceof PromiseInterface - || $this->state === self::FULFILLED - ) { - return $inner; - } else { - // It's rejected so "unwrap" and throw an exception. - throw exception_for($inner); - } - } - } - - public function getState() - { - return $this->state; - } - - public function cancel() - { - if ($this->state !== self::PENDING) { - return; - } - - $this->waitFn = $this->waitList = null; - - if ($this->cancelFn) { - $fn = $this->cancelFn; - $this->cancelFn = null; - try { - $fn(); - } catch (\Throwable $e) { - $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); - } - } - - // Reject the promise only if it wasn't rejected in a then callback. - if ($this->state === self::PENDING) { - $this->reject(new CancellationException('Promise has been cancelled')); - } - } - - public function resolve($value) - { - $this->settle(self::FULFILLED, $value); - } - - public function reject($reason) - { - $this->settle(self::REJECTED, $reason); - } - - private function settle($state, $value) - { - if ($this->state !== self::PENDING) { - // Ignore calls with the same resolution. - if ($state === $this->state && $value === $this->result) { - return; - } - throw $this->state === $state - ? new \LogicException("The promise is already {$state}.") - : new \LogicException("Cannot change a {$this->state} promise to {$state}"); - } - - if ($value === $this) { - throw new \LogicException('Cannot fulfill or reject a promise with itself'); - } - - // Clear out the state of the promise but stash the handlers. - $this->state = $state; - $this->result = $value; - $handlers = $this->handlers; - $this->handlers = null; - $this->waitList = $this->waitFn = null; - $this->cancelFn = null; - - if (!$handlers) { - return; - } - - // If the value was not a settled promise or a thenable, then resolve - // it in the task queue using the correct ID. - if (!method_exists($value, 'then')) { - $id = $state === self::FULFILLED ? 1 : 2; - // It's a success, so resolve the handlers in the queue. - queue()->add(static function () use ($id, $value, $handlers) { - foreach ($handlers as $handler) { - self::callHandler($id, $value, $handler); - } - }); - } elseif ($value instanceof Promise - && $value->getState() === self::PENDING - ) { - // We can just merge our handlers onto the next promise. - $value->handlers = array_merge($value->handlers, $handlers); - } else { - // Resolve the handlers when the forwarded promise is resolved. - $value->then( - static function ($value) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(1, $value, $handler); - } - }, - static function ($reason) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(2, $reason, $handler); - } - } - ); - } - } - - /** - * Call a stack of handlers using a specific callback index and value. - * - * @param int $index 1 (resolve) or 2 (reject). - * @param mixed $value Value to pass to the callback. - * @param array $handler Array of handler data (promise and callbacks). - * - * @return array Returns the next group to resolve. - */ - private static function callHandler($index, $value, array $handler) - { - /** @var PromiseInterface $promise */ - $promise = $handler[0]; - - // The promise may have been cancelled or resolved before placing - // this thunk in the queue. - if ($promise->getState() !== self::PENDING) { - return; - } - - try { - if (isset($handler[$index])) { - $promise->resolve($handler[$index]($value)); - } elseif ($index === 1) { - // Forward resolution values as-is. - $promise->resolve($value); - } else { - // Forward rejections down the chain. - $promise->reject($value); - } - } catch (\Throwable $reason) { - $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); - } - } - - private function waitIfPending() - { - if ($this->state !== self::PENDING) { - return; - } elseif ($this->waitFn) { - $this->invokeWaitFn(); - } elseif ($this->waitList) { - $this->invokeWaitList(); - } else { - // If there's not wait function, then reject the promise. - $this->reject('Cannot wait on a promise that has ' - . 'no internal wait function. You must provide a wait ' - . 'function when constructing the promise to be able to ' - . 'wait on a promise.'); - } - - queue()->run(); - - if ($this->state === self::PENDING) { - $this->reject('Invoking the wait callback did not resolve the promise'); - } - } - - private function invokeWaitFn() - { - try { - $wfn = $this->waitFn; - $this->waitFn = null; - $wfn(true); - } catch (\Exception $reason) { - if ($this->state === self::PENDING) { - // The promise has not been resolved yet, so reject the promise - // with the exception. - $this->reject($reason); - } else { - // The promise was already resolved, so there's a problem in - // the application. - throw $reason; - } - } - } - - private function invokeWaitList() - { - $waitList = $this->waitList; - $this->waitList = null; - - foreach ($waitList as $result) { - while (true) { - $result->waitIfPending(); - - if ($result->result instanceof Promise) { - $result = $result->result; - } else { - if ($result->result instanceof PromiseInterface) { - $result->result->wait(false); - } - break; - } - } - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/PromiseInterface.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/PromiseInterface.php deleted file mode 100644 index 8f5f4b9..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ /dev/null @@ -1,93 +0,0 @@ -reason = $reason; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // If there's no onRejected callback then just return self. - if (!$onRejected) { - return $this; - } - - $queue = queue(); - $reason = $this->reason; - $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected) { - if ($p->getState() === self::PENDING) { - try { - // Return a resolved promise if onRejected does not throw. - $p->resolve($onRejected($reason)); - } catch (\Throwable $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - if ($unwrap) { - throw exception_for($this->reason); - } - } - - public function getState() - { - return self::REJECTED; - } - - public function resolve($value) - { - throw new \LogicException("Cannot resolve a rejected promise"); - } - - public function reject($reason) - { - if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); - } - } - - public function cancel() - { - // pass - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/RejectionException.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/RejectionException.php deleted file mode 100644 index 07c1136..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/RejectionException.php +++ /dev/null @@ -1,47 +0,0 @@ -reason = $reason; - - $message = 'The promise was rejected'; - - if ($description) { - $message .= ' with reason: ' . $description; - } elseif (is_string($reason) - || (is_object($reason) && method_exists($reason, '__toString')) - ) { - $message .= ' with reason: ' . $this->reason; - } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' - . json_encode($this->reason, JSON_PRETTY_PRINT); - } - - parent::__construct($message); - } - - /** - * Returns the rejection reason. - * - * @return mixed - */ - public function getReason() - { - return $this->reason; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueue.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueue.php deleted file mode 100644 index 6e8a2a0..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueue.php +++ /dev/null @@ -1,66 +0,0 @@ -run(); - */ -class TaskQueue implements TaskQueueInterface -{ - private $enableShutdown = true; - private $queue = []; - - public function __construct($withShutdown = true) - { - if ($withShutdown) { - register_shutdown_function(function () { - if ($this->enableShutdown) { - // Only run the tasks if an E_ERROR didn't occur. - $err = error_get_last(); - if (!$err || ($err['type'] ^ E_ERROR)) { - $this->run(); - } - } - }); - } - } - - public function isEmpty() - { - return !$this->queue; - } - - public function add(callable $task) - { - $this->queue[] = $task; - } - - public function run() - { - /** @var callable $task */ - while ($task = array_shift($this->queue)) { - $task(); - } - } - - /** - * The task queue will be run and exhausted by default when the process - * exits IFF the exit is not the result of a PHP E_ERROR error. - * - * You can disable running the automatic shutdown of the queue by calling - * this function. If you disable the task queue shutdown process, then you - * MUST either run the task queue (as a result of running your event loop - * or manually using the run() method) or wait on each outstanding promise. - * - * Note: This shutdown will occur before any destructors are triggered. - */ - public function disableShutdown() - { - $this->enableShutdown = false; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueueInterface.php deleted file mode 100644 index ac8306e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - */ -function queue(TaskQueueInterface $assign = null) -{ - static $queue; - - if ($assign) { - $queue = $assign; - } elseif (!$queue) { - $queue = new TaskQueue(); - } - - return $queue; -} - -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - */ -function task(callable $task) -{ - $queue = queue(); - $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise) { - try { - $promise->resolve($task()); - } catch (\Throwable $e) { - $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); - } - }); - - return $promise; -} - -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - */ -function promise_for($value) -{ - if ($value instanceof PromiseInterface) { - return $value; - } - - // Return a Guzzle promise that shadows the given promise. - if (method_exists($value, 'then')) { - $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null; - $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null; - $promise = new Promise($wfn, $cfn); - $value->then([$promise, 'resolve'], [$promise, 'reject']); - return $promise; - } - - return new FulfilledPromise($value); -} - -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - */ -function rejection_for($reason) -{ - if ($reason instanceof PromiseInterface) { - return $reason; - } - - return new RejectedPromise($reason); -} - -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - */ -function exception_for($reason) -{ - return $reason instanceof \Exception || $reason instanceof \Throwable - ? $reason - : new RejectionException($reason); -} - -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - */ -function iter_for($value) -{ - if ($value instanceof \Iterator) { - return $value; - } elseif (is_array($value)) { - return new \ArrayIterator($value); - } else { - return new \ArrayIterator([$value]); - } -} - -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - */ -function inspect(PromiseInterface $promise) -{ - try { - return [ - 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait() - ]; - } catch (RejectionException $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; - } catch (\Throwable $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } -} - -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * @see GuzzleHttp\Promise\inspect for the inspection state array format. - */ -function inspect_all($promises) -{ - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); - } - - return $results; -} - -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param mixed $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - */ -function unwrap($promises) -{ - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = $promise->wait(); - } - - return $results; -} - -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function all($promises) -{ - $results = []; - return each( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = $value; - }, - function ($reason, $idx, Promise $aggregate) { - $aggregate->reject($reason); - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); -} - -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} - * if the number of fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function some($count, $promises) -{ - $results = []; - $rejections = []; - - return each( - $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count) { - if ($p->getState() !== PromiseInterface::PENDING) { - return; - } - $results[$idx] = $value; - if (count($results) >= $count) { - $p->resolve(null); - } - }, - function ($reason) use (&$rejections) { - $rejections[] = $reason; - } - )->then( - function () use (&$results, &$rejections, $count) { - if (count($results) !== $count) { - throw new AggregateException( - 'Not enough promises to fulfill count', - $rejections - ); - } - ksort($results); - return array_values($results); - } - ); -} - -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ -function any($promises) -{ - return some(1, $promises)->then(function ($values) { return $values[0]; }); -} - -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * @see GuzzleHttp\Promise\inspect for the inspection state array format. - */ -function settle($promises) -{ - $results = []; - - return each( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; - }, - function ($reason, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); -} - -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator - * index, and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate promise if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator - * index, and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate promise if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ -function each( - $iterable, - callable $onFulfilled = null, - callable $onRejected = null -) { - return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected - ]))->promise(); -} - -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ -function each_limit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null -) { - return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency - ]))->promise(); -} - -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - */ -function each_limit_all( - $iterable, - $concurrency, - callable $onFulfilled = null -) { - return each_limit( - $iterable, - $concurrency, - $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate) { - $aggregate->reject($reason); - } - ); -} - -/** - * Returns true if a promise is fulfilled. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_fulfilled(PromiseInterface $promise) -{ - return $promise->getState() === PromiseInterface::FULFILLED; -} - -/** - * Returns true if a promise is rejected. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_rejected(PromiseInterface $promise) -{ - return $promise->getState() === PromiseInterface::REJECTED; -} - -/** - * Returns true if a promise is fulfilled or rejected. - * - * @param PromiseInterface $promise - * - * @return bool - */ -function is_settled(PromiseInterface $promise) -{ - return $promise->getState() !== PromiseInterface::PENDING; -} - -/** - * @see Coroutine - * - * @param callable $generatorFn - * - * @return PromiseInterface - */ -function coroutine(callable $generatorFn) -{ - return new Coroutine($generatorFn); -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/functions_include.php b/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/functions_include.php deleted file mode 100644 index 34cd171..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/promises/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -withPath('foo')->withHost('example.com')` will throw an exception - because the path of a URI with an authority must start with a slash "/" or be empty - - `(new Uri())->withScheme('http')` will return `'http://localhost'` -* Fix compatibility of URIs with `file` scheme and empty host. -* Added common URI utility methods based on RFC 3986 (see documentation in the readme): - - `Uri::isDefaultPort` - - `Uri::isAbsolute` - - `Uri::isNetworkPathReference` - - `Uri::isAbsolutePathReference` - - `Uri::isRelativePathReference` - - `Uri::isSameDocumentReference` - - `Uri::composeComponents` - - `UriNormalizer::normalize` - - `UriNormalizer::isEquivalent` - - `UriResolver::relativize` -* Deprecated `Uri::resolve` in favor of `UriResolver::resolve` -* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` - -## 1.3.1 - 2016-06-25 - -* Fix `Uri::__toString` for network path references, e.g. `//example.org`. -* Fix missing lowercase normalization for host. -* Fix handling of URI components in case they are `'0'` in a lot of places, - e.g. as a user info password. -* Fix `Uri::withAddedHeader` to correctly merge headers with different case. -* Fix trimming of header values in `Uri::withAddedHeader`. Header values may - be surrounded by whitespace which should be ignored according to RFC 7230 - Section 3.2.4. This does not apply to header names. -* Fix `Uri::withAddedHeader` with an array of header values. -* Fix `Uri::resolve` when base path has no slash and handling of fragment. -* Fix handling of encoding in `Uri::with(out)QueryValue` so one can pass the - key/value both in encoded as well as decoded form to those methods. This is - consistent with withPath, withQuery etc. -* Fix `ServerRequest::withoutAttribute` when attribute value is null. - -## 1.3.0 - 2016-04-13 - -* Added remaining interfaces needed for full PSR7 compatibility - (ServerRequestInterface, UploadedFileInterface, etc.). -* Added support for stream_for from scalars. -* Can now extend Uri. -* Fixed a bug in validating request methods by making it more permissive. - -## 1.2.3 - 2016-02-18 - -* Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote - streams, which can sometimes return fewer bytes than requested with `fread`. -* Fixed handling of gzipped responses with FNAME headers. - -## 1.2.2 - 2016-01-22 - -* Added support for URIs without any authority. -* Added support for HTTP 451 'Unavailable For Legal Reasons.' -* Added support for using '0' as a filename. -* Added support for including non-standard ports in Host headers. - -## 1.2.1 - 2015-11-02 - -* Now supporting negative offsets when seeking to SEEK_END. - -## 1.2.0 - 2015-08-15 - -* Body as `"0"` is now properly added to a response. -* Now allowing forward seeking in CachingStream. -* Now properly parsing HTTP requests that contain proxy targets in - `parse_request`. -* functions.php is now conditionally required. -* user-info is no longer dropped when resolving URIs. - -## 1.1.0 - 2015-06-24 - -* URIs can now be relative. -* `multipart/form-data` headers are now overridden case-insensitively. -* URI paths no longer encode the following characters because they are allowed - in URIs: "(", ")", "*", "!", "'" -* A port is no longer added to a URI when the scheme is missing and no port is - present. - -## 1.0.0 - 2015-05-19 - -Initial release. - -Currently unsupported: - -- `Psr\Http\Message\ServerRequestInterface` -- `Psr\Http\Message\UploadedFileInterface` diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/LICENSE b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/LICENSE deleted file mode 100644 index 581d95f..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling - -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. diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/README.md b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/README.md deleted file mode 100644 index 1649935..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/README.md +++ /dev/null @@ -1,739 +0,0 @@ -# PSR-7 Message Implementation - -This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) -message implementation, several stream decorators, and some helpful -functionality like query string parsing. - - -[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) - - -# Stream implementation - -This package comes with a number of stream implementations and stream -decorators. - - -## AppendStream - -`GuzzleHttp\Psr7\AppendStream` - -Reads from multiple streams, one after the other. - -```php -use GuzzleHttp\Psr7; - -$a = Psr7\stream_for('abc, '); -$b = Psr7\stream_for('123.'); -$composed = new Psr7\AppendStream([$a, $b]); - -$composed->addStream(Psr7\stream_for(' Above all listen to me')); - -echo $composed; // abc, 123. Above all listen to me. -``` - - -## BufferStream - -`GuzzleHttp\Psr7\BufferStream` - -Provides a buffer stream that can be written to fill a buffer, and read -from to remove bytes from the buffer. - -This stream returns a "hwm" metadata value that tells upstream consumers -what the configured high water mark of the stream is, or the maximum -preferred size of the buffer. - -```php -use GuzzleHttp\Psr7; - -// When more than 1024 bytes are in the buffer, it will begin returning -// false to writes. This is an indication that writers should slow down. -$buffer = new Psr7\BufferStream(1024); -``` - - -## CachingStream - -The CachingStream is used to allow seeking over previously read bytes on -non-seekable streams. This can be useful when transferring a non-seekable -entity body fails due to needing to rewind the stream (for example, resulting -from a redirect). Data that is read from the remote stream will be buffered in -a PHP temp stream so that previously read bytes are cached first in memory, -then on disk. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\stream_for(fopen('http://www.google.com', 'r')); -$stream = new Psr7\CachingStream($original); - -$stream->read(1024); -echo $stream->tell(); -// 1024 - -$stream->seek(0); -echo $stream->tell(); -// 0 -``` - - -## DroppingStream - -`GuzzleHttp\Psr7\DroppingStream` - -Stream decorator that begins dropping data once the size of the underlying -stream becomes too full. - -```php -use GuzzleHttp\Psr7; - -// Create an empty stream -$stream = Psr7\stream_for(); - -// Start dropping data when the stream has more than 10 bytes -$dropping = new Psr7\DroppingStream($stream, 10); - -$dropping->write('01234567890123456789'); -echo $stream; // 0123456789 -``` - - -## FnStream - -`GuzzleHttp\Psr7\FnStream` - -Compose stream implementations based on a hash of functions. - -Allows for easy testing and extension of a provided stream without needing -to create a concrete class for a simple extension point. - -```php - -use GuzzleHttp\Psr7; - -$stream = Psr7\stream_for('hi'); -$fnStream = Psr7\FnStream::decorate($stream, [ - 'rewind' => function () use ($stream) { - echo 'About to rewind - '; - $stream->rewind(); - echo 'rewound!'; - } -]); - -$fnStream->rewind(); -// Outputs: About to rewind - rewound! -``` - - -## InflateStream - -`GuzzleHttp\Psr7\InflateStream` - -Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. - -This stream decorator skips the first 10 bytes of the given stream to remove -the gzip header, converts the provided stream to a PHP stream resource, -then appends the zlib.inflate filter. The stream is then converted back -to a Guzzle stream resource to be used as a Guzzle stream. - - -## LazyOpenStream - -`GuzzleHttp\Psr7\LazyOpenStream` - -Lazily reads or writes to a file that is opened only after an IO operation -take place on the stream. - -```php -use GuzzleHttp\Psr7; - -$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); -// The file has not yet been opened... - -echo $stream->read(10); -// The file is opened and read from only when needed. -``` - - -## LimitStream - -`GuzzleHttp\Psr7\LimitStream` - -LimitStream can be used to read a subset or slice of an existing stream object. -This can be useful for breaking a large file into smaller pieces to be sent in -chunks (e.g. Amazon S3's multipart upload API). - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+')); -echo $original->getSize(); -// >>> 1048576 - -// Limit the size of the body to 1024 bytes and start reading from byte 2048 -$stream = new Psr7\LimitStream($original, 1024, 2048); -echo $stream->getSize(); -// >>> 1024 -echo $stream->tell(); -// >>> 0 -``` - - -## MultipartStream - -`GuzzleHttp\Psr7\MultipartStream` - -Stream that when read returns bytes for a streaming multipart or -multipart/form-data stream. - - -## NoSeekStream - -`GuzzleHttp\Psr7\NoSeekStream` - -NoSeekStream wraps a stream and does not allow seeking. - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\stream_for('foo'); -$noSeek = new Psr7\NoSeekStream($original); - -echo $noSeek->read(3); -// foo -var_export($noSeek->isSeekable()); -// false -$noSeek->seek(0); -var_export($noSeek->read(3)); -// NULL -``` - - -## PumpStream - -`GuzzleHttp\Psr7\PumpStream` - -Provides a read only stream that pumps data from a PHP callable. - -When invoking the provided callable, the PumpStream will pass the amount of -data requested to read to the callable. The callable can choose to ignore -this value and return fewer or more bytes than requested. Any extra data -returned by the provided callable is buffered internally until drained using -the read() function of the PumpStream. The provided callable MUST return -false when there is no more data to read. - - -## Implementing stream decorators - -Creating a stream decorator is very easy thanks to the -`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that -implement `Psr\Http\Message\StreamInterface` by proxying to an underlying -stream. Just `use` the `StreamDecoratorTrait` and implement your custom -methods. - -For example, let's say we wanted to call a specific function each time the last -byte is read from a stream. This could be implemented by overriding the -`read()` method. - -```php -use Psr\Http\Message\StreamInterface; -use GuzzleHttp\Psr7\StreamDecoratorTrait; - -class EofCallbackStream implements StreamInterface -{ - use StreamDecoratorTrait; - - private $callback; - - public function __construct(StreamInterface $stream, callable $cb) - { - $this->stream = $stream; - $this->callback = $cb; - } - - public function read($length) - { - $result = $this->stream->read($length); - - // Invoke the callback when EOF is hit. - if ($this->eof()) { - call_user_func($this->callback); - } - - return $result; - } -} -``` - -This decorator could be added to any existing stream and used like so: - -```php -use GuzzleHttp\Psr7; - -$original = Psr7\stream_for('foo'); - -$eofStream = new EofCallbackStream($original, function () { - echo 'EOF!'; -}); - -$eofStream->read(2); -$eofStream->read(1); -// echoes "EOF!" -$eofStream->seek(0); -$eofStream->read(3); -// echoes "EOF!" -``` - - -## PHP StreamWrapper - -You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a -PSR-7 stream as a PHP stream resource. - -Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP -stream from a PSR-7 stream. - -```php -use GuzzleHttp\Psr7\StreamWrapper; - -$stream = GuzzleHttp\Psr7\stream_for('hello!'); -$resource = StreamWrapper::getResource($stream); -echo fread($resource, 6); // outputs hello! -``` - - -# Function API - -There are various functions available under the `GuzzleHttp\Psr7` namespace. - - -## `function str` - -`function str(MessageInterface $message)` - -Returns the string representation of an HTTP message. - -```php -$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); -echo GuzzleHttp\Psr7\str($request); -``` - - -## `function uri_for` - -`function uri_for($uri)` - -This function accepts a string or `Psr\Http\Message\UriInterface` and returns a -UriInterface for the given value. If the value is already a `UriInterface`, it -is returned as-is. - -```php -$uri = GuzzleHttp\Psr7\uri_for('http://example.com'); -assert($uri === GuzzleHttp\Psr7\uri_for($uri)); -``` - - -## `function stream_for` - -`function stream_for($resource = '', array $options = [])` - -Create a new stream based on the input type. - -Options is an associative array that can contain the following keys: - -* - metadata: Array of custom metadata. -* - size: Size of the stream. - -This method accepts the following `$resource` types: - -- `Psr\Http\Message\StreamInterface`: Returns the value as-is. -- `string`: Creates a stream object that uses the given string as the contents. -- `resource`: Creates a stream object that wraps the given PHP stream resource. -- `Iterator`: If the provided value implements `Iterator`, then a read-only - stream object will be created that wraps the given iterable. Each time the - stream is read from, data from the iterator will fill a buffer and will be - continuously called until the buffer is equal to the requested read size. - Subsequent read calls will first read from the buffer and then call `next` - on the underlying iterator until it is exhausted. -- `object` with `__toString()`: If the object has the `__toString()` method, - the object will be cast to a string and then a stream will be returned that - uses the string value. -- `NULL`: When `null` is passed, an empty stream object is returned. -- `callable` When a callable is passed, a read-only stream object will be - created that invokes the given callable. The callable is invoked with the - number of suggested bytes to read. The callable can return any number of - bytes, but MUST return `false` when there is no more data to return. The - stream object that wraps the callable will invoke the callable until the - number of requested bytes are available. Any additional bytes will be - buffered and used in subsequent reads. - -```php -$stream = GuzzleHttp\Psr7\stream_for('foo'); -$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); - -$generator function ($bytes) { - for ($i = 0; $i < $bytes; $i++) { - yield ' '; - } -} - -$stream = GuzzleHttp\Psr7\stream_for($generator(100)); -``` - - -## `function parse_header` - -`function parse_header($header)` - -Parse an array of header values containing ";" separated data into an array of -associative arrays representing the header key value pair data of the header. -When a parameter does not contain a value, but just contains a key, this -function will inject a key with a '' string value. - - -## `function normalize_header` - -`function normalize_header($header)` - -Converts an array of header values that may contain comma separated headers -into an array of headers with no comma separated values. - - -## `function modify_request` - -`function modify_request(RequestInterface $request, array $changes)` - -Clone and modify a request with the given changes. This method is useful for -reducing the number of clones needed to mutate a message. - -The changes can be one of: - -- method: (string) Changes the HTTP method. -- set_headers: (array) Sets the given headers. -- remove_headers: (array) Remove the given headers. -- body: (mixed) Sets the given body. -- uri: (UriInterface) Set the URI. -- query: (string) Set the query string value of the URI. -- version: (string) Set the protocol version. - - -## `function rewind_body` - -`function rewind_body(MessageInterface $message)` - -Attempts to rewind a message body and throws an exception on failure. The body -of the message will only be rewound if a call to `tell()` returns a value other -than `0`. - - -## `function try_fopen` - -`function try_fopen($filename, $mode)` - -Safely opens a PHP stream resource using a filename. - -When fopen fails, PHP normally raises a warning. This function adds an error -handler that checks for errors and throws an exception instead. - - -## `function copy_to_string` - -`function copy_to_string(StreamInterface $stream, $maxLen = -1)` - -Copy the contents of a stream into a string until the given number of bytes -have been read. - - -## `function copy_to_stream` - -`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)` - -Copy the contents of a stream into another stream until the given number of -bytes have been read. - - -## `function hash` - -`function hash(StreamInterface $stream, $algo, $rawOutput = false)` - -Calculate a hash of a Stream. This method reads the entire stream to calculate -a rolling hash (based on PHP's hash_init functions). - - -## `function readline` - -`function readline(StreamInterface $stream, $maxLength = null)` - -Read a line from the stream up to the maximum allowed buffer length. - - -## `function parse_request` - -`function parse_request($message)` - -Parses a request message string into a request object. - - -## `function parse_response` - -`function parse_response($message)` - -Parses a response message string into a response object. - - -## `function parse_query` - -`function parse_query($str, $urlEncoding = true)` - -Parse a query string into an associative array. - -If multiple values are found for the same key, the value of that key value pair -will become an array. This function does not parse nested PHP style arrays into -an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into -`['foo[a]' => '1', 'foo[b]' => '2']`). - - -## `function build_query` - -`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)` - -Build a query string from an array of key value pairs. - -This function can use the return value of parse_query() to build a query string. -This function does not modify the provided keys when an array is encountered -(like http_build_query would). - - -## `function mimetype_from_filename` - -`function mimetype_from_filename($filename)` - -Determines the mimetype of a file by looking at its extension. - - -## `function mimetype_from_extension` - -`function mimetype_from_extension($extension)` - -Maps a file extensions to a mimetype. - - -# Additional URI Methods - -Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, -this library also provides additional functionality when working with URIs as static methods. - -## URI Types - -An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. -An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, -the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): - -- network-path references, e.g. `//example.com/path` -- absolute-path references, e.g. `/path` -- relative-path references, e.g. `subpath` - -The following methods can be used to identify the type of the URI. - -### `GuzzleHttp\Psr7\Uri::isAbsolute` - -`public static function isAbsolute(UriInterface $uri): bool` - -Whether the URI is absolute, i.e. it has a scheme. - -### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` - -`public static function isNetworkPathReference(UriInterface $uri): bool` - -Whether the URI is a network-path reference. A relative reference that begins with two slash characters is -termed an network-path reference. - -### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` - -`public static function isAbsolutePathReference(UriInterface $uri): bool` - -Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is -termed an absolute-path reference. - -### `GuzzleHttp\Psr7\Uri::isRelativePathReference` - -`public static function isRelativePathReference(UriInterface $uri): bool` - -Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is -termed a relative-path reference. - -### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` - -`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` - -Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its -fragment component, identical to the base URI. When no base URI is given, only an empty URI reference -(apart from its fragment) is considered a same-document reference. - -## URI Components - -Additional methods to work with URI components. - -### `GuzzleHttp\Psr7\Uri::isDefaultPort` - -`public static function isDefaultPort(UriInterface $uri): bool` - -Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null -or the standard port. This method can be used independently of the implementation. - -### `GuzzleHttp\Psr7\Uri::composeComponents` - -`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` - -Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called -manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. - -### `GuzzleHttp\Psr7\Uri::fromParts` - -`public static function fromParts(array $parts): UriInterface` - -Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. - - -### `GuzzleHttp\Psr7\Uri::withQueryValue` - -`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` - -Creates a new URI with a specific query string value. Any existing query string values that exactly match the -provided key are removed and replaced with the given key value pair. A value of null will set the query string -key without a value, e.g. "key" instead of "key=value". - - -### `GuzzleHttp\Psr7\Uri::withoutQueryValue` - -`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` - -Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the -provided key are removed. - -## Reference Resolution - -`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers -do when resolving a link in a website based on the current request URI. - -### `GuzzleHttp\Psr7\UriResolver::resolve` - -`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` - -Converts the relative URI into a new URI that is resolved against the base URI. - -### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` - -`public static function removeDotSegments(string $path): string` - -Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). - -### `GuzzleHttp\Psr7\UriResolver::relativize` - -`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` - -Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): - -```php -(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) -``` - -One use-case is to use the current request URI as base URI and then generate relative links in your documents -to reduce the document size or offer self-contained downloadable document archives. - -```php -$base = new Uri('http://example.com/a/b/'); -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. -echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. -echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. -``` - -## Normalization and Comparison - -`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). - -### `GuzzleHttp\Psr7\UriNormalizer::normalize` - -`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` - -Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. -This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask -of normalizations to apply. The following normalizations are available: - -- `UriNormalizer::PRESERVING_NORMALIZATIONS` - - Default normalizations which only include the ones that preserve semantics. - -- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` - - All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. - - Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` - -- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` - - Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of - ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should - not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved - characters by URI normalizers. - - Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` - -- `UriNormalizer::CONVERT_EMPTY_PATH` - - Converts the empty path to "/" for http and https URIs. - - Example: `http://example.org` → `http://example.org/` - -- `UriNormalizer::REMOVE_DEFAULT_HOST` - - Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host - "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to - RFC 3986. - - Example: `file://localhost/myfile` → `file:///myfile` - -- `UriNormalizer::REMOVE_DEFAULT_PORT` - - Removes the default port of the given URI scheme from the URI. - - Example: `http://example.org:80/` → `http://example.org/` - -- `UriNormalizer::REMOVE_DOT_SEGMENTS` - - Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would - change the semantics of the URI reference. - - Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` - -- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` - - Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes - and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization - may change the semantics. Encoded slashes (%2F) are not removed. - - Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` - -- `UriNormalizer::SORT_QUERY_PARAMETERS` - - Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be - significant (this is not defined by the standard). So this normalization is not safe and may change the semantics - of the URI. - - Example: `?lang=en&article=fred` → `?article=fred&lang=en` - -### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` - -`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` - -Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given -`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. -This of course assumes they will be resolved against the same base URI. If this is not the case, determination of -equivalence or difference of relative references does not mean anything. diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/composer.json b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/composer.json deleted file mode 100644 index b1c5a90..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "guzzlehttp/psr7", - "type": "library", - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": ["request", "response", "message", "stream", "http", "uri", "url"], - "license": "MIT", - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": ["src/functions_include.php"] - }, - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/AppendStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/AppendStream.php deleted file mode 100644 index 23039fd..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/AppendStream.php +++ /dev/null @@ -1,233 +0,0 @@ -addStream($stream); - } - } - - public function __toString() - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents() - { - return copy_to_string($this); - } - - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream - * - * {@inheritdoc} - */ - public function detach() - { - $this->close(); - $this->detached = true; - } - - public function tell() - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof() - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - public function rewind() - { - $this->seek(0); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); - } - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - $progressToNext = false; - - while ($remaining > 0) { - - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = false; - if ($this->current === $total) { - break; - } - $this->current++; - } - - $result = $this->streams[$this->current]->read($remaining); - - // Using a loose comparison here to match on '', false, and null - if ($result == null) { - $progressToNext = true; - continue; - } - - $buffer .= $result; - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/BufferStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/BufferStream.php deleted file mode 100644 index af4d4c2..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/BufferStream.php +++ /dev/null @@ -1,137 +0,0 @@ -hwm = $hwm; - } - - public function __toString() - { - return $this->getContents(); - } - - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close() - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - } - - public function getSize() - { - return strlen($this->buffer); - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return true; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - - public function eof() - { - return strlen($this->buffer) === 0; - } - - public function tell() - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - - // TODO: What should happen here? - if (strlen($this->buffer) >= $this->hwm) { - return false; - } - - return strlen($string); - } - - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/CachingStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/CachingStream.php deleted file mode 100644 index ed68f08..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/CachingStream.php +++ /dev/null @@ -1,138 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); - } - - public function getSize() - { - return max($this->stream->getSize(), $this->remoteStream->getSize()); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence == SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - - $diff = $byte - $this->stream->getSize(); - - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } - - private function cacheEntireStream() - { - $target = new FnStream(['write' => 'strlen']); - copy_to_stream($this, $target); - - return $this->tell(); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/DroppingStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/DroppingStream.php deleted file mode 100644 index 8935c80..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ /dev/null @@ -1,42 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - return $this->stream->write(substr($string, 0, $diff)); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/FnStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/FnStream.php deleted file mode 100644 index cc9b445..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/FnStream.php +++ /dev/null @@ -1,149 +0,0 @@ -methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - - return new self($methods); - } - - public function __toString() - { - return call_user_func($this->_fn___toString); - } - - public function close() - { - return call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function getSize() - { - return call_user_func($this->_fn_getSize); - } - - public function tell() - { - return call_user_func($this->_fn_tell); - } - - public function eof() - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable() - { - return call_user_func($this->_fn_isSeekable); - } - - public function rewind() - { - call_user_func($this->_fn_rewind); - } - - public function seek($offset, $whence = SEEK_SET) - { - call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable() - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string) - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable() - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length) - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents() - { - return call_user_func($this->_fn_getContents); - } - - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/InflateStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/InflateStream.php deleted file mode 100644 index 0051d3f..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/InflateStream.php +++ /dev/null @@ -1,52 +0,0 @@ -read(10); - $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); - // Skip the header, that is 10 + length of filename + 1 (nil) bytes - $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); - $resource = StreamWrapper::getResource($stream); - stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); - $this->stream = new Stream($resource); - } - - /** - * @param StreamInterface $stream - * @param $header - * @return int - */ - private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) - { - $filename_header_length = 0; - - if (substr(bin2hex($header), 6, 2) === '08') { - // we have a filename, read until nil - $filename_header_length = 1; - while ($stream->read(1) !== chr(0)) { - $filename_header_length++; - } - } - - return $filename_header_length; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LazyOpenStream.php deleted file mode 100644 index 02cec3a..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,39 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return stream_for(try_fopen($this->filename, $this->mode)); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LimitStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LimitStream.php deleted file mode 100644 index 3c13d4f..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/LimitStream.php +++ /dev/null @@ -1,155 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return false; - } - - return $this->stream->tell() >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence !== SEEK_SET || $offset < 0) { - throw new \RuntimeException(sprintf( - 'Cannot seek to offset % with whence %s', - $offset, - $whence - )); - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - $this->stream->seek($offset); - } - - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset $offset"); - } else { - $this->stream->read($offset - $current); - } - } - - $this->offset = $offset; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit($limit) - { - $this->limit = $limit; - } - - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } - - return ''; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MessageTrait.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MessageTrait.php deleted file mode 100644 index 1e4da64..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ /dev/null @@ -1,183 +0,0 @@ - array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface */ - private $stream; - - public function getProtocolVersion() - { - return $this->protocol; - } - - public function withProtocolVersion($version) - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - return $new; - } - - public function getHeaders() - { - return $this->headers; - } - - public function hasHeader($header) - { - return isset($this->headerNames[strtolower($header)]); - } - - public function getHeader($header) - { - $header = strtolower($header); - - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header) - { - return implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value) - { - if (!is_array($value)) { - $value = [$value]; - } - - $value = $this->trimHeaderValues($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value) - { - if (!is_array($value)) { - $value = [$value]; - } - - $value = $this->trimHeaderValues($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - - return $new; - } - - public function withoutHeader($header) - { - $normalized = strtolower($header); - - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody() - { - if (!$this->stream) { - $this->stream = stream_for(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body) - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - return $new; - } - - private function setHeaders(array $headers) - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - if (!is_array($value)) { - $value = [$value]; - } - - $value = $this->trimHeaderValues($value); - $normalized = strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param string[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimHeaderValues(array $values) - { - return array_map(function ($value) { - return trim($value, " \t"); - }, $values); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MultipartStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MultipartStream.php deleted file mode 100644 index c0fd584..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ /dev/null @@ -1,153 +0,0 @@ -boundary = $boundary ?: sha1(uniqid('', true)); - $this->stream = $this->createStream($elements); - } - - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - public function isWritable() - { - return false; - } - - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getHeaders(array $headers) - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements) - { - $stream = new AppendStream(); - - foreach ($elements as $element) { - $this->addElement($stream, $element); - } - - // Add the trailing boundary with CRLF - $stream->addStream(stream_for("--{$this->boundary}--\r\n")); - - return $stream; - } - - private function addElement(AppendStream $stream, array $element) - { - foreach (['contents', 'name'] as $key) { - if (!array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - - $element['contents'] = stream_for($element['contents']); - - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if (substr($uri, 0, 6) !== 'php://') { - $element['filename'] = $uri; - } - } - - list($body, $headers) = $this->createElement( - $element['name'], - $element['contents'], - isset($element['filename']) ? $element['filename'] : null, - isset($element['headers']) ? $element['headers'] : [] - ); - - $stream->addStream(stream_for($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(stream_for("\r\n")); - } - - /** - * @return array - */ - private function createElement($name, StreamInterface $stream, $filename, array $headers) - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf('form-data; name="%s"; filename="%s"', - $name, - basename($filename)) - : "form-data; name=\"{$name}\""; - } - - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = mimetype_from_filename($filename)) { - $headers['Content-Type'] = $type; - } - } - - return [$stream, $headers]; - } - - private function getHeader(array $headers, $key) - { - $lowercaseHeader = strtolower($key); - foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { - return $v; - } - } - - return null; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/NoSeekStream.php deleted file mode 100644 index 2332218..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,22 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new BufferStream(); - } - - public function __toString() - { - try { - return copy_to_string($this); - } catch (\Exception $e) { - return ''; - } - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = false; - $this->source = null; - } - - public function getSize() - { - return $this->size; - } - - public function tell() - { - return $this->tellPos; - } - - public function eof() - { - return !$this->source; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - - public function isReadable() - { - return true; - } - - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - - private function pump($length) - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Request.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Request.php deleted file mode 100644 index 0828548..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Request.php +++ /dev/null @@ -1,142 +0,0 @@ -method = strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!$this->hasHeader('Host')) { - $this->updateHostFromUri(); - } - - if ($body !== '' && $body !== null) { - $this->stream = stream_for($body); - } - } - - public function getRequestTarget() - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - - $target = $this->uri->getPath(); - if ($target == '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget) - { - if (preg_match('#\s#', $requestTarget)) { - throw new InvalidArgumentException( - 'Invalid request target provided; cannot contain whitespace' - ); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - - public function getMethod() - { - return $this->method; - } - - public function withMethod($method) - { - $new = clone $this; - $new->method = strtoupper($method); - return $new; - } - - public function getUri() - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false) - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri() - { - $host = $this->uri->getHost(); - - if ($host == '') { - return; - } - - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Response.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Response.php deleted file mode 100644 index 2830c6c..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Response.php +++ /dev/null @@ -1,132 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-status', - 208 => 'Already Reported', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Switch Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Unordered Collection', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase = ''; - - /** @var int */ - private $statusCode = 200; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|null|resource|StreamInterface $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct( - $status = 200, - array $headers = [], - $body = null, - $version = '1.1', - $reason = null - ) { - $this->statusCode = (int) $status; - - if ($body !== '' && $body !== null) { - $this->stream = stream_for($body); - } - - $this->setHeaders($headers); - if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - - $this->protocol = $version; - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = '') - { - $new = clone $this; - $new->statusCode = (int) $code; - if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { - $reasonPhrase = self::$phrases[$new->statusCode]; - } - $new->reasonPhrase = $reasonPhrase; - return $new; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/ServerRequest.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/ServerRequest.php deleted file mode 100644 index 575aab8..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ /dev/null @@ -1,358 +0,0 @@ -serverParams = $serverParams; - - parent::__construct($method, $uri, $headers, $body, $version); - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * @throws InvalidArgumentException for unrecognized values - * @return array - */ - public static function normalizeFiles(array $files) - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * @return array|UploadedFileInterface - */ - private static function createUploadedFileFromSpec(array $value) - { - if (is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - - return new UploadedFile( - $value['tmp_name'], - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @param array $files - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []) - { - $normalizedFiles = []; - - foreach (array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], - ]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - * - * @return ServerRequestInterface - */ - public static function fromGlobals() - { - $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = function_exists('getallheaders') ? getallheaders() : []; - $uri = self::getUriFromGlobals(); - $body = new LazyOpenStream('php://input', 'r+'); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - - return $serverRequest - ->withCookieParams($_COOKIE) - ->withQueryParams($_GET) - ->withParsedBody($_POST) - ->withUploadedFiles(self::normalizeFiles($_FILES)); - } - - /** - * Get a Uri populated with values from $_SERVER. - * - * @return UriInterface - */ - public static function getUriFromGlobals() { - $uri = new Uri(''); - - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - - $hasPort = false; - if (isset($_SERVER['HTTP_HOST'])) { - $hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']); - $uri = $uri->withHost($hostHeaderParts[0]); - if (isset($hostHeaderParts[1])) { - $hasPort = true; - $uri = $uri->withPort($hostHeaderParts[1]); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - - $hasQuery = false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI']); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - - return $uri; - } - - - /** - * {@inheritdoc} - */ - public function getServerParams() - { - return $this->serverParams; - } - - /** - * {@inheritdoc} - */ - public function getUploadedFiles() - { - return $this->uploadedFiles; - } - - /** - * {@inheritdoc} - */ - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getCookieParams() - { - return $this->cookieParams; - } - - /** - * {@inheritdoc} - */ - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getQueryParams() - { - return $this->queryParams; - } - - /** - * {@inheritdoc} - */ - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getParsedBody() - { - return $this->parsedBody; - } - - /** - * {@inheritdoc} - */ - public function withParsedBody($data) - { - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function getAttribute($attribute, $default = null) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - /** - * {@inheritdoc} - */ - public function withAttribute($attribute, $value) - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withoutAttribute($attribute) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Stream.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Stream.php deleted file mode 100644 index e336628..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Stream.php +++ /dev/null @@ -1,257 +0,0 @@ - [ - 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, - 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, - 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a+' => true - ], - 'write' => [ - 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, - 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, - 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true - ] - ]; - - /** - * This constructor accepts an associative array of options. - * - * - size: (int) If a read stream would otherwise have an indeterminate - * size, but the size is known due to foreknowledge, then you can - * provide that size, in bytes. - * - metadata: (array) Any additional metadata to return when the metadata - * of the stream is accessed. - * - * @param resource $stream Stream resource to wrap. - * @param array $options Associative array of options. - * - * @throws \InvalidArgumentException if the stream is not a stream resource - */ - public function __construct($stream, $options = []) - { - if (!is_resource($stream)) { - throw new \InvalidArgumentException('Stream must be a resource'); - } - - if (isset($options['size'])) { - $this->size = $options['size']; - } - - $this->customMetadata = isset($options['metadata']) - ? $options['metadata'] - : []; - - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]); - $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]); - $this->uri = $this->getMetadata('uri'); - } - - public function __get($name) - { - if ($name == 'stream') { - throw new \RuntimeException('The stream is detached'); - } - - throw new \BadMethodCallException('No value for ' . $name); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - try { - $this->seek(0); - return (string) stream_get_contents($this->stream); - } catch (\Exception $e) { - return ''; - } - } - - public function getContents() - { - $contents = stream_get_contents($this->stream); - - if ($contents === false) { - throw new \RuntimeException('Unable to read stream contents'); - } - - return $contents; - } - - public function close() - { - if (isset($this->stream)) { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable() - { - return $this->readable; - } - - public function isWritable() - { - return $this->writable; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function eof() - { - return !$this->stream || feof($this->stream); - } - - public function tell() - { - $result = ftell($this->stream); - - if ($result === false) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } elseif (fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); - } - } - - public function read($length) - { - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - - if (0 === $length) { - return ''; - } - - $string = fread($this->stream, $length); - if (false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $string; - } - - public function write($string) - { - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - $result = fwrite($this->stream, $string); - - if ($result === false) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index daec6f5..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,149 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @param string $name Name of the property (allows "stream" only). - * - * @return StreamInterface - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - trigger_error('StreamDecorator::__toString exception: ' - . (string) $e, E_USER_ERROR); - return ''; - } - } - - public function getContents() - { - return copy_to_string($this); - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = call_user_func_array([$this->stream, $method], $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close() - { - $this->stream->close(); - } - - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function getSize() - { - return $this->stream->getSize(); - } - - public function eof() - { - return $this->stream->eof(); - } - - public function tell() - { - return $this->stream->tell(); - } - - public function isReadable() - { - return $this->stream->isReadable(); - } - - public function isWritable() - { - return $this->stream->isWritable(); - } - - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - - public function read($length) - { - return $this->stream->read($length); - } - - public function write($string) - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamWrapper.php deleted file mode 100644 index cf7b223..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,121 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, null, stream_context_create([ - 'guzzle' => ['stream' => $stream] - ])); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read($count) - { - return $this->stream->read($count); - } - - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - - public function stream_tell() - { - return $this->stream->tell(); - } - - public function stream_eof() - { - return $this->stream->eof(); - } - - public function stream_seek($offset, $whence) - { - $this->stream->seek($offset, $whence); - - return true; - } - - public function stream_stat() - { - static $modeMap = [ - 'r' => 33060, - 'r+' => 33206, - 'w' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UploadedFile.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UploadedFile.php deleted file mode 100644 index e62bd5c..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ /dev/null @@ -1,316 +0,0 @@ -setError($errorStatus); - $this->setSize($size); - $this->setClientFilename($clientFilename); - $this->setClientMediaType($clientMediaType); - - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - - /** - * Depending on the value set file or stream variable - * - * @param mixed $streamOrFile - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile) - { - if (is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (is_resource($streamOrFile)) { - $this->stream = new Stream($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new InvalidArgumentException( - 'Invalid stream or file provided for UploadedFile' - ); - } - } - - /** - * @param int $error - * @throws InvalidArgumentException - */ - private function setError($error) - { - if (false === is_int($error)) { - throw new InvalidArgumentException( - 'Upload file error status must be an integer' - ); - } - - if (false === in_array($error, UploadedFile::$errors)) { - throw new InvalidArgumentException( - 'Invalid error status for UploadedFile' - ); - } - - $this->error = $error; - } - - /** - * @param int $size - * @throws InvalidArgumentException - */ - private function setSize($size) - { - if (false === is_int($size)) { - throw new InvalidArgumentException( - 'Upload file size must be an integer' - ); - } - - $this->size = $size; - } - - /** - * @param mixed $param - * @return boolean - */ - private function isStringOrNull($param) - { - return in_array(gettype($param), ['string', 'NULL']); - } - - /** - * @param mixed $param - * @return boolean - */ - private function isStringNotEmpty($param) - { - return is_string($param) && false === empty($param); - } - - /** - * @param string|null $clientFilename - * @throws InvalidArgumentException - */ - private function setClientFilename($clientFilename) - { - if (false === $this->isStringOrNull($clientFilename)) { - throw new InvalidArgumentException( - 'Upload file client filename must be a string or null' - ); - } - - $this->clientFilename = $clientFilename; - } - - /** - * @param string|null $clientMediaType - * @throws InvalidArgumentException - */ - private function setClientMediaType($clientMediaType) - { - if (false === $this->isStringOrNull($clientMediaType)) { - throw new InvalidArgumentException( - 'Upload file client media type must be a string or null' - ); - } - - $this->clientMediaType = $clientMediaType; - } - - /** - * Return true if there is no upload error - * - * @return boolean - */ - private function isOk() - { - return $this->error === UPLOAD_ERR_OK; - } - - /** - * @return boolean - */ - public function isMoved() - { - return $this->moved; - } - - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive() - { - if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->isMoved()) { - throw new RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - /** - * {@inheritdoc} - * @throws RuntimeException if the upload was not successful. - */ - public function getStream() - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - return new LazyOpenStream($this->file, 'r+'); - } - - /** - * {@inheritdoc} - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * @param string $targetPath Path to which to move the uploaded file. - * @throws RuntimeException if the upload was not successful. - * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo($targetPath) - { - $this->validateActive(); - - if (false === $this->isStringNotEmpty($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a non-empty string' - ); - } - - if ($this->file) { - $this->moved = php_sapi_name() == 'cli' - ? rename($this->file, $targetPath) - : move_uploaded_file($this->file, $targetPath); - } else { - copy_to_stream( - $this->getStream(), - new LazyOpenStream($targetPath, 'w') - ); - - $this->moved = true; - } - - if (false === $this->moved) { - throw new RuntimeException( - sprintf('Uploaded file could not be moved to %s', $targetPath) - ); - } - } - - /** - * {@inheritdoc} - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize() - { - return $this->size; - } - - /** - * {@inheritdoc} - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError() - { - return $this->error; - } - - /** - * {@inheritdoc} - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename() - { - return $this->clientFilename; - } - - /** - * {@inheritdoc} - */ - public function getClientMediaType() - { - return $this->clientMediaType; - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Uri.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Uri.php deleted file mode 100644 index f46c1db..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/Uri.php +++ /dev/null @@ -1,702 +0,0 @@ - 80, - 'https' => 443, - 'ftp' => 21, - 'gopher' => 70, - 'nntp' => 119, - 'news' => 119, - 'telnet' => 23, - 'tn3270' => 23, - 'imap' => 143, - 'pop' => 110, - 'ldap' => 389, - ]; - - private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; - private static $charSubDelims = '!\$&\'\(\)\*\+,;='; - private static $replaceQuery = ['=' => '%3D', '&' => '%26']; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - /** - * @param string $uri URI to parse - */ - public function __construct($uri = '') - { - // weak type check to also accept null until we can add scalar type hints - if ($uri != '') { - $parts = parse_url($uri); - if ($parts === false) { - throw new \InvalidArgumentException("Unable to parse URI: $uri"); - } - $this->applyParts($parts); - } - } - - public function __toString() - { - return self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * - * @return string - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != ''|| $scheme === 'file') { - $uri .= '//' . $authority; - } - - $uri .= $path; - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Whether the URI has the default port of the current scheme. - * - * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - * - * @param UriInterface $uri - * - * @return bool - */ - public static function isDefaultPort(UriInterface $uri) - { - return $uri->getPort() === null - || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); - } - - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @param UriInterface $uri - * - * @return bool - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(UriInterface $uri) - { - return $uri->getScheme() !== ''; - } - - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && isset($uri->getPath()[0]) - && $uri->getPath()[0] === '/'; - } - - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @param UriInterface $uri - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) - { - if ($base !== null) { - $uri = UriResolver::resolve($base, $uri); - - return ($uri->getScheme() === $base->getScheme()) - && ($uri->getAuthority() === $base->getAuthority()) - && ($uri->getPath() === $base->getPath()) - && ($uri->getQuery() === $base->getQuery()); - } - - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - - /** - * Removes dot segments from a path and returns the new path. - * - * @param string $path - * - * @return string - * - * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. - * @see UriResolver::removeDotSegments - */ - public static function removeDotSegments($path) - { - return UriResolver::removeDotSegments($path); - } - - /** - * Converts the relative URI into a new URI that is resolved against the base URI. - * - * @param UriInterface $base Base URI - * @param string|UriInterface $rel Relative URI - * - * @return UriInterface - * - * @deprecated since version 1.4. Use UriResolver::resolve instead. - * @see UriResolver::resolve - */ - public static function resolve(UriInterface $base, $rel) - { - if (!($rel instanceof UriInterface)) { - $rel = new self($rel); - } - - return UriResolver::resolve($base, $rel); - } - - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - * - * @return UriInterface - */ - public static function withoutQueryValue(UriInterface $uri, $key) - { - $current = $uri->getQuery(); - if ($current === '') { - return $uri; - } - - $decodedKey = rawurldecode($key); - $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { - return rawurldecode(explode('=', $part)[0]) !== $decodedKey; - }); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - * - * @return UriInterface - */ - public static function withQueryValue(UriInterface $uri, $key, $value) - { - $current = $uri->getQuery(); - - if ($current === '') { - $result = []; - } else { - $decodedKey = rawurldecode($key); - $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { - return rawurldecode(explode('=', $part)[0]) !== $decodedKey; - }); - } - - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $key = strtr($key, self::$replaceQuery); - - if ($value !== null) { - $result[] = $key . '=' . strtr($value, self::$replaceQuery); - } else { - $result[] = $key; - } - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a URI from a hash of `parse_url` components. - * - * @param array $parts - * - * @return UriInterface - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws \InvalidArgumentException If the components do not form a valid URI. - */ - public static function fromParts(array $parts) - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - - return $uri; - } - - public function getScheme() - { - return $this->scheme; - } - - public function getAuthority() - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo() - { - return $this->userInfo; - } - - public function getHost() - { - return $this->host; - } - - public function getPort() - { - return $this->port; - } - - public function getPath() - { - return $this->path; - } - - public function getQuery() - { - return $this->query; - } - - public function getFragment() - { - return $this->fragment; - } - - public function withScheme($scheme) - { - $scheme = $this->filterScheme($scheme); - - if ($this->scheme === $scheme) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withUserInfo($user, $password = null) - { - $info = $user; - if ($password != '') { - $info .= ':' . $password; - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - $new->validateState(); - - return $new; - } - - public function withHost($host) - { - $host = $this->filterHost($host); - - if ($this->host === $host) { - return $this; - } - - $new = clone $this; - $new->host = $host; - $new->validateState(); - - return $new; - } - - public function withPort($port) - { - $port = $this->filterPort($port); - - if ($this->port === $port) { - return $this; - } - - $new = clone $this; - $new->port = $port; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withPath($path) - { - $path = $this->filterPath($path); - - if ($this->path === $path) { - return $this; - } - - $new = clone $this; - $new->path = $path; - $new->validateState(); - - return $new; - } - - public function withQuery($query) - { - $query = $this->filterQueryAndFragment($query); - - if ($this->query === $query) { - return $this; - } - - $new = clone $this; - $new->query = $query; - - return $new; - } - - public function withFragment($fragment) - { - $fragment = $this->filterQueryAndFragment($fragment); - - if ($this->fragment === $fragment) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - - return $new; - } - - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts) - { - $this->scheme = isset($parts['scheme']) - ? $this->filterScheme($parts['scheme']) - : ''; - $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; - $this->host = isset($parts['host']) - ? $this->filterHost($parts['host']) - : ''; - $this->port = isset($parts['port']) - ? $this->filterPort($parts['port']) - : null; - $this->path = isset($parts['path']) - ? $this->filterPath($parts['path']) - : ''; - $this->query = isset($parts['query']) - ? $this->filterQueryAndFragment($parts['query']) - : ''; - $this->fragment = isset($parts['fragment']) - ? $this->filterQueryAndFragment($parts['fragment']) - : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $parts['pass']; - } - - $this->removeDefaultPort(); - } - - /** - * @param string $scheme - * - * @return string - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme) - { - if (!is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - return strtolower($scheme); - } - - /** - * @param string $host - * - * @return string - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host) - { - if (!is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - return strtolower($host); - } - - /** - * @param int|null $port - * - * @return int|null - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port) - { - if ($port === null) { - return null; - } - - $port = (int) $port; - if (1 > $port || 0xffff < $port) { - throw new \InvalidArgumentException( - sprintf('Invalid port: %d. Must be between 1 and 65535', $port) - ); - } - - return $port; - } - - private function removeDefaultPort() - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - - /** - * Filters the path of a URI - * - * @param string $path - * - * @return string - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path) - { - if (!is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $path - ); - } - - /** - * Filters the query string or fragment of a URI. - * - * @param string $str - * - * @return string - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str) - { - if (!is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $str - ); - } - - private function rawurlencodeMatchZero(array $match) - { - return rawurlencode($match[0]); - } - - private function validateState() - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - - if ($this->getAuthority() === '') { - if (0 === strpos($this->path, '//')) { - throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - @trigger_error( - 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . - 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', - E_USER_DEPRECATED - ); - $this->path = '/'. $this->path; - //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); - } - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriNormalizer.php deleted file mode 100644 index 384c29e..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,216 +0,0 @@ -getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') - ) { - $uri = $uri->withPath('/'); - } - - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - - if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); - } - - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); - } - - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = explode('&', $uri->getQuery()); - sort($queryKeyValues); - $uri = $uri->withQuery(implode('&', $queryKeyValues)); - } - - return $uri; - } - - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @return bool - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - - private static function capitalizePercentEncoding(UriInterface $uri) - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - - $callback = function (array $match) { - return strtoupper($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private static function decodeUnreservedCharacters(UriInterface $uri) - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - - $callback = function (array $match) { - return rawurldecode($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriResolver.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriResolver.php deleted file mode 100644 index c1cb8a2..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/UriResolver.php +++ /dev/null @@ -1,219 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new Uri(Uri::composeComponents( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); - } - - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - * - * @param UriInterface $base Base URI - * @param UriInterface $target Target URI - * - * @return UriInterface The relative URI reference - */ - public static function relativize(UriInterface $base, UriInterface $target) - { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') - ) { - return $target; - } - - if (Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = explode('/', $target->getPath()); - $lastSegment = end($segments); - - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - - return $emptyPathUri; - } - - private static function getRelativePath(UriInterface $base, UriInterface $target) - { - $sourceSegments = explode('/', $base->getPath()); - $targetSegments = explode('/', $target->getPath()); - array_pop($sourceSegments); - $targetLastSegment = array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); - - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./$relativePath"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".$relativePath"; - } else { - $relativePath = "./$relativePath"; - } - } - - return $relativePath; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions.php deleted file mode 100644 index e40348d..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions.php +++ /dev/null @@ -1,828 +0,0 @@ -getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - - foreach ($message->getHeaders() as $name => $values) { - $msg .= "\r\n{$name}: " . implode(', ', $values); - } - - return "{$msg}\r\n\r\n" . $message->getBody(); -} - -/** - * Returns a UriInterface for the given value. - * - * This function accepts a string or {@see Psr\Http\Message\UriInterface} and - * returns a UriInterface for the given value. If the value is already a - * `UriInterface`, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * @throws \InvalidArgumentException - */ -function uri_for($uri) -{ - if ($uri instanceof UriInterface) { - return $uri; - } elseif (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); -} - -/** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data - * @param array $options Additional options - * - * @return Stream - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ -function stream_for($resource = '', array $options = []) -{ - if (is_scalar($resource)) { - $stream = fopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, $resource); - fseek($stream, 0); - } - return new Stream($stream, $options); - } - - switch (gettype($resource)) { - case 'resource': - return new Stream($resource, $options); - case 'object': - if ($resource instanceof StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (method_exists($resource, '__toString')) { - return stream_for((string) $resource, $options); - } - break; - case 'NULL': - return new Stream(fopen('php://temp', 'r+'), $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); -} - -/** - * Parse an array of header values containing ";" separated data into an - * array of associative arrays representing the header key value pair - * data of the header. When a parameter does not contain a value, but just - * contains a key, this function will inject a key with a '' string value. - * - * @param string|array $header Header to parse into components. - * - * @return array Returns the parsed header values. - */ -function parse_header($header) -{ - static $trimmed = "\"' \n\t\r"; - $params = $matches = []; - - foreach (normalize_header($header) as $val) { - $part = []; - foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { - if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - - return $params; -} - -/** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @return array Returns the normalized header field values. - */ -function normalize_header($header) -{ - if (!is_array($header)) { - return array_map('trim', explode(',', $header)); - } - - $result = []; - foreach ($header as $value) { - foreach ((array) $value as $v) { - if (strpos($v, ',') === false) { - $result[] = $v; - continue; - } - foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { - $result[] = trim($vv); - } - } - } - - return $result; -} - -/** - * Clone and modify a request with the given changes. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - * - * @return RequestInterface - */ -function modify_request(RequestInterface $request, array $changes) -{ - if (!$changes) { - return $request; - } - - $headers = $request->getHeaders(); - - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':'.$port; - } - } - } - $uri = $changes['uri']; - } - - if (!empty($changes['remove_headers'])) { - $headers = _caseless_remove($changes['remove_headers'], $headers); - } - - if (!empty($changes['set_headers'])) { - $headers = _caseless_remove(array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - - if ($request instanceof ServerRequestInterface) { - return new ServerRequest( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion(), - $request->getServerParams() - ); - } - - return new Request( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion() - ); -} - -/** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` returns a - * value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ -function rewind_body(MessageInterface $message) -{ - $body = $message->getBody(); - - if ($body->tell()) { - $body->rewind(); - } -} - -/** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * @throws \RuntimeException if the file cannot be opened - */ -function try_fopen($filename, $mode) -{ - $ex = null; - set_error_handler(function () use ($filename, $mode, &$ex) { - $ex = new \RuntimeException(sprintf( - 'Unable to open %s using mode %s: %s', - $filename, - $mode, - func_get_args()[1] - )); - }); - - $handle = fopen($filename, $mode); - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $handle; -} - -/** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * @return string - * @throws \RuntimeException on error. - */ -function copy_to_string(StreamInterface $stream, $maxLen = -1) -{ - $buffer = ''; - - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; -} - -/** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ -function copy_to_stream( - StreamInterface $source, - StreamInterface $dest, - $maxLen = -1 -) { - $bufferSize = 8192; - - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(min($bufferSize, $remaining)); - $len = strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } -} - -/** - * Calculate a hash of a Stream - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * @throws \RuntimeException on error. - */ -function hash( - StreamInterface $stream, - $algo, - $rawOutput = false -) { - $pos = $stream->tell(); - - if ($pos > 0) { - $stream->rewind(); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; -} - -/** - * Read a line from the stream up to the maximum allowed buffer length - * - * @param StreamInterface $stream Stream to read from - * @param int $maxLength Maximum buffer length - * - * @return string|bool - */ -function readline(StreamInterface $stream, $maxLength = null) -{ - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - // Using a loose equality here to match on '' and false. - if (null == ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - - return $buffer; -} - -/** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - * - * @return Request - */ -function parse_request($message) -{ - $data = _parse_message($message); - $matches = []; - if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; - - $request = new Request( - $parts[0], - $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], - $data['headers'], - $data['body'], - $version - ); - - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); -} - -/** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - * - * @return Response - */ -function parse_response($message) -{ - $data = _parse_message($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string'); - } - $parts = explode(' ', $data['start-line'], 3); - - return new Response( - $parts[1], - $data['headers'], - $data['body'], - explode('/', $parts[0])[1], - isset($parts[2]) ? $parts[2] : null - ); -} - -/** - * Parse a query string into an associative array. - * - * If multiple values are found for the same key, the value of that key - * value pair will become an array. This function does not parse nested - * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will - * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). - * - * @param string $str Query string to parse - * @param bool|string $urlEncoding How the query string is encoded - * - * @return array - */ -function parse_query($str, $urlEncoding = true) -{ - $result = []; - - if ($str === '') { - return $result; - } - - if ($urlEncoding === true) { - $decoder = function ($value) { - return rawurldecode(str_replace('+', ' ', $value)); - }; - } elseif ($urlEncoding == PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding == PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { return $str; }; - } - - foreach (explode('&', $str) as $kvp) { - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - return $result; -} - -/** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of parse_query() to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like http_build_query would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * @return string - */ -function build_query(array $params, $encoding = PHP_QUERY_RFC3986) -{ - if (!$params) { - return ''; - } - - if ($encoding === false) { - $encoder = function ($str) { return $str; }; - } elseif ($encoding === PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder($k); - if (!is_array($v)) { - $qs .= $k; - if ($v !== null) { - $qs .= '=' . $encoder($v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - if ($vv !== null) { - $qs .= '=' . $encoder($vv); - } - $qs .= '&'; - } - } - } - - return $qs ? (string) substr($qs, 0, -1) : ''; -} - -/** - * Determines the mimetype of a file by looking at its extension. - * - * @param $filename - * - * @return null|string - */ -function mimetype_from_filename($filename) -{ - return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION)); -} - -/** - * Maps a file extensions to a mimetype. - * - * @param $extension string The file extension. - * - * @return string|null - * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types - */ -function mimetype_from_extension($extension) -{ - static $mimetypes = [ - '7z' => 'application/x-7z-compressed', - 'aac' => 'audio/x-aac', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'asc' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'atom' => 'application/atom+xml', - 'avi' => 'video/x-msvideo', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bzip2', - 'cer' => 'application/pkix-cert', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'css' => 'text/css', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'deb' => 'application/x-debian-package', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dvi' => 'application/x-dvi', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'etx' => 'text/x-setext', - 'flac' => 'audio/flac', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/gzip', - 'htm' => 'text/html', - 'html' => 'text/html', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ini' => 'text/plain', - 'iso' => 'application/x-iso9660-image', - 'jar' => 'application/java-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'latex' => 'application/x-latex', - 'log' => 'text/plain', - 'm4a' => 'audio/mp4', - 'm4v' => 'video/mp4', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4v' => 'video/mp4', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'pbm' => 'image/x-portable-bitmap', - 'pdf' => 'application/pdf', - 'pgm' => 'image/x-portable-graymap', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'ppm' => 'image/x-portable-pixmap', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'qt' => 'video/quicktime', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'svg' => 'image/svg+xml', - 'swf' => 'application/x-shockwave-flash', - 'tar' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'torrent' => 'application/x-bittorrent', - 'ttf' => 'application/x-font-ttf', - 'txt' => 'text/plain', - 'wav' => 'audio/x-wav', - 'webm' => 'video/webm', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'video/x-ms-wmv', - 'woff' => 'application/x-font-woff', - 'wsdl' => 'application/wsdl+xml', - 'xbm' => 'image/x-xbitmap', - 'xls' => 'application/vnd.ms-excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'xpm' => 'image/x-xpixmap', - 'xwd' => 'image/x-xwindowdump', - 'yaml' => 'text/yaml', - 'yml' => 'text/yaml', - 'zip' => 'application/zip', - ]; - - $extension = strtolower($extension); - - return isset($mimetypes[$extension]) - ? $mimetypes[$extension] - : null; -} - -/** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - * @internal - */ -function _parse_message($message) -{ - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - - // Iterate over each line in the message, accounting for line endings - $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE); - $result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => '']; - array_shift($lines); - - for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) { - $line = $lines[$i]; - // If two line breaks were encountered, then this is the end of body - if (empty($line)) { - if ($i < $totalLines - 1) { - $result['body'] = implode('', array_slice($lines, $i + 2)); - } - break; - } - if (strpos($line, ':')) { - $parts = explode(':', $line, 2); - $key = trim($parts[0]); - $value = isset($parts[1]) ? trim($parts[1]) : ''; - $result['headers'][$key][] = $value; - } - } - - return $result; -} - -/** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - * @internal - */ -function _parse_request_uri($path, array $headers) -{ - $hostKey = array_filter(array_keys($headers), function ($k) { - return strtolower($k) === 'host'; - }); - - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - - $host = $headers[reset($hostKey)][0]; - $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - - return $scheme . '://' . $host . '/' . ltrim($path, '/'); -} - -/** @internal */ -function _caseless_remove($keys, array $data) -{ - $result = []; - - foreach ($keys as &$key) { - $key = strtolower($key); - } - - foreach ($data as $k => $v) { - if (!in_array(strtolower($k), $keys)) { - $result[$k] = $v; - } - } - - return $result; -} diff --git a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions_include.php b/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions_include.php deleted file mode 100644 index 96a4a83..0000000 --- a/sensitive-issue-searcher/vendor/guzzlehttp/psr7/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -setUsingCache(true); - -if (method_exists($config, 'setRiskyAllowed')) { - $config->setRiskyAllowed(true); -} - -return $config; diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/.styleci.yml b/sensitive-issue-searcher/vendor/knplabs/github-api/.styleci.yml deleted file mode 100644 index 731de4d..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/.styleci.yml +++ /dev/null @@ -1,4 +0,0 @@ -preset: psr2 - -enabled: - - return diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/CHANGELOG.md b/sensitive-issue-searcher/vendor/knplabs/github-api/CHANGELOG.md deleted file mode 100644 index c7ba646..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/CHANGELOG.md +++ /dev/null @@ -1,80 +0,0 @@ -# Change Log - -The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. - -## 2.1.0 - -### Added - -- Add support for retrieving a single notification info using his ID -- Add a function to get user organizations -- Added GraphQL support -- Add page variable to organization repo list (Organization::repositories()) -- Add support for pull request review. -- Add support for adding branch protection. - -### Fixed - -- Bug with double slashes when using enterprise URL. -- Bug when headers not being passed to request (#529) - -## 2.0.0 - -### Added - -- Support for JWT authentication -- API for Organization\Members -- API for Integrations -- API for Repo\Cards -- API for Repo\Columns -- API for Repo\Projects -- API for User\MyRepositories -- Methods in Repo API for frequency and participation - -### Changed - -- `ApiLimitExceedException::__construct` has a new second parameter for the remaining API calls. -- First parameter of `Github\Client` has changed type from `\Http\Client\HttpClient` to -`Github\HttpClient\Builder`. A factory class was also added. To upgrade you need to change: - -```php -// Old way does not work: -$github = new Github\Client($httpClient); - -// New way will work: -$github = new Github\Client(new Github\HttpClient\Builder($httpClient)); -$github = Github\Client::createWithHttpClient($httpClient); -``` -- Renamed the currentuser `DeployKeys` api class to `PublicKeys` to reflect to github api name. - -## 2.0.0-rc4 - -### Added - -- HTTPlug to decouple from Guzzle -- `Github\Client::getLastResponse` was added -- Support for PSR-6 cache -- `Github\Client::addPlugin` and `Github\Client::removePlugin` -- `Github\Client::getApiVersion` -- `Github\Client::removeCache` - -### Changed - -- Uses of `Github\HttpClient\HttpClientInterface` is replaced by `Http\Client\HttpClient` ie the constructor of `Github\Client`. -- We use PSR-7's representation of HTTP message instead of `Guzzle\Http\Message\Response` and `Guzzle\Http\Message\Request`. -- `Github\Client::addHeaders` was added instead of `Github\Client::setHeaders` -- Signature of `Github\Client::useCache` has changed. First argument must be a `CacheItemPoolInterface` -- We use PSR-4 instead of PSR-0 - -### Removed - -- Support for PHP 5.3 and 5.4 -- `Github/HttpClient/HttpClientInterface` was removed -- `Github/HttpClient/HttpClient` was removed -- All classes in `Github/HttpClient/HttpClient/Listener/*` were removed -- `Github/HttpClient/CachedHttpClient` was removed -- All classes in `Github/HttpClient/Cache/*` were removed - -## 1.7.1 - -No change log before this version diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/LICENSE b/sensitive-issue-searcher/vendor/knplabs/github-api/LICENSE deleted file mode 100644 index 0fd8dd8..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2012 KnpLabs -Copyright (c) 2010 Thibault Duplessis - -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. diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/README.md b/sensitive-issue-searcher/vendor/knplabs/github-api/README.md deleted file mode 100644 index 4ccdbdb..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# PHP GitHub API 2.0 - -In 2.0 lib no longer uses guzzle 3.7, instead it has an HTTPlug abstraction layer. - -For old version please check: - -* [branch](https://github.com/KnpLabs/php-github-api/tree/1.7) -* [readme](https://github.com/KnpLabs/php-github-api/tree/1.7/README.md) -* [docs](https://github.com/KnpLabs/php-github-api/tree/1.7/doc) - -[![Build Status](https://travis-ci.org/KnpLabs/php-github-api.svg?branch=master)](https://travis-ci.org/KnpLabs/php-github-api) -[![StyleCI](https://styleci.io/repos/3948501/shield?style=flat)](https://styleci.io/repos/3948501) - -A simple Object Oriented wrapper for GitHub API, written with PHP5. - -Uses [GitHub API v3](http://developer.github.com/v3/). The object API is very similar to the RESTful API. - -## Features - -* Follows PSR-4 conventions and coding standard: autoload friendly -* Light and fast thanks to lazy loading of API classes -* Extensively tested and documented - -## Requirements - -* PHP >= 5.5 -* [Guzzle](https://github.com/guzzle/guzzle) library, -* (optional) PHPUnit to run tests. - -## Autoload - -The new version of `php-github-api` using [Composer](http://getcomposer.org). -The first step to use `php-github-api` is to download composer: - -```bash -$ curl -s http://getcomposer.org/installer | php -``` - -Then run the following command to require the library: -```bash -$ php composer.phar require knplabs/github-api php-http/guzzle6-adapter -``` - -Why `php-http/guzzle6-adapter`? We are decoupled form any HTTP messaging client with help by [HTTPlug](http://httplug.io/). Read about clients in our [docs](doc/customize.md). - -## Using Laravel? - -[Laravel GitHub](https://github.com/GrahamCampbell/Laravel-GitHub) by [Graham Campbell](https://github.com/GrahamCampbell) might interest you. - -## Basic usage of `php-github-api` client - -```php -api('user')->repositories('ornicar'); -``` - -From `$client` object, you can access to all GitHub. - -## Cache usage - -This example uses the PSR6 cache pool [redis-adapter](https://github.com/php-cache/redis-adapter). See http://www.php-cache.com/ for alternatives. - -```php -connect('127.0.0.1', 6379); -// Create a PSR6 cache pool -$pool = new RedisCachePool($client); - -$client = new \Github\Client(); -$client->addCache($pool); - -// Do some request - -// Stop using cache -$client->removeCache(); -``` - -Using cache, the client will get cached responses if resources haven't changed since last time, -**without** reaching the `X-Rate-Limit` [imposed by github](http://developer.github.com/v3/#rate-limiting). - - -## Documentation - -See the [`doc` directory](doc/) for more detailed documentation. - -## License - -`php-github-api` is licensed under the MIT License - see the LICENSE file for details - -## Credits - -### Sponsored by - -[![KnpLabs Team](http://knplabs.com/front/images/knp-labs-logo.png)](http://knplabs.com) - -### Contributors - -- Thanks to [Thibault Duplessis aka. ornicar](http://github.com/ornicar) for his first version of this library. -- Thanks to [Joseph Bielawski aka. stloyd](http://github.com/stloyd) for his contributions and support. -- Thanks to [noloh](http://github.com/noloh) for his contribution on the Object API. -- Thanks to [bshaffer](http://github.com/bshaffer) for his contribution on the Repo API. -- Thanks to [Rolf van de Krol](http://github.com/rolfvandekrol) for his countless contributions. -- Thanks to [Nicolas Pastorino](http://github.com/jeanvoye) for his contribution on the Pull Request API. -- Thanks to [Edoardo Rivello](http://github.com/erivello) for his contribution on the Gists API. - -Thanks to GitHub for the high quality API and documentation. diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/composer.json b/sensitive-issue-searcher/vendor/knplabs/github-api/composer.json deleted file mode 100644 index b959547..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "knplabs/github-api", - "type": "library", - "description": "GitHub API v3 client", - "homepage": "https://github.com/KnpLabs/php-github-api", - "keywords": ["github", "gh", "api", "gist"], - "license": "MIT", - "authors": [ - { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" - }, - { - "name": "Thibault Duplessis", - "email": "thibault.duplessis@gmail.com", - "homepage": "http://ornicar.github.com" - } - ], - "require": { - "php": "^5.5 || ^7.0", - "psr/http-message": "^1.0", - "psr/cache": "^1.0", - "php-http/httplug": "^1.1", - "php-http/discovery": "^1.0", - "php-http/client-implementation": "^1.0", - "php-http/client-common": "^1.3", - "php-http/cache-plugin": "^1.2" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.5", - "php-http/guzzle6-adapter": "^1.0", - "guzzlehttp/psr7": "^1.2", - "sllh/php-cs-fixer-styleci-bridge": "^1.3" - }, - "autoload": { - "psr-4": { "Github\\": "lib/Github/" } - }, - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php deleted file mode 100644 index 6feff8e..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php +++ /dev/null @@ -1,215 +0,0 @@ - - */ -abstract class AbstractApi implements ApiInterface -{ - /** - * The client. - * - * @var Client - */ - protected $client; - - /** - * Number of items per page (GitHub pagination). - * - * @var null|int - */ - protected $perPage; - - /** - * @param Client $client - */ - public function __construct(Client $client) - { - $this->client = $client; - } - - public function configure() - { - } - - /** - * @return null|int - */ - public function getPerPage() - { - return $this->perPage; - } - - /** - * @param null|int $perPage - */ - public function setPerPage($perPage) - { - $this->perPage = (null === $perPage ? $perPage : (int) $perPage); - - return $this; - } - - /** - * Send a GET request with query parameters. - * - * @param string $path Request path. - * @param array $parameters GET parameters. - * @param array $requestHeaders Request Headers. - * - * @return array|string - */ - protected function get($path, array $parameters = array(), array $requestHeaders = array()) - { - if (null !== $this->perPage && !isset($parameters['per_page'])) { - $parameters['per_page'] = $this->perPage; - } - if (array_key_exists('ref', $parameters) && is_null($parameters['ref'])) { - unset($parameters['ref']); - } - - if (count($parameters) > 0) { - $path .= '?'.http_build_query($parameters); - } - - $response = $this->client->getHttpClient()->get($path, $requestHeaders); - - return ResponseMediator::getContent($response); - } - - /** - * Send a HEAD request with query parameters. - * - * @param string $path Request path. - * @param array $parameters HEAD parameters. - * @param array $requestHeaders Request headers. - * - * @return \Psr\Http\Message\ResponseInterface - */ - protected function head($path, array $parameters = array(), array $requestHeaders = array()) - { - if (array_key_exists('ref', $parameters) && is_null($parameters['ref'])) { - unset($parameters['ref']); - } - - $response = $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters), $requestHeaders); - - return $response; - } - - /** - * Send a POST request with JSON-encoded parameters. - * - * @param string $path Request path. - * @param array $parameters POST parameters to be JSON encoded. - * @param array $requestHeaders Request headers. - * - * @return array|string - */ - protected function post($path, array $parameters = array(), array $requestHeaders = array()) - { - return $this->postRaw( - $path, - $this->createJsonBody($parameters), - $requestHeaders - ); - } - - /** - * Send a POST request with raw data. - * - * @param string $path Request path. - * @param string $body Request body. - * @param array $requestHeaders Request headers. - * - * @return array|string - */ - protected function postRaw($path, $body, array $requestHeaders = array()) - { - $response = $this->client->getHttpClient()->post( - $path, - $requestHeaders, - $body - ); - - return ResponseMediator::getContent($response); - } - - /** - * Send a PATCH request with JSON-encoded parameters. - * - * @param string $path Request path. - * @param array $parameters POST parameters to be JSON encoded. - * @param array $requestHeaders Request headers. - * - * @return array|string - */ - protected function patch($path, array $parameters = array(), array $requestHeaders = array()) - { - $response = $this->client->getHttpClient()->patch( - $path, - $requestHeaders, - $this->createJsonBody($parameters) - ); - - return ResponseMediator::getContent($response); - } - - /** - * Send a PUT request with JSON-encoded parameters. - * - * @param string $path Request path. - * @param array $parameters POST parameters to be JSON encoded. - * @param array $requestHeaders Request headers. - * - * @return array|string - */ - protected function put($path, array $parameters = array(), array $requestHeaders = array()) - { - $response = $this->client->getHttpClient()->put( - $path, - $requestHeaders, - $this->createJsonBody($parameters) - ); - - return ResponseMediator::getContent($response); - } - - /** - * Send a DELETE request with JSON-encoded parameters. - * - * @param string $path Request path. - * @param array $parameters POST parameters to be JSON encoded. - * @param array $requestHeaders Request headers. - * - * @return array|string - */ - protected function delete($path, array $parameters = array(), array $requestHeaders = array()) - { - $response = $this->client->getHttpClient()->delete( - $path, - $requestHeaders, - $this->createJsonBody($parameters) - ); - - return ResponseMediator::getContent($response); - } - - /** - * Create a JSON encoded version of an array of parameters. - * - * @param array $parameters Request parameters - * - * @return null|string - */ - protected function createJsonBody(array $parameters) - { - return (count($parameters) === 0) ? null : json_encode($parameters, empty($parameters) ? JSON_FORCE_OBJECT : 0); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php deleted file mode 100644 index 387a6e6..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ -trait AcceptHeaderTrait -{ - protected $acceptHeaderValue = null; - - protected function get($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::get($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - protected function head($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::head($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - protected function post($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::post($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - protected function postRaw($path, $body, array $requestHeaders = array()) - { - return parent::postRaw($path, $body, $this->mergeHeaders($requestHeaders)); - } - - protected function patch($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::patch($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - protected function put($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::put($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - protected function delete($path, array $parameters = array(), array $requestHeaders = array()) - { - return parent::delete($path, $parameters, $this->mergeHeaders($requestHeaders)); - } - - /** - * Append a new accept header on all requests - * @return array - */ - private function mergeHeaders(array $headers = array()) - { - $default = array(); - if ($this->acceptHeaderValue) { - $default = array('Accept' => $this->acceptHeaderValue); - } - - return array_merge($default, $headers); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/ApiInterface.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/ApiInterface.php deleted file mode 100644 index 49d5167..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/ApiInterface.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -interface ApiInterface -{ - public function getPerPage(); - - public function setPerPage($perPage); -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php deleted file mode 100644 index 5e6853f..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php +++ /dev/null @@ -1,121 +0,0 @@ - - */ -class Authorizations extends AbstractApi -{ - /** - * List all authorizations. - * - * @return array - */ - public function all() - { - return $this->get('/authorizations'); - } - - /** - * Show a single authorization. - * - * @param $clientId - * - * @return array - */ - public function show($clientId) - { - return $this->get('/authorizations/'.rawurlencode($clientId)); - } - - /** - * Create an authorization. - * - * @param array $params - * @param null $OTPCode - * - * @return array - */ - public function create(array $params, $OTPCode = null) - { - $headers = null === $OTPCode ? array() : array('X-GitHub-OTP' => $OTPCode); - - return $this->post('/authorizations', $params, $headers); - } - - /** - * Update an authorization. - * - * @param $clientId - * @param array $params - * - * @return array - */ - public function update($clientId, array $params) - { - return $this->patch('/authorizations/'.rawurlencode($clientId), $params); - } - - /** - * Remove an authorization. - * - * @param $clientId - * - * @return array - */ - public function remove($clientId) - { - return $this->delete('/authorizations/'.rawurlencode($clientId)); - } - - /** - * Check an authorization. - * - * @param $clientId - * @param $token - * - * @return array - */ - public function check($clientId, $token) - { - return $this->get('/applications/'.rawurlencode($clientId).'/tokens/'.rawurlencode($token)); - } - - /** - * Reset an authorization. - * - * @param $clientId - * @param $token - * - * @return array - */ - public function reset($clientId, $token) - { - return $this->post('/applications/'.rawurlencode($clientId).'/tokens/'.rawurlencode($token)); - } - - /** - * Remove an authorization. - * - * @param $clientId - * @param $token - */ - public function revoke($clientId, $token) - { - $this->delete('/applications/'.rawurlencode($clientId).'/tokens/'.rawurlencode($token)); - } - - /** - * Revoke all authorizations. - * - * @param $clientId - */ - public function revokeAll($clientId) - { - $this->delete('/applications/'.rawurlencode($clientId).'/tokens'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser.php deleted file mode 100644 index dc2a877..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @author Felipe Valtl de Mello - */ -class CurrentUser extends AbstractApi -{ - public function show() - { - return $this->get('/user'); - } - - public function update(array $params) - { - return $this->patch('/user', $params); - } - - /** - * @return Emails - */ - public function emails() - { - return new Emails($this->client); - } - - /** - * @return Followers - */ - public function follow() - { - return new Followers($this->client); - } - - public function followers($page = 1) - { - return $this->get('/user/followers', array( - 'page' => $page - )); - } - - /** - * @link http://developer.github.com/v3/issues/#list-issues - * - * @param array $params - * @param bool $includeOrgIssues - * - * @return array - */ - public function issues(array $params = array(), $includeOrgIssues = true) - { - return $this->get($includeOrgIssues ? '/issues' : '/user/issues', array_merge(array('page' => 1), $params)); - } - - /** - * @return PublicKeys - */ - public function keys() - { - return new PublicKeys($this->client); - } - - /** - * @return Notifications - */ - public function notifications() - { - return new Notifications($this->client); - } - - /** - * @return Memberships - */ - public function memberships() - { - return new Memberships($this->client); - } - - /** - * @link http://developer.github.com/v3/orgs/#list-user-organizations - * - * @return array - */ - public function organizations() - { - return $this->get('/user/orgs'); - } - - /** - * @link https://developer.github.com/v3/orgs/teams/#list-user-teams - * - * @return array - */ - public function teams() - { - return $this->get('/user/teams'); - } - - /** - * @link http://developer.github.com/v3/repos/#list-your-repositories - * - * @param string $type role in the repository - * @param string $sort sort by - * @param string $direction direction of sort, ask or desc - * - * @return array - */ - public function repositories($type = 'owner', $sort = 'full_name', $direction = 'asc') - { - return $this->get('/user/repos', array( - 'type' => $type, - 'sort' => $sort, - 'direction' => $direction - )); - } - - /** - * @return Watchers - */ - public function watchers() - { - return new Watchers($this->client); - } - - /** - * @deprecated Use watchers() instead - */ - public function watched($page = 1) - { - return $this->get('/user/watched', array( - 'page' => $page - )); - } - - /** - * @return Starring - */ - public function starring() - { - return new Starring($this->client); - } - - /** - * @deprecated Use starring() instead - */ - public function starred($page = 1) - { - return $this->get('/user/starred', array( - 'page' => $page - )); - } - - /** - * @link https://developer.github.com/v3/activity/watching/#list-repositories-being-watched - */ - public function subscriptions() - { - return $this->get('/user/subscriptions'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php deleted file mode 100644 index 8155301..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class Emails extends AbstractApi -{ - /** - * List emails for the authenticated user. - * - * @link http://developer.github.com/v3/users/emails/ - * - * @return array - */ - public function all() - { - return $this->get('/user/emails'); - } - - /** - * Adds one or more email for the authenticated user. - * - * @link http://developer.github.com/v3/users/emails/ - * - * @param string|array $emails - * - * @throws \Github\Exception\InvalidArgumentException - * - * @return array - */ - public function add($emails) - { - if (is_string($emails)) { - $emails = array($emails); - } elseif (0 === count($emails)) { - throw new InvalidArgumentException(); - } - - return $this->post('/user/emails', $emails); - } - - /** - * Removes one or more email for the authenticated user. - * - * @link http://developer.github.com/v3/users/emails/ - * - * @param string|array $emails - * - * @throws \Github\Exception\InvalidArgumentException - * - * @return array - */ - public function remove($emails) - { - if (is_string($emails)) { - $emails = array($emails); - } elseif (0 === count($emails)) { - throw new InvalidArgumentException(); - } - - return $this->delete('/user/emails', $emails); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Followers.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Followers.php deleted file mode 100644 index 19a8e2d..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Followers.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -class Followers extends AbstractApi -{ - /** - * List followed users by the authenticated user. - * - * @link http://developer.github.com/v3/repos/followers/ - * - * @param int $page - * - * @return array - */ - public function all($page = 1) - { - return $this->get('/user/following', array( - 'page' => $page - )); - } - - /** - * Check that the authenticated user follows a user. - * - * @link http://developer.github.com/v3/repos/followers/ - * - * @param string $username the username to follow - * - * @return array - */ - public function check($username) - { - return $this->get('/user/following/'.rawurlencode($username)); - } - - /** - * Make the authenticated user follow a user. - * - * @link http://developer.github.com/v3/repos/followers/ - * - * @param string $username the username to follow - * - * @return array - */ - public function follow($username) - { - return $this->put('/user/following/'.rawurlencode($username)); - } - - /** - * Make the authenticated user un-follow a user. - * - * @link http://developer.github.com/v3/repos/followers/ - * - * @param string $username the username to un-follow - * - * @return array - */ - public function unfollow($username) - { - return $this->delete('/user/following/'.rawurlencode($username)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Memberships.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Memberships.php deleted file mode 100644 index df87596..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Memberships.php +++ /dev/null @@ -1,48 +0,0 @@ -get('/user/memberships/orgs'); - } - - /** - * Get your organization membership. - * - * @link https://developer.github.com/v3/orgs/members/#get-your-organization-membership - * - * @param string $organization - * - * @return array - */ - public function organization($organization) - { - return $this->get('/user/memberships/orgs/'.rawurlencode($organization)); - } - - /** - * Edit your organization membership - * - * @link https://developer.github.com/v3/orgs/members/#edit-your-organization-membership - * - * @param string $organization - * - * @return array - */ - public function edit($organization) - { - return $this->patch('/user/memberships/orgs/'.rawurlencode($organization), array('state' => 'active')); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Notifications.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Notifications.php deleted file mode 100644 index ccc2af2..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Notifications.php +++ /dev/null @@ -1,144 +0,0 @@ - - */ -class Notifications extends AbstractApi -{ - /** - * List all notifications for the authenticated user. - * - * @link http://developer.github.com/v3/activity/notifications/#list-your-notifications - * - * @param array $params - * - * @return array - */ - public function all(array $params = array()) - { - return $this->get('/notifications', $params); - } - - /** - * List all notifications for the authenticated user in selected repository. - * - * @link http://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param array $params - * - * @return array - */ - public function allInRepository($username, $repository, array $params = array()) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/notifications', $params); - } - - /** - * Mark all notifications as read. - * - * @link http://developer.github.com/v3/activity/notifications/#mark-as-read - * - * @param array $params - * - * @return array - */ - public function markAsReadAll(array $params = array()) - { - return $this->put('/notifications', $params); - } - - /** - * Mark all notifications for a repository as read. - * - * @link http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param array $params - * - * @return array - */ - public function markAsReadInRepository($username, $repository, array $params = array()) - { - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/notifications', $params); - } - - /** - * Mark a notification as read. - * - * @link http://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read - * - * @param string $id the notification number - * @param array $params - * - * @return array - */ - public function markAsRead($id, array $params) - { - return $this->patch('/notifications/threads/'.rawurlencode($id), $params); - } - - /** - * Show a notification. - * - * @link http://developer.github.com/v3/activity/notifications/#view-a-single-thread - * - * @param string $id the notification number - * - * @return array - */ - public function show($id) - { - return $this->get('/notifications/threads/'.rawurlencode($id)); - } - - /** - * Show a subscription. - * - * @link http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription - * - * @param string $id the notification number - * - * @return array - */ - public function showSubscription($id) - { - return $this->get('/notifications/threads/'.rawurlencode($id).'/subscription'); - } - - /** - * Create a subscription. - * - * @link http://developer.github.com/v3/activity/notifications/#set-a-thread-subscription - * - * @param string $id the notification number - * @param array $params - * - * @return array - */ - public function createSubscription($id, array $params) - { - return $this->put('/notifications/threads/'.rawurlencode($id).'/subscription', $params); - } - - /** - * Delete a subscription. - * - * @link http://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription - * - * @param string $id the notification number - * - * @return array - */ - public function removeSubscription($id) - { - return $this->delete('/notifications/threads/'.rawurlencode($id).'/subscription'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/PublicKeys.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/PublicKeys.php deleted file mode 100644 index 418e78b..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/PublicKeys.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class PublicKeys extends AbstractApi -{ - /** - * List deploy keys for the authenticated user. - * - * @link https://developer.github.com/v3/users/keys/ - * - * @return array - */ - public function all() - { - return $this->get('/user/keys'); - } - - /** - * Shows deploy key for the authenticated user. - * - * @link https://developer.github.com/v3/users/keys/ - * - * @param string $id - * - * @return array - */ - public function show($id) - { - return $this->get('/user/keys/'.rawurlencode($id)); - } - - /** - * Adds deploy key for the authenticated user. - * - * @link https://developer.github.com/v3/users/keys/ - * - * @param array $params - * - * @throws \Github\Exception\MissingArgumentException - * - * @return array - */ - public function create(array $params) - { - if (!isset($params['title'], $params['key'])) { - throw new MissingArgumentException(array('title', 'key')); - } - - return $this->post('/user/keys', $params); - } - - /** - * Removes deploy key for the authenticated user. - * - * @link https://developer.github.com/v3/users/keys/ - * - * @param string $id - * - * @return array - */ - public function remove($id) - { - return $this->delete('/user/keys/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php deleted file mode 100644 index 39de729..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -class Starring extends AbstractApi -{ - /** - * List repositories starred by the authenticated user. - * - * @link https://developer.github.com/v3/activity/starring/ - * - * @param int $page - * @param int $perPage - * - * @return array - */ - public function all($page = 1, $perPage = 30) - { - return $this->get('/user/starred', array( - 'page' => $page, - 'per_page' => $perPage, - )); - } - - /** - * Check that the authenticated user starres a repository. - * - * @link https://developer.github.com/v3/activity/starring/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function check($username, $repository) - { - return $this->get('/user/starred/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Make the authenticated user star a repository. - * - * @link https://developer.github.com/v3/activity/starring/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function star($username, $repository) - { - return $this->put('/user/starred/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Make the authenticated user unstar a repository. - * - * @link https://developer.github.com/v3/activity/starring - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function unstar($username, $repository) - { - return $this->delete('/user/starred/'.rawurlencode($username).'/'.rawurlencode($repository)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Watchers.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Watchers.php deleted file mode 100644 index a5a6d9b..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Watchers.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @revised Felipe Valtl de Mello - */ -class Watchers extends AbstractApi -{ - /** - * List repositories watched by the authenticated user. - * - * @link https://developer.github.com/v3/activity/watching/ - * - * @param int $page - * - * @return array - */ - public function all($page = 1) - { - return $this->get('/user/subscriptions', array( - 'page' => $page - )); - } - - /** - * Check that the authenticated user watches a repository. - * - * @link https://developer.github.com/v3/activity/watching/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function check($username, $repository) - { - return $this->get('/user/subscriptions/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Make the authenticated user watch a repository. - * - * @link https://developer.github.com/v3/activity/watching/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function watch($username, $repository) - { - return $this->put('/user/subscriptions/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Make the authenticated user unwatch a repository. - * - * @link https://developer.github.com/v3/activity/watching/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function unwatch($username, $repository) - { - return $this->delete('/user/subscriptions/'.rawurlencode($username).'/'.rawurlencode($repository)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Deployment.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Deployment.php deleted file mode 100644 index 265be43..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Deployment.php +++ /dev/null @@ -1,100 +0,0 @@ -get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments', $params); - } - - /** - * Get a deployment in selected repository. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the deployment - * - * @return array - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id)); - } - - /** - * Create a new deployment for the given username and repo. - * @link https://developer.github.com/v3/repos/deployments/#create-a-deployment - * - * Important: Once a deployment is created, it cannot be updated. Changes are indicated by creating new statuses. - * @see updateStatus - * - * @param string $username the username - * @param string $repository the repository - * @param array $params the new deployment data - * @return array information about the deployment - * - * @throws MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['ref'])) { - throw new MissingArgumentException(array('ref')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments', $params); - } - - /** - * Updates a deployment by creating a new status update. - * @link https://developer.github.com/v3/repos/deployments/#create-a-deployment-status - * - * @param string $username the username - * @param string $repository the repository - * @param string $id the deployment number - * @param array $params The information about the deployment update. - * Must include a "state" field of pending, success, error, or failure. - * May also be given a target_url and description, ßee link for more details. - * @return array information about the deployment - * - * @throws MissingArgumentException - */ - public function updateStatus($username, $repository, $id, array $params) - { - if (!isset($params['state'])) { - throw new MissingArgumentException(array('state')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id).'/statuses', $params); - } - - /** - * Gets all of the status updates tied to a given deployment. - * - * @param string $username the username - * @param string $repository the repository - * @param int $id the deployment identifier - * @return array the deployment statuses - */ - public function getStatuses($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id).'/statuses'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise.php deleted file mode 100644 index c23171a..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @author Guillermo A. Fisher - */ -class Enterprise extends AbstractApi -{ - /** - * @return Stats - */ - public function stats() - { - return new Stats($this->client); - } - - /** - * @return License - */ - public function license() - { - return new License($this->client); - } - - /** - * @return ManagementConsole - */ - public function console() - { - return new ManagementConsole($this->client); - } - - /** - * @return UserAdmin - */ - public function userAdmin() - { - return new UserAdmin($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/License.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/License.php deleted file mode 100644 index 67e1c2a..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/License.php +++ /dev/null @@ -1,20 +0,0 @@ -get('/enterprise/settings/license'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/ManagementConsole.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/ManagementConsole.php deleted file mode 100644 index bc25e53..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/ManagementConsole.php +++ /dev/null @@ -1,77 +0,0 @@ -getWithLicenseHash('/setup/api/configcheck', $hash); - } - - /** - * Retrieves your installation’s settings. - * - * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-settings - * - * @param string $hash md5 hash of your license - * - * @return array array of settings - */ - public function settings($hash) - { - return $this->getWithLicenseHash('/setup/api/settings', $hash); - } - - /** - * Checks your installation’s maintenance status. - * - * @link https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status - * - * @param string $hash md5 hash of your license - * - * @return array array of maintenance status information - */ - public function maintenance($hash) - { - return $this->getWithLicenseHash('/setup/api/maintenance', $hash); - } - - /** - * Retrieves your installation’s authorized SSH keys. - * - * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-authorized-ssh-keys - * - * @param string $hash md5 hash of your license - * - * @return array array of authorized keys - */ - public function keys($hash) - { - return $this->getWithLicenseHash('/setup/api/settings/authorized-keys', $hash); - } - - /** - * Sends an authenticated GET request. - * - * @param string $uri the request URI - * @param string $hash md5 hash of your license - * - * @return array|string - */ - protected function getWithLicenseHash($uri, $hash) - { - return $this->get($uri, array('license_md5' => rawurlencode($hash))); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/Stats.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/Stats.php deleted file mode 100644 index 7d3b195..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/Stats.php +++ /dev/null @@ -1,128 +0,0 @@ -show('issues'); - } - - /** - * Returns the number of active and inactive hooks. - * - * @return array array with totals of active and inactive hooks - */ - public function hooks() - { - return $this->show('hooks'); - } - - /** - * Returns the number of open and closed milestones. - * - * @return array array with totals of open and closed milestones - */ - public function milestones() - { - return $this->show('milestones'); - } - - /** - * Returns the number of organizations, teams, team members, and disabled organizations. - * - * @return array array with totals of organizations, teams, team members, and disabled organizations - */ - public function orgs() - { - return $this->show('orgs'); - } - - /** - * Returns the number of comments on issues, pull requests, commits, and gists. - * - * @return array array with totals of comments on issues, pull requests, commits, and gists - */ - public function comments() - { - return $this->show('comments'); - } - - /** - * Returns the number of GitHub Pages sites. - * - * @return array array with totals of GitHub Pages sites - */ - public function pages() - { - return $this->show('pages'); - } - - /** - * Returns the number of suspended and admin users. - * - * @return array array with totals of suspended and admin users - */ - public function users() - { - return $this->show('users'); - } - - /** - * Returns the number of private and public gists. - * - * @return array array with totals of private and public gists - */ - public function gists() - { - return $this->show('gists'); - } - - /** - * Returns the number of merged, mergeable, and unmergeable pull requests. - * - * @return array array with totals of merged, mergeable, and unmergeable pull requests - */ - public function pulls() - { - return $this->show('pulls'); - } - - /** - * Returns the number of organization-owned repositories, root repositories, forks, pushed commits, and wikis. - * - * @return array array with totals of organization-owned repositories, root repositories, forks, pushed commits, and wikis - */ - public function repos() - { - return $this->show('repos'); - } - - /** - * Returns all of the statistics. - * - * @return array array with all of the statistics - */ - public function all() - { - return $this->show('all'); - } - - /** - * @param string $type The type of statistics to show - * - * @return array - */ - public function show($type) - { - return $this->get('/enterprise/stats/' . rawurlencode($type)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/UserAdmin.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/UserAdmin.php deleted file mode 100644 index 8f6ad10..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Enterprise/UserAdmin.php +++ /dev/null @@ -1,36 +0,0 @@ -put('/users/'.rawurldecode($username).'/suspended', array('Content-Length' => 0)); - } - - /** - * Unsuspend a user. - * - * @link https://developer.github.com/v3/users/administration/#unsuspend-a-user - * - * @param string $username - * - * @return array - */ - public function unsuspend($username) - { - return $this->delete('/users/'.rawurldecode($username).'/suspended'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gist/Comments.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gist/Comments.php deleted file mode 100644 index 521e4d0..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gist/Comments.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -class Comments extends AbstractApi -{ - /** - * Get all comments for a gist. - * - * @param string $gist - * - * @return array - */ - public function all($gist) - { - return $this->get('/gists/'.rawurlencode($gist).'/comments'); - } - - /** - * Get a comment of a gist. - * - * @param string $gist - * @param int $comment - * - * @return array - */ - public function show($gist, $comment) - { - return $this->get('/gists/'.rawurlencode($gist).'/comments/'.rawurlencode($comment)); - } - - /** - * Create a comment for gist. - * - * @param string $gist - * @param string $body - * - * @return array - */ - public function create($gist, $body) - { - return $this->post('/gists/'.rawurlencode($gist).'/comments', array('body' => $body)); - } - - /** - * Create a comment for a gist. - * - * @param string $gist - * @param int $comment_id - * @param string $body - * - * @return array - */ - public function update($gist, $comment_id, $body) - { - return $this->patch('/gists/'.rawurlencode($gist).'/comments/'.rawurlencode($comment_id), array('body' => $body)); - } - - /** - * Delete a comment for a gist. - * - * @param string $gist - * @param int $comment - * - * @return array - */ - public function remove($gist, $comment) - { - return $this->delete('/gists/'.rawurlencode($gist).'/comments/'.rawurlencode($comment)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gists.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gists.php deleted file mode 100644 index 9710e6d..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Gists.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @author Edoardo Rivello - */ -class Gists extends AbstractApi -{ - public function all($type = null) - { - if (!in_array($type, array('public', 'starred'))) { - return $this->get('/gists'); - } - - return $this->get('/gists/'.rawurlencode($type)); - } - - public function show($number) - { - return $this->get('/gists/'.rawurlencode($number)); - } - - public function create(array $params) - { - if (!isset($params['files']) || (!is_array($params['files']) || 0 === count($params['files']))) { - throw new MissingArgumentException('files'); - } - - $params['public'] = (bool) $params['public']; - - return $this->post('/gists', $params); - } - - public function update($id, array $params) - { - return $this->patch('/gists/'.rawurlencode($id), $params); - } - - public function commits($id) - { - return $this->get('/gists/'.rawurlencode($id).'/commits'); - } - - public function fork($id) - { - return $this->post('/gists/'.rawurlencode($id).'/fork'); - } - - public function forks($id) - { - return $this->get('/gists/'.rawurlencode($id).'/forks'); - } - - public function remove($id) - { - return $this->delete('/gists/'.rawurlencode($id)); - } - - public function check($id) - { - return $this->get('/gists/'.rawurlencode($id).'/star'); - } - - public function star($id) - { - return $this->put('/gists/'.rawurlencode($id).'/star'); - } - - public function unstar($id) - { - return $this->delete('/gists/'.rawurlencode($id).'/star'); - } - - /** - * Get a gist's comments. - * - * @link http://developer.github.com/v3/gists/comments/ - * - * @return Comments - */ - public function comments() - { - return new Comments($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData.php deleted file mode 100644 index 21395a8..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -class GitData extends AbstractApi -{ - /** - * @return Blobs - */ - public function blobs() - { - return new Blobs($this->client); - } - - /** - * @return Commits - */ - public function commits() - { - return new Commits($this->client); - } - - /** - * @return References - */ - public function references() - { - return new References($this->client); - } - - /** - * @return Tags - */ - public function tags() - { - return new Tags($this->client); - } - - /** - * @return Trees - */ - public function trees() - { - return new Trees($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Blobs.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Blobs.php deleted file mode 100644 index b8abb41..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Blobs.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @author Tobias Nyholm - */ -class Blobs extends AbstractApi -{ - use AcceptHeaderTrait; - - /** - * Configure the Accept header depending on the blob type. - * - * @param string|null $bodyType - */ - public function configure($bodyType = null) - { - if ('raw' === $bodyType) { - $this->acceptHeaderValue = sprintf('application/vnd.github.%s.raw', $this->client->getApiVersion()); - } - } - - /** - * Show a blob of a sha for a repository. - * - * @param string $username - * @param string $repository - * @param string $sha - * - * @return array - */ - public function show($username, $repository, $sha) - { - $response = $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha)); - - return $response; - } - - /** - * Create a blob of a sha for a repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['content'], $params['encoding'])) { - throw new MissingArgumentException(array('content', 'encoding')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Commits.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Commits.php deleted file mode 100644 index e8d1bfe..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Commits.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class Commits extends AbstractApi -{ - /** - * Show a commit for a repository. - * - * @param string $username - * @param string $repository - * @param string $sha - * - * @return array - */ - public function show($username, $repository, $sha) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/commits/'.rawurlencode($sha)); - } - - /** - * Create a commit for a repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['message'], $params['tree'], $params['parents'])) { - throw new MissingArgumentException(array('message', 'tree', 'parents')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/commits', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/References.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/References.php deleted file mode 100644 index 906a6ff..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/References.php +++ /dev/null @@ -1,139 +0,0 @@ - - */ -class References extends AbstractApi -{ - /** - * Get all references of a repository. - * - * @param string $username - * @param string $repository - * - * @return array - */ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs'); - } - - /** - * Get all branches of a repository. - * - * @param string $username - * @param string $repository - * - * @return array - */ - public function branches($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/heads'); - } - - /** - * Get all tags of a repository. - * - * @param string $username - * @param string $repository - * - * @return array - */ - public function tags($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/tags'); - } - - /** - * Show the reference of a repository. - * - * @param string $username - * @param string $repository - * @param string $reference - * - * @return array - */ - public function show($username, $repository, $reference) - { - $reference = $this->encodeReference($reference); - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); - } - - /** - * Create a reference for a repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['ref'], $params['sha'])) { - throw new MissingArgumentException(array('ref', 'sha')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs', $params); - } - - /** - * Update a reference for a repository. - * - * @param string $username - * @param string $repository - * @param string $reference - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function update($username, $repository, $reference, array $params) - { - if (!isset($params['sha'])) { - throw new MissingArgumentException('sha'); - } - - $reference = $this->encodeReference($reference); - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference, $params); - } - - /** - * Delete a reference of a repository. - * - * @param string $username - * @param string $repository - * @param string $reference - * - * @return array - */ - public function remove($username, $repository, $reference) - { - $reference = $this->encodeReference($reference); - - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); - } - - /** - * Encode the raw reference. - * - * @param string $rawReference - * - * @return string - */ - private function encodeReference($rawReference) - { - return implode('/', array_map('rawurlencode', explode('/', $rawReference))); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Tags.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Tags.php deleted file mode 100644 index d1caefe..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Tags.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -class Tags extends AbstractApi -{ - /** - * Get all tags for a repository. - * - * @param string $username - * @param string $repository - * - * @return array - */ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/tags'); - } - - /** - * Get a tag for a repository. - * - * @param string $username - * @param string $repository - * @param string $sha - * - * @return array - */ - public function show($username, $repository, $sha) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags/'.rawurlencode($sha)); - } - - /** - * Create a tag for a repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['tag'], $params['message'], $params['object'], $params['type'])) { - throw new MissingArgumentException(array('tag', 'message', 'object', 'type')); - } - - if (!isset($params['tagger'])) { - throw new MissingArgumentException('tagger'); - } - - if (!isset($params['tagger']['name'], $params['tagger']['email'], $params['tagger']['date'])) { - throw new MissingArgumentException(array('tagger.name', 'tagger.email', 'tagger.date')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/tags', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Trees.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Trees.php deleted file mode 100644 index 8088568..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GitData/Trees.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -class Trees extends AbstractApi -{ - /** - * Get the tree for a repository. - * - * @param string $username - * @param string $repository - * @param string $sha - * @param bool $recursive - * - * @return array - */ - public function show($username, $repository, $sha, $recursive = false) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees/'.rawurlencode($sha), $recursive ? array('recursive' => 1) : array()); - } - - /** - * Create tree for a repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['tree']) || !is_array($params['tree'])) { - throw new MissingArgumentException('tree'); - } - - if (!isset($params['tree'][0])) { - $params['tree'] = array($params['tree']); - } - - foreach ($params['tree'] as $key => $tree) { - if (!isset($tree['path'], $tree['mode'], $tree['type'])) { - throw new MissingArgumentException(array("tree.$key.path", "tree.$key.mode", "tree.$key.type")); - } - - // If `sha` is not set, `content` is required - if (!isset($tree['sha']) && !isset($tree['content'])) { - throw new MissingArgumentException("tree.$key.content"); - } - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GraphQL.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GraphQL.php deleted file mode 100644 index 9097401..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/GraphQL.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class GraphQL extends AbstractApi -{ - /** - * @param string $query - * - * @return array - */ - public function execute($query) - { - $params = array( - 'query' => $query - ); - - return $this->post('/graphql', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Integrations.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Integrations.php deleted file mode 100644 index 7af6a09..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Integrations.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ -class Integrations extends AbstractApi -{ - /** - * Create an access token for an installation - * - * @param int $installationId An integration installation id - * @param int $userId An optional user id on behalf of whom the - * token will be requested - * - * @return array token and token metadata - */ - public function createInstallationToken($installationId, $userId = null) - { - $parameters = array(); - if ($userId) { - $parameters['user_id'] = $userId; - } - - return $this->post('/installations/'.rawurlencode($installationId).'/access_tokens', $parameters); - } - - /** - * Find all installations for the authenticated integration. - * - * @link https://developer.github.com/v3/integrations/#find-installations - * - * @return array - */ - public function findInstallations() - { - return $this->get('/integration/installations'); - } - - /** - * List repositories that are accessible to the authenticated installation. - * - * @link https://developer.github.com/v3/integrations/installations/#list-repositories - * - * @param int $userId - * - * @return array - */ - public function listRepositories($userId) - { - return $this->get('/installation/repositories', ['user_id' => $userId]); - } - - /** - * Add a single repository to an installation. - * - * @link https://developer.github.com/v3/integrations/installations/#add-repository-to-installation - * - * @param int $installationId - * @param int $repositoryId - * - * @return array - */ - public function addRepository($installationId, $repositoryId) - { - return $this->put('/installations/'.rawurlencode($installationId).'/repositories/'.rawurlencode($repositoryId)); - } - - /** - * Remove a single repository from an installation. - * - * @link https://developer.github.com/v3/integrations/installations/#remove-repository-from-installation - * - * @param int $installationId - * @param int $repositoryId - * - * @return array - */ - public function removeRepository($installationId, $repositoryId) - { - return $this->delete('/installations/'.rawurlencode($installationId).'/repositories/'.rawurlencode($repositoryId)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue.php deleted file mode 100644 index f1f41d9..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue.php +++ /dev/null @@ -1,182 +0,0 @@ - - * @author Joseph Bielawski - */ -class Issue extends AbstractApi -{ - /** - * List issues by username, repo and state. - * - * @link http://developer.github.com/v3/issues/ - * - * @param string $username the username - * @param string $repository the repository - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * - * @return array list of issues found - */ - public function all($username, $repository, array $params = array()) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues', array_merge(array('page' => 1), $params)); - } - - /** - * Search issues by username, repo, state and keyword. - * - * @link http://developer.github.com/v3/search/#search-issues - * - * @param string $username the username - * @param string $repository the repository - * @param string $state the issue state, can be open or closed - * @param string $keyword the keyword to filter issues by - * - * @return array list of issues found - */ - public function find($username, $repository, $state, $keyword) - { - if (!in_array($state, array('open', 'closed'))) { - $state = 'open'; - } - - return $this->get('/legacy/issues/search/'.rawurlencode($username).'/'.rawurlencode($repository).'/'.rawurlencode($state).'/'.rawurlencode($keyword)); - } - - /** - * List issues by organization. - * - * @link http://developer.github.com/v3/issues/ - * - * @param string $organization the organization - * @param string $state the issue state, can be open or closed - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * - * @return array list of issues found - */ - public function org($organization, $state, array $params = array()) - { - if (!in_array($state, array('open', 'closed'))) { - $state = 'open'; - } - - return $this->get('/orgs/'.rawurlencode($organization).'/issues', array_merge(array('page' => 1, 'state' => $state), $params)); - } - - /** - * Get extended information about an issue by its username, repo and number. - * - * @link http://developer.github.com/v3/issues/ - * - * @param string $username the username - * @param string $repository the repository - * @param string $id the issue number - * - * @return array information about the issue - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id)); - } - - /** - * Create a new issue for the given username and repo. - * The issue is assigned to the authenticated user. Requires authentication. - * - * @link http://developer.github.com/v3/issues/ - * - * @param string $username the username - * @param string $repository the repository - * @param array $params the new issue data - * - * @throws MissingArgumentException - * - * @return array information about the issue - */ - public function create($username, $repository, array $params) - { - if (!isset($params['title'], $params['body'])) { - throw new MissingArgumentException(array('title', 'body')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues', $params); - } - - /** - * Update issue information's by username, repo and issue number. Requires authentication. - * - * @link http://developer.github.com/v3/issues/ - * - * @param string $username the username - * @param string $repository the repository - * @param string $id the issue number - * @param array $params key=>value user attributes to update. - * key can be title or body - * - * @return array information about the issue - */ - public function update($username, $repository, $id, array $params) - { - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id), $params); - } - - /** - * List an issue comments. - * - * @link http://developer.github.com/v3/issues/comments/ - * - * @return Comments - */ - public function comments() - { - return new Comments($this->client); - } - - /** - * List all project events. - * - * @link http://developer.github.com/v3/issues/events/ - * - * @return Events - */ - public function events() - { - return new Events($this->client); - } - - /** - * List all project labels. - * - * @link http://developer.github.com/v3/issues/labels/ - * - * @return Labels - */ - public function labels() - { - return new Labels($this->client); - } - - /** - * List all project milestones. - * - * @link http://developer.github.com/v3/issues/milestones/ - * - * @return Milestones - */ - public function milestones() - { - return new Milestones($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Comments.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Comments.php deleted file mode 100644 index e72b964..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Comments.php +++ /dev/null @@ -1,122 +0,0 @@ - - * @author Tobias Nyholm - */ -class Comments extends AbstractApi -{ - use AcceptHeaderTrait; - - /** - * Configure the body type. - * - * @link https://developer.github.com/v3/issues/comments/#custom-media-types - * @param string|null $bodyType - */ - public function configure($bodyType = null) - { - if (!in_array($bodyType, array('raw', 'text', 'html'))) { - $bodyType = 'full'; - } - - $this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType); - } - - /** - * Get all comments for an issue. - * - * @link https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue - * @param string $username - * @param string $repository - * @param int $issue - * @param int $page - * - * @return array - */ - public function all($username, $repository, $issue, $page = 1) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/comments', array( - 'page' => $page - )); - } - - /** - * Get a comment for an issue. - * - * @link https://developer.github.com/v3/issues/comments/#get-a-single-comment - * @param string $username - * @param string $repository - * @param int $comment - * - * @return array - */ - public function show($username, $repository, $comment) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/comments/'.rawurlencode($comment)); - } - - /** - * Create a comment for an issue. - * - * @link https://developer.github.com/v3/issues/comments/#create-a-comment - * @param string $username - * @param string $repository - * @param int $issue - * @param array $params - * - * @throws \Github\Exception\MissingArgumentException - * @return array - */ - public function create($username, $repository, $issue, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/comments', $params); - } - - /** - * Update a comment for an issue. - * - * @link https://developer.github.com/v3/issues/comments/#edit-a-comment - * @param string $username - * @param string $repository - * @param int $comment - * @param array $params - * - * @throws \Github\Exception\MissingArgumentException - * @return array - */ - public function update($username, $repository, $comment, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/comments/'.rawurlencode($comment), $params); - } - - /** - * Delete a comment for an issue. - * - * @link https://developer.github.com/v3/issues/comments/#delete-a-comment - * @param string $username - * @param string $repository - * @param int $comment - * - * @return array - */ - public function remove($username, $repository, $comment) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/comments/'.rawurlencode($comment)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php deleted file mode 100644 index adfcde8..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Events extends AbstractApi -{ - /** - * Get all events for an issue. - * - * @link https://developer.github.com/v3/issues/events/#list-events-for-an-issue - * @param string $username - * @param string $repository - * @param int|null $issue - * @param int $page - * @return array - */ - public function all($username, $repository, $issue = null, $page = 1) - { - if (null !== $issue) { - $path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/events'; - } else { - $path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events'; - } - - return $this->get($path, array( - 'page' => $page - )); - } - - /** - * Display an event for an issue. - * - * @link https://developer.github.com/v3/issues/events/#get-a-single-event - * @param $username - * @param $repository - * @param $event - * @return array - */ - public function show($username, $repository, $event) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events/'.rawurlencode($event)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php deleted file mode 100644 index 8f27887..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php +++ /dev/null @@ -1,167 +0,0 @@ - - */ -class Labels extends AbstractApi -{ - /** - * Get all labels for a repository or the labels for a specific issue. - * - * @link https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue - * @param string $username - * @param string $repository - * @param int|null $issue - * - * @return array - */ - public function all($username, $repository, $issue = null) - { - if ($issue === null) { - $path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels'; - } else { - $path = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels'; - } - - return $this->get($path); - } - - /** - * Create a label for a repository. - * - * @link https://developer.github.com/v3/issues/labels/#create-a-label - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException('name'); - } - if (!isset($params['color'])) { - $params['color'] = 'FFFFFF'; - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels', $params); - } - - /** - * Delete a label for a repository. - * - * @link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue - * @param string $username - * @param string $repository - * @param string $label - * - * @return array - */ - public function deleteLabel($username, $repository, $label) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label)); - } - - /** - * Edit a label for a repository - * - * @link https://developer.github.com/v3/issues/labels/#update-a-label - * @param string $username - * @param string $repository - * @param string $label - * @param string $newName - * @param string $color - * - * @return array - */ - public function update($username, $repository, $label, $newName, $color) - { - $params = array( - 'name' => $newName, - 'color' => $color, - ); - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label), $params); - } - - /** - * Add a label to an issue. - * - * @link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue - * @param string $username - * @param string $repository - * @param int $issue - * @param string $labels - * - * @return array - * - * @thorws \Github\Exception\InvalidArgumentException - */ - public function add($username, $repository, $issue, $labels) - { - if (is_string($labels)) { - $labels = array($labels); - } elseif (0 === count($labels)) { - throw new InvalidArgumentException(); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels', $labels); - } - - /** - * Replace labels for an issue. - * - * @link https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue - * @param string $username - * @param string $repository - * @param int $issue - * @param array $params - * - * @return array - */ - public function replace($username, $repository, $issue, array $params) - { - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels', $params); - } - - /** - * Remove a label for an issue - * - * @link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue - * @param string $username - * @param string $repository - * @param string $issue - * @param string $label - * - * @return null - */ - public function remove($username, $repository, $issue, $label) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels/'.rawurlencode($label)); - } - - /** - * Remove all labels from an issue. - * - * @link https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue - * @param string $username - * @param string $repository - * @param string $issue - * - * @return null - */ - public function clear($username, $repository, $issue) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php deleted file mode 100644 index c7ac0f4..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ -class Milestones extends AbstractApi -{ - /** - * Get all milestones for a repository. - * - * @link https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - */ - public function all($username, $repository, array $params = array()) - { - if (isset($params['state']) && !in_array($params['state'], array('open', 'closed', 'all'))) { - $params['state'] = 'open'; - } - if (isset($params['sort']) && !in_array($params['sort'], array('due_date', 'completeness'))) { - $params['sort'] = 'due_date'; - } - if (isset($params['direction']) && !in_array($params['direction'], array('asc', 'desc'))) { - $params['direction'] = 'asc'; - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones', array_merge(array( - 'page' => 1, - 'state' => 'open', - 'sort' => 'due_date', - 'direction' => 'asc' - ), $params)); - } - - /** - * Get a milestone for a repository. - * - * @link https://developer.github.com/v3/issues/milestones/#get-a-single-milestone - * @param string $username - * @param string $repository - * @param int $id - * - * @return array - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id)); - } - - /** - * Create a milestone for a repository. - * - * @link https://developer.github.com/v3/issues/milestones/#create-a-milestone - * @param string $username - * @param string $repository - * @param array $params - * - * @return array - * - * @throws \Github\Exception\MissingArgumentException - */ - public function create($username, $repository, array $params) - { - if (!isset($params['title'])) { - throw new MissingArgumentException('title'); - } - if (isset($params['state']) && !in_array($params['state'], array('open', 'closed'))) { - $params['state'] = 'open'; - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones', $params); - } - - /** - * Update a milestone for a repository. - * - * @link https://developer.github.com/v3/issues/milestones/#update-a-milestone - * @param string $username - * @param string $repository - * @param int $id - * @param array $params - * - * @return array - */ - public function update($username, $repository, $id, array $params) - { - if (isset($params['state']) && !in_array($params['state'], array('open', 'closed'))) { - $params['state'] = 'open'; - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id), $params); - } - - /** - * Delete a milestone for a repository. - * - * @link https://developer.github.com/v3/issues/milestones/#delete-a-milestone - * @param string $username - * @param string $repository - * @param int $id - * - * @return null - */ - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id)); - } - - /** - * Get the labels of a milestone - * - * @link https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone - * @param string $username - * @param string $repository - * @param int $id - * - * @return array - */ - public function labels($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id).'/labels'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Markdown.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Markdown.php deleted file mode 100644 index 82d2ac5..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Markdown.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Markdown extends AbstractApi -{ - /** - * @param string $text - * @param string $mode - * @param string $context - * - * @return string - */ - public function render($text, $mode = 'markdown', $context = null) - { - if (!in_array($mode, array('gfm', 'markdown'))) { - $mode = 'markdown'; - } - - $params = array( - 'text' => $text, - 'mode' => $mode - ); - if (null !== $context && 'gfm' === $mode) { - $params['context'] = $context; - } - - return $this->post('/markdown', $params); - } - - /** - * @param string $file - * - * @return string - */ - public function renderRaw($file) - { - return $this->post('/markdown/raw', array( - 'file' => $file - )); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Meta.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Meta.php deleted file mode 100644 index 076b3dc..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Meta.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -class Meta extends AbstractApi -{ - /** - * Get the ip address of the hook and git servers for the GitHub.com service. - * - * @return array Information about the service of GitHub.com - */ - public function service() - { - return $this->get('/meta'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Notification.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Notification.php deleted file mode 100644 index e8d5d8f..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Notification.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ -class Notification extends AbstractApi -{ - /** - * Get a listing of notifications. - * - * @link https://developer.github.com/v3/activity/notifications/ - * - * @param bool $includingRead - * @param bool $participating - * @param DateTime|null $since - * - * @return array array of notifications - */ - public function all($includingRead = false, $participating = false, DateTime $since = null) - { - $parameters = array( - 'all' => $includingRead, - 'participating' => $participating - ); - - if ($since !== null) { - $parameters['since'] = $since->format(DateTime::ISO8601); - } - - return $this->get('/notifications', $parameters); - } - - /** - * Marks all notifications as read from the current date - * Optionally give DateTime to mark as read before that date. - * - * @link https://developer.github.com/v3/activity/notifications/#mark-as-read - * - * @param DateTime|null $since - */ - public function markRead(DateTime $since = null) - { - $parameters = array(); - - if ($since !== null) { - $parameters['last_read_at'] = $since->format(DateTime::ISO8601); - } - - $this->put('/notifications', $parameters); - } - /** - * Gets a single notification using his ID - * - * @link https://developer.github.com/v3/activity/notifications/#view-a-single-thread - * - * @param int $id - */ - public function id($id) - { - return $this->get('/notifications/threads/'.$id); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization.php deleted file mode 100644 index 077211a..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @author Joseph Bielawski - */ -class Organization extends AbstractApi -{ - /** - * @link https://developer.github.com/v3/orgs/#list-all-organizations - * - * @return array the organizations - */ - public function all($since = '') - { - return $this->get('/organizations?since='.rawurlencode($since)); - } - - /** - * Get extended information about an organization by its name. - * - * @link http://developer.github.com/v3/orgs/#get - * - * @param string $organization the organization to show - * - * @return array information about the organization - */ - public function show($organization) - { - return $this->get('/orgs/'.rawurlencode($organization)); - } - - public function update($organization, array $params) - { - return $this->patch('/orgs/'.rawurlencode($organization), $params); - } - - /** - * List all repositories across all the organizations that you can access. - * - * @link http://developer.github.com/v3/repos/#list-organization-repositories - * - * @param string $organization the user name - * @param string $type the type of repositories - * @param int $page the page - * - * @return array the repositories - */ - public function repositories($organization, $type = 'all', $page = 1) - { - return $this->get('/orgs/'.rawurlencode($organization).'/repos', array( - 'type' => $type, - 'page' => $page, - )); - } - - /** - * @return Members - */ - public function members() - { - return new Members($this->client); - } - - /** - * @return Hooks - */ - public function hooks() - { - return new Hooks($this->client); - } - - /** - * @return Teams - */ - public function teams() - { - return new Teams($this->client); - } - - /** - * @link http://developer.github.com/v3/issues/#list-issues - * - * @param $organization - * @param array $params - * @param int $page - * - * @return array - */ - public function issues($organization, array $params = array(), $page = 1) - { - return $this->get('/orgs/'.rawurlencode($organization).'/issues', array_merge(array('page' => $page), $params)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php deleted file mode 100644 index e137dee..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php +++ /dev/null @@ -1,97 +0,0 @@ -get('/orgs/'.rawurlencode($organization).'/hooks'); - } - - /** - * Get a single hook. - * @link https://developer.github.com/v3/orgs/hooks/#get-single-hook - * - * @param string $organization - * @param int $id - * @return array - */ - public function show($organization, $id) - { - return $this->get('/orgs/'.rawurlencode($organization).'/hooks/'.rawurlencode($id)); - } - - /** - * Create a hook. - * - * @link https://developer.github.com/v3/orgs/hooks/#create-a-hook - * @param string $organization - * @param array $params - * @return array - * @throws \Github\Exception\MissingArgumentException - */ - public function create($organization, array $params) - { - if (!isset($params['name'], $params['config'])) { - throw new MissingArgumentException(array('name', 'config')); - } - - return $this->post('/orgs/'.rawurlencode($organization).'/hooks', $params); - } - - /** - * Edit a hook. - * - * @link https://developer.github.com/v3/orgs/hooks/#edit-a-hook - * @param string $organization - * @param int $id - * @param array $params - * @return array - * @throws \Github\Exception\MissingArgumentException - */ - public function update($organization, $id, array $params) - { - if (!isset($params['config'])) { - throw new MissingArgumentException(array('config')); - } - - return $this->patch('/orgs/'.rawurlencode($organization).'/hooks/'.rawurlencode($id), $params); - } - - /** - * Ping a hook. - * - * @link https://developer.github.com/v3/orgs/hooks/#ping-a-hook - * @param string $organization - * @param int $id - * @return null - */ - public function ping($organization, $id) - { - return $this->post('/orgs/'.rawurlencode($organization).'/hooks/'.rawurlencode($id).'/pings'); - } - - /** - * Delete a hook. - * - * @link https://developer.github.com/v3/orgs/hooks/#delete-a-hook - * @param string $organization - * @param int $id - * @return null - */ - public function remove($organization, $id) - { - return $this->delete('/orgs/'.rawurlencode($organization).'/hooks/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Members.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Members.php deleted file mode 100644 index 13bda33..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Members.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class Members extends AbstractApi -{ - public function all($organization, $type = null, $filter = 'all', $role = null) - { - $parameters = array(); - $path = '/orgs/'.rawurlencode($organization).'/'; - if (null === $type) { - $path .= 'members'; - if (null !== $filter) { - $parameters['filter'] = $filter; - } - if (null !== $role) { - $parameters['role'] = $role; - } - } else { - $path .= 'public_members'; - } - - return $this->get($path, $parameters); - } - - public function show($organization, $username) - { - return $this->get('/orgs/'.rawurlencode($organization).'/members/'.rawurlencode($username)); - } - - public function member($organization, $username) - { - return $this->get('/orgs/'.rawurlencode($organization).'/memberships/'.rawurlencode($username)); - } - - public function check($organization, $username) - { - return $this->get('/orgs/'.rawurlencode($organization).'/public_members/'.rawurlencode($username)); - } - - public function publicize($organization, $username) - { - return $this->put('/orgs/'.rawurlencode($organization).'/public_members/'.rawurlencode($username)); - } - - public function conceal($organization, $username) - { - return $this->delete('/orgs/'.rawurlencode($organization).'/public_members/'.rawurlencode($username)); - } - - /* - * Add user to organization - */ - public function add($organization, $username) - { - return $this->put('/orgs/'.rawurlencode($organization).'/memberships/'.rawurlencode($username)); - } - - public function addMember($organization, $username) - { - return $this->add($organization, $username); - } - - public function remove($organization, $username) - { - return $this->delete('/orgs/'.rawurlencode($organization).'/members/'.rawurlencode($username)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Projects.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Projects.php deleted file mode 100644 index dcff9c8..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Projects.php +++ /dev/null @@ -1,23 +0,0 @@ -get('/orgs/'.rawurlencode($organization).'/projects', array_merge(array('page' => 1), $params)); - } - - public function create($organization, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException(array('name')); - } - - return $this->post('/orgs/'.rawurlencode($organization).'/projects', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Teams.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Teams.php deleted file mode 100644 index b6b0b72..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Organization/Teams.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ -class Teams extends AbstractApi -{ - public function all($organization) - { - return $this->get('/orgs/'.rawurlencode($organization).'/teams'); - } - - public function create($organization, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException('name'); - } - if (isset($params['repo_names']) && !is_array($params['repo_names'])) { - $params['repo_names'] = array($params['repo_names']); - } - if (isset($params['permission']) && !in_array($params['permission'], array('pull', 'push', 'admin'))) { - $params['permission'] = 'pull'; - } - - return $this->post('/orgs/'.rawurlencode($organization).'/teams', $params); - } - - public function show($team) - { - return $this->get('/teams/'.rawurlencode($team)); - } - - public function update($team, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException('name'); - } - if (isset($params['permission']) && !in_array($params['permission'], array('pull', 'push', 'admin'))) { - $params['permission'] = 'pull'; - } - - return $this->patch('/teams/'.rawurlencode($team), $params); - } - - public function remove($team) - { - return $this->delete('/teams/'.rawurlencode($team)); - } - - public function members($team) - { - return $this->get('/teams/'.rawurlencode($team).'/members'); - } - - public function check($team, $username) - { - return $this->get('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username)); - } - - public function addMember($team, $username) - { - return $this->put('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username)); - } - - public function removeMember($team, $username) - { - return $this->delete('/teams/'.rawurlencode($team).'/memberships/'.rawurlencode($username)); - } - - public function repositories($team) - { - return $this->get('/teams/'.rawurlencode($team).'/repos'); - } - - public function repository($team, $organization, $repository) - { - return $this->get('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository)); - } - - public function addRepository($team, $organization, $repository, $params = array()) - { - if (isset($params['permission']) && !in_array($params['permission'], array('pull', 'push', 'admin'))) { - $params['permission'] = 'pull'; - } - - return $this->put('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository), $params); - } - - public function removeRepository($team, $organization, $repository) - { - return $this->delete('/teams/'.rawurlencode($team).'/repos/'.rawurlencode($organization).'/'.rawurlencode($repository)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/AbstractProjectApi.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/AbstractProjectApi.php deleted file mode 100644 index 55bc733..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/AbstractProjectApi.php +++ /dev/null @@ -1,41 +0,0 @@ -acceptHeaderValue = 'application/vnd.github.inertia-preview+json'; - } - - public function show($id, array $params = array()) - { - return $this->get('/projects/' . rawurlencode($id), array_merge(array('page' => 1), $params)); - } - - public function update($id, array $params) - { - return $this->patch('/projects/'.rawurlencode($id), $params); - } - - public function deleteProject($id) - { - return $this->delete('/projects/'.rawurlencode($id)); - } - - public function columns() - { - return new Columns($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Cards.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Cards.php deleted file mode 100644 index 65765b7..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Cards.php +++ /dev/null @@ -1,56 +0,0 @@ -acceptHeaderValue = 'application/vnd.github.inertia-preview+json'; - } - - public function all($columnId, array $params = array()) - { - return $this->get('/projects/columns/' . rawurlencode($columnId) . '/cards', array_merge(array('page' => 1), $params)); - } - - public function show($id) - { - return $this->get('/projects/columns/cards/'.rawurlencode($id)); - } - - public function create($columnId, array $params) - { - return $this->post('/projects/columns/' . rawurlencode($columnId) . '/cards', $params); - } - - public function update($id, array $params) - { - return $this->patch('/projects/columns/cards/' . rawurlencode($id), $params); - } - - public function deleteCard($id) - { - return $this->delete('/projects/columns/cards/'.rawurlencode($id)); - } - - public function move($id, array $params) - { - if (!isset($params['position'])) { - throw new MissingArgumentException(array('position')); - } - - return $this->post('/projects/columns/cards/' . rawurlencode($id) . '/moves', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Columns.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Columns.php deleted file mode 100644 index 16b9f25..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Project/Columns.php +++ /dev/null @@ -1,69 +0,0 @@ -acceptHeaderValue = 'application/vnd.github.inertia-preview+json'; - } - - public function all($projectId, array $params = array()) - { - return $this->get('/projects/' . rawurlencode($projectId) . '/columns', array_merge(array('page' => 1), $params)); - } - - public function show($id) - { - return $this->get('/projects/columns/'.rawurlencode($id)); - } - - public function create($projectId, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException(array('name')); - } - - return $this->post('/projects/' . rawurlencode($projectId) . '/columns', $params); - } - - public function update($id, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException(array('name')); - } - - return $this->patch('/projects/columns/' . rawurlencode($id), $params); - } - - public function deleteColumn($id) - { - return $this->delete('/projects/columns/'.rawurlencode($id)); - } - - public function move($id, array $params) - { - if (!isset($params['position'])) { - throw new MissingArgumentException(array('position')); - } - - return $this->post('/projects/columns/' . rawurlencode($id) . '/moves', $params); - } - - public function cards() - { - return new Cards($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php deleted file mode 100644 index 52cc77f..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php +++ /dev/null @@ -1,142 +0,0 @@ - - */ -class PullRequest extends AbstractApi -{ - /** - * Get a listing of a project's pull requests by the username, repository and (optionally) state. - * - * @link http://developer.github.com/v3/pulls/ - * - * @param string $username the username - * @param string $repository the repository - * @param array $params a list of extra parameters. - * - * @return array array of pull requests for the project - */ - public function all($username, $repository, array $params = array()) - { - $parameters = array_merge(array( - 'page' => 1, - 'per_page' => 30 - ), $params); - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls', $parameters); - } - - /** - * Show all details of a pull request, including the discussions. - * - * @link http://developer.github.com/v3/pulls/ - * - * @param string $username the username - * @param string $repository the repository - * @param string $id the ID of the pull request for which details are retrieved - * - * @return array array of pull requests for the project - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id)); - } - - public function commits($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id).'/commits'); - } - - public function files($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id).'/files'); - } - - public function comments() - { - return new Comments($this->client); - } - - public function reviews() - { - return new Review($this->client); - } - - /** - * Create a pull request. - * - * @link http://developer.github.com/v3/pulls/ - * - * @param string $username the username - * @param string $repository the repository - * @param array $params A String of the branch or commit SHA that you want your changes to be pulled to. - * A String of the branch or commit SHA of your changes. Typically this will be a branch. - * If the branch is in a fork of the original repository, specify the username first: - * "my-user:some-branch". The String title of the Pull Request. The String body of - * the Pull Request. The issue number. Used when title and body is not set. - * - * @throws MissingArgumentException - * - * @return array - */ - public function create($username, $repository, array $params) - { - // Two ways to create PR, using issue or title - if (!isset($params['issue']) && !isset($params['title'])) { - throw new MissingArgumentException(array('issue', 'title')); - } - - if (!isset($params['base'], $params['head'])) { - throw new MissingArgumentException(array('base', 'head')); - } - - // If `issue` is not sent, then `body` must be sent - if (!isset($params['issue']) && !isset($params['body'])) { - throw new MissingArgumentException(array('issue', 'body')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls', $params); - } - - public function update($username, $repository, $id, array $params) - { - if (isset($params['state']) && !in_array($params['state'], array('open', 'closed'))) { - $params['state'] = 'open'; - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id), $params); - } - - public function merged($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id).'/merge'); - } - - public function merge($username, $repository, $id, $message, $sha, $mergeMethod = 'merge', $title = null) - { - if (is_bool($mergeMethod)) { - $mergeMethod = $mergeMethod ? 'squash' : 'merge'; - } - - $params = array( - 'commit_message' => $message, - 'sha' => $sha, - 'merge_method' => $mergeMethod, - ); - - if (is_string($title)) { - $params['commit_title'] = $title; - } - - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($id).'/merge', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php deleted file mode 100644 index b2de809..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class Comments extends AbstractApi -{ - public function all($username, $repository, $pullRequest = null) - { - if (null !== $pullRequest) { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($pullRequest).'/comments'); - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments'); - } - - public function show($username, $repository, $comment) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments/'.rawurlencode($comment)); - } - - public function create($username, $repository, $pullRequest, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - // If `in_reply_to` is set, other options are not necessary anymore - if (!isset($params['in_reply_to']) && !isset($params['commit_id'], $params['path'], $params['position'])) { - throw new MissingArgumentException(array('commit_id', 'path', 'position')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($pullRequest).'/comments', $params); - } - - public function update($username, $repository, $comment, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments/'.rawurlencode($comment), $params); - } - - public function remove($username, $repository, $comment) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments/'.rawurlencode($comment)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Review.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Review.php deleted file mode 100644 index 8977bdd..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Review.php +++ /dev/null @@ -1,161 +0,0 @@ - - */ -class Review extends AbstractApi -{ - /** - * Get a listing of a pull request's reviews by the username, repository and pull request number. - * - * @link https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param array $params a list of extra parameters. - * - * @return array array of pull request reviews for the pull request - */ - public function all($username, $repository, $pullRequest, array $params = []) - { - $parameters = array_merge([ - 'page' => 1, - 'per_page' => 30 - ], $params); - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews', $parameters); - } - - /** - * Get a single pull request review by the username, repository, pull request number and the review id. - * - * @link https://developer.github.com/v3/pulls/reviews/#get-a-single-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param int $id the review id - * - * @return array the pull request review - */ - public function show($username, $repository, $pullRequest, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id); - } - - /** - * Delete a single pull request review by the username, repository, pull request number and the review id. - * - * @link https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param int $id the review id - * - * @return array|string - */ - public function remove($username, $repository, $pullRequest, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id); - } - - /** - * Get comments for a single pull request review. - * - * @link https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param int $id the review id - * - * @return array|string - */ - public function comments($username, $repository, $pullRequest, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($pullRequest).'/reviews/'.rawurlencode($id).'/comments'); - } - - /** - * Create a pull request review by the username, repository and pull request number. - * - * @link https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param array $params a list of extra parameters. - * - * @throws MissingArgumentException - * - * @return array the pull request review - */ - public function create($username, $repository, $pullRequest, array $params = []) - { - if (!isset($params['event'])) { - throw new MissingArgumentException('event'); - } - - if (!in_array($params['event'], ["APPROVE", "REQUEST_CHANGES", "COMMENT"], true)) { - throw new InvalidArgumentException(sprintf('"event" must be one of ["APPROVE", "REQUEST_CHANGES", "COMMENT"] ("%s" given).', $params['event'])); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews', $params); - } - - /** - * Submit a pull request review by the username, repository, pull request number and the review id. - * - * @link https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param int $id the review id - * @param array $params a list of extra parameters. - * - * @throws MissingArgumentException - * - * @return array the pull request review - */ - public function submit($username, $repository, $pullRequest, $id, array $params = []) - { - if (!isset($params['event'])) { - throw new MissingArgumentException('event'); - } - - if (!in_array($params['event'], ["APPROVE", "REQUEST_CHANGES", "COMMENT"], true)) { - throw new InvalidArgumentException(sprintf('"event" must be one of ["APPROVE", "REQUEST_CHANGES", "COMMENT"] ("%s" given).', $params['event'])); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id.'/events', $params); - } - - /** - * Dismiss a pull request review by the username, repository, pull request number and the review id. - * - * @link https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review - * - * @param string $username the username - * @param string $repository the repository - * @param int $pullRequest the pull request number - * @param int $id the review id - * - * @return array|string - */ - public function dismiss($username, $repository, $pullRequest, $id) - { - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id.'/dismissals'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php deleted file mode 100644 index bfa42ae..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class RateLimit extends AbstractApi -{ - /** - * Get rate limits - * - * @return array - */ - public function getRateLimits() - { - return $this->get('/rate_limit'); - } - - /** - * Get core rate limit - * - * @return integer - */ - public function getCoreLimit() - { - $response = $this->getRateLimits(); - - return $response['resources']['core']['limit']; - } - - /** - * Get search rate limit - * - * @return integer - */ - public function getSearchLimit() - { - $response = $this->getRateLimits(); - - return $response['resources']['search']['limit']; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repo.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repo.php deleted file mode 100644 index 94becd2..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repo.php +++ /dev/null @@ -1,565 +0,0 @@ - - * @author Thibault Duplessis - */ -class Repo extends AbstractApi -{ - /** - * Search repositories by keyword. - * - * @link http://developer.github.com/v3/search/#search-repositories - * - * @param string $keyword the search query - * @param array $params - * - * @return array list of found repositories - */ - public function find($keyword, array $params = array()) - { - return $this->get('/legacy/repos/search/'.rawurlencode($keyword), array_merge(array('start_page' => 1), $params)); - } - - /** - * List all public repositories. - * - * @link https://developer.github.com/v3/repos/#list-all-public-repositories - * - * @param int|null $id The integer ID of the last Repository that you’ve seen. - * - * @return array list of users found - */ - public function all($id = null) - { - if (!is_int($id)) { - return $this->get('/repositories'); - } - - return $this->get('/repositories?since=' . rawurldecode($id)); - } - - /** - * Get the last year of commit activity for a repository grouped by week. - * - * @link http://developer.github.com/v3/repos/statistics/#commit-activity - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array commit activity grouped by week - */ - public function activity($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/stats/commit_activity'); - } - - /** - * Get contributor commit statistics for a repository. - * - * @link http://developer.github.com/v3/repos/statistics/#contributors - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array list of contributors and their commit statistics - */ - public function statistics($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/stats/contributors'); - } - - /** - * Get a weekly aggregate of the number of additions and deletions pushed to a repository. - * - * @link http://developer.github.com/v3/repos/statistics/#code-frequency - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array list of weeks and their commit statistics - */ - public function frequency($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/stats/code_frequency'); - } - - /** - * Get the weekly commit count for the repository owner and everyone else. - * - * @link http://developer.github.com/v3/repos/statistics/#participation - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array list of weekly commit count grouped by 'all' and 'owner' - */ - public function participation($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/stats/participation'); - } - - /** - * List all repositories for an organization. - * - * @link http://developer.github.com/v3/repos/#list-organization-repositories - * - * @param string $organization the name of the organization - * @param array $params - * - * @return array list of organization repositories - */ - public function org($organization, array $params = array()) - { - return $this->get('/orgs/'.$organization.'/repos', array_merge(array('start_page' => 1), $params)); - } - - /** - * Get extended information about a repository by its username and repository name. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array information about the repository - */ - public function show($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Create repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $name name of the repository - * @param string $description repository description - * @param string $homepage homepage url - * @param bool $public `true` for public, `false` for private - * @param null|string $organization username of organization if applicable - * @param bool $hasIssues `true` to enable issues for this repository, `false` to disable them - * @param bool $hasWiki `true` to enable the wiki for this repository, `false` to disable it - * @param bool $hasDownloads `true` to enable downloads for this repository, `false` to disable them - * @param int $teamId The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization. - * @param bool $autoInit `true` to create an initial commit with empty README, `false` for no initial commit - * - * @return array returns repository data - */ - public function create( - $name, - $description = '', - $homepage = '', - $public = true, - $organization = null, - $hasIssues = false, - $hasWiki = false, - $hasDownloads = false, - $teamId = null, - $autoInit = false - ) { - $path = null !== $organization ? '/orgs/'.$organization.'/repos' : '/user/repos'; - - $parameters = array( - 'name' => $name, - 'description' => $description, - 'homepage' => $homepage, - 'private' => !$public, - 'has_issues' => $hasIssues, - 'has_wiki' => $hasWiki, - 'has_downloads' => $hasDownloads, - 'auto_init' => $autoInit - ); - - if ($organization && $teamId) { - $parameters['team_id'] = $teamId; - } - - return $this->post($path, $parameters); - } - - /** - * Set information of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param array $values the key => value pairs to post - * - * @return array information about the repository - */ - public function update($username, $repository, array $values) - { - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository), $values); - } - - /** - * Delete a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return mixed null on success, array on error with 'message' - */ - public function remove($username, $repository) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository)); - } - - /** - * Get the readme content for a repository by its username and repository name. - * - * @link http://developer.github.com/v3/repos/contents/#get-the-readme - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $format one of formats: "raw" or "html" - * - * @return array the readme content - */ - public function readme($username, $repository, $format = 'raw') - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [], [ - 'Accept' => "application/vnd.github.$format", - ]); - } - - /** - * Manage the collaborators of a repository. - * - * @link http://developer.github.com/v3/repos/collaborators/ - * - * @return Collaborators - */ - public function collaborators() - { - return new Collaborators($this->client); - } - - /** - * Manage the comments of a repository. - * - * @link http://developer.github.com/v3/repos/comments/ - * - * @return Comments - */ - public function comments() - { - return new Comments($this->client); - } - - /** - * Manage the commits of a repository. - * - * @link http://developer.github.com/v3/repos/commits/ - * - * @return Commits - */ - public function commits() - { - return new Commits($this->client); - } - - /** - * Manage the content of a repository. - * - * @link http://developer.github.com/v3/repos/contents/ - * - * @return Contents - */ - public function contents() - { - return new Contents($this->client); - } - - /** - * Manage the content of a repository. - * - * @link http://developer.github.com/v3/repos/downloads/ - * - * @return Downloads - */ - public function downloads() - { - return new Downloads($this->client); - } - - /** - * Manage the releases of a repository (Currently Undocumented). - * - * @link http://developer.github.com/v3/repos/ - * - * @return Releases - */ - public function releases() - { - return new Releases($this->client); - } - - /** - * Manage the deploy keys of a repository. - * - * @link http://developer.github.com/v3/repos/keys/ - * - * @return DeployKeys - */ - public function keys() - { - return new DeployKeys($this->client); - } - - /** - * Manage the forks of a repository. - * - * @link http://developer.github.com/v3/repos/forks/ - * - * @return Forks - */ - public function forks() - { - return new Forks($this->client); - } - - /** - * Manage the stargazers of a repository. - * - * @link https://developer.github.com/v3/activity/starring/#list-stargazers - * - * @return Stargazers - */ - public function stargazers() - { - return new Stargazers($this->client); - } - - /** - * Manage the hooks of a repository. - * - * @link http://developer.github.com/v3/issues/jooks/ - * - * @return Hooks - */ - public function hooks() - { - return new Hooks($this->client); - } - - /** - * Manage the labels of a repository. - * - * @link http://developer.github.com/v3/issues/labels/ - * - * @return Labels - */ - public function labels() - { - return new Labels($this->client); - } - - /** - * Manage the statuses of a repository. - * - * @link http://developer.github.com/v3/repos/statuses/ - * - * @return Statuses - */ - public function statuses() - { - return new Statuses($this->client); - } - - /** - * Get the branch(es) of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the username - * @param string $repository the name of the repository - * @param string $branch the name of the branch - * - * @return array list of the repository branches - */ - public function branches($username, $repository, $branch = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches'; - if (null !== $branch) { - $url .= '/'.rawurlencode($branch); - } - - return $this->get($url); - } - - /** - * Manage the protection of a repository branch. - * - * @link https://developer.github.com/v3/repos/branches/#get-branch-protection - * - * @return Protection - */ - public function protection() - { - return new Protection($this->client); - } - - /** - * Get the contributors of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param bool $includingAnonymous by default, the list only shows GitHub users. - * You can include non-users too by setting this to true - * - * @return array list of the repo contributors - */ - public function contributors($username, $repository, $includingAnonymous = false) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contributors', array( - 'anon' => $includingAnonymous ?: null - )); - } - - /** - * Get the language breakdown of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * - * @return array list of the languages - */ - public function languages($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/languages'); - } - - /** - * Get the tags of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * - * @return array list of the repository tags - */ - public function tags($username, $repository, array $params = []) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/tags', $params); - } - - /** - * Get the teams of a repository. - * - * @link http://developer.github.com/v3/repos/ - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array list of the languages - */ - public function teams($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/teams'); - } - - /** - * @deprecated see subscribers method - * - * @param string $username - * @param string $repository - * @param int $page - * - * @return array - */ - public function watchers($username, $repository, $page = 1) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/watchers', array( - 'page' => $page - )); - } - - /** - * @param string $username - * @param string $repository - * @param int $page - * - * @return array - */ - public function subscribers($username, $repository, $page = 1) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/subscribers', array( - 'page' => $page - )); - } - - /** - * Perform a merge. - * - * @link http://developer.github.com/v3/repos/merging/ - * - * @param string $username - * @param string $repository - * @param string $base The name of the base branch that the head will be merged into. - * @param string $head The head to merge. This can be a branch name or a commit SHA1. - * @param string $message Commit message to use for the merge commit. If omitted, a default message will be used. - * - * @return array|null - */ - public function merge($username, $repository, $base, $head, $message = null) - { - $parameters = array( - 'base' => $base, - 'head' => $head, - ); - - if (is_string($message)) { - $parameters['commit_message'] = $message; - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/merges', $parameters); - } - - /** - * @param string $username - * @param string $repository - * @return array - */ - public function milestones($username, $repository) - { - return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/milestones'); - } - - public function projects() - { - return new Projects($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Assets.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Assets.php deleted file mode 100644 index 21b5a08..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Assets.php +++ /dev/null @@ -1,117 +0,0 @@ - - */ -class Assets extends AbstractApi -{ - /** - * Get all release's assets in selected repository - * GET /repos/:owner/:repo/releases/:id/assets. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the release - * - * @return array - */ - public function all($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id).'/assets'); - } - - /** - * Get an asset in selected repository's release - * GET /repos/:owner/:repo/releases/assets/:id. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the asset - * - * @return array - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/assets/'.rawurlencode($id)); - } - - /** - * Create an asset for selected repository's release - * POST /repos/:owner/:repo/releases/:id/assets?name=:filename. - * - * Creating an asset requires support for server name indentification (SNI) - * so this must be supported by your PHP version. - * - * @see http://developer.github.com/v3/repos/releases/#upload-a-release-asset - * @see http://php.net/manual/en/openssl.constsni.php - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the release - * @param string $name the filename for the asset - * @param string $contentType the content type for the asset - * @param string $content the content of the asset - * - * @throws MissingArgumentException - * @throws ErrorException - * - * @return array - */ - public function create($username, $repository, $id, $name, $contentType, $content) - { - if (!defined('OPENSSL_TLSEXT_SERVER_NAME') || !OPENSSL_TLSEXT_SERVER_NAME) { - throw new ErrorException('Asset upload support requires Server Name Indication. This is not supported by your PHP version. See http://php.net/manual/en/openssl.constsni.php.'); - } - - // Asset creation requires a separate endpoint, uploads.github.com. - // Change the base url for the HTTP client temporarily while we execute - // this request. - $response = $this->postRaw('https://uploads.github.com/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id).'/assets?name='.$name, $content, array('Content-Type' => $contentType)); - - return $response; - } - - /** - * Edit an asset in selected repository's release - * PATCH /repos/:owner/:repo/releases/assets/:id. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the asset - * @param array $params request parameters - * - * @throws MissingArgumentException - * - * @return array - */ - public function edit($username, $repository, $id, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException('name'); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/assets/'.rawurlencode($id), $params); - } - - /** - * Delete an asset in selected repository's release - * DELETE /repos/:owner/:repo/releases/assets/:id. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the asset - * - * @return array - */ - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/assets/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php deleted file mode 100644 index 116d8cc..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -class Collaborators extends AbstractApi -{ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators'); - } - - public function check($username, $repository, $collaborator) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators/'.rawurlencode($collaborator)); - } - - public function add($username, $repository, $collaborator) - { - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators/'.rawurlencode($collaborator)); - } - - public function remove($username, $repository, $collaborator) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators/'.rawurlencode($collaborator)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Comments.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Comments.php deleted file mode 100644 index b1d9abe..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Comments.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @author Tobias Nyholm - */ -class Comments extends AbstractApi -{ - use AcceptHeaderTrait; - - public function configure($bodyType = null) - { - switch ($bodyType) { - case 'raw': - $header = sprintf('Accept: application/vnd.github.%s.raw+json', $this->client->getApiVersion()); - break; - - case 'text': - $header = sprintf('Accept: application/vnd.github.%s.text+json', $this->client->getApiVersion()); - break; - - case 'html': - $header = sprintf('Accept: application/vnd.github.%s.html+json', $this->client->getApiVersion()); - break; - - default: - $header = sprintf('Accept: application/vnd.github.%s.full+json', $this->client->getApiVersion()); - } - - $this->acceptHeaderValue = $header; - } - - public function all($username, $repository, $sha = null) - { - if (null === $sha) { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/comments'); - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha).'/comments'); - } - - public function show($username, $repository, $comment) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/comments/'.rawurlencode($comment)); - } - - public function create($username, $repository, $sha, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha).'/comments', $params); - } - - public function update($username, $repository, $comment, array $params) - { - if (!isset($params['body'])) { - throw new MissingArgumentException('body'); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/comments/'.rawurlencode($comment), $params); - } - - public function remove($username, $repository, $comment) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/comments/'.rawurlencode($comment)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Commits.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Commits.php deleted file mode 100644 index 3aaa460..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Commits.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -class Commits extends AbstractApi -{ - public function all($username, $repository, array $params) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits', $params); - } - - public function compare($username, $repository, $base, $head, $mediaType = null) - { - $headers = array(); - if (null !== $mediaType) { - $headers['Accept'] = $mediaType; - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/compare/'.rawurlencode($base).'...'.rawurlencode($head), array(), $headers); - } - - public function show($username, $repository, $sha) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php deleted file mode 100644 index 064f684..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php +++ /dev/null @@ -1,273 +0,0 @@ - - */ -class Contents extends AbstractApi -{ - /** - * Get content of README file in a repository. - * - * @link http://developer.github.com/v3/repos/contents/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param null|string $reference reference to a branch or commit - * - * @return array information for README file - */ - public function readme($username, $repository, $reference = null) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', array( - 'ref' => $reference - )); - } - - /** - * Get contents of any file or directory in a repository. - * - * @link http://developer.github.com/v3/repos/contents/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param null|string $path path to file or directory - * @param null|string $reference reference to a branch or commit - * - * @return array information for file | information for each item in directory - */ - public function show($username, $repository, $path = null, $reference = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents'; - if (null !== $path) { - $url .= '/'.rawurlencode($path); - } - - return $this->get($url, array( - 'ref' => $reference - )); - } - - /** - * Creates a new file in a repository. - * - * @link http://developer.github.com/v3/repos/contents/#create-a-file - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $path path to file - * @param string $content contents of the new file - * @param string $message the commit message - * @param null|string $branch name of a branch - * @param null|array $committer information about the committer - * - * @throws MissingArgumentException - * - * @return array information about the new file - */ - public function create($username, $repository, $path, $content, $message, $branch = null, array $committer = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path); - - $parameters = array( - 'content' => base64_encode($content), - 'message' => $message, - ); - - if (null !== $branch) { - $parameters['branch'] = $branch; - } - - if (null !== $committer) { - if (!isset($committer['name'], $committer['email'])) { - throw new MissingArgumentException(array('name', 'email')); - } - $parameters['committer'] = $committer; - } - - return $this->put($url, $parameters); - } - - /** - * Checks that a given path exists in a repository. - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $path path of file to check - * @param null|string $reference reference to a branch or commit - * - * @return bool - */ - public function exists($username, $repository, $path, $reference = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents'; - - if (null !== $path) { - $url .= '/'.rawurlencode($path); - } - - try { - $response = $this->head($url, array( - 'ref' => $reference - )); - - if ($response->getStatusCode() != 200) { - return false; - } - } catch (TwoFactorAuthenticationRequiredException $ex) { - throw $ex; - } catch (\Exception $ex) { - return false; - } - - return true; - } - - /** - * Updates the contents of a file in a repository. - * - * @link http://developer.github.com/v3/repos/contents/#update-a-file - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $path path to file - * @param string $content contents of the new file - * @param string $message the commit message - * @param string $sha blob SHA of the file being replaced - * @param null|string $branch name of a branch - * @param null|array $committer information about the committer - * - * @throws MissingArgumentException - * - * @return array information about the updated file - */ - public function update($username, $repository, $path, $content, $message, $sha, $branch = null, array $committer = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path); - - $parameters = array( - 'content' => base64_encode($content), - 'message' => $message, - 'sha' => $sha, - ); - - if (null !== $branch) { - $parameters['branch'] = $branch; - } - - if (null !== $committer) { - if (!isset($committer['name'], $committer['email'])) { - throw new MissingArgumentException(array('name', 'email')); - } - $parameters['committer'] = $committer; - } - - return $this->put($url, $parameters); - } - - /** - * Deletes a file from a repository. - * - * @link http://developer.github.com/v3/repos/contents/#delete-a-file - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $path path to file - * @param string $message the commit message - * @param string $sha blob SHA of the file being deleted - * @param null|string $branch name of a branch - * @param null|array $committer information about the committer - * - * @throws MissingArgumentException - * - * @return array information about the updated file - */ - public function rm($username, $repository, $path, $message, $sha, $branch = null, array $committer = null) - { - $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path); - - $parameters = array( - 'message' => $message, - 'sha' => $sha, - ); - - if (null !== $branch) { - $parameters['branch'] = $branch; - } - - if (null !== $committer) { - if (!isset($committer['name'], $committer['email'])) { - throw new MissingArgumentException(array('name', 'email')); - } - $parameters['committer'] = $committer; - } - - return $this->delete($url, $parameters); - } - - /** - * Get content of archives in a repository. - * - * @link http://developer.github.com/v3/repos/contents/ - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $format format of archive: tarball or zipball - * @param null|string $reference reference to a branch or commit - * - * @return array information for archives - */ - public function archive($username, $repository, $format, $reference = null) - { - if (!in_array($format, array('tarball', 'zipball'))) { - $format = 'tarball'; - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/'.rawurlencode($format). - ((null !== $reference) ? ('/'.rawurlencode($reference)) : '')); - } - - /** - * Get the contents of a file in a repository. - * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $path path to file - * @param null|string $reference reference to a branch or commit - * - * @throws InvalidArgumentException If $path is not a file or if its encoding is different from base64 - * @throws ErrorException If $path doesn't include a 'content' index - * - * @return null|string content of file, or null in case of base64_decode failure - */ - public function download($username, $repository, $path, $reference = null) - { - $file = $this->show($username, $repository, $path, $reference); - - if (!isset($file['type']) || 'file' !== $file['type']) { - throw new InvalidArgumentException(sprintf('Path "%s" is not a file.', $path)); - } - - if (!isset($file['content'])) { - throw new ErrorException(sprintf('Unable to access "content" for file "%s" (possible keys: "%s").', $path, implode(', ', array_keys($file)))); - } - - if (!isset($file['encoding'])) { - throw new InvalidArgumentException(sprintf('Can\'t decode content of file "%s", as no encoding is defined.', $path)); - } - - if ('base64' !== $file['encoding']) { - throw new InvalidArgumentException(sprintf('Encoding "%s" of file "%s" is not supported.', $file['encoding'], $path)); - } - - return base64_decode($file['content']) ?: null; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/DeployKeys.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/DeployKeys.php deleted file mode 100644 index 2c25542..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/DeployKeys.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class DeployKeys extends AbstractApi -{ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/keys'); - } - - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/keys/'.rawurlencode($id)); - } - - public function create($username, $repository, array $params) - { - if (!isset($params['title'], $params['key'])) { - throw new MissingArgumentException(array('title', 'key')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/keys', $params); - } - - public function update($username, $repository, $id, array $params) - { - if (!isset($params['title'], $params['key'])) { - throw new MissingArgumentException(array('title', 'key')); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/keys/'.rawurlencode($id), $params); - } - - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/keys/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Downloads.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Downloads.php deleted file mode 100644 index bfde5b3..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Downloads.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ -class Downloads extends AbstractApi -{ - /** - * List downloads in selected repository. - * - * @link http://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * - * @return array - */ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/downloads'); - } - - /** - * Get a download in selected repository. - * - * @link http://developer.github.com/v3/repos/downloads/#get-a-single-download - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the download file - * - * @return array - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/downloads/'.rawurlencode($id)); - } - - /** - * Delete a download in selected repository. - * - * @link http://developer.github.com/v3/repos/downloads/#delete-a-download - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the download file - * - * @return array - */ - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/downloads/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Forks.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Forks.php deleted file mode 100644 index dbd4f3d..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Forks.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -class Forks extends AbstractApi -{ - public function all($username, $repository, array $params = array()) - { - if (isset($params['sort']) && !in_array($params['sort'], array('newest', 'oldest', 'watchers'))) { - $params['sort'] = 'newest'; - } - - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/forks', array_merge(array('page' => 1), $params)); - } - - public function create($username, $repository, array $params = array()) - { - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/forks', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Hooks.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Hooks.php deleted file mode 100644 index a44a01a..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Hooks.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ -class Hooks extends AbstractApi -{ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks'); - } - - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks/'.rawurlencode($id)); - } - - public function create($username, $repository, array $params) - { - if (!isset($params['name'], $params['config'])) { - throw new MissingArgumentException(array('name', 'config')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks', $params); - } - - public function update($username, $repository, $id, array $params) - { - if (!isset($params['config'])) { - throw new MissingArgumentException(array('config')); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks/'.rawurlencode($id), $params); - } - - public function ping($username, $repository, $id) - { - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks/'.rawurlencode($id).'/pings'); - } - - public function test($username, $repository, $id) - { - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks/'.rawurlencode($id).'/test'); - } - - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/hooks/'.rawurlencode($id)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Labels.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Labels.php deleted file mode 100644 index 34535e8..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Labels.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class Labels extends AbstractApi -{ - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels'); - } - - public function show($username, $repository, $label) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label)); - } - - public function create($username, $repository, array $params) - { - if (!isset($params['name'], $params['color'])) { - throw new MissingArgumentException(array('name', 'color')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels', $params); - } - - public function update($username, $repository, $label, array $params) - { - if (!isset($params['name'], $params['color'])) { - throw new MissingArgumentException(array('name', 'color')); - } - - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label), $params); - } - - public function remove($username, $repository, $label) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/labels/'.rawurlencode($label)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Projects.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Projects.php deleted file mode 100644 index 279a1d4..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Projects.php +++ /dev/null @@ -1,23 +0,0 @@ -get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/projects', array_merge(array('page' => 1), $params)); - } - - public function create($username, $repository, array $params) - { - if (!isset($params['name'])) { - throw new MissingArgumentException(array('name')); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/projects', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Protection.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Protection.php deleted file mode 100644 index 6976870..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Protection.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Protection extends AbstractApi -{ - /** - * Retrieves configured protection for the provided branch - * - * @link https://developer.github.com/v3/repos/branches/#get-branch-protection - * - * @param string $username The user who owns the repository - * @param string $repository The name of the repo - * @param string $branch The name of the branch - * - * @return array The branch protection information - */ - public function show($username, $repository, $branch) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection'); - } - - /** - * Updates the repo's branch protection - * - * @link https://developer.github.com/v3/repos/branches/#update-branch-protection - * - * @param string $username The user who owns the repository - * @param string $repository The name of the repo - * @param string $branch The name of the branch - * @param array $params The branch protection information - * - * @return array The updated branch protection information - */ - public function update($username, $repository, $branch, array $params = array()) - { - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection', $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php deleted file mode 100644 index 4d59318..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php +++ /dev/null @@ -1,126 +0,0 @@ - - * @author Evgeniy Guseletov - */ -class Releases extends AbstractApi -{ - /** - * Get the latest release. - * - * @param $username - * @param $repository - * - * @return array - */ - public function latest($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/latest'); - } - - /** - * List releases for a tag. - * - * @param $username - * @param $repository - * @param $tag - * - * @return array - */ - public function tag($username, $repository, $tag) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/tags/'.rawurlencode($tag)); - } - - /** - * List releases in selected repository. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * - * @return array - */ - public function all($username, $repository, array $params = []) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases', $params); - } - - /** - * Get a release in selected repository. - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the release - * - * @return array - */ - public function show($username, $repository, $id) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id)); - } - - /** - * Create new release in selected repository. - * - * @param string $username - * @param string $repository - * @param array $params - * - * @throws MissingArgumentException - * - * @return array - */ - public function create($username, $repository, array $params) - { - if (!isset($params['tag_name'])) { - throw new MissingArgumentException('tag_name'); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases', $params); - } - - /** - * Edit release in selected repository. - * - * @param string $username - * @param string $repository - * @param int $id - * @param array $params - * - * @return array - */ - public function edit($username, $repository, $id, array $params) - { - return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id), $params); - } - - /** - * Delete a release in selected repository (Not thoroughly tested!). - * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param int $id the id of the release - * - * @return array - */ - public function remove($username, $repository, $id) - { - return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id)); - } - - /** - * @return Assets - */ - public function assets() - { - return new Assets($this->client); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Stargazers.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Stargazers.php deleted file mode 100644 index 9267dff..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Stargazers.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @author Tobias Nyholm - */ -class Stargazers extends AbstractApi -{ - use AcceptHeaderTrait; - - /** - * Configure the body type - * - * @see https://developer.github.com/v3/activity/starring/#alternative-response-with-star-creation-timestamps - * - * @param string $bodyType - */ - public function configure($bodyType = null) - { - if ('star' === $bodyType) { - $this->acceptHeaderValue = sprintf('application/vnd.github.%s.star+json', $this->client->getApiVersion()); - } - } - - public function all($username, $repository) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/stargazers'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Statuses.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Statuses.php deleted file mode 100644 index 728d130..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Repository/Statuses.php +++ /dev/null @@ -1,62 +0,0 @@ - - */ -class Statuses extends AbstractApi -{ - /** - * @link http://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-sha - * - * @param string $username - * @param string $repository - * @param string $sha - * - * @return array - */ - public function show($username, $repository, $sha) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha).'/statuses'); - } - - /** - * @link https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref - * - * @param string $username - * @param string $repository - * @param string $sha - * - * @return array - */ - public function combined($username, $repository, $sha) - { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha).'/status'); - } - - /** - * @link http://developer.github.com/v3/repos/statuses/#create-a-status - * - * @param string $username - * @param string $repository - * @param string $sha - * @param array $params - * - * @throws MissingArgumentException - * - * @return array - */ - public function create($username, $repository, $sha, array $params = array()) - { - if (!isset($params['state'])) { - throw new MissingArgumentException('state'); - } - - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/statuses/'.rawurlencode($sha), $params); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Search.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Search.php deleted file mode 100644 index 15e698a..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/Search.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -class Search extends AbstractApi -{ - /** - * Search repositories by filter (q). - * - * @link https://developer.github.com/v3/search/#search-repositories - * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc - * - * @return array list of repositories found - */ - public function repositories($q, $sort = 'updated', $order = 'desc') - { - return $this->get('/search/repositories', array('q' => $q, 'sort' => $sort, 'order' => $order)); - } - - /** - * Search issues by filter (q). - * - * @link https://developer.github.com/v3/search/#search-issues - * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc - * - * @return array list of issues found - */ - public function issues($q, $sort = 'updated', $order = 'desc') - { - return $this->get('/search/issues', array('q' => $q, 'sort' => $sort, 'order' => $order)); - } - - /** - * Search code by filter (q). - * - * @link https://developer.github.com/v3/search/#search-code - * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc - * - * @return array list of code found - */ - public function code($q, $sort = 'updated', $order = 'desc') - { - return $this->get('/search/code', array('q' => $q, 'sort' => $sort, 'order' => $order)); - } - - /** - * Search users by filter (q). - * - * @link https://developer.github.com/v3/search/#search-users - * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc - * - * @return array list of users found - */ - public function users($q, $sort = 'updated', $order = 'desc') - { - return $this->get('/search/users', array('q' => $q, 'sort' => $sort, 'order' => $order)); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/User.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/User.php deleted file mode 100644 index 6570229..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Api/User.php +++ /dev/null @@ -1,234 +0,0 @@ - - * @author Thibault Duplessis - */ -class User extends AbstractApi -{ - /** - * Search users by username. - * - * @link http://developer.github.com/v3/search/#search-users - * - * @param string $keyword the keyword to search - * - * @return array list of users found - */ - public function find($keyword) - { - return $this->get('/legacy/user/search/'.rawurlencode($keyword)); - } - - /** - * Request all users. - * - * @link https://developer.github.com/v3/users/#get-all-users - * - * @param int|null $id ID of the last user that you've seen - * - * @return array list of users found - */ - public function all($id = null) - { - if (!is_int($id)) { - return $this->get('/users'); - } - - return $this->get('/users?since=' . rawurldecode($id)); - } - - /** - * Get extended information about a user by its username. - * - * @link http://developer.github.com/v3/users/ - * - * @param string $username the username to show - * - * @return array information about the user - */ - public function show($username) - { - return $this->get('/users/'.rawurlencode($username)); - } - - /** - * Get extended information about a user by its username. - * - * @link https://developer.github.com/v3/orgs/ - * - * @param string $username the username to show - * - * @return array information about organizations that user belongs to - */ - public function organizations($username) - { - return $this->get('/users/'.rawurlencode($username).'/orgs'); - } - - /** - * Get user organizations - * - * @link https://developer.github.com/v3/orgs/#list-your-organizations - * - * @return array information about organizations that authenticated user belongs to - */ - public function orgs() - { - return $this->get('/user/orgs'); - } - /** - * Request the users that a specific user is following. - * - * @link http://developer.github.com/v3/users/followers/ - * - * @param string $username the username - * - * @return array list of followed users - */ - public function following($username) - { - return $this->get('/users/'.rawurlencode($username).'/following'); - } - - /** - * Request the users following a specific user. - * - * @link http://developer.github.com/v3/users/followers/ - * - * @param string $username the username - * - * @return array list of following users - */ - public function followers($username) - { - return $this->get('/users/'.rawurlencode($username).'/followers'); - } - - /** - * Request the repository that a specific user is watching. - * - * @deprecated see subscriptions method - * - * @param string $username the username - * - * @return array list of watched repositories - */ - public function watched($username) - { - return $this->get('/users/'.rawurlencode($username).'/watched'); - } - - /** - * Request starred repositories that a specific user has starred. - * - * @link http://developer.github.com/v3/activity/starring/ - * - * @param string $username the username - * @param int $page the page number of the paginated result set - * - * @return array list of starred repositories - */ - public function starred($username, $page = 1) - { - return $this->get('/users/'.rawurlencode($username).'/starred', array( - 'page' => $page - )); - } - - /** - * Request the repository that a specific user is watching. - * - * @link http://developer.github.com/v3/activity/watching/ - * - * @param string $username the username - * - * @return array list of watched repositories - */ - public function subscriptions($username) - { - return $this->get('/users/'.rawurlencode($username).'/subscriptions'); - } - - /** - * List public repositories for the specified user. - * - * @link https://developer.github.com/v3/repos/#list-user-repositories - * - * @param string $username the username - * @param string $type role in the repository - * @param string $sort sort by - * @param string $direction direction of sort, asc or desc - * - * @return array list of the user repositories - */ - public function repositories($username, $type = 'owner', $sort = 'full_name', $direction = 'asc') - { - return $this->get('/users/'.rawurlencode($username).'/repos', [ - 'type' => $type, - 'sort' => $sort, - 'direction' => $direction, - ]); - } - - /** - * List repositories that are accessible to the authenticated user. - * - * @link https://developer.github.com/v3/repos/#list-your-repositories - * - * @param array $params visibility, affiliation, type, sort, direction - * - * @return array list of the user repositories - */ - public function myRepositories(array $params = []) - { - return $this->get('/user/repos', $params); - } - - /** - * Get the public gists for a user. - * - * @link http://developer.github.com/v3/gists/ - * - * @param string $username the username - * - * @return array list of the user gists - */ - public function gists($username) - { - return $this->get('/users/'.rawurlencode($username).'/gists'); - } - - /** - * Get the public keys for a user. - * - * @link http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user - * - * @param string $username the username - * - * @return array list of the user public keys - */ - public function keys($username) - { - return $this->get('/users/'.rawurlencode($username).'/keys'); - } - - /** - * List events performed by a user. - * - * @link http://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user - * - * @param string $username - * - * @return array - */ - public function publicEvents($username) - { - return $this->get('/users/'.rawurlencode($username) . '/events/public'); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Client.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Client.php deleted file mode 100644 index 062cf99..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Client.php +++ /dev/null @@ -1,393 +0,0 @@ - - * - * Website: http://github.com/KnpLabs/php-github-api - */ -class Client -{ - /** - * Constant for authentication method. Indicates the default, but deprecated - * login with username and token in URL. - */ - const AUTH_URL_TOKEN = 'url_token'; - - /** - * Constant for authentication method. Not indicates the new login, but allows - * usage of unauthenticated rate limited requests for given client_id + client_secret. - */ - const AUTH_URL_CLIENT_ID = 'url_client_id'; - - /** - * Constant for authentication method. Indicates the new favored login method - * with username and password via HTTP Authentication. - */ - const AUTH_HTTP_PASSWORD = 'http_password'; - - /** - * Constant for authentication method. Indicates the new login method with - * with username and token via HTTP Authentication. - */ - const AUTH_HTTP_TOKEN = 'http_token'; - - /** - * Constant for authentication method. Indicates JSON Web Token - * authentication required for integration access to the API. - */ - const AUTH_JWT = 'jwt'; - - /** - * @var string - */ - private $apiVersion; - - /** - * @var Builder - */ - private $httpClientBuilder; - - /** - * @var History - */ - private $responseHistory; - - /** - * Instantiate a new GitHub client. - * - * @param Builder|null $httpClientBuilder - * @param string|null $apiVersion - * @param string|null $enterpriseUrl - */ - public function __construct(Builder $httpClientBuilder = null, $apiVersion = null, $enterpriseUrl = null) - { - $this->responseHistory = new History(); - $this->httpClientBuilder = $builder = $httpClientBuilder ?: new Builder(); - - $builder->addPlugin(new GithubExceptionThrower()); - $builder->addPlugin(new Plugin\HistoryPlugin($this->responseHistory)); - $builder->addPlugin(new Plugin\RedirectPlugin()); - $builder->addPlugin(new Plugin\AddHostPlugin(UriFactoryDiscovery::find()->createUri('https://api.github.com'))); - $builder->addPlugin(new Plugin\HeaderDefaultsPlugin(array( - 'User-Agent' => 'php-github-api (http://github.com/KnpLabs/php-github-api)', - ))); - - $this->apiVersion = $apiVersion ?: 'v3'; - $builder->addHeaderValue('Accept', sprintf('application/vnd.github.%s+json', $this->apiVersion)); - - if ($enterpriseUrl) { - $this->setEnterpriseUrl($enterpriseUrl); - } - } - - /** - * Create a Github\Client using a HttpClient. - * - * @param HttpClient $httpClient - * - * @return Client - */ - public static function createWithHttpClient(HttpClient $httpClient) - { - $builder = new Builder($httpClient); - - return new self($builder); - } - - /** - * @param string $name - * - * @throws InvalidArgumentException - * - * @return ApiInterface - */ - public function api($name) - { - switch ($name) { - case 'me': - case 'current_user': - case 'currentUser': - $api = new Api\CurrentUser($this); - break; - - case 'deployment': - case 'deployments': - $api = new Api\Deployment($this); - break; - - case 'ent': - case 'enterprise': - $api = new Api\Enterprise($this); - break; - - case 'git': - case 'git_data': - case 'gitData': - $api = new Api\GitData($this); - break; - - case 'gist': - case 'gists': - $api = new Api\Gists($this); - break; - - case 'integration': - case 'integrations': - $api = new Api\Integrations($this); - break; - - case 'issue': - case 'issues': - $api = new Api\Issue($this); - break; - - case 'markdown': - $api = new Api\Markdown($this); - break; - - case 'notification': - case 'notifications': - $api = new Api\Notification($this); - break; - - case 'organization': - case 'organizations': - $api = new Api\Organization($this); - break; - case 'org_project': - case 'orgProject': - case 'org_projects': - case 'orgProjects': - case 'organization_project': - case 'organizationProject': - case 'organization_projects': - case 'organizationProjects': - $api = new Api\Organization\Projects($this); - break; - - case 'pr': - case 'pulls': - case 'pullRequest': - case 'pull_request': - case 'pullRequests': - case 'pull_requests': - $api = new Api\PullRequest($this); - break; - - case 'rateLimit': - case 'rate_limit': - $api = new Api\RateLimit($this); - break; - - case 'repo': - case 'repos': - case 'repository': - case 'repositories': - $api = new Api\Repo($this); - break; - - case 'search': - $api = new Api\Search($this); - break; - - case 'team': - case 'teams': - $api = new Api\Organization\Teams($this); - break; - - case 'member': - case 'members': - $api = new Api\Organization\Members($this); - break; - - case 'user': - case 'users': - $api = new Api\User($this); - break; - - case 'authorization': - case 'authorizations': - $api = new Api\Authorizations($this); - break; - - case 'meta': - $api = new Api\Meta($this); - break; - case 'graphql': - $api = new Api\GraphQL($this); - break; - - default: - throw new InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name)); - } - - return $api; - } - - /** - * Authenticate a user for all next requests. - * - * @param string $tokenOrLogin GitHub private token/username/client ID - * @param null|string $password GitHub password/secret (optionally can contain $authMethod) - * @param null|string $authMethod One of the AUTH_* class constants - * - * @throws InvalidArgumentException If no authentication method was given - */ - public function authenticate($tokenOrLogin, $password = null, $authMethod = null) - { - if (null === $password && null === $authMethod) { - throw new InvalidArgumentException('You need to specify authentication method!'); - } - - if (null === $authMethod && in_array($password, array(self::AUTH_URL_TOKEN, self::AUTH_URL_CLIENT_ID, self::AUTH_HTTP_PASSWORD, self::AUTH_HTTP_TOKEN, self::AUTH_JWT))) { - $authMethod = $password; - $password = null; - } - - if (null === $authMethod) { - $authMethod = self::AUTH_HTTP_PASSWORD; - } - - $this->getHttpClientBuilder()->removePlugin(Authentication::class); - $this->getHttpClientBuilder()->addPlugin(new Authentication($tokenOrLogin, $password, $authMethod)); - } - - /** - * Sets the URL of your GitHub Enterprise instance. - * - * @param string $enterpriseUrl URL of the API in the form of http(s)://hostname - */ - private function setEnterpriseUrl($enterpriseUrl) - { - $builder = $this->getHttpClientBuilder(); - $builder->removePlugin(Plugin\AddHostPlugin::class); - $builder->removePlugin(PathPrepend::class); - - $builder->addPlugin(new Plugin\AddHostPlugin(UriFactoryDiscovery::find()->createUri($enterpriseUrl))); - $builder->addPlugin(new PathPrepend(sprintf('/api/%s', $this->getApiVersion()))); - } - - /** - * @return string - */ - public function getApiVersion() - { - return $this->apiVersion; - } - - /** - * Add a cache plugin to cache responses locally. - * - * @param CacheItemPoolInterface $cache - * @param array $config - */ - public function addCache(CacheItemPoolInterface $cachePool, array $config = []) - { - $this->getHttpClientBuilder()->addCache($cachePool, $config); - } - - /** - * Remove the cache plugin. - */ - public function removeCache() - { - $this->getHttpClientBuilder()->removeCache(); - } - - /** - * @param string $name - * - * @throws BadMethodCallException - * - * @return ApiInterface - */ - public function __call($name, $args) - { - try { - return $this->api($name); - } catch (InvalidArgumentException $e) { - throw new BadMethodCallException(sprintf('Undefined method called: "%s"', $name)); - } - } - - /** - * @return null|\Psr\Http\Message\ResponseInterface - */ - public function getLastResponse() - { - return $this->responseHistory->getLastResponse(); - } - - /** - * @return HttpMethodsClient - */ - public function getHttpClient() - { - return $this->getHttpClientBuilder()->getHttpClient(); - } - - /** - * @return Builder - */ - protected function getHttpClientBuilder() - { - return $this->httpClientBuilder; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ApiLimitExceedException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ApiLimitExceedException.php deleted file mode 100644 index 0283175..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ApiLimitExceedException.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -class ApiLimitExceedException extends RuntimeException -{ - private $limit; - private $reset; - - public function __construct($limit = 5000, $reset = 1800, $code = 0, $previous = null) - { - $this->limit = (int) $limit; - $this->reset = (int) $reset; - - parent::__construct(sprintf('You have reached GitHub hourly limit! Actual limit is: %d', $limit), $code, $previous); - } - - public function getLimit() - { - return $this->limit; - } - - public function getResetTime() - { - return $this->reset; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/BadMethodCallException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/BadMethodCallException.php deleted file mode 100644 index 83e0543..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/BadMethodCallException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ErrorException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ErrorException.php deleted file mode 100644 index 61f61f3..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ErrorException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -class ErrorException extends \ErrorException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ExceptionInterface.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ExceptionInterface.php deleted file mode 100644 index 87e6d2f..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ExceptionInterface.php +++ /dev/null @@ -1,9 +0,0 @@ - - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/MissingArgumentException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/MissingArgumentException.php deleted file mode 100644 index 4a7e372..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/MissingArgumentException.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ -class MissingArgumentException extends ErrorException -{ - public function __construct($required, $code = 0, $previous = null) - { - if (is_string($required)) { - $required = array($required); - } - - parent::__construct(sprintf('One or more of required ("%s") parameters is missing!', implode('", "', $required)), $code, $previous); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/RuntimeException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/RuntimeException.php deleted file mode 100644 index 676cb95..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/RuntimeException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php deleted file mode 100644 index 6f93fe4..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php +++ /dev/null @@ -1,19 +0,0 @@ -type = $type; - parent::__construct('Two factor authentication is enabled on this account', $code, $previous); - } - - public function getType() - { - return $this->type; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ValidationFailedException.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ValidationFailedException.php deleted file mode 100644 index c689e2d..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/Exception/ValidationFailedException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -class ValidationFailedException extends ErrorException -{ -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php deleted file mode 100644 index 5b74228..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php +++ /dev/null @@ -1,196 +0,0 @@ - - */ -class Builder -{ - /** - * The object that sends HTTP messages. - * - * @var HttpClient - */ - private $httpClient; - - /** - * A HTTP client with all our plugins. - * - * @var PluginClient - */ - private $pluginClient; - - /** - * @var MessageFactory - */ - private $requestFactory; - - /** - * @var StreamFactory - */ - private $streamFactory; - - /** - * True if we should create a new Plugin client at next request. - * - * @var bool - */ - private $httpClientModified = true; - - /** - * @var Plugin[] - */ - private $plugins = []; - - /** - * This plugin is speacal treated because it has to be the very last plugin. - * - * @var Plugin\CachePlugin - */ - private $cachePlugin; - - /** - * Http headers. - * - * @var array - */ - private $headers = []; - - /** - * @param HttpClient $httpClient - * @param RequestFactory $requestFactory - * @param StreamFactory $streamFactory - */ - public function __construct( - HttpClient $httpClient = null, - RequestFactory $requestFactory = null, - StreamFactory $streamFactory = null - ) { - $this->httpClient = $httpClient ?: HttpClientDiscovery::find(); - $this->requestFactory = $requestFactory ?: MessageFactoryDiscovery::find(); - $this->streamFactory = $streamFactory ?: StreamFactoryDiscovery::find(); - } - - /** - * @return HttpMethodsClient - */ - public function getHttpClient() - { - if ($this->httpClientModified) { - $this->httpClientModified = false; - - $plugins = $this->plugins; - if ($this->cachePlugin) { - $plugins[] = $this->cachePlugin; - } - - $this->pluginClient = new HttpMethodsClient( - new PluginClient($this->httpClient, $plugins), - $this->requestFactory - ); - } - - return $this->pluginClient; - } - - /** - * Add a new plugin to the end of the plugin chain. - * - * @param Plugin $plugin - */ - public function addPlugin(Plugin $plugin) - { - $this->plugins[] = $plugin; - $this->httpClientModified = true; - } - - /** - * Remove a plugin by its fully qualified class name (FQCN). - * - * @param string $fqcn - */ - public function removePlugin($fqcn) - { - foreach ($this->plugins as $idx => $plugin) { - if ($plugin instanceof $fqcn) { - unset($this->plugins[$idx]); - $this->httpClientModified = true; - } - } - } - - /** - * Clears used headers. - */ - public function clearHeaders() - { - $this->headers = []; - - $this->removePlugin(Plugin\HeaderAppendPlugin::class); - $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); - } - - /** - * @param array $headers - */ - public function addHeaders(array $headers) - { - $this->headers = array_merge($this->headers, $headers); - - $this->removePlugin(Plugin\HeaderAppendPlugin::class); - $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); - } - - /** - * @param string $header - * @param string $headerValue - */ - public function addHeaderValue($header, $headerValue) - { - if (!isset($this->headers[$header])) { - $this->headers[$header] = $headerValue; - } else { - $this->headers[$header] = array_merge((array)$this->headers[$header], array($headerValue)); - } - - $this->removePlugin(Plugin\HeaderAppendPlugin::class); - $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers)); - } - - /** - * Add a cache plugin to cache responses locally. - * - * @param CacheItemPoolInterface $cache - * @param array $config - */ - public function addCache(CacheItemPoolInterface $cachePool, array $config = []) - { - $this->cachePlugin = new Plugin\CachePlugin($cachePool, $this->streamFactory, $config); - $this->httpClientModified = true; - } - - /** - * Remove the cache plugin. - */ - public function removeCache() - { - $this->cachePlugin = null; - $this->httpClientModified = true; - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php deleted file mode 100644 index c841d21..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php +++ /dev/null @@ -1,81 +0,0 @@ -getBody()->__toString(); - if (strpos($response->getHeaderLine('Content-Type'), 'application/json') === 0) { - $content = json_decode($body, true); - if (JSON_ERROR_NONE === json_last_error()) { - return $content; - } - } - - return $body; - } - - /** - * @param ResponseInterface $response - * - * @return array|null - */ - public static function getPagination(ResponseInterface $response) - { - if (!$response->hasHeader('Link')) { - return null; - } - - $header = self::getHeader($response, 'Link'); - $pagination = array(); - foreach (explode(',', $header) as $link) { - preg_match('/<(.*)>; rel="(.*)"/i', trim($link, ','), $match); - - if (3 === count($match)) { - $pagination[$match[2]] = $match[1]; - } - } - - return $pagination; - } - - /** - * @param ResponseInterface $response - * - * @return null|string - */ - public static function getApiLimit(ResponseInterface $response) - { - $remainingCalls = self::getHeader($response, 'X-RateLimit-Remaining'); - - if (null !== $remainingCalls && 1 > $remainingCalls) { - throw new ApiLimitExceedException($remainingCalls); - } - - return $remainingCalls; - } - - /** - * Get the value for a single header - * @param ResponseInterface $response - * @param string $name - * - * @return string|null - */ - public static function getHeader(ResponseInterface $response, $name) - { - $headers = $response->getHeader($name); - - return array_shift($headers); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/Authentication.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/Authentication.php deleted file mode 100644 index 9601eb1..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/Authentication.php +++ /dev/null @@ -1,85 +0,0 @@ - - */ -class Authentication implements Plugin -{ - private $tokenOrLogin; - private $password; - private $method; - - public function __construct($tokenOrLogin, $password = null, $method) - { - $this->tokenOrLogin = $tokenOrLogin; - $this->password = $password; - $this->method = $method; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - switch ($this->method) { - case Client::AUTH_HTTP_PASSWORD: - $request = $request->withHeader( - 'Authorization', - sprintf('Basic %s', base64_encode($this->tokenOrLogin.':'.$this->password)) - ); - break; - - case Client::AUTH_HTTP_TOKEN: - $request = $request->withHeader('Authorization', sprintf('token %s', $this->tokenOrLogin)); - break; - - case Client::AUTH_URL_CLIENT_ID: - $uri = $request->getUri(); - $query = $uri->getQuery(); - - $parameters = array( - 'client_id' => $this->tokenOrLogin, - 'client_secret' => $this->password, - ); - - $query .= empty($query) ? '' : '&'; - $query .= utf8_encode(http_build_query($parameters, '', '&')); - - $uri = $uri->withQuery($query); - $request = $request->withUri($uri); - break; - - case Client::AUTH_URL_TOKEN: - $uri = $request->getUri(); - $query = $uri->getQuery(); - - $parameters = array('access_token' => $this->tokenOrLogin); - - $query .= empty($query) ? '' : '&'; - $query .= utf8_encode(http_build_query($parameters, '', '&')); - - $uri = $uri->withQuery($query); - $request = $request->withUri($uri); - break; - - case Client::AUTH_JWT: - $request = $request->withHeader('Authorization', sprintf('Bearer %s', $this->tokenOrLogin)); - break; - - default: - throw new RuntimeException(sprintf('%s not yet implemented', $this->method)); - break; - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php deleted file mode 100644 index cc9581e..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @author Tobias Nyholm - */ -class GithubExceptionThrower implements Plugin -{ - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - return $next($request)->then(function (ResponseInterface $response) use ($request) { - if ($response->getStatusCode() < 400 || $response->getStatusCode() > 600) { - return $response; - } - - // If error: - $remaining = ResponseMediator::getHeader($response, 'X-RateLimit-Remaining'); - if (null != $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getRequestTarget(), 1, 10)) { - $limit = ResponseMediator::getHeader($response, 'X-RateLimit-Limit'); - $reset = ResponseMediator::getHeader($response, 'X-RateLimit-Reset'); - - throw new ApiLimitExceedException($limit, $reset); - } - - if (401 === $response->getStatusCode()) { - if ($response->hasHeader('X-GitHub-OTP') && 0 === strpos((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 'required;')) { - $type = substr((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 9); - - throw new TwoFactorAuthenticationRequiredException($type); - } - } - - $content = ResponseMediator::getContent($response); - if (is_array($content) && isset($content['message'])) { - if (400 == $response->getStatusCode()) { - throw new ErrorException($content['message'], 400); - } elseif (422 == $response->getStatusCode() && isset($content['errors'])) { - $errors = array(); - foreach ($content['errors'] as $error) { - switch ($error['code']) { - case 'missing': - $errors[] = sprintf('The %s %s does not exist, for resource "%s"', $error['field'], $error['value'], $error['resource']); - break; - - case 'missing_field': - $errors[] = sprintf('Field "%s" is missing, for resource "%s"', $error['field'], $error['resource']); - break; - - case 'invalid': - if (isset($error['message'])) { - $errors[] = sprintf('Field "%s" is invalid, for resource "%s": "%s"', $error['field'], $error['resource'], $error['message']); - } else { - $errors[] = sprintf('Field "%s" is invalid, for resource "%s"', $error['field'], $error['resource']); - } - break; - - case 'already_exists': - $errors[] = sprintf('Field "%s" already exists, for resource "%s"', $error['field'], $error['resource']); - break; - - default: - $errors[] = $error['message']; - break; - - } - } - - throw new ValidationFailedException('Validation Failed: '.implode(', ', $errors), 422); - } - } - - throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode()); - }); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/History.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/History.php deleted file mode 100644 index 303d814..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/History.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class History implements Journal -{ - /** - * @var ResponseInterface - */ - private $lastResponse; - - /** - * @return ResponseInterface|null - */ - public function getLastResponse() - { - return $this->lastResponse; - } - - public function addSuccess(RequestInterface $request, ResponseInterface $response) - { - $this->lastResponse = $response; - } - - public function addFailure(RequestInterface $request, Exception $exception) - { - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/PathPrepend.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/PathPrepend.php deleted file mode 100644 index b3b840e..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/PathPrepend.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class PathPrepend implements Plugin -{ - private $path; - - /** - * @param string $path - */ - public function __construct($path) - { - $this->path = $path; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $currentPath = $request->getUri()->getPath(); - $uri = $request->getUri()->withPath($this->path.$currentPath); - - $request = $request->withUri($uri); - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPager.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPager.php deleted file mode 100644 index b63ffd6..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPager.php +++ /dev/null @@ -1,192 +0,0 @@ - - * @author Mitchel Verschoof - */ -class ResultPager implements ResultPagerInterface -{ - /** - * The GitHub Client to use for pagination. - * - * @var \Github\Client - */ - protected $client; - - /** - * Comes from pagination headers in Github API results. - * - * @var array - */ - protected $pagination; - - /** - * The Github client to use for pagination. - * - * This must be the same instance that you got the Api instance from. - * - * Example code: - * - * $client = new \Github\Client(); - * $api = $client->api('someApi'); - * $pager = new \Github\ResultPager($client); - * - * @param \Github\Client $client - */ - public function __construct(Client $client) - { - $this->client = $client; - } - - /** - * {@inheritdoc} - */ - public function getPagination() - { - return $this->pagination; - } - - /** - * {@inheritdoc} - */ - public function fetch(ApiInterface $api, $method, array $parameters = array()) - { - $result = $this->callApi($api, $method, $parameters); - $this->postFetch(); - - return $result; - } - - /** - * {@inheritdoc} - */ - public function fetchAll(ApiInterface $api, $method, array $parameters = array()) - { - $isSearch = $api instanceof Search; - - // get the perPage from the api - $perPage = $api->getPerPage(); - - // set parameters per_page to GitHub max to minimize number of requests - $api->setPerPage(100); - - $result = $this->callApi($api, $method, $parameters); - $this->postFetch(); - - if ($isSearch) { - $result = isset($result['items']) ? $result['items'] : $result; - } - - while ($this->hasNext()) { - $next = $this->fetchNext(); - - if ($isSearch) { - $result = array_merge($result, $next['items']); - } else { - $result = array_merge($result, $next); - } - } - - // restore the perPage - $api->setPerPage($perPage); - - return $result; - } - - /** - * {@inheritdoc} - */ - public function postFetch() - { - $this->pagination = ResponseMediator::getPagination($this->client->getLastResponse()); - } - - /** - * {@inheritdoc} - */ - public function hasNext() - { - return $this->has('next'); - } - - /** - * {@inheritdoc} - */ - public function fetchNext() - { - return $this->get('next'); - } - - /** - * {@inheritdoc} - */ - public function hasPrevious() - { - return $this->has('prev'); - } - - /** - * {@inheritdoc} - */ - public function fetchPrevious() - { - return $this->get('prev'); - } - - /** - * {@inheritdoc} - */ - public function fetchFirst() - { - return $this->get('first'); - } - - /** - * {@inheritdoc} - */ - public function fetchLast() - { - return $this->get('last'); - } - - /** - * {@inheritdoc} - */ - protected function has($key) - { - return !empty($this->pagination) && isset($this->pagination[$key]); - } - - /** - * {@inheritdoc} - */ - protected function get($key) - { - if ($this->has($key)) { - $result = $this->client->getHttpClient()->get($this->pagination[$key]); - $this->postFetch(); - - return ResponseMediator::getContent($result); - } - } - - /** - * @param ApiInterface $api - * @param $method - * @param array $parameters - * - * @return mixed - */ - protected function callApi(ApiInterface $api, $method, array $parameters) - { - return call_user_func_array(array($api, $method), $parameters); - } -} diff --git a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPagerInterface.php b/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPagerInterface.php deleted file mode 100644 index 1130e8e..0000000 --- a/sensitive-issue-searcher/vendor/knplabs/github-api/lib/Github/ResultPagerInterface.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @author Mitchel Verschoof - */ -interface ResultPagerInterface -{ - /** - * @return null|array pagination result of last request - */ - public function getPagination(); - - /** - * Fetch a single result (page) from an api call. - * - * @param ApiInterface $api the Api instance - * @param string $method the method name to call on the Api instance - * @param array $parameters the method parameters in an array - * - * @return array returns the result of the Api::$method() call - */ - public function fetch(ApiInterface $api, $method, array $parameters = array()); - - /** - * Fetch all results (pages) from an api call. - * - * Use with care - there is no maximum. - * - * @param ApiInterface $api the Api instance - * @param string $method the method name to call on the Api instance - * @param array $parameters the method parameters in an array - * - * @return array returns a merge of the results of the Api::$method() call - */ - public function fetchAll(ApiInterface $api, $method, array $parameters = array()); - - /** - * Method that performs the actual work to refresh the pagination property. - */ - public function postFetch(); - - /** - * Check to determine the availability of a next page. - * - * @return bool - */ - public function hasNext(); - - /** - * Check to determine the availability of a previous page. - * - * @return bool - */ - public function hasPrevious(); - - /** - * Fetch the next page. - * - * @return array - */ - public function fetchNext(); - - /** - * Fetch the previous page. - * - * @return array - */ - public function fetchPrevious(); - - /** - * Fetch the first page. - * - * @return array - */ - public function fetchFirst(); - - /** - * Fetch the last page. - * - * @return array - */ - public function fetchLast(); -} diff --git a/sensitive-issue-searcher/vendor/php-http/cache-plugin/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/cache-plugin/CHANGELOG.md deleted file mode 100644 index d6c3ed3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/cache-plugin/CHANGELOG.md +++ /dev/null @@ -1,34 +0,0 @@ -# Change Log - - -## 1.2.0 - 2016-08-16 - -### Changed - -- The default value for `default_ttl` is changed from `null` to `0`. - -### Fixed - -- Issue when you use `respect_cache_headers=>false` in combination with `default_ttl=>null`. -- We allow `cache_lifetime` to be set to `null`. - - -## 1.1.0 - 2016-08-04 - -### Added - -- Support for cache validation with ETag and Last-Modified headers. (Enabled automatically when the server sends the relevant headers.) -- `hash_algo` config option used for cache key generation (defaults to **sha1**). - -### Changed - -- Default hash algo used for cache generation (from **md5** to **sha1**). - -### Fixed - -- Cast max age header to integer in order to get valid expiration value. - - -## 1.0.0 - 2016-05-05 - -- Initial release diff --git a/sensitive-issue-searcher/vendor/php-http/cache-plugin/LICENSE b/sensitive-issue-searcher/vendor/php-http/cache-plugin/LICENSE deleted file mode 100644 index 4558d6f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/cache-plugin/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/cache-plugin/README.md b/sensitive-issue-searcher/vendor/php-http/cache-plugin/README.md deleted file mode 100644 index ce07b09..0000000 --- a/sensitive-issue-searcher/vendor/php-http/cache-plugin/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Cache Plugin - -[![Latest Version](https://img.shields.io/github/release/php-http/cache-plugin.svg?style=flat-square)](https://github.com/php-http/cache-plugin/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/cache-plugin.svg?style=flat-square)](https://travis-ci.org/php-http/cache-plugin) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/cache-plugin.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/cache-plugin) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/cache-plugin.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/cache-plugin) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/cache-plugin.svg?style=flat-square)](https://packagist.org/packages/php-http/cache-plugin) - -**PSR-6 Cache plugin for HTTPlug.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/cache-plugin -``` - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org/en/latest/plugins/cache.html). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/cache-plugin/composer.json b/sensitive-issue-searcher/vendor/php-http/cache-plugin/composer.json deleted file mode 100644 index 646bbc5..0000000 --- a/sensitive-issue-searcher/vendor/php-http/cache-plugin/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "php-http/cache-plugin", - "description": "PSR-6 Cache plugin for HTTPlug", - "license": "MIT", - "keywords": ["cache", "http", "httplug", "plugin"], - "homepage": "http://httplug.io", - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": "^5.4 || ^7.0", - "psr/cache": "^1.0", - "php-http/client-common": "^1.1", - "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5", - "henrikbjorn/phpspec-code-coverage" : "^1.0" - }, - "autoload": { - "psr-4": { - "Http\\Client\\Common\\Plugin\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "spec\\Http\\Client\\Common\\Plugin\\": "spec/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/cache-plugin/src/CachePlugin.php b/sensitive-issue-searcher/vendor/php-http/cache-plugin/src/CachePlugin.php deleted file mode 100644 index 5053aad..0000000 --- a/sensitive-issue-searcher/vendor/php-http/cache-plugin/src/CachePlugin.php +++ /dev/null @@ -1,346 +0,0 @@ - - */ -final class CachePlugin implements Plugin -{ - /** - * @var CacheItemPoolInterface - */ - private $pool; - - /** - * @var StreamFactory - */ - private $streamFactory; - - /** - * @var array - */ - private $config; - - /** - * @param CacheItemPoolInterface $pool - * @param StreamFactory $streamFactory - * @param array $config { - * - * @var bool $respect_cache_headers Whether to look at the cache directives or ignore them - * @var int $default_ttl (seconds) If we do not respect cache headers or can't calculate a good ttl, use this - * value - * @var string $hash_algo The hashing algorithm to use when generating cache keys - * @var int $cache_lifetime (seconds) To support serving a previous stale response when the server answers 304 - * we have to store the cache for a longer time than the server originally says it is valid for. - * We store a cache item for $cache_lifetime + max age of the response. - * } - */ - public function __construct(CacheItemPoolInterface $pool, StreamFactory $streamFactory, array $config = []) - { - $this->pool = $pool; - $this->streamFactory = $streamFactory; - - $optionsResolver = new OptionsResolver(); - $this->configureOptions($optionsResolver); - $this->config = $optionsResolver->resolve($config); - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $method = strtoupper($request->getMethod()); - // if the request not is cachable, move to $next - if ($method !== 'GET' && $method !== 'HEAD') { - return $next($request); - } - - // If we can cache the request - $key = $this->createCacheKey($request); - $cacheItem = $this->pool->getItem($key); - - if ($cacheItem->isHit()) { - $data = $cacheItem->get(); - // The array_key_exists() is to be removed in 2.0. - if (array_key_exists('expiresAt', $data) && ($data['expiresAt'] === null || time() < $data['expiresAt'])) { - // This item is still valid according to previous cache headers - return new FulfilledPromise($this->createResponseFromCacheItem($cacheItem)); - } - - // Add headers to ask the server if this cache is still valid - if ($modifiedSinceValue = $this->getModifiedSinceHeaderValue($cacheItem)) { - $request = $request->withHeader('If-Modified-Since', $modifiedSinceValue); - } - - if ($etag = $this->getETag($cacheItem)) { - $request = $request->withHeader('If-None-Match', $etag); - } - } - - return $next($request)->then(function (ResponseInterface $response) use ($cacheItem) { - if (304 === $response->getStatusCode()) { - if (!$cacheItem->isHit()) { - /* - * We do not have the item in cache. This plugin did not add If-Modified-Since - * or If-None-Match headers. Return the response from server. - */ - return $response; - } - - // The cached response we have is still valid - $data = $cacheItem->get(); - $maxAge = $this->getMaxAge($response); - $data['expiresAt'] = $this->calculateResponseExpiresAt($maxAge); - $cacheItem->set($data)->expiresAfter($this->calculateCacheItemExpiresAfter($maxAge)); - $this->pool->save($cacheItem); - - return $this->createResponseFromCacheItem($cacheItem); - } - - if ($this->isCacheable($response)) { - $bodyStream = $response->getBody(); - $body = $bodyStream->__toString(); - if ($bodyStream->isSeekable()) { - $bodyStream->rewind(); - } else { - $response = $response->withBody($this->streamFactory->createStream($body)); - } - - $maxAge = $this->getMaxAge($response); - $cacheItem - ->expiresAfter($this->calculateCacheItemExpiresAfter($maxAge)) - ->set([ - 'response' => $response, - 'body' => $body, - 'expiresAt' => $this->calculateResponseExpiresAt($maxAge), - 'createdAt' => time(), - 'etag' => $response->getHeader('ETag'), - ]); - $this->pool->save($cacheItem); - } - - return $response; - }); - } - - /** - * Calculate the timestamp when this cache item should be dropped from the cache. The lowest value that can be - * returned is $maxAge. - * - * @param int|null $maxAge - * - * @return int|null Unix system time passed to the PSR-6 cache - */ - private function calculateCacheItemExpiresAfter($maxAge) - { - if ($this->config['cache_lifetime'] === null && $maxAge === null) { - return; - } - - return $this->config['cache_lifetime'] + $maxAge; - } - - /** - * Calculate the timestamp when a response expires. After that timestamp, we need to send a - * If-Modified-Since / If-None-Match request to validate the response. - * - * @param int|null $maxAge - * - * @return int|null Unix system time. A null value means that the response expires when the cache item expires - */ - private function calculateResponseExpiresAt($maxAge) - { - if ($maxAge === null) { - return; - } - - return time() + $maxAge; - } - - /** - * Verify that we can cache this response. - * - * @param ResponseInterface $response - * - * @return bool - */ - protected function isCacheable(ResponseInterface $response) - { - if (!in_array($response->getStatusCode(), [200, 203, 300, 301, 302, 404, 410])) { - return false; - } - if (!$this->config['respect_cache_headers']) { - return true; - } - if ($this->getCacheControlDirective($response, 'no-store') || $this->getCacheControlDirective($response, 'private')) { - return false; - } - - return true; - } - - /** - * Get the value of a parameter in the cache control header. - * - * @param ResponseInterface $response - * @param string $name The field of Cache-Control to fetch - * - * @return bool|string The value of the directive, true if directive without value, false if directive not present - */ - private function getCacheControlDirective(ResponseInterface $response, $name) - { - $headers = $response->getHeader('Cache-Control'); - foreach ($headers as $header) { - if (preg_match(sprintf('|%s=?([0-9]+)?|i', $name), $header, $matches)) { - - // return the value for $name if it exists - if (isset($matches[1])) { - return $matches[1]; - } - - return true; - } - } - - return false; - } - - /** - * @param RequestInterface $request - * - * @return string - */ - private function createCacheKey(RequestInterface $request) - { - return hash($this->config['hash_algo'], $request->getMethod().' '.$request->getUri()); - } - - /** - * Get a ttl in seconds. It could return null if we do not respect cache headers and got no defaultTtl. - * - * @param ResponseInterface $response - * - * @return int|null - */ - private function getMaxAge(ResponseInterface $response) - { - if (!$this->config['respect_cache_headers']) { - return $this->config['default_ttl']; - } - - // check for max age in the Cache-Control header - $maxAge = $this->getCacheControlDirective($response, 'max-age'); - if (!is_bool($maxAge)) { - $ageHeaders = $response->getHeader('Age'); - foreach ($ageHeaders as $age) { - return $maxAge - ((int) $age); - } - - return (int) $maxAge; - } - - // check for ttl in the Expires header - $headers = $response->getHeader('Expires'); - foreach ($headers as $header) { - return (new \DateTime($header))->getTimestamp() - (new \DateTime())->getTimestamp(); - } - - return $this->config['default_ttl']; - } - - /** - * Configure an options resolver. - * - * @param OptionsResolver $resolver - */ - private function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'cache_lifetime' => 86400 * 30, // 30 days - 'default_ttl' => 0, - 'respect_cache_headers' => true, - 'hash_algo' => 'sha1', - ]); - - $resolver->setAllowedTypes('cache_lifetime', ['int', 'null']); - $resolver->setAllowedTypes('default_ttl', ['int', 'null']); - $resolver->setAllowedTypes('respect_cache_headers', 'bool'); - $resolver->setAllowedValues('hash_algo', hash_algos()); - } - - /** - * @param CacheItemInterface $cacheItem - * - * @return ResponseInterface - */ - private function createResponseFromCacheItem(CacheItemInterface $cacheItem) - { - $data = $cacheItem->get(); - - /** @var ResponseInterface $response */ - $response = $data['response']; - $response = $response->withBody($this->streamFactory->createStream($data['body'])); - - return $response; - } - - /** - * Get the value of the "If-Modified-Since" header. - * - * @param CacheItemInterface $cacheItem - * - * @return string|null - */ - private function getModifiedSinceHeaderValue(CacheItemInterface $cacheItem) - { - $data = $cacheItem->get(); - // The isset() is to be removed in 2.0. - if (!isset($data['createdAt'])) { - return; - } - - $modified = new \DateTime('@'.$data['createdAt']); - $modified->setTimezone(new \DateTimeZone('GMT')); - - return sprintf('%s GMT', $modified->format('l, d-M-y H:i:s')); - } - - /** - * Get the ETag from the cached response. - * - * @param CacheItemInterface $cacheItem - * - * @return string|null - */ - private function getETag(CacheItemInterface $cacheItem) - { - $data = $cacheItem->get(); - // The isset() is to be removed in 2.0. - if (!isset($data['etag'])) { - return; - } - - if (!is_array($data['etag'])) { - return $data['etag']; - } - - foreach ($data['etag'] as $etag) { - if (!empty($etag)) { - return $etag; - } - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/client-common/CHANGELOG.md deleted file mode 100644 index 6df8e3e..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/CHANGELOG.md +++ /dev/null @@ -1,97 +0,0 @@ -# Change Log - - -## 1.4.2 - 2017-03-18 - -### Deprecated - -- `DecoderPlugin` does not longer claim to support `compress` content encoding - -### Fixed - -- `DecoderPlugin` uses the right `FilteredStream` to handle `deflate` content encoding - - -## 1.4.1 - 2017-02-20 - -### Fixed - -- Cast return value of `StreamInterface::getSize` to string in `ContentLengthPlugin` - - -## 1.4.0 - 2016-11-04 - -### Added - -- Add Path plugin -- Base URI plugin that combines Add Host and Add Path plugins - - -## 1.3.0 - 2016-10-16 - -### Changed - -- Fix Emulated Trait to use Http based promise which respect the HttpAsyncClient interface -- Require Httplug 1.1 where we use HTTP specific promises. -- RedirectPlugin: use the full URL instead of the URI to properly keep track of redirects -- Add AddPathPlugin for API URLs with base path -- Add BaseUriPlugin that combines AddHostPlugin and AddPathPlugin - - -## 1.2.1 - 2016-07-26 - -### Changed - -- AddHostPlugin also sets the port if specified - - -## 1.2.0 - 2016-07-14 - -### Added - -- Suggest separate plugins in composer.json -- Introduced `debug_plugins` option for `PluginClient` - - -## 1.1.0 - 2016-05-04 - -### Added - -- Add a flexible http client providing both contract, and only emulating what's necessary -- HTTP Client Router: route requests to underlying clients -- Plugin client and core plugins moved here from `php-http/plugins` - -### Deprecated - -- Extending client classes, they will be made final in version 2.0 - - -## 1.0.0 - 2016-01-27 - -### Changed - -- Remove useless interface in BatchException - - -## 0.2.0 - 2016-01-12 - -### Changed - -- Updated package files -- Updated HTTPlug to RC1 - - -## 0.1.1 - 2015-12-26 - -### Added - -- Emulated clients - - -## 0.1.0 - 2015-12-25 - -### Added - -- Batch client from utils -- Methods client from utils -- Emulators and decorators from client-tools diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/LICENSE b/sensitive-issue-searcher/vendor/php-http/client-common/LICENSE deleted file mode 100644 index 4558d6f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/README.md b/sensitive-issue-searcher/vendor/php-http/client-common/README.md deleted file mode 100644 index 017bfce..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# HTTP Client Common - -[![Latest Version](https://img.shields.io/github/release/php-http/client-common.svg?style=flat-square)](https://github.com/php-http/client-common/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/client-common.svg?style=flat-square)](https://travis-ci.org/php-http/client-common) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/client-common.svg?style=flat-square)](https://packagist.org/packages/php-http/client-common) - -**Common HTTP Client implementations and tools for HTTPlug.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/client-common -``` - - -## Usage - -This package provides common tools for HTTP Clients: - -- BatchClient to handle sending requests in parallel -- A convenience client with HTTP method names as class methods -- Emulator, decorator layers for sync/async clients - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org/en/latest/components/client-common.html). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/composer.json b/sensitive-issue-searcher/vendor/php-http/client-common/composer.json deleted file mode 100644 index 67539d1..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "php-http/client-common", - "description": "Common HTTP Client implementations and tools for HTTPlug", - "license": "MIT", - "keywords": ["http", "client", "httplug", "common"], - "homepage": "http://httplug.io", - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": ">=5.4", - "php-http/httplug": "^1.1", - "php-http/message-factory": "^1.0", - "php-http/message": "^1.2", - "symfony/options-resolver": "^2.6 || ^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^1.0" - }, - "suggest": { - "php-http/logger-plugin": "PSR-3 Logger plugin", - "php-http/cache-plugin": "PSR-6 Cache plugin", - "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" - }, - "autoload": { - "psr-4": { - "Http\\Client\\Common\\": "src/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchClient.php deleted file mode 100644 index 2036355..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchClient.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class BatchClient implements HttpClient -{ - /** - * @var HttpClient - */ - private $client; - - /** - * @param HttpClient $client - */ - public function __construct(HttpClient $client) - { - $this->client = $client; - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) - { - return $this->client->sendRequest($request); - } - - /** - * Send several requests. - * - * You may not assume that the requests are executed in a particular order. If the order matters - * for your application, use sendRequest sequentially. - * - * @param RequestInterface[] The requests to send - * - * @return BatchResult Containing one result per request - * - * @throws BatchException If one or more requests fails. The exception gives access to the - * BatchResult with a map of request to result for success, request to - * exception for failures - */ - public function sendRequests(array $requests) - { - $batchResult = new BatchResult(); - - foreach ($requests as $request) { - try { - $response = $this->sendRequest($request); - $batchResult = $batchResult->addResponse($request, $response); - } catch (Exception $e) { - $batchResult = $batchResult->addException($request, $e); - } - } - - if ($batchResult->hasExceptions()) { - throw new BatchException($batchResult); - } - - return $batchResult; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchResult.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchResult.php deleted file mode 100644 index 710611d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/BatchResult.php +++ /dev/null @@ -1,181 +0,0 @@ - - */ -final class BatchResult -{ - /** - * @var \SplObjectStorage - */ - private $responses; - - /** - * @var \SplObjectStorage - */ - private $exceptions; - - public function __construct() - { - $this->responses = new \SplObjectStorage(); - $this->exceptions = new \SplObjectStorage(); - } - - /** - * Checks if there are any successful responses at all. - * - * @return bool - */ - public function hasResponses() - { - return $this->responses->count() > 0; - } - - /** - * Returns all successful responses. - * - * @return ResponseInterface[] - */ - public function getResponses() - { - $responses = []; - - foreach ($this->responses as $request) { - $responses[] = $this->responses[$request]; - } - - return $responses; - } - - /** - * Checks if there is a successful response for a request. - * - * @param RequestInterface $request - * - * @return bool - */ - public function isSuccessful(RequestInterface $request) - { - return $this->responses->contains($request); - } - - /** - * Returns the response for a successful request. - * - * @param RequestInterface $request - * - * @return ResponseInterface - * - * @throws \UnexpectedValueException If request was not part of the batch or failed - */ - public function getResponseFor(RequestInterface $request) - { - try { - return $this->responses[$request]; - } catch (\UnexpectedValueException $e) { - throw new \UnexpectedValueException('Request not found', $e->getCode(), $e); - } - } - - /** - * Adds a response in an immutable way. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * - * @return BatchResult the new BatchResult with this request-response pair added to it - */ - public function addResponse(RequestInterface $request, ResponseInterface $response) - { - $new = clone $this; - $new->responses->attach($request, $response); - - return $new; - } - - /** - * Checks if there are any unsuccessful requests at all. - * - * @return bool - */ - public function hasExceptions() - { - return $this->exceptions->count() > 0; - } - - /** - * Returns all exceptions for the unsuccessful requests. - * - * @return Exception[] - */ - public function getExceptions() - { - $exceptions = []; - - foreach ($this->exceptions as $request) { - $exceptions[] = $this->exceptions[$request]; - } - - return $exceptions; - } - - /** - * Checks if there is an exception for a request, meaning the request failed. - * - * @param RequestInterface $request - * - * @return bool - */ - public function isFailed(RequestInterface $request) - { - return $this->exceptions->contains($request); - } - - /** - * Returns the exception for a failed request. - * - * @param RequestInterface $request - * - * @return Exception - * - * @throws \UnexpectedValueException If request was not part of the batch or was successful - */ - public function getExceptionFor(RequestInterface $request) - { - try { - return $this->exceptions[$request]; - } catch (\UnexpectedValueException $e) { - throw new \UnexpectedValueException('Request not found', $e->getCode(), $e); - } - } - - /** - * Adds an exception in an immutable way. - * - * @param RequestInterface $request - * @param Exception $exception - * - * @return BatchResult the new BatchResult with this request-exception pair added to it - */ - public function addException(RequestInterface $request, Exception $exception) - { - $new = clone $this; - $new->exceptions->attach($request, $exception); - - return $new; - } - - public function __clone() - { - $this->responses = clone $this->responses; - $this->exceptions = clone $this->exceptions; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpAsyncClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpAsyncClient.php deleted file mode 100644 index 1b16316..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpAsyncClient.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -class EmulatedHttpAsyncClient implements HttpClient, HttpAsyncClient -{ - use HttpAsyncClientEmulator; - use HttpClientDecorator; - - /** - * @param HttpClient $httpClient - */ - public function __construct(HttpClient $httpClient) - { - $this->httpClient = $httpClient; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpClient.php deleted file mode 100644 index 01046c8..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/EmulatedHttpClient.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -class EmulatedHttpClient implements HttpClient, HttpAsyncClient -{ - use HttpAsyncClientDecorator; - use HttpClientEmulator; - - /** - * @param HttpAsyncClient $httpAsyncClient - */ - public function __construct(HttpAsyncClient $httpAsyncClient) - { - $this->httpAsyncClient = $httpAsyncClient; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/BatchException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/BatchException.php deleted file mode 100644 index 66a9271..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/BatchException.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -final class BatchException extends TransferException -{ - /** - * @var BatchResult - */ - private $result; - - /** - * @param BatchResult $result - */ - public function __construct(BatchResult $result) - { - $this->result = $result; - } - - /** - * Returns the BatchResult that contains all responses and exceptions. - * - * @return BatchResult - */ - public function getResult() - { - return $this->result; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/CircularRedirectionException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/CircularRedirectionException.php deleted file mode 100644 index 73ec521..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/CircularRedirectionException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class CircularRedirectionException extends HttpException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ClientErrorException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ClientErrorException.php deleted file mode 100644 index b1f6cc8..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ClientErrorException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class ClientErrorException extends HttpException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/LoopException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/LoopException.php deleted file mode 100644 index e834124..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/LoopException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class LoopException extends RequestException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/MultipleRedirectionException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/MultipleRedirectionException.php deleted file mode 100644 index ae514cd..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/MultipleRedirectionException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class MultipleRedirectionException extends HttpException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ServerErrorException.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ServerErrorException.php deleted file mode 100644 index 665d724..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Exception/ServerErrorException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class ServerErrorException extends HttpException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/FlexibleHttpClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/FlexibleHttpClient.php deleted file mode 100644 index 58f8813..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/FlexibleHttpClient.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -final class FlexibleHttpClient implements HttpClient, HttpAsyncClient -{ - use HttpClientDecorator; - use HttpAsyncClientDecorator; - - /** - * @param HttpClient|HttpAsyncClient $client - */ - public function __construct($client) - { - if (!($client instanceof HttpClient) && !($client instanceof HttpAsyncClient)) { - throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Http\\Client\\HttpAsyncClient'); - } - - $this->httpClient = $client; - $this->httpAsyncClient = $client; - - if (!($this->httpClient instanceof HttpClient)) { - $this->httpClient = new EmulatedHttpClient($this->httpClient); - } - - if (!($this->httpAsyncClient instanceof HttpAsyncClient)) { - $this->httpAsyncClient = new EmulatedHttpAsyncClient($this->httpAsyncClient); - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientDecorator.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientDecorator.php deleted file mode 100644 index 6eb576c..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientDecorator.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -trait HttpAsyncClientDecorator -{ - /** - * @var HttpAsyncClient - */ - protected $httpAsyncClient; - - /** - * {@inheritdoc} - * - * @see HttpAsyncClient::sendAsyncRequest - */ - public function sendAsyncRequest(RequestInterface $request) - { - return $this->httpAsyncClient->sendAsyncRequest($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientEmulator.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientEmulator.php deleted file mode 100644 index c0ba354..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpAsyncClientEmulator.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -trait HttpAsyncClientEmulator -{ - /** - * {@inheritdoc} - * - * @see HttpClient::sendRequest - */ - abstract public function sendRequest(RequestInterface $request); - - /** - * {@inheritdoc} - * - * @see HttpAsyncClient::sendAsyncRequest - */ - public function sendAsyncRequest(RequestInterface $request) - { - try { - return new Promise\HttpFulfilledPromise($this->sendRequest($request)); - } catch (Exception $e) { - return new Promise\HttpRejectedPromise($e); - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientDecorator.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientDecorator.php deleted file mode 100644 index a33d5ef..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientDecorator.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -trait HttpClientDecorator -{ - /** - * @var HttpClient - */ - protected $httpClient; - - /** - * {@inheritdoc} - * - * @see HttpClient::sendRequest - */ - public function sendRequest(RequestInterface $request) - { - return $this->httpClient->sendRequest($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientEmulator.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientEmulator.php deleted file mode 100644 index dbec1ab..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientEmulator.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -trait HttpClientEmulator -{ - /** - * {@inheritdoc} - * - * @see HttpClient::sendRequest - */ - public function sendRequest(RequestInterface $request) - { - $promise = $this->sendAsyncRequest($request); - - return $promise->wait(); - } - - /** - * {@inheritdoc} - * - * @see HttpAsyncClient::sendAsyncRequest - */ - abstract public function sendAsyncRequest(RequestInterface $request); -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientRouter.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientRouter.php deleted file mode 100644 index 9f72133..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpClientRouter.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -final class HttpClientRouter implements HttpClient, HttpAsyncClient -{ - /** - * @var array - */ - private $clients = []; - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) - { - $client = $this->chooseHttpClient($request); - - return $client->sendRequest($request); - } - - /** - * {@inheritdoc} - */ - public function sendAsyncRequest(RequestInterface $request) - { - $client = $this->chooseHttpClient($request); - - return $client->sendAsyncRequest($request); - } - - /** - * Add a client to the router. - * - * @param HttpClient|HttpAsyncClient $client - * @param RequestMatcher $requestMatcher - */ - public function addClient($client, RequestMatcher $requestMatcher) - { - $this->clients[] = [ - 'matcher' => $requestMatcher, - 'client' => new FlexibleHttpClient($client), - ]; - } - - /** - * Choose an HTTP client given a specific request. - * - * @param RequestInterface $request - * - * @return HttpClient|HttpAsyncClient - */ - protected function chooseHttpClient(RequestInterface $request) - { - foreach ($this->clients as $client) { - if ($client['matcher']->matches($request)) { - return $client['client']; - } - } - - throw new RequestException('No client found for the specified request', $request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpMethodsClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpMethodsClient.php deleted file mode 100644 index 58804fc..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/HttpMethodsClient.php +++ /dev/null @@ -1,205 +0,0 @@ -get('/foo') - * ->post('/bar') - * ; - * - * The client also exposes the sendRequest methods of the wrapped HttpClient. - * - * @author Márk Sági-Kazár - * @author David Buchmann - */ -class HttpMethodsClient implements HttpClient -{ - /** - * @var HttpClient - */ - private $httpClient; - - /** - * @var RequestFactory - */ - private $requestFactory; - - /** - * @param HttpClient $httpClient The client to send requests with - * @param RequestFactory $requestFactory The message factory to create requests - */ - public function __construct(HttpClient $httpClient, RequestFactory $requestFactory) - { - $this->httpClient = $httpClient; - $this->requestFactory = $requestFactory; - } - - /** - * Sends a GET request. - * - * @param string|UriInterface $uri - * @param array $headers - * - * @throws Exception - * - * @return ResponseInterface - */ - public function get($uri, array $headers = []) - { - return $this->send('GET', $uri, $headers, null); - } - - /** - * Sends an HEAD request. - * - * @param string|UriInterface $uri - * @param array $headers - * - * @throws Exception - * - * @return ResponseInterface - */ - public function head($uri, array $headers = []) - { - return $this->send('HEAD', $uri, $headers, null); - } - - /** - * Sends a TRACE request. - * - * @param string|UriInterface $uri - * @param array $headers - * - * @throws Exception - * - * @return ResponseInterface - */ - public function trace($uri, array $headers = []) - { - return $this->send('TRACE', $uri, $headers, null); - } - - /** - * Sends a POST request. - * - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function post($uri, array $headers = [], $body = null) - { - return $this->send('POST', $uri, $headers, $body); - } - - /** - * Sends a PUT request. - * - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function put($uri, array $headers = [], $body = null) - { - return $this->send('PUT', $uri, $headers, $body); - } - - /** - * Sends a PATCH request. - * - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function patch($uri, array $headers = [], $body = null) - { - return $this->send('PATCH', $uri, $headers, $body); - } - - /** - * Sends a DELETE request. - * - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function delete($uri, array $headers = [], $body = null) - { - return $this->send('DELETE', $uri, $headers, $body); - } - - /** - * Sends an OPTIONS request. - * - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function options($uri, array $headers = [], $body = null) - { - return $this->send('OPTIONS', $uri, $headers, $body); - } - - /** - * Sends a request with any HTTP method. - * - * @param string $method HTTP method to use - * @param string|UriInterface $uri - * @param array $headers - * @param string|StreamInterface|null $body - * - * @throws Exception - * - * @return ResponseInterface - */ - public function send($method, $uri, array $headers = [], $body = null) - { - return $this->sendRequest($this->requestFactory->createRequest( - $method, - $uri, - $headers, - $body - )); - } - - /** - * Forward to the underlying HttpClient. - * - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) - { - return $this->httpClient->sendRequest($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin.php deleted file mode 100644 index 89a2a62..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -interface Plugin -{ - /** - * Handle the request and return the response coming from the next callable. - * - * @see http://docs.php-http.org/en/latest/plugins/build-your-own.html - * - * @param RequestInterface $request - * @param callable $next Next middleware in the chain, the request is passed as the first argument - * @param callable $first First middleware in the chain, used to to restart a request - * - * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient). - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first); -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddHostPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddHostPlugin.php deleted file mode 100644 index 9e35de2..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddHostPlugin.php +++ /dev/null @@ -1,77 +0,0 @@ - - */ -final class AddHostPlugin implements Plugin -{ - /** - * @var UriInterface - */ - private $host; - - /** - * @var bool - */ - private $replace; - - /** - * @param UriInterface $host - * @param array $config { - * - * @var bool $replace True will replace all hosts, false will only add host when none is specified. - * } - */ - public function __construct(UriInterface $host, array $config = []) - { - if ($host->getHost() === '') { - throw new \LogicException('Host can not be empty'); - } - - $this->host = $host; - - $resolver = new OptionsResolver(); - $this->configureOptions($resolver); - $options = $resolver->resolve($config); - - $this->replace = $options['replace']; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - if ($this->replace || $request->getUri()->getHost() === '') { - $uri = $request->getUri() - ->withHost($this->host->getHost()) - ->withScheme($this->host->getScheme()) - ->withPort($this->host->getPort()) - ; - - $request = $request->withUri($uri); - } - - return $next($request); - } - - /** - * @param OptionsResolver $resolver - */ - private function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults([ - 'replace' => false, - ]); - $resolver->setAllowedTypes('replace', 'bool'); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php deleted file mode 100644 index 18fdf52..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -final class AddPathPlugin implements Plugin -{ - /** - * @var UriInterface - */ - private $uri; - - /** - * @param UriInterface $uri - */ - public function __construct(UriInterface $uri) - { - if ($uri->getPath() === '') { - throw new \LogicException('URI path cannot be empty'); - } - - if (substr($uri->getPath(), -1) === '/') { - throw new \LogicException('URI path cannot end with a slash.'); - } - - $this->uri = $uri; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $request = $request->withUri($request->getUri() - ->withPath($this->uri->getPath().$request->getUri()->getPath()) - ); - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php deleted file mode 100644 index 194712f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -final class AuthenticationPlugin implements Plugin -{ - /** - * @var Authentication An authentication system - */ - private $authentication; - - /** - * @param Authentication $authentication - */ - public function __construct(Authentication $authentication) - { - $this->authentication = $authentication; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $request = $this->authentication->authenticate($request); - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php deleted file mode 100644 index 2c2a775..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -final class BaseUriPlugin implements Plugin -{ - /** - * @var AddHostPlugin - */ - private $addHostPlugin; - - /** - * @var AddPathPlugin|null - */ - private $addPathPlugin = null; - - /** - * @param UriInterface $uri Has to contain a host name and cans have a path. - * @param array $hostConfig Config for AddHostPlugin. @see AddHostPlugin::configureOptions - */ - public function __construct(UriInterface $uri, array $hostConfig = []) - { - $this->addHostPlugin = new AddHostPlugin($uri, $hostConfig); - - if (rtrim($uri->getPath(), '/')) { - $this->addPathPlugin = new AddPathPlugin($uri); - } - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $addHostNext = function (RequestInterface $request) use ($next, $first) { - return $this->addHostPlugin->handleRequest($request, $next, $first); - }; - - if ($this->addPathPlugin) { - return $this->addPathPlugin->handleRequest($request, $addHostNext, $first); - } - - return $addHostNext($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ContentLengthPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ContentLengthPlugin.php deleted file mode 100644 index 0f7aafa..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ContentLengthPlugin.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class ContentLengthPlugin implements Plugin -{ - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - if (!$request->hasHeader('Content-Length')) { - $stream = $request->getBody(); - - // Cannot determine the size so we use a chunk stream - if (null === $stream->getSize()) { - $stream = new ChunkStream($stream); - $request = $request->withBody($stream); - $request = $request->withAddedHeader('Transfer-Encoding', 'chunked'); - } else { - $request = $request->withHeader('Content-Length', (string) $stream->getSize()); - } - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/CookiePlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/CookiePlugin.php deleted file mode 100644 index af306e5..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/CookiePlugin.php +++ /dev/null @@ -1,170 +0,0 @@ - - */ -final class CookiePlugin implements Plugin -{ - /** - * Cookie storage. - * - * @var CookieJar - */ - private $cookieJar; - - /** - * @param CookieJar $cookieJar - */ - public function __construct(CookieJar $cookieJar) - { - $this->cookieJar = $cookieJar; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->cookieJar->getCookies() as $cookie) { - if ($cookie->isExpired()) { - continue; - } - - if (!$cookie->matchDomain($request->getUri()->getHost())) { - continue; - } - - if (!$cookie->matchPath($request->getUri()->getPath())) { - continue; - } - - if ($cookie->isSecure() && ($request->getUri()->getScheme() !== 'https')) { - continue; - } - - $request = $request->withAddedHeader('Cookie', sprintf('%s=%s', $cookie->getName(), $cookie->getValue())); - } - - return $next($request)->then(function (ResponseInterface $response) use ($request) { - if ($response->hasHeader('Set-Cookie')) { - $setCookies = $response->getHeader('Set-Cookie'); - - foreach ($setCookies as $setCookie) { - $cookie = $this->createCookie($request, $setCookie); - - // Cookie invalid do not use it - if (null === $cookie) { - continue; - } - - // Restrict setting cookie from another domain - if (false === strpos($cookie->getDomain(), $request->getUri()->getHost())) { - continue; - } - - $this->cookieJar->addCookie($cookie); - } - } - - return $response; - }); - } - - /** - * Creates a cookie from a string. - * - * @param RequestInterface $request - * @param $setCookie - * - * @return Cookie|null - * - * @throws TransferException - */ - private function createCookie(RequestInterface $request, $setCookie) - { - $parts = array_map('trim', explode(';', $setCookie)); - - if (empty($parts) || !strpos($parts[0], '=')) { - return; - } - - list($name, $cookieValue) = $this->createValueKey(array_shift($parts)); - - $maxAge = null; - $expires = null; - $domain = $request->getUri()->getHost(); - $path = $request->getUri()->getPath(); - $secure = false; - $httpOnly = false; - - // Add the cookie pieces into the parsed data array - foreach ($parts as $part) { - list($key, $value) = $this->createValueKey($part); - - switch (strtolower($key)) { - case 'expires': - $expires = \DateTime::createFromFormat(\DateTime::COOKIE, $value); - - if (true !== ($expires instanceof \DateTime)) { - throw new TransferException( - sprintf( - 'Cookie header `%s` expires value `%s` could not be converted to date', - $name, - $value - ) - ); - } - break; - - case 'max-age': - $maxAge = (int) $value; - break; - - case 'domain': - $domain = $value; - break; - - case 'path': - $path = $value; - break; - - case 'secure': - $secure = true; - break; - - case 'httponly': - $httpOnly = true; - break; - } - } - - return new Cookie($name, $cookieValue, $maxAge, $domain, $path, $secure, $httpOnly, $expires); - } - - /** - * Separates key/value pair from cookie. - * - * @param $part - * - * @return array - */ - private function createValueKey($part) - { - $parts = explode('=', $part, 2); - $key = trim($parts[0]); - $value = isset($parts[1]) ? trim($parts[1]) : true; - - return [$key, $value]; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/DecoderPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/DecoderPlugin.php deleted file mode 100644 index 7666c64..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/DecoderPlugin.php +++ /dev/null @@ -1,140 +0,0 @@ - - */ -final class DecoderPlugin implements Plugin -{ - /** - * @var bool Whether this plugin decode stream with value in the Content-Encoding header (default to true). - * - * If set to false only the Transfer-Encoding header will be used - */ - private $useContentEncoding; - - /** - * @param array $config { - * - * @var bool $use_content_encoding Whether this plugin should look at the Content-Encoding header first or only at the Transfer-Encoding (defaults to true). - * } - */ - public function __construct(array $config = []) - { - $resolver = new OptionsResolver(); - $resolver->setDefaults([ - 'use_content_encoding' => true, - ]); - $resolver->setAllowedTypes('use_content_encoding', 'bool'); - $options = $resolver->resolve($config); - - $this->useContentEncoding = $options['use_content_encoding']; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $encodings = extension_loaded('zlib') ? ['gzip', 'deflate'] : ['identity']; - - if ($this->useContentEncoding) { - $request = $request->withHeader('Accept-Encoding', $encodings); - } - $encodings[] = 'chunked'; - $request = $request->withHeader('TE', $encodings); - - return $next($request)->then(function (ResponseInterface $response) { - return $this->decodeResponse($response); - }); - } - - /** - * Decode a response body given its Transfer-Encoding or Content-Encoding value. - * - * @param ResponseInterface $response Response to decode - * - * @return ResponseInterface New response decoded - */ - private function decodeResponse(ResponseInterface $response) - { - $response = $this->decodeOnEncodingHeader('Transfer-Encoding', $response); - - if ($this->useContentEncoding) { - $response = $this->decodeOnEncodingHeader('Content-Encoding', $response); - } - - return $response; - } - - /** - * Decode a response on a specific header (content encoding or transfer encoding mainly). - * - * @param string $headerName Name of the header - * @param ResponseInterface $response Response - * - * @return ResponseInterface A new instance of the response decoded - */ - private function decodeOnEncodingHeader($headerName, ResponseInterface $response) - { - if ($response->hasHeader($headerName)) { - $encodings = $response->getHeader($headerName); - $newEncodings = []; - - while ($encoding = array_pop($encodings)) { - $stream = $this->decorateStream($encoding, $response->getBody()); - - if (false === $stream) { - array_unshift($newEncodings, $encoding); - - continue; - } - - $response = $response->withBody($stream); - } - - $response = $response->withHeader($headerName, $newEncodings); - } - - return $response; - } - - /** - * Decorate a stream given an encoding. - * - * @param string $encoding - * @param StreamInterface $stream - * - * @return StreamInterface|false A new stream interface or false if encoding is not supported - */ - private function decorateStream($encoding, StreamInterface $stream) - { - if (strtolower($encoding) == 'chunked') { - return new Encoding\DechunkStream($stream); - } - - if (strtolower($encoding) == 'deflate') { - return new Encoding\DecompressStream($stream); - } - - if (strtolower($encoding) == 'gzip') { - return new Encoding\GzipDecodeStream($stream); - } - - return false; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ErrorPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ErrorPlugin.php deleted file mode 100644 index f09d3b1..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/ErrorPlugin.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -final class ErrorPlugin implements Plugin -{ - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $promise = $next($request); - - return $promise->then(function (ResponseInterface $response) use ($request) { - return $this->transformResponseToException($request, $response); - }); - } - - /** - * Transform response to an error if possible. - * - * @param RequestInterface $request Request of the call - * @param ResponseInterface $response Response of the call - * - * @throws ClientErrorException If response status code is a 4xx - * @throws ServerErrorException If response status code is a 5xx - * - * @return ResponseInterface If status code is not in 4xx or 5xx return response - */ - protected function transformResponseToException(RequestInterface $request, ResponseInterface $response) - { - if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { - throw new ClientErrorException($response->getReasonPhrase(), $request, $response); - } - - if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { - throw new ServerErrorException($response->getReasonPhrase(), $request, $response); - } - - return $response; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderAppendPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderAppendPlugin.php deleted file mode 100644 index 1e7b320..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderAppendPlugin.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -final class HeaderAppendPlugin implements Plugin -{ - /** - * @var array - */ - private $headers = []; - - /** - * @param array $headers Hashmap of header name to header value - */ - public function __construct(array $headers) - { - $this->headers = $headers; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->headers as $header => $headerValue) { - $request = $request->withAddedHeader($header, $headerValue); - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderDefaultsPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderDefaultsPlugin.php deleted file mode 100644 index 6dfc111..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderDefaultsPlugin.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -final class HeaderDefaultsPlugin implements Plugin -{ - /** - * @var array - */ - private $headers = []; - - /** - * @param array $headers Hashmap of header name to header value - */ - public function __construct(array $headers) - { - $this->headers = $headers; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->headers as $header => $headerValue) { - if (!$request->hasHeader($header)) { - $request = $request->withHeader($header, $headerValue); - } - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php deleted file mode 100644 index fc9c19d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderRemovePlugin.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -final class HeaderRemovePlugin implements Plugin -{ - /** - * @var array - */ - private $headers = []; - - /** - * @param array $headers List of header names to remove from the request - */ - public function __construct(array $headers) - { - $this->headers = $headers; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->headers as $header) { - if ($request->hasHeader($header)) { - $request = $request->withoutHeader($header); - } - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderSetPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderSetPlugin.php deleted file mode 100644 index 75f11d4..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HeaderSetPlugin.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -final class HeaderSetPlugin implements Plugin -{ - /** - * @var array - */ - private $headers = []; - - /** - * @param array $headers Hashmap of header name to header value - */ - public function __construct(array $headers) - { - $this->headers = $headers; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - foreach ($this->headers as $header => $headerValue) { - $request = $request->withHeader($header, $headerValue); - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HistoryPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HistoryPlugin.php deleted file mode 100644 index 5abddbd..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/HistoryPlugin.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -final class HistoryPlugin implements Plugin -{ - /** - * Journal use to store request / responses / exception. - * - * @var Journal - */ - private $journal; - - /** - * @param Journal $journal - */ - public function __construct(Journal $journal) - { - $this->journal = $journal; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $journal = $this->journal; - - return $next($request)->then(function (ResponseInterface $response) use ($request, $journal) { - $journal->addSuccess($request, $response); - - return $response; - }, function (Exception $exception) use ($request, $journal) { - $journal->addFailure($request, $exception); - - throw $exception; - }); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/Journal.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/Journal.php deleted file mode 100644 index 15f3095..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/Journal.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -interface Journal -{ - /** - * Record a successful call. - * - * @param RequestInterface $request Request use to make the call - * @param ResponseInterface $response Response returned by the call - */ - public function addSuccess(RequestInterface $request, ResponseInterface $response); - - /** - * Record a failed call. - * - * @param RequestInterface $request Request use to make the call - * @param Exception $exception Exception returned by the call - */ - public function addFailure(RequestInterface $request, Exception $exception); -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RedirectPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RedirectPlugin.php deleted file mode 100644 index d2f442e..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RedirectPlugin.php +++ /dev/null @@ -1,270 +0,0 @@ - - */ -class RedirectPlugin implements Plugin -{ - /** - * Rule on how to redirect, change method for the new request. - * - * @var array - */ - protected $redirectCodes = [ - 300 => [ - 'switch' => [ - 'unless' => ['GET', 'HEAD'], - 'to' => 'GET', - ], - 'multiple' => true, - 'permanent' => false, - ], - 301 => [ - 'switch' => [ - 'unless' => ['GET', 'HEAD'], - 'to' => 'GET', - ], - 'multiple' => false, - 'permanent' => true, - ], - 302 => [ - 'switch' => [ - 'unless' => ['GET', 'HEAD'], - 'to' => 'GET', - ], - 'multiple' => false, - 'permanent' => false, - ], - 303 => [ - 'switch' => [ - 'unless' => ['GET', 'HEAD'], - 'to' => 'GET', - ], - 'multiple' => false, - 'permanent' => false, - ], - 307 => [ - 'switch' => false, - 'multiple' => false, - 'permanent' => false, - ], - 308 => [ - 'switch' => false, - 'multiple' => false, - 'permanent' => true, - ], - ]; - - /** - * Determine how header should be preserved from old request. - * - * @var bool|array - * - * true will keep all previous headers (default value) - * false will ditch all previous headers - * string[] will keep only headers with the specified names - */ - protected $preserveHeader; - - /** - * Store all previous redirect from 301 / 308 status code. - * - * @var array - */ - protected $redirectStorage = []; - - /** - * Whether the location header must be directly used for a multiple redirection status code (300). - * - * @var bool - */ - protected $useDefaultForMultiple; - - /** - * @var array - */ - protected $circularDetection = []; - - /** - * @param array $config { - * - * @var bool|string[] $preserve_header True keeps all headers, false remove all of them, an array is interpreted as a list of header names to keep - * @var bool $use_default_for_multiple Whether the location header must be directly used for a multiple redirection status code (300). - * } - */ - public function __construct(array $config = []) - { - $resolver = new OptionsResolver(); - $resolver->setDefaults([ - 'preserve_header' => true, - 'use_default_for_multiple' => true, - ]); - $resolver->setAllowedTypes('preserve_header', ['bool', 'array']); - $resolver->setAllowedTypes('use_default_for_multiple', 'bool'); - $resolver->setNormalizer('preserve_header', function (OptionsResolver $resolver, $value) { - if (is_bool($value) && false === $value) { - return []; - } - - return $value; - }); - $options = $resolver->resolve($config); - - $this->preserveHeader = $options['preserve_header']; - $this->useDefaultForMultiple = $options['use_default_for_multiple']; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - // Check in storage - if (array_key_exists((string) $request->getUri(), $this->redirectStorage)) { - $uri = $this->redirectStorage[(string) $request->getUri()]['uri']; - $statusCode = $this->redirectStorage[(string) $request->getUri()]['status']; - $redirectRequest = $this->buildRedirectRequest($request, $uri, $statusCode); - - return $first($redirectRequest); - } - - return $next($request)->then(function (ResponseInterface $response) use ($request, $first) { - $statusCode = $response->getStatusCode(); - - if (!array_key_exists($statusCode, $this->redirectCodes)) { - return $response; - } - - $uri = $this->createUri($response, $request); - $redirectRequest = $this->buildRedirectRequest($request, $uri, $statusCode); - $chainIdentifier = spl_object_hash((object) $first); - - if (!array_key_exists($chainIdentifier, $this->circularDetection)) { - $this->circularDetection[$chainIdentifier] = []; - } - - $this->circularDetection[$chainIdentifier][] = (string) $request->getUri(); - - if (in_array((string) $redirectRequest->getUri(), $this->circularDetection[$chainIdentifier])) { - throw new CircularRedirectionException('Circular redirection detected', $request, $response); - } - - if ($this->redirectCodes[$statusCode]['permanent']) { - $this->redirectStorage[(string) $request->getUri()] = [ - 'uri' => $uri, - 'status' => $statusCode, - ]; - } - - // Call redirect request in synchrone - $redirectPromise = $first($redirectRequest); - - return $redirectPromise->wait(); - }); - } - - /** - * Builds the redirect request. - * - * @param RequestInterface $request Original request - * @param UriInterface $uri New uri - * @param int $statusCode Status code from the redirect response - * - * @return MessageInterface|RequestInterface - */ - protected function buildRedirectRequest(RequestInterface $request, UriInterface $uri, $statusCode) - { - $request = $request->withUri($uri); - - if (false !== $this->redirectCodes[$statusCode]['switch'] && !in_array($request->getMethod(), $this->redirectCodes[$statusCode]['switch']['unless'])) { - $request = $request->withMethod($this->redirectCodes[$statusCode]['switch']['to']); - } - - if (is_array($this->preserveHeader)) { - $headers = array_keys($request->getHeaders()); - - foreach ($headers as $name) { - if (!in_array($name, $this->preserveHeader)) { - $request = $request->withoutHeader($name); - } - } - } - - return $request; - } - - /** - * Creates a new Uri from the old request and the location header. - * - * @param ResponseInterface $response The redirect response - * @param RequestInterface $request The original request - * - * @throws HttpException If location header is not usable (missing or incorrect) - * @throws MultipleRedirectionException If a 300 status code is received and default location cannot be resolved (doesn't use the location header or not present) - * - * @return UriInterface - */ - private function createUri(ResponseInterface $response, RequestInterface $request) - { - if ($this->redirectCodes[$response->getStatusCode()]['multiple'] && (!$this->useDefaultForMultiple || !$response->hasHeader('Location'))) { - throw new MultipleRedirectionException('Cannot choose a redirection', $request, $response); - } - - if (!$response->hasHeader('Location')) { - throw new HttpException('Redirect status code, but no location header present in the response', $request, $response); - } - - $location = $response->getHeaderLine('Location'); - $parsedLocation = parse_url($location); - - if (false === $parsedLocation) { - throw new HttpException(sprintf('Location %s could not be parsed', $location), $request, $response); - } - - $uri = $request->getUri(); - - if (array_key_exists('scheme', $parsedLocation)) { - $uri = $uri->withScheme($parsedLocation['scheme']); - } - - if (array_key_exists('host', $parsedLocation)) { - $uri = $uri->withHost($parsedLocation['host']); - } - - if (array_key_exists('port', $parsedLocation)) { - $uri = $uri->withPort($parsedLocation['port']); - } - - if (array_key_exists('path', $parsedLocation)) { - $uri = $uri->withPath($parsedLocation['path']); - } - - if (array_key_exists('query', $parsedLocation)) { - $uri = $uri->withQuery($parsedLocation['query']); - } else { - $uri = $uri->withQuery(''); - } - - if (array_key_exists('fragment', $parsedLocation)) { - $uri = $uri->withFragment($parsedLocation['fragment']); - } else { - $uri = $uri->withFragment(''); - } - - return $uri; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RequestMatcherPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RequestMatcherPlugin.php deleted file mode 100644 index 5f72b02..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RequestMatcherPlugin.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class RequestMatcherPlugin implements Plugin -{ - /** - * @var RequestMatcher - */ - private $requestMatcher; - - /** - * @var Plugin - */ - private $delegatedPlugin; - - /** - * @param RequestMatcher $requestMatcher - * @param Plugin $delegatedPlugin - */ - public function __construct(RequestMatcher $requestMatcher, Plugin $delegatedPlugin) - { - $this->requestMatcher = $requestMatcher; - $this->delegatedPlugin = $delegatedPlugin; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - if ($this->requestMatcher->matches($request)) { - return $this->delegatedPlugin->handleRequest($request, $next, $first); - } - - return $next($request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RetryPlugin.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RetryPlugin.php deleted file mode 100644 index bbb1ffa..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/Plugin/RetryPlugin.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ -final class RetryPlugin implements Plugin -{ - /** - * Number of retry before sending an exception. - * - * @var int - */ - private $retry; - - /** - * Store the retry counter for each request. - * - * @var array - */ - private $retryStorage = []; - - /** - * @param array $config { - * - * @var int $retries Number of retries to attempt if an exception occurs before letting the exception bubble up. - * } - */ - public function __construct(array $config = []) - { - $resolver = new OptionsResolver(); - $resolver->setDefaults([ - 'retries' => 1, - ]); - $resolver->setAllowedTypes('retries', 'int'); - $options = $resolver->resolve($config); - - $this->retry = $options['retries']; - } - - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) - { - $chainIdentifier = spl_object_hash((object) $first); - - return $next($request)->then(function (ResponseInterface $response) use ($request, $chainIdentifier) { - if (array_key_exists($chainIdentifier, $this->retryStorage)) { - unset($this->retryStorage[$chainIdentifier]); - } - - return $response; - }, function (Exception $exception) use ($request, $next, $first, $chainIdentifier) { - if (!array_key_exists($chainIdentifier, $this->retryStorage)) { - $this->retryStorage[$chainIdentifier] = 0; - } - - if ($this->retryStorage[$chainIdentifier] >= $this->retry) { - unset($this->retryStorage[$chainIdentifier]); - - throw $exception; - } - - ++$this->retryStorage[$chainIdentifier]; - - // Retry in synchrone - $promise = $this->handleRequest($request, $next, $first); - - return $promise->wait(); - }); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/client-common/src/PluginClient.php b/sensitive-issue-searcher/vendor/php-http/client-common/src/PluginClient.php deleted file mode 100644 index e11cfeb..0000000 --- a/sensitive-issue-searcher/vendor/php-http/client-common/src/PluginClient.php +++ /dev/null @@ -1,175 +0,0 @@ - - */ -final class PluginClient implements HttpClient, HttpAsyncClient -{ - /** - * An HTTP async client. - * - * @var HttpAsyncClient - */ - private $client; - - /** - * The plugin chain. - * - * @var Plugin[] - */ - private $plugins; - - /** - * A list of options. - * - * @var array - */ - private $options; - - /** - * @param HttpClient|HttpAsyncClient $client - * @param Plugin[] $plugins - * @param array $options { - * - * @var int $max_restarts - * @var Plugin[] $debug_plugins an array of plugins that are injected between each normal plugin - * } - * - * @throws \RuntimeException if client is not an instance of HttpClient or HttpAsyncClient - */ - public function __construct($client, array $plugins = [], array $options = []) - { - if ($client instanceof HttpAsyncClient) { - $this->client = $client; - } elseif ($client instanceof HttpClient) { - $this->client = new EmulatedHttpAsyncClient($client); - } else { - throw new \RuntimeException('Client must be an instance of Http\\Client\\HttpClient or Http\\Client\\HttpAsyncClient'); - } - - $this->plugins = $plugins; - $this->options = $this->configure($options); - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) - { - // If we don't have an http client, use the async call - if (!($this->client instanceof HttpClient)) { - return $this->sendAsyncRequest($request)->wait(); - } - - // Else we want to use the synchronous call of the underlying client, and not the async one in the case - // we have both an async and sync call - $pluginChain = $this->createPluginChain($this->plugins, function (RequestInterface $request) { - try { - return new HttpFulfilledPromise($this->client->sendRequest($request)); - } catch (HttplugException $exception) { - return new HttpRejectedPromise($exception); - } - }); - - return $pluginChain($request)->wait(); - } - - /** - * {@inheritdoc} - */ - public function sendAsyncRequest(RequestInterface $request) - { - $pluginChain = $this->createPluginChain($this->plugins, function (RequestInterface $request) { - return $this->client->sendAsyncRequest($request); - }); - - return $pluginChain($request); - } - - /** - * Configure the plugin client. - * - * @param array $options - * - * @return array - */ - private function configure(array $options = []) - { - $resolver = new OptionsResolver(); - $resolver->setDefaults([ - 'max_restarts' => 10, - 'debug_plugins' => [], - ]); - - $resolver - ->setAllowedTypes('debug_plugins', 'array') - ->setAllowedValues('debug_plugins', function (array $plugins) { - foreach ($plugins as $plugin) { - // Make sure each object passed with the `debug_plugins` is an instance of Plugin. - if (!$plugin instanceof Plugin) { - return false; - } - } - - return true; - }); - - return $resolver->resolve($options); - } - - /** - * Create the plugin chain. - * - * @param Plugin[] $pluginList A list of plugins - * @param callable $clientCallable Callable making the HTTP call - * - * @return callable - */ - private function createPluginChain($pluginList, callable $clientCallable) - { - $firstCallable = $lastCallable = $clientCallable; - - /* - * Inject debug plugins between each plugin. - */ - $pluginListWithDebug = $this->options['debug_plugins']; - foreach ($pluginList as $plugin) { - $pluginListWithDebug[] = $plugin; - $pluginListWithDebug = array_merge($pluginListWithDebug, $this->options['debug_plugins']); - } - - while ($plugin = array_pop($pluginListWithDebug)) { - $lastCallable = function (RequestInterface $request) use ($plugin, $lastCallable, &$firstCallable) { - return $plugin->handleRequest($request, $lastCallable, $firstCallable); - }; - - $firstCallable = $lastCallable; - } - - $firstCalls = 0; - $firstCallable = function (RequestInterface $request) use ($lastCallable, &$firstCalls) { - if ($firstCalls > $this->options['max_restarts']) { - throw new LoopException('Too many restarts in plugin client', $request); - } - - ++$firstCalls; - - return $lastCallable($request); - }; - - return $firstCallable; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/discovery/CHANGELOG.md deleted file mode 100644 index 0c56331..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/CHANGELOG.md +++ /dev/null @@ -1,179 +0,0 @@ -# Change Log - - -## 1.2.1 - 2017-03-02 - -### Fixed - -- Fixed minor issue with `MockClientStrategy`, also added more tests. - -## 1.2.0 - 2017-02-12 - -### Added - -- MockClientStrategy class. - -## 1.1.1 - 2016-11-27 - -### Changed - -- Made exception messages clearer. `StrategyUnavailableException` is no longer the previous exception to `DiscoveryFailedException`. -- `CommonClassesStrategy` is using `self` instead of `static`. Using `static` makes no sense when `CommonClassesStrategy` is final. - -## 1.1.0 - 2016-10-20 - -### Added - -- Discovery support for Slim Framework factories - -## 1.0.0 - 2016-07-18 - -### Added - -- Added back `Http\Discovery\NotFoundException` to preserve BC with 0.8 version. You may upgrade from 0.8.x and 0.9.x to 1.0.0 without any BC breaks. -- Added interface `Http\Discovery\Exception` which is implemented by all our exceptions - -### Changed - -- Puli strategy renamed to Puli Beta strategy to prevent incompatibility with a future Puli stable - -### Deprecated - -- For BC reasons, the old `Http\Discovery\NotFoundException` (extending the new exception) will be thrown until version 2.0 - - -## 0.9.1 - 2016-06-28 - -### Changed - -- Dropping PHP 5.4 support because we use the ::class constant. - - -## 0.9.0 - 2016-06-25 - -### Added - -- Discovery strategies to find classes - -### Changed - -- [Puli](http://puli.io) made optional -- Improved exceptions -- **[BC] `NotFoundException` moved to `Http\Discovery\Exception\NotFoundException`** - - -## 0.8.0 - 2016-02-11 - -### Changed - -- Puli composer plugin must be installed separately - - -## 0.7.0 - 2016-01-15 - -### Added - -- Temporary puli.phar (Beta 10) executable - -### Changed - -- Updated HTTPlug dependencies -- Updated Puli dependencies -- Local configuration to make tests passing - -### Removed - -- Puli CLI dependency - - -## 0.6.4 - 2016-01-07 - -### Fixed - -- Puli [not working](https://twitter.com/PuliPHP/status/685132540588507137) with the latest json-schema - - -## 0.6.3 - 2016-01-04 - -### Changed - -- Adjust Puli dependencies - - -## 0.6.2 - 2016-01-04 - -### Changed - -- Make Puli CLI a requirement - - -## 0.6.1 - 2016-01-03 - -### Changed - -- More flexible Puli requirement - - -## 0.6.0 - 2015-12-30 - -### Changed - -- Use [Puli](http://puli.io) for discovery -- Improved exception messages - - -## 0.5.0 - 2015-12-25 - -### Changed - -- Updated message factory dependency (php-http/message) - - -## 0.4.0 - 2015-12-17 - -### Added - -- Array condition evaluation in the Class Discovery - -### Removed - -- Message factories (moved to php-http/utils) - - -## 0.3.0 - 2015-11-18 - -### Added - -- HTTP Async Client Discovery -- Stream factories - -### Changed - -- Discoveries and Factories are final -- Message and Uri factories have the type in their names -- Diactoros Message factory uses Stream factory internally - -### Fixed - -- Improved docblocks for API documentation generation - - -## 0.2.0 - 2015-10-31 - -### Changed - -- Renamed AdapterDiscovery to ClientDiscovery - - -## 0.1.1 - 2015-06-13 - -### Fixed - -- Bad HTTP Adapter class name for Guzzle 5 - - -## 0.1.0 - 2015-06-12 - -### Added - -- Initial release diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/LICENSE b/sensitive-issue-searcher/vendor/php-http/discovery/LICENSE deleted file mode 100644 index 4558d6f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/README.md b/sensitive-issue-searcher/vendor/php-http/discovery/README.md deleted file mode 100644 index 7c5151e..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# HTTPlug Discovery - -[![Latest Version](https://img.shields.io/github/release/php-http/discovery.svg?style=flat-square)](https://github.com/php-http/discovery/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/discovery.svg?style=flat-square)](https://travis-ci.org/php-http/discovery) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/discovery.svg?style=flat-square)](https://packagist.org/packages/php-http/discovery) - -**Finds installed HTTPlug implementations and PSR-7 message factories.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/discovery -``` - - -## Documentation - -Please see the [official documentation](http://php-http.readthedocs.org/en/latest/discovery.html). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/composer.json b/sensitive-issue-searcher/vendor/php-http/discovery/composer.json deleted file mode 100644 index 128af59..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "php-http/discovery", - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", - "license": "MIT", - "keywords": ["http", "discovery", "client", "adapter", "message", "factory", "psr7"], - "homepage": "http://php-http.org", - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": "^5.5 || ^7.0" - }, - "require-dev": { - "php-http/httplug": "^1.0", - "php-http/message-factory": "^1.0", - "puli/composer-plugin": "1.0.0-beta10", - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^2.0.2" - }, - "suggest": { - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.", - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" - }, - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "spec\\Http\\Discovery\\": "spec/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "prefer-stable": true, - "minimum-stability": "beta" -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/ClassDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/ClassDiscovery.php deleted file mode 100644 index 2c3e877..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/ClassDiscovery.php +++ /dev/null @@ -1,207 +0,0 @@ - - * @author Márk Sági-Kazár - * @author Tobias Nyholm - */ -abstract class ClassDiscovery -{ - /** - * A list of strategies to find classes. - * - * @var array - */ - private static $strategies = [ - Strategy\PuliBetaStrategy::class, - Strategy\CommonClassesStrategy::class, - ]; - - /** - * Discovery cache to make the second time we use discovery faster. - * - * @var array - */ - private static $cache = []; - - /** - * Finds a class. - * - * @param string $type - * - * @return string|\Closure - * - * @throws DiscoveryFailedException - */ - protected static function findOneByType($type) - { - // Look in the cache - if (null !== ($class = self::getFromCache($type))) { - return $class; - } - - $exceptions = []; - foreach (self::$strategies as $strategy) { - try { - $candidates = call_user_func($strategy.'::getCandidates', $type); - } catch (StrategyUnavailableException $e) { - $exceptions[] = $e; - continue; - } - - foreach ($candidates as $candidate) { - if (isset($candidate['condition'])) { - if (!self::evaluateCondition($candidate['condition'])) { - continue; - } - } - - // save the result for later use - self::storeInCache($type, $candidate); - - return $candidate['class']; - } - } - - throw DiscoveryFailedException::create($exceptions); - } - - /** - * Get a value from cache. - * - * @param string $type - * - * @return string|null - */ - private static function getFromCache($type) - { - if (!isset(self::$cache[$type])) { - return; - } - - $candidate = self::$cache[$type]; - if (isset($candidate['condition'])) { - if (!self::evaluateCondition($candidate['condition'])) { - return; - } - } - - return $candidate['class']; - } - - /** - * Store a value in cache. - * - * @param string $type - * @param string $class - */ - private static function storeInCache($type, $class) - { - self::$cache[$type] = $class; - } - - /** - * Set new strategies and clear the cache. - * - * @param array $strategies string array of fully qualified class name to a DiscoveryStrategy - */ - public static function setStrategies(array $strategies) - { - self::$strategies = $strategies; - self::clearCache(); - } - - /** - * Append a strategy at the end of the strategy queue. - * - * @param string $strategy Fully qualified class name to a DiscoveryStrategy - */ - public static function appendStrategy($strategy) - { - self::$strategies[] = $strategy; - self::clearCache(); - } - - /** - * Prepend a strategy at the beginning of the strategy queue. - * - * @param string $strategy Fully qualified class name to a DiscoveryStrategy - */ - public static function prependStrategy($strategy) - { - array_unshift(self::$strategies, $strategy); - self::clearCache(); - } - - /** - * Clear the cache. - */ - public static function clearCache() - { - self::$cache = []; - } - - /** - * Evaluates conditions to boolean. - * - * @param mixed $condition - * - * @return bool - */ - protected static function evaluateCondition($condition) - { - if (is_string($condition)) { - // Should be extended for functions, extensions??? - return class_exists($condition); - } elseif (is_callable($condition)) { - return $condition(); - } elseif (is_bool($condition)) { - return $condition; - } elseif (is_array($condition)) { - $evaluatedCondition = true; - - // Immediately stop execution if the condition is false - for ($i = 0; $i < count($condition) && false !== $evaluatedCondition; ++$i) { - $evaluatedCondition &= static::evaluateCondition($condition[$i]); - } - - return $evaluatedCondition; - } - - return false; - } - - /** - * Get an instance of the $class. - * - * @param string|\Closure $class A FQCN of a class or a closure that instantiate the class. - * - * @return object - * - * @throws ClassInstantiationFailedException - */ - protected static function instantiateClass($class) - { - try { - if (is_string($class)) { - return new $class(); - } - - if (is_callable($class)) { - return $class(); - } - } catch (\Exception $e) { - throw new ClassInstantiationFailedException('Unexpected exception when instantiating class.', 0, $e); - } - - throw new ClassInstantiationFailedException('Could not instantiate class because parameter is neither a callable nor a string'); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception.php deleted file mode 100644 index 973c908..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -interface Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php deleted file mode 100644 index e95bf5d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/ClassInstantiationFailedException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -final class ClassInstantiationFailedException extends \RuntimeException implements Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php deleted file mode 100644 index 304b727..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ -final class DiscoveryFailedException extends \Exception implements Exception -{ - /** - * @var \Exception[] - */ - private $exceptions; - - /** - * @param string $message - * @param \Exception[] $exceptions - */ - public function __construct($message, array $exceptions = []) - { - $this->exceptions = $exceptions; - - parent::__construct($message); - } - - /** - * @param \Exception[] $exceptions - */ - public static function create($exceptions) - { - $message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors'; - foreach ($exceptions as $e) { - $message .= "\n - ".$e->getMessage(); - } - $message .= "\n\n"; - - return new self($message, $exceptions); - } - - /** - * @return \Exception[] - */ - public function getExceptions() - { - return $this->exceptions; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/NotFoundException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/NotFoundException.php deleted file mode 100644 index befbf48..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/NotFoundException.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -/*final */class NotFoundException extends \RuntimeException implements Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php deleted file mode 100644 index a6ade73..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/PuliUnavailableException.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -final class PuliUnavailableException extends StrategyUnavailableException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php deleted file mode 100644 index 89ecf35..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Exception/StrategyUnavailableException.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -class StrategyUnavailableException extends \RuntimeException implements Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php deleted file mode 100644 index 6ef60e7..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpAsyncClientDiscovery.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class HttpAsyncClientDiscovery extends ClassDiscovery -{ - /** - * Finds an HTTP Async Client. - * - * @return HttpAsyncClient - * - * @throws Exception\NotFoundException - */ - public static function find() - { - try { - $asyncClient = static::findOneByType(HttpAsyncClient::class); - } catch (DiscoveryFailedException $e) { - throw new NotFoundException( - 'No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".', - 0, - $e - ); - } - - return static::instantiateClass($asyncClient); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpClientDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpClientDiscovery.php deleted file mode 100644 index 2654b7e..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/HttpClientDiscovery.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class HttpClientDiscovery extends ClassDiscovery -{ - /** - * Finds an HTTP Client. - * - * @return HttpClient - * - * @throws Exception\NotFoundException - */ - public static function find() - { - try { - $client = static::findOneByType(HttpClient::class); - } catch (DiscoveryFailedException $e) { - throw new NotFoundException( - 'No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".', - 0, - $e - ); - } - - return static::instantiateClass($client); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/MessageFactoryDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/MessageFactoryDiscovery.php deleted file mode 100644 index c21b9bf..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/MessageFactoryDiscovery.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class MessageFactoryDiscovery extends ClassDiscovery -{ - /** - * Finds a Message Factory. - * - * @return MessageFactory - * - * @throws Exception\NotFoundException - */ - public static function find() - { - try { - $messageFactory = static::findOneByType(MessageFactory::class); - } catch (DiscoveryFailedException $e) { - throw new NotFoundException( - 'No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', - 0, - $e - ); - } - - return static::instantiateClass($messageFactory); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/NotFoundException.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/NotFoundException.php deleted file mode 100644 index d59dadb..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/NotFoundException.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * @deprecated since since version 1.0, and will be removed in 2.0. Use {@link \Http\Discovery\Exception\NotFoundException} instead. - */ -final class NotFoundException extends \Http\Discovery\Exception\NotFoundException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php deleted file mode 100644 index cbed15d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -final class CommonClassesStrategy implements DiscoveryStrategy -{ - /** - * @var array - */ - private static $classes = [ - 'Http\Message\MessageFactory' => [ - ['class' => GuzzleMessageFactory::class, 'condition' => [GuzzleRequest::class, GuzzleMessageFactory::class]], - ['class' => DiactorosMessageFactory::class, 'condition' => [DiactorosRequest::class, DiactorosMessageFactory::class]], - ['class' => SlimMessageFactory::class, 'condition' => [SlimRequest::class, SlimMessageFactory::class]], - ], - 'Http\Message\StreamFactory' => [ - ['class' => GuzzleStreamFactory::class, 'condition' => [GuzzleRequest::class, GuzzleStreamFactory::class]], - ['class' => DiactorosStreamFactory::class, 'condition' => [DiactorosRequest::class, DiactorosStreamFactory::class]], - ['class' => SlimStreamFactory::class, 'condition' => [SlimRequest::class, SlimStreamFactory::class]], - ], - 'Http\Message\UriFactory' => [ - ['class' => GuzzleUriFactory::class, 'condition' => [GuzzleRequest::class, GuzzleUriFactory::class]], - ['class' => DiactorosUriFactory::class, 'condition' => [DiactorosRequest::class, DiactorosUriFactory::class]], - ['class' => SlimUriFactory::class, 'condition' => [SlimRequest::class, SlimUriFactory::class]], - ], - 'Http\Client\HttpAsyncClient' => [ - ['class' => Guzzle6::class, 'condition' => Guzzle6::class], - ['class' => Curl::class, 'condition' => Curl::class], - ['class' => React::class, 'condition' => React::class], - ], - 'Http\Client\HttpClient' => [ - ['class' => Guzzle6::class, 'condition' => Guzzle6::class], - ['class' => Guzzle5::class, 'condition' => Guzzle5::class], - ['class' => Curl::class, 'condition' => Curl::class], - ['class' => Socket::class, 'condition' => Socket::class], - ['class' => Buzz::class, 'condition' => Buzz::class], - ['class' => React::class, 'condition' => React::class], - ], - ]; - - /** - * {@inheritdoc} - */ - public static function getCandidates($type) - { - if (isset(self::$classes[$type])) { - return self::$classes[$type]; - } - - return []; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php deleted file mode 100644 index 641485a..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/DiscoveryStrategy.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -interface DiscoveryStrategy -{ - /** - * Find a resource of a specific type. - * - * @param string $type - * - * @return array The return value is always an array with zero or more elements. Each - * element is an array with two keys ['class' => string, 'condition' => mixed]. - * - * @throws StrategyUnavailableException if we cannot use this strategy. - */ - public static function getCandidates($type); -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php deleted file mode 100644 index ea464cf..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -final class MockClientStrategy implements DiscoveryStrategy -{ - /** - * {@inheritdoc} - */ - public static function getCandidates($type) - { - return ($type === HttpClient::class) - ? [['class' => Mock::class, 'condition' => Mock::class]] - : []; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php deleted file mode 100644 index 2666fb3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @author Márk Sági-Kazár - */ -class PuliBetaStrategy implements DiscoveryStrategy -{ - /** - * @var GeneratedPuliFactory - */ - protected static $puliFactory; - - /** - * @var Discovery - */ - protected static $puliDiscovery; - - /** - * @return GeneratedPuliFactory - * - * @throws PuliUnavailableException - */ - private static function getPuliFactory() - { - if (null === self::$puliFactory) { - if (!defined('PULI_FACTORY_CLASS')) { - throw new PuliUnavailableException('Puli Factory is not available'); - } - - $puliFactoryClass = PULI_FACTORY_CLASS; - - if (!class_exists($puliFactoryClass)) { - throw new PuliUnavailableException('Puli Factory class does not exist'); - } - - self::$puliFactory = new $puliFactoryClass(); - } - - return self::$puliFactory; - } - - /** - * Returns the Puli discovery layer. - * - * @return Discovery - * - * @throws PuliUnavailableException - */ - private static function getPuliDiscovery() - { - if (!isset(self::$puliDiscovery)) { - $factory = self::getPuliFactory(); - $repository = $factory->createRepository(); - - self::$puliDiscovery = $factory->createDiscovery($repository); - } - - return self::$puliDiscovery; - } - - /** - * {@inheritdoc} - */ - public static function getCandidates($type) - { - $returnData = []; - $bindings = self::getPuliDiscovery()->findBindings($type); - - foreach ($bindings as $binding) { - $condition = true; - if ($binding->hasParameterValue('depends')) { - $condition = $binding->getParameterValue('depends'); - } - $returnData[] = ['class' => $binding->getClassName(), 'condition' => $condition]; - } - - return $returnData; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/StreamFactoryDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/StreamFactoryDiscovery.php deleted file mode 100644 index 7bcc8ce..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/StreamFactoryDiscovery.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class StreamFactoryDiscovery extends ClassDiscovery -{ - /** - * Finds a Stream Factory. - * - * @return StreamFactory - * - * @throws Exception\NotFoundException - */ - public static function find() - { - try { - $streamFactory = static::findOneByType(StreamFactory::class); - } catch (DiscoveryFailedException $e) { - throw new NotFoundException( - 'No stream factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', - 0, - $e - ); - } - - return static::instantiateClass($streamFactory); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/discovery/src/UriFactoryDiscovery.php b/sensitive-issue-searcher/vendor/php-http/discovery/src/UriFactoryDiscovery.php deleted file mode 100644 index 1eef1e6..0000000 --- a/sensitive-issue-searcher/vendor/php-http/discovery/src/UriFactoryDiscovery.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class UriFactoryDiscovery extends ClassDiscovery -{ - /** - * Finds a URI Factory. - * - * @return UriFactory - * - * @throws Exception\NotFoundException - */ - public static function find() - { - try { - $uriFactory = static::findOneByType(UriFactory::class); - } catch (DiscoveryFailedException $e) { - throw new NotFoundException( - 'No uri factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', - 0, - $e - ); - } - - return static::instantiateClass($uriFactory); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/CHANGELOG.md deleted file mode 100644 index 0fdb506..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/CHANGELOG.md +++ /dev/null @@ -1,66 +0,0 @@ -# Change Log - - -## 1.1.1 - 2016-05-10 - -### Fixed - -- Adapter can again be instantiated without a guzzle client. - -## 1.1.0 - 2016-05-09 - -### Added - -- Factory method Client::createWithConfig to create an adapter with custom - configuration for the underlying guzzle client. - - -## 1.0.0 - 2016-01-26 - - -## 0.4.1 - 2016-01-13 - -### Changed - -- Updated integration tests - -### Removed - -- Client common dependency - - -## 0.4.0 - 2016-01-12 - -### Changed - -- Updated package files -- Updated HTTPlug to RC1 - - -## 0.2.1 - 2015-12-17 - -### Added - -- Puli configuration and bindings - -### Changed - -- Guzzle setup conforms to HTTPlug requirement now: Minimal functionality in client - - -## 0.2.0 - 2015-12-15 - -### Added - -- Async client capabalities - -### Changed - -- HTTPlug instead of HTTP Adapter - - -## 0.1.0 - 2015-06-12 - -### Added - -- Initial release diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/LICENSE b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/LICENSE deleted file mode 100644 index 48741e4..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014-2015 Eric GELOEN -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/README.md b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/README.md deleted file mode 100644 index 623eb2f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Guzzle 6 HTTP Adapter - -[![Latest Version](https://img.shields.io/github/release/php-http/guzzle6-adapter.svg?style=flat-square)](https://github.com/php-http/guzzle6-adapter/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/guzzle6-adapter.svg?style=flat-square)](https://travis-ci.org/php-http/guzzle6-adapter) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/guzzle6-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/guzzle6-adapter) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/guzzle6-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/guzzle6-adapter) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/guzzle6-adapter.svg?style=flat-square)](https://packagist.org/packages/php-http/guzzle6-adapter) - -**Guzzle 6 HTTP Adapter.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/guzzle6-adapter -``` - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org/en/latest/clients/guzzle6-adapter.html). - - -## Testing - -First launch the http server: - -```bash -$ ./vendor/bin/http_test_server > /dev/null 2>&1 & -``` - -Then the test suite: - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## Credits - -Thanks to [David de Boer](https://github.com/ddeboer) for implementing this adapter. - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/composer.json b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/composer.json deleted file mode 100644 index 2f01d1a..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/composer.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "php-http/guzzle6-adapter", - "description": "Guzzle 6 HTTP Adapter", - "license": "MIT", - "keywords": ["guzzle", "http"], - "homepage": "http://httplug.io", - "authors": [ - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": ">=5.5.0", - "php-http/httplug": "^1.0", - "guzzlehttp/guzzle": "^6.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" - }, - "provide": { - "php-http/client-implementation": "1.0", - "php-http/async-client-implementation": "1.0" - }, - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\Tests\\": "tests/" - } - }, - "scripts": { - "test": "vendor/bin/phpunit", - "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/puli.json b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/puli.json deleted file mode 100644 index bd29614..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/puli.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0", - "name": "php-http/guzzle6-adapter", - "bindings": { - "04b5a002-71a8-473d-a8df-75671551b84a": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Adapter\\Guzzle6\\Client", - "type": "Http\\Client\\HttpClient" - }, - "9c856476-7f6b-43df-a740-15420a5f839c": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Adapter\\Guzzle6\\Client", - "type": "Http\\Client\\HttpAsyncClient" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Client.php b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Client.php deleted file mode 100644 index ded7494..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Client.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ -class Client implements HttpClient, HttpAsyncClient -{ - /** - * @var ClientInterface - */ - private $client; - - /** - * @param ClientInterface|null $client - */ - public function __construct(ClientInterface $client = null) - { - if (!$client) { - $client = static::buildClient(); - } - - $this->client = $client; - } - - /** - * Factory method to create the guzzle 6 adapter with custom configuration for guzzle. - * - * @param array $config Configuration to create guzzle with. - * - * @return Client - */ - public static function createWithConfig(array $config) - { - return new self(static::buildClient($config)); - } - - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) - { - $promise = $this->sendAsyncRequest($request); - - return $promise->wait(); - } - - /** - * {@inheritdoc} - */ - public function sendAsyncRequest(RequestInterface $request) - { - $promise = $this->client->sendAsync($request); - - return new Promise($promise, $request); - } - - /** - * Build the guzzle client instance. - * - * @param array $config Additional configuration - * - * @return GuzzleClient - */ - private static function buildClient(array $config = []) - { - $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler()); - $handlerStack->push(Middleware::prepareBody(), 'prepare_body'); - $config = array_merge(['handler' => $handlerStack], $config); - - return new GuzzleClient($config); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Promise.php b/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Promise.php deleted file mode 100644 index 4d5eb8d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/guzzle6-adapter/src/Promise.php +++ /dev/null @@ -1,140 +0,0 @@ - - */ -class Promise implements HttpPromise -{ - /** - * @var PromiseInterface - */ - private $promise; - - /** - * @var string State of the promise - */ - private $state; - - /** - * @var ResponseInterface - */ - private $response; - - /** - * @var HttplugException - */ - private $exception; - - /** - * @var RequestInterface - */ - private $request; - - /** - * @param PromiseInterface $promise - * @param RequestInterface $request - */ - public function __construct(PromiseInterface $promise, RequestInterface $request) - { - $this->request = $request; - $this->state = self::PENDING; - $this->promise = $promise->then(function ($response) { - $this->response = $response; - $this->state = self::FULFILLED; - - return $response; - }, function ($reason) use ($request) { - $this->state = self::REJECTED; - - if ($reason instanceof HttplugException) { - $this->exception = $reason; - } elseif ($reason instanceof GuzzleExceptions\GuzzleException) { - $this->exception = $this->handleException($reason, $request); - } elseif ($reason instanceof \Exception) { - $this->exception = new \RuntimeException('Invalid exception returned from Guzzle6', 0, $reason); - } else { - $this->exception = new \UnexpectedValueException('Reason returned from Guzzle6 must be an Exception', 0, $reason); - } - - throw $this->exception; - }); - } - - /** - * {@inheritdoc} - */ - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - return new static($this->promise->then($onFulfilled, $onRejected), $this->request); - } - - /** - * {@inheritdoc} - */ - public function getState() - { - return $this->state; - } - - /** - * {@inheritdoc} - */ - public function wait($unwrap = true) - { - $this->promise->wait(false); - - if ($unwrap) { - if ($this->getState() == self::REJECTED) { - throw $this->exception; - } - - return $this->response; - } - } - - /** - * Converts a Guzzle exception into an Httplug exception. - * - * @param GuzzleExceptions\GuzzleException $exception - * @param RequestInterface $request - * - * @return HttplugException - */ - private function handleException(GuzzleExceptions\GuzzleException $exception, RequestInterface $request) - { - if ($exception instanceof GuzzleExceptions\SeekException) { - return new HttplugException\RequestException($exception->getMessage(), $request, $exception); - } - - if ($exception instanceof GuzzleExceptions\ConnectException) { - return new HttplugException\NetworkException($exception->getMessage(), $exception->getRequest(), $exception); - } - - if ($exception instanceof GuzzleExceptions\RequestException) { - // Make sure we have a response for the HttpException - if ($exception->hasResponse()) { - return new HttplugException\HttpException( - $exception->getMessage(), - $exception->getRequest(), - $exception->getResponse(), - $exception - ); - } - - return new HttplugException\RequestException($exception->getMessage(), $exception->getRequest(), $exception); - } - - return new HttplugException\TransferException($exception->getMessage(), 0, $exception); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/httplug/CHANGELOG.md deleted file mode 100644 index 8478966..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/CHANGELOG.md +++ /dev/null @@ -1,72 +0,0 @@ -# Change Log - -## 1.1.0 - 2016-08-31 - -- Added HttpFulfilledPromise and HttpRejectedPromise which respect the HttpAsyncClient interface - -## 1.0.0 - 2016-01-26 - -### Removed - -- Stability configuration from composer - - -## 1.0.0-RC1 - 2016-01-12 - -### Changed - -- Updated package files -- Updated promise dependency to RC1 - - -## 1.0.0-beta - 2015-12-17 - -### Added - -- Puli configuration and binding types - -### Changed - -- Exception concept - - -## 1.0.0-alpha3 - 2015-12-13 - -### Changed - -- Async client does not throw exceptions - -### Removed - -- Promise interface moved to its own repository: [php-http/promise](https://github.com/php-http/promise) - - -## 1.0.0-alpha2 - 2015-11-16 - -### Added - -- Async client and Promise interface - - -## 1.0.0-alpha - 2015-10-26 - -### Added - -- Better domain exceptions. - -### Changed - -- Purpose of the library: general HTTP CLient abstraction. - -### Removed - -- Request options: they should be configured at construction time. -- Multiple request sending: should be done asynchronously using Async Client. -- `getName` method - - -## 0.1.0 - 2015-06-03 - -### Added - -- Initial release diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/LICENSE b/sensitive-issue-searcher/vendor/php-http/httplug/LICENSE deleted file mode 100644 index 48741e4..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014-2015 Eric GELOEN -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/README.md b/sensitive-issue-searcher/vendor/php-http/httplug/README.md deleted file mode 100644 index f46212b..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# HTTPlug - -[![Latest Version](https://img.shields.io/github/release/php-http/httplug.svg?style=flat-square)](https://github.com/php-http/httplug/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/httplug.svg?style=flat-square)](https://travis-ci.org/php-http/httplug) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug) - -[![Slack Status](http://slack.httplug.io/badge.svg)](http://slack.httplug.io) -[![Email](https://img.shields.io/badge/email-team@httplug.io-blue.svg?style=flat-square)](mailto:team@httplug.io) - -**HTTPlug, the HTTP client abstraction for PHP.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/httplug -``` - - -## Intro - -This is the contract package for HTTP Client. -Use it to create HTTP Clients which are interoperable and compatible with [PSR-7](http://www.php-fig.org/psr/psr-7/). - -This library is the official successor of the [ivory http adapter](https://github.com/egeloen/ivory-http-adapter). - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/composer.json b/sensitive-issue-searcher/vendor/php-http/httplug/composer.json deleted file mode 100644 index f74c4d3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "php-http/httplug", - "description": "HTTPlug, the HTTP client abstraction for PHP", - "license": "MIT", - "keywords": ["http", "client"], - "homepage": "http://httplug.io", - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0", - "php-http/promise": "^1.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^1.0" - }, - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/puli.json b/sensitive-issue-searcher/vendor/php-http/httplug/puli.json deleted file mode 100644 index 4168331..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/puli.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "1.0", - "name": "php-http/httplug", - "binding-types": { - "Http\\Client\\HttpAsyncClient": { - "description": "Async HTTP Client" - }, - "Http\\Client\\HttpClient": { - "description": "HTTP Client" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception.php deleted file mode 100644 index e7382c3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -interface Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/HttpException.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/HttpException.php deleted file mode 100644 index f4f32a4..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/HttpException.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class HttpException extends RequestException -{ - /** - * @var ResponseInterface - */ - protected $response; - - /** - * @param string $message - * @param RequestInterface $request - * @param ResponseInterface $response - * @param \Exception|null $previous - */ - public function __construct( - $message, - RequestInterface $request, - ResponseInterface $response, - \Exception $previous = null - ) { - parent::__construct($message, $request, $previous); - - $this->response = $response; - $this->code = $response->getStatusCode(); - } - - /** - * Returns the response. - * - * @return ResponseInterface - */ - public function getResponse() - { - return $this->response; - } - - /** - * Factory method to create a new exception with a normalized error message. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param \Exception|null $previous - * - * @return HttpException - */ - public static function create( - RequestInterface $request, - ResponseInterface $response, - \Exception $previous = null - ) { - $message = sprintf( - '[url] %s [http method] %s [status code] %s [reason phrase] %s', - $request->getRequestTarget(), - $request->getMethod(), - $response->getStatusCode(), - $response->getReasonPhrase() - ); - - return new self($message, $request, $response, $previous); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/NetworkException.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/NetworkException.php deleted file mode 100644 index f2198e5..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/NetworkException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class NetworkException extends RequestException -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/RequestException.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/RequestException.php deleted file mode 100644 index cdce14b..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/RequestException.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class RequestException extends TransferException -{ - /** - * @var RequestInterface - */ - private $request; - - /** - * @param string $message - * @param RequestInterface $request - * @param \Exception|null $previous - */ - public function __construct($message, RequestInterface $request, \Exception $previous = null) - { - $this->request = $request; - - parent::__construct($message, 0, $previous); - } - - /** - * Returns the request. - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/TransferException.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/TransferException.php deleted file mode 100644 index a858cf5..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Exception/TransferException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -class TransferException extends \RuntimeException implements Exception -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpAsyncClient.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpAsyncClient.php deleted file mode 100644 index 492e511..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpAsyncClient.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -interface HttpAsyncClient -{ - /** - * Sends a PSR-7 request in an asynchronous way. - * - * Exceptions related to processing the request are available from the returned Promise. - * - * @param RequestInterface $request - * - * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception. - * - * @throws \Exception If processing the request is impossible (eg. bad configuration). - */ - public function sendAsyncRequest(RequestInterface $request); -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpClient.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpClient.php deleted file mode 100644 index 0e51749..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/HttpClient.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @author Márk Sági-Kazár - * @author David Buchmann - */ -interface HttpClient -{ - /** - * Sends a PSR-7 request. - * - * @param RequestInterface $request - * - * @return ResponseInterface - * - * @throws \Http\Client\Exception If an error happens during processing the request. - * @throws \Exception If processing the request is impossible (eg. bad configuration). - */ - public function sendRequest(RequestInterface $request); -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php deleted file mode 100644 index 6779e44..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php +++ /dev/null @@ -1,57 +0,0 @@ -response = $response; - } - - /** - * {@inheritdoc} - */ - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - if (null === $onFulfilled) { - return $this; - } - - try { - return new self($onFulfilled($this->response)); - } catch (Exception $e) { - return new HttpRejectedPromise($e); - } - } - - /** - * {@inheritdoc} - */ - public function getState() - { - return Promise::FULFILLED; - } - - /** - * {@inheritdoc} - */ - public function wait($unwrap = true) - { - if ($unwrap) { - return $this->response; - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php b/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php deleted file mode 100644 index bfb0738..0000000 --- a/sensitive-issue-searcher/vendor/php-http/httplug/src/Promise/HttpRejectedPromise.php +++ /dev/null @@ -1,56 +0,0 @@ -exception = $exception; - } - - /** - * {@inheritdoc} - */ - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - if (null === $onRejected) { - return $this; - } - - try { - return new HttpFulfilledPromise($onRejected($this->exception)); - } catch (Exception $e) { - return new self($e); - } - } - - /** - * {@inheritdoc} - */ - public function getState() - { - return Promise::REJECTED; - } - - /** - * {@inheritdoc} - */ - public function wait($unwrap = true) - { - if ($unwrap) { - throw $this->exception; - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/message-factory/CHANGELOG.md deleted file mode 100644 index 4711924..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/CHANGELOG.md +++ /dev/null @@ -1,65 +0,0 @@ -# Change Log - - -## 1.0.2 - 2015-12-19 - -### Added - -- Request and Response factory binding types to Puli - - -## 1.0.1 - 2015-12-17 - -### Added - -- Puli configuration and binding types - - -## 1.0.0 - 2015-12-15 - -### Added - -- Response Factory in order to be reused in Message and Server Message factories -- Request Factory - -### Changed - -- Message Factory extends Request and Response factories - - -## 1.0.0-RC1 - 2015-12-14 - -### Added - -- CS check - -### Changed - -- RuntimeException is thrown when the StreamFactory cannot write to the underlying stream - - -## 0.3.0 - 2015-11-16 - -### Removed - -- Client Context Factory -- Factory Awares and Templates - - -## 0.2.0 - 2015-11-16 - -### Changed - -- Reordered the parameters when creating a message to have the protocol last, -as its the least likely to need to be changed. - - -## 0.1.0 - 2015-06-01 - -### Added - -- Initial release - -### Changed - -- Helpers are renamed to templates diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/LICENSE b/sensitive-issue-searcher/vendor/php-http/message-factory/LICENSE deleted file mode 100644 index 8e2c4a0..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/README.md b/sensitive-issue-searcher/vendor/php-http/message-factory/README.md deleted file mode 100644 index 4654495..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# PSR-7 Message Factory - -[![Latest Version](https://img.shields.io/github/release/php-http/message-factory.svg?style=flat-square)](https://github.com/php-http/message-factory/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message-factory.svg?style=flat-square)](https://packagist.org/packages/php-http/message-factory) - -**Factory interfaces for PSR-7 HTTP Message.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/message-factory -``` - - -## Documentation - -Please see the [official documentation](http://php-http.readthedocs.org/en/latest/message-factory/). - - -## Contributing - -Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details. - - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/composer.json b/sensitive-issue-searcher/vendor/php-http/message-factory/composer.json deleted file mode 100644 index 7c72feb..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "php-http/message-factory", - "description": "Factory interfaces for PSR-7 HTTP Message", - "license": "MIT", - "keywords": ["http", "factory", "message", "stream", "uri"], - "homepage": "http://php-http.org", - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/puli.json b/sensitive-issue-searcher/vendor/php-http/message-factory/puli.json deleted file mode 100644 index 08d3762..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/puli.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "version": "1.0", - "binding-types": { - "Http\\Message\\MessageFactory": { - "description": "PSR-7 Message Factory", - "parameters": { - "depends": { - "description": "Optional class dependency which can be checked by consumers" - } - } - }, - "Http\\Message\\RequestFactory": { - "parameters": { - "depends": { - "description": "Optional class dependency which can be checked by consumers" - } - } - }, - "Http\\Message\\ResponseFactory": { - "parameters": { - "depends": { - "description": "Optional class dependency which can be checked by consumers" - } - } - }, - "Http\\Message\\StreamFactory": { - "description": "PSR-7 Stream Factory", - "parameters": { - "depends": { - "description": "Optional class dependency which can be checked by consumers" - } - } - }, - "Http\\Message\\UriFactory": { - "description": "PSR-7 URI Factory", - "parameters": { - "depends": { - "description": "Optional class dependency which can be checked by consumers" - } - } - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/src/MessageFactory.php b/sensitive-issue-searcher/vendor/php-http/message-factory/src/MessageFactory.php deleted file mode 100644 index 965aaa8..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/src/MessageFactory.php +++ /dev/null @@ -1,12 +0,0 @@ - - */ -interface MessageFactory extends RequestFactory, ResponseFactory -{ -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/src/RequestFactory.php b/sensitive-issue-searcher/vendor/php-http/message-factory/src/RequestFactory.php deleted file mode 100644 index 624e82f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/src/RequestFactory.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -interface RequestFactory -{ - /** - * Creates a new PSR-7 request. - * - * @param string $method - * @param string|UriInterface $uri - * @param array $headers - * @param resource|string|StreamInterface|null $body - * @param string $protocolVersion - * - * @return RequestInterface - */ - public function createRequest( - $method, - $uri, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/src/ResponseFactory.php b/sensitive-issue-searcher/vendor/php-http/message-factory/src/ResponseFactory.php deleted file mode 100644 index 2411ed3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/src/ResponseFactory.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -interface ResponseFactory -{ - /** - * Creates a new PSR-7 response. - * - * @param int $statusCode - * @param string|null $reasonPhrase - * @param array $headers - * @param resource|string|StreamInterface|null $body - * @param string $protocolVersion - * - * @return ResponseInterface - */ - public function createResponse( - $statusCode = 200, - $reasonPhrase = null, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/src/StreamFactory.php b/sensitive-issue-searcher/vendor/php-http/message-factory/src/StreamFactory.php deleted file mode 100644 index 327a902..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/src/StreamFactory.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ -interface StreamFactory -{ - /** - * Creates a new PSR-7 stream. - * - * @param string|resource|StreamInterface|null $body - * - * @return StreamInterface - * - * @throws \InvalidArgumentException If the stream body is invalid. - * @throws \RuntimeException If creating the stream from $body fails. - */ - public function createStream($body = null); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message-factory/src/UriFactory.php b/sensitive-issue-searcher/vendor/php-http/message-factory/src/UriFactory.php deleted file mode 100644 index f05e625..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message-factory/src/UriFactory.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -interface UriFactory -{ - /** - * Creates an PSR-7 URI. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI. - */ - public function createUri($uri); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/CHANGELOG.md b/sensitive-issue-searcher/vendor/php-http/message/CHANGELOG.md deleted file mode 100644 index 4113311..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/CHANGELOG.md +++ /dev/null @@ -1,131 +0,0 @@ -# Change Log - - -## Unreleased - -## 1.5.0 - 2017-02-14 - -### Added - -- Check for empty string in Stream factories -- Cookie::createWithoutValidation Static constructor to create a cookie. Will not perform any attribute validation during instantiation. -- Cookie::isValid Method to check if cookie attributes are valid. - -### Fixed - -- FilteredStream::getSize returns null because the contents size is unknown. -- Stream factories does not rewinds streams. The previous behavior was not coherent between factories and inputs. - -### Deprecated - -- FilteredStream::getReadFilter The read filter is internal and should never be used by consuming code. -- FilteredStream::getWriteFilter We did not implement writing to the streams at all. And if we do, the filter is an internal information and should not be used by consuming code. - - -## 1.4.1 - 2016-12-16 - -### Fixed - -- Cookie::matchPath Cookie with root path (`/`) will not match sub path (e.g. `/cookie`). - - -## 1.4.0 - 2016-10-20 - -### Added - -- Message, stream and URI factories for [Slim Framework](https://github.com/slimphp/Slim) -- BufferedStream that allow you to decorate a non-seekable stream with a seekable one. -- cUrlFormatter to be able to redo the request with a cURL command - - -## 1.3.1 - 2016-07-15 - -### Fixed - -- FullHttpMessageFormatter will not read from streams that you cannot rewind (non-seekable) -- FullHttpMessageFormatter will not read from the stream if $maxBodyLength is zero -- FullHttpMessageFormatter rewinds streams after they are read - - -## 1.3.0 - 2016-07-14 - -### Added - -- FullHttpMessageFormatter to include headers and body in the formatted message - -### Fixed - -- #41: Response builder broke header value - - -## 1.2.0 - 2016-03-29 - -### Added - -- The RequestMatcher is built after the Symfony RequestMatcher and separates - scheme, host and path expressions and provides an option to filter on the - method -- New RequestConditional authentication method using request matchers -- Add automatic basic auth info detection based on the URL - -### Changed - -- Improved ResponseBuilder - -### Deprecated - -- RegexRequestMatcher, use RequestMatcher instead -- Matching authenitcation method, use RequestConditional instead - - -## 1.1.0 - 2016-02-25 - -### Added - - - Add a request matcher interface and regex implementation - - Add a callback request matcher implementation - - Add a ResponseBuilder, to create PSR7 Response from a string - -### Fixed - - - Fix casting string on a FilteredStream not filtering the output - - -## 1.0.0 - 2016-01-27 - - -## 0.2.0 - 2015-12-29 - -### Added - -- Autoregistration of stream filters using Composer autoload -- Cookie -- [Apigen](http://www.apigen.org/) configuration - - -## 0.1.2 - 2015-12-26 - -### Added - -- Request and response factory bindings - -### Fixed - -- Chunk filter namespace in Dechunk stream - - -## 0.1.1 - 2015-12-25 - -### Added - -- Formatter - - -## 0.1.0 - 2015-12-24 - -### Added - -- Authentication -- Encoding -- Message decorator -- Message factory (Guzzle, Diactoros) diff --git a/sensitive-issue-searcher/vendor/php-http/message/LICENSE b/sensitive-issue-searcher/vendor/php-http/message/LICENSE deleted file mode 100644 index 4558d6f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2016 PHP HTTP Team - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/message/README.md b/sensitive-issue-searcher/vendor/php-http/message/README.md deleted file mode 100644 index 338b415..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# HTTP Message - -[![Latest Version](https://img.shields.io/github/release/php-http/message.svg?style=flat-square)](https://github.com/php-http/message/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/message.svg?style=flat-square)](https://travis-ci.org/php-http/message) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/message.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/message) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/message.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/message) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/message.svg?style=flat-square)](https://packagist.org/packages/php-http/message) - -**HTTP Message related tools.** - - -## Install - -Via Composer - -``` bash -$ composer require php-http/message -``` - - -## Intro - -This package contains various PSR-7 tools which might be useful in an HTTP workflow: - -- Authentication method implementations -- Various Stream encoding tools -- Message decorators -- Message factory implementations for Guzzle PSR-7 and Diactoros -- Cookie implementation -- Request matchers - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org/en/latest/message.html). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - -## Cretids - -Thanks to [Cuzzle](https://github.com/namshi/cuzzle) for inpiration for the `CurlCommandFormatter`. - -## Security - -If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/message/apigen.neon b/sensitive-issue-searcher/vendor/php-http/message/apigen.neon deleted file mode 100644 index 0ba1a18..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/apigen.neon +++ /dev/null @@ -1,6 +0,0 @@ -source: - - src/ - -destination: build/api/ - -templateTheme: bootstrap diff --git a/sensitive-issue-searcher/vendor/php-http/message/composer.json b/sensitive-issue-searcher/vendor/php-http/message/composer.json deleted file mode 100644 index 2a0fa45..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/composer.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "php-http/message", - "description": "HTTP Message related tools", - "license": "MIT", - "keywords": ["message", "http", "psr-7"], - "homepage": "http://php-http.org", - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0", - "php-http/message-factory": "^1.0.2", - "clue/stream-filter": "^1.3" - }, - "require-dev": { - "zendframework/zend-diactoros": "^1.0", - "guzzlehttp/psr7": "^1.0", - "ext-zlib": "*", - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", - "akeneo/phpspec-skip-example-extension": "^1.0", - "slim/slim": "^3.0" - }, - "suggest": { - "zendframework/zend-diactoros": "Used with Diactoros Factories", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "ext-zlib": "Used with compressor/decompressor streams" - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, - "files": [ - "src/filters.php" - ] - }, - "autoload-dev": { - "psr-4": { - "spec\\Http\\Message\\": "spec/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/puli.json b/sensitive-issue-searcher/vendor/php-http/message/puli.json deleted file mode 100644 index 024a85d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/puli.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "version": "1.0", - "name": "php-http/message", - "bindings": { - "064d003d-78a1-48c4-8f3b-1f92ff25da69": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\DiactorosMessageFactory", - "type": "Http\\Message\\MessageFactory", - "parameters": { - "depends": "Zend\\Diactoros\\Request" - } - }, - "0836751e-6558-4d1b-8993-4a52012947c3": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\SlimMessageFactory", - "type": "Http\\Message\\ResponseFactory" - }, - "1d127622-dc61-4bfa-b9da-d221548d72c3": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\SlimMessageFactory", - "type": "Http\\Message\\RequestFactory" - }, - "2438c2d0-0658-441f-8855-ddaf0f87d54d": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\GuzzleMessageFactory", - "type": "Http\\Message\\MessageFactory", - "parameters": { - "depends": "GuzzleHttp\\Psr7\\Request" - } - }, - "253aa08c-d705-46e7-b1d2-e28c97eef792": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\GuzzleMessageFactory", - "type": "Http\\Message\\RequestFactory", - "parameters": { - "depends": "GuzzleHttp\\Psr7\\Request" - } - }, - "273a34f9-62f4-4ba1-9801-b1284d49ff89": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\StreamFactory\\GuzzleStreamFactory", - "type": "Http\\Message\\StreamFactory", - "parameters": { - "depends": "GuzzleHttp\\Psr7\\Stream" - } - }, - "304b83db-b594-4d83-ae75-1f633adf92f7": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\UriFactory\\GuzzleUriFactory", - "type": "Http\\Message\\UriFactory", - "parameters": { - "depends": "GuzzleHttp\\Psr7\\Uri" - } - }, - "3f4bc1cd-aa95-4702-9fa7-65408e471691": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\UriFactory\\DiactorosUriFactory", - "type": "Http\\Message\\UriFactory", - "parameters": { - "depends": "Zend\\Diactoros\\Uri" - } - }, - "4672a6ee-ad9e-4109-a5d1-b7d46f26c7a1": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\SlimMessageFactory", - "type": "Http\\Message\\MessageFactory" - }, - "6234e947-d3bd-43eb-97d5-7f9e22e6bb1b": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\DiactorosMessageFactory", - "type": "Http\\Message\\ResponseFactory", - "parameters": { - "depends": "Zend\\Diactoros\\Response" - } - }, - "6a9ad6ce-d82c-470f-8e30-60f21d9d95bf": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\UriFactory\\SlimUriFactory", - "type": "Http\\Message\\UriFactory" - }, - "72c2afa0-ea56-4d03-adb6-a9f241a8a734": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\StreamFactory\\SlimStreamFactory", - "type": "Http\\Message\\StreamFactory" - }, - "95c1be8f-39fe-4abd-8351-92cb14379a75": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\StreamFactory\\DiactorosStreamFactory", - "type": "Http\\Message\\StreamFactory", - "parameters": { - "depends": "Zend\\Diactoros\\Stream" - } - }, - "a018af27-7590-4dcf-83a1-497f95604cd6": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\GuzzleMessageFactory", - "type": "Http\\Message\\ResponseFactory", - "parameters": { - "depends": "GuzzleHttp\\Psr7\\Response" - } - }, - "c07955b1-de46-43db-923b-d07fae9382cb": { - "_class": "Puli\\Discovery\\Binding\\ClassBinding", - "class": "Http\\Message\\MessageFactory\\DiactorosMessageFactory", - "type": "Http\\Message\\RequestFactory", - "parameters": { - "depends": "Zend\\Diactoros\\Request" - } - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication.php deleted file mode 100644 index b50366f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -interface Authentication -{ - /** - * Authenticates a request. - * - * @param RequestInterface $request - * - * @return RequestInterface - */ - public function authenticate(RequestInterface $request); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/AutoBasicAuth.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/AutoBasicAuth.php deleted file mode 100644 index 7b6a429..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/AutoBasicAuth.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -final class AutoBasicAuth implements Authentication -{ - /** - * Whether user info should be removed from the URI. - * - * @var bool - */ - private $shouldRemoveUserInfo; - - /** - * @param bool|true $shouldRremoveUserInfo - */ - public function __construct($shouldRremoveUserInfo = true) - { - $this->shouldRemoveUserInfo = (bool) $shouldRremoveUserInfo; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - $uri = $request->getUri(); - $userInfo = $uri->getUserInfo(); - - if (!empty($userInfo)) { - if ($this->shouldRemoveUserInfo) { - $request = $request->withUri($uri->withUserInfo('')); - } - - $request = $request->withHeader('Authorization', sprintf('Basic %s', base64_encode($userInfo))); - } - - return $request; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/BasicAuth.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/BasicAuth.php deleted file mode 100644 index 23618a5..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/BasicAuth.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -final class BasicAuth implements Authentication -{ - /** - * @var string - */ - private $username; - - /** - * @var string - */ - private $password; - - /** - * @param string $username - * @param string $password - */ - public function __construct($username, $password) - { - $this->username = $username; - $this->password = $password; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - $header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $this->username, $this->password))); - - return $request->withHeader('Authorization', $header); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Bearer.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Bearer.php deleted file mode 100644 index a8fb21a..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Bearer.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -final class Bearer implements Authentication -{ - /** - * @var string - */ - private $token; - - /** - * @param string $token - */ - public function __construct($token) - { - $this->token = $token; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - $header = sprintf('Bearer %s', $this->token); - - return $request->withHeader('Authorization', $header); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Chain.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Chain.php deleted file mode 100644 index 71002bb..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Chain.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class Chain implements Authentication -{ - /** - * @var Authentication[] - */ - private $authenticationChain = []; - - /** - * @param Authentication[] $authenticationChain - */ - public function __construct(array $authenticationChain = []) - { - foreach ($authenticationChain as $authentication) { - if (!$authentication instanceof Authentication) { - throw new \InvalidArgumentException( - 'Members of the authentication chain must be of type Http\Message\Authentication' - ); - } - } - - $this->authenticationChain = $authenticationChain; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - foreach ($this->authenticationChain as $authentication) { - $request = $authentication->authenticate($request); - } - - return $request; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Matching.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Matching.php deleted file mode 100644 index 4b89b50..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Matching.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * @deprecated since since version 1.2, and will be removed in 2.0. Use {@link RequestConditional} instead. - */ -final class Matching implements Authentication -{ - /** - * @var Authentication - */ - private $authentication; - - /** - * @var CallbackRequestMatcher - */ - private $matcher; - - /** - * @param Authentication $authentication - * @param callable|null $matcher - */ - public function __construct(Authentication $authentication, callable $matcher = null) - { - if (is_null($matcher)) { - $matcher = function () { - return true; - }; - } - - $this->authentication = $authentication; - $this->matcher = new CallbackRequestMatcher($matcher); - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - if ($this->matcher->matches($request)) { - return $this->authentication->authenticate($request); - } - - return $request; - } - - /** - * Creates a matching authentication for an URL. - * - * @param Authentication $authentication - * @param string $url - * - * @return self - */ - public static function createUrlMatcher(Authentication $authentication, $url) - { - $matcher = function (RequestInterface $request) use ($url) { - return preg_match($url, $request->getRequestTarget()); - }; - - return new static($authentication, $matcher); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/QueryParam.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/QueryParam.php deleted file mode 100644 index 14b58ff..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/QueryParam.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -final class QueryParam implements Authentication -{ - /** - * @var array - */ - private $params = []; - - /** - * @param array $params - */ - public function __construct(array $params) - { - $this->params = $params; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - $uri = $request->getUri(); - $query = $uri->getQuery(); - $params = []; - - parse_str($query, $params); - - $params = array_merge($params, $this->params); - - $query = http_build_query($params); - - $uri = $uri->withQuery($query); - - return $request->withUri($uri); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/RequestConditional.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/RequestConditional.php deleted file mode 100644 index 5477440..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/RequestConditional.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -final class RequestConditional implements Authentication -{ - /** - * @var RequestMatcher - */ - private $requestMatcher; - - /** - * @var Authentication - */ - private $authentication; - - /** - * @param RequestMatcher $requestMatcher - * @param Authentication $authentication - */ - public function __construct(RequestMatcher $requestMatcher, Authentication $authentication) - { - $this->requestMatcher = $requestMatcher; - $this->authentication = $authentication; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - if ($this->requestMatcher->matches($request)) { - return $this->authentication->authenticate($request); - } - - return $request; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Wsse.php b/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Wsse.php deleted file mode 100644 index fbbde33..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Authentication/Wsse.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -final class Wsse implements Authentication -{ - /** - * @var string - */ - private $username; - - /** - * @var string - */ - private $password; - - /** - * @param string $username - * @param string $password - */ - public function __construct($username, $password) - { - $this->username = $username; - $this->password = $password; - } - - /** - * {@inheritdoc} - */ - public function authenticate(RequestInterface $request) - { - // TODO: generate better nonce? - $nonce = substr(md5(uniqid(uniqid().'_', true)), 0, 16); - $created = date('c'); - $digest = base64_encode(sha1(base64_decode($nonce).$created.$this->password, true)); - - $wsse = sprintf( - 'UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"', - $this->username, - $digest, - $nonce, - $created - ); - - return $request - ->withHeader('Authorization', 'WSSE profile="UsernameToken"') - ->withHeader('X-WSSE', $wsse) - ; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Builder/ResponseBuilder.php b/sensitive-issue-searcher/vendor/php-http/message/src/Builder/ResponseBuilder.php deleted file mode 100644 index e6933a0..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Builder/ResponseBuilder.php +++ /dev/null @@ -1,148 +0,0 @@ -response = $response; - } - - /** - * Return response. - * - * @return ResponseInterface - */ - public function getResponse() - { - return $this->response; - } - - /** - * Add headers represented by an array of header lines. - * - * @param string[] $headers Response headers as array of header lines. - * - * @return $this - * - * @throws \UnexpectedValueException For invalid header values. - * @throws \InvalidArgumentException For invalid status code arguments. - */ - public function setHeadersFromArray(array $headers) - { - $status = array_shift($headers); - $this->setStatus($status); - - foreach ($headers as $headerLine) { - $headerLine = trim($headerLine); - if ('' === $headerLine) { - continue; - } - - $this->addHeader($headerLine); - } - - return $this; - } - - /** - * Add headers represented by a single string. - * - * @param string $headers Response headers as single string. - * - * @return $this - * - * @throws \InvalidArgumentException if $headers is not a string on object with __toString() - * @throws \UnexpectedValueException For invalid header values. - */ - public function setHeadersFromString($headers) - { - if (!(is_string($headers) - || (is_object($headers) && method_exists($headers, '__toString'))) - ) { - throw new \InvalidArgumentException( - sprintf( - '%s expects parameter 1 to be a string, %s given', - __METHOD__, - is_object($headers) ? get_class($headers) : gettype($headers) - ) - ); - } - - $this->setHeadersFromArray(explode("\r\n", $headers)); - - return $this; - } - - /** - * Set response status from a status string. - * - * @param string $statusLine Response status as a string. - * - * @return $this - * - * @throws \InvalidArgumentException For invalid status line. - */ - public function setStatus($statusLine) - { - $parts = explode(' ', $statusLine, 3); - if (count($parts) < 2 || strpos(strtolower($parts[0]), 'http/') !== 0) { - throw new \InvalidArgumentException( - sprintf('"%s" is not a valid HTTP status line', $statusLine) - ); - } - - $reasonPhrase = count($parts) > 2 ? $parts[2] : ''; - $this->response = $this->response - ->withStatus((int) $parts[1], $reasonPhrase) - ->withProtocolVersion(substr($parts[0], 5)); - - return $this; - } - - /** - * Add header represented by a string. - * - * @param string $headerLine Response header as a string. - * - * @return $this - * - * @throws \InvalidArgumentException For invalid header names or values. - */ - public function addHeader($headerLine) - { - $parts = explode(':', $headerLine, 2); - if (count($parts) !== 2) { - throw new \InvalidArgumentException( - sprintf('"%s" is not a valid HTTP header line', $headerLine) - ); - } - $name = trim($parts[0]); - $value = trim($parts[1]); - if ($this->response->hasHeader($name)) { - $this->response = $this->response->withAddedHeader($name, $value); - } else { - $this->response = $this->response->withHeader($name, $value); - } - - return $this; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Cookie.php b/sensitive-issue-searcher/vendor/php-http/message/src/Cookie.php deleted file mode 100644 index 5f61b90..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Cookie.php +++ /dev/null @@ -1,526 +0,0 @@ - - * - * @see http://tools.ietf.org/search/rfc6265 - */ -final class Cookie -{ - /** - * @var string - */ - private $name; - - /** - * @var string|null - */ - private $value; - - /** - * @var int|null - */ - private $maxAge; - - /** - * @var string|null - */ - private $domain; - - /** - * @var string - */ - private $path; - - /** - * @var bool - */ - private $secure; - - /** - * @var bool - */ - private $httpOnly; - - /** - * Expires attribute is HTTP 1.0 only and should be avoided. - * - * @var \DateTime|null - */ - private $expires; - - /** - * @param string $name - * @param string|null $value - * @param int $maxAge - * @param string|null $domain - * @param string|null $path - * @param bool $secure - * @param bool $httpOnly - * @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided. - * - * @throws \InvalidArgumentException If name, value or max age is not valid. - */ - public function __construct( - $name, - $value = null, - $maxAge = null, - $domain = null, - $path = null, - $secure = false, - $httpOnly = false, - \DateTime $expires = null - ) { - $this->validateName($name); - $this->validateValue($value); - $this->validateMaxAge($maxAge); - - $this->name = $name; - $this->value = $value; - $this->maxAge = $maxAge; - $this->expires = $expires; - $this->domain = $this->normalizeDomain($domain); - $this->path = $this->normalizePath($path); - $this->secure = (bool) $secure; - $this->httpOnly = (bool) $httpOnly; - } - - /** - * Creates a new cookie without any attribute validation. - * - * @param string $name - * @param string|null $value - * @param int $maxAge - * @param string|null $domain - * @param string|null $path - * @param bool $secure - * @param bool $httpOnly - * @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided. - */ - public static function createWithoutValidation( - $name, - $value = null, - $maxAge = null, - $domain = null, - $path = null, - $secure = false, - $httpOnly = false, - \DateTime $expires = null - ) { - $cookie = new self('name', null, null, $domain, $path, $secure, $httpOnly, $expires); - $cookie->name = $name; - $cookie->value = $value; - $cookie->maxAge = $maxAge; - - return $cookie; - } - - /** - * Returns the name. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Returns the value. - * - * @return string|null - */ - public function getValue() - { - return $this->value; - } - - /** - * Checks if there is a value. - * - * @return bool - */ - public function hasValue() - { - return isset($this->value); - } - - /** - * Sets the value. - * - * @param string|null $value - * - * @return Cookie - */ - public function withValue($value) - { - $this->validateValue($value); - - $new = clone $this; - $new->value = $value; - - return $new; - } - - /** - * Returns the max age. - * - * @return int|null - */ - public function getMaxAge() - { - return $this->maxAge; - } - - /** - * Checks if there is a max age. - * - * @return bool - */ - public function hasMaxAge() - { - return isset($this->maxAge); - } - - /** - * Sets the max age. - * - * @param int|null $maxAge - * - * @return Cookie - */ - public function withMaxAge($maxAge) - { - $this->validateMaxAge($maxAge); - - $new = clone $this; - $new->maxAge = $maxAge; - - return $new; - } - - /** - * Returns the expiration time. - * - * @return \DateTime|null - */ - public function getExpires() - { - return $this->expires; - } - - /** - * Checks if there is an expiration time. - * - * @return bool - */ - public function hasExpires() - { - return isset($this->expires); - } - - /** - * Sets the expires. - * - * @param \DateTime|null $expires - * - * @return Cookie - */ - public function withExpires(\DateTime $expires = null) - { - $new = clone $this; - $new->expires = $expires; - - return $new; - } - - /** - * Checks if the cookie is expired. - * - * @return bool - */ - public function isExpired() - { - return isset($this->expires) and $this->expires < new \DateTime(); - } - - /** - * Returns the domain. - * - * @return string|null - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Checks if there is a domain. - * - * @return bool - */ - public function hasDomain() - { - return isset($this->domain); - } - - /** - * Sets the domain. - * - * @param string|null $domain - * - * @return Cookie - */ - public function withDomain($domain) - { - $new = clone $this; - $new->domain = $this->normalizeDomain($domain); - - return $new; - } - - /** - * Checks whether this cookie is meant for this domain. - * - * @see http://tools.ietf.org/html/rfc6265#section-5.1.3 - * - * @param string $domain - * - * @return bool - */ - public function matchDomain($domain) - { - // Domain is not set or exact match - if (!$this->hasDomain() || strcasecmp($domain, $this->domain) === 0) { - return true; - } - - // Domain is not an IP address - if (filter_var($domain, FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) preg_match(sprintf('/\b%s$/i', preg_quote($this->domain)), $domain); - } - - /** - * Returns the path. - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Sets the path. - * - * @param string|null $path - * - * @return Cookie - */ - public function withPath($path) - { - $new = clone $this; - $new->path = $this->normalizePath($path); - - return $new; - } - - /** - * Checks whether this cookie is meant for this path. - * - * @see http://tools.ietf.org/html/rfc6265#section-5.1.4 - * - * @param string $path - * - * @return bool - */ - public function matchPath($path) - { - return $this->path === $path || (strpos($path, rtrim($this->path, '/').'/') === 0); - } - - /** - * Checks whether this cookie may only be sent over HTTPS. - * - * @return bool - */ - public function isSecure() - { - return $this->secure; - } - - /** - * Sets whether this cookie should only be sent over HTTPS. - * - * @param bool $secure - * - * @return Cookie - */ - public function withSecure($secure) - { - $new = clone $this; - $new->secure = (bool) $secure; - - return $new; - } - - /** - * Check whether this cookie may not be accessed through Javascript. - * - * @return bool - */ - public function isHttpOnly() - { - return $this->httpOnly; - } - - /** - * Sets whether this cookie may not be accessed through Javascript. - * - * @param bool $httpOnly - * - * @return Cookie - */ - public function withHttpOnly($httpOnly) - { - $new = clone $this; - $new->httpOnly = (bool) $httpOnly; - - return $new; - } - - /** - * Checks if this cookie represents the same cookie as $cookie. - * - * This does not compare the values, only name, domain and path. - * - * @param Cookie $cookie - * - * @return bool - */ - public function match(Cookie $cookie) - { - return $this->name === $cookie->name && $this->domain === $cookie->domain and $this->path === $cookie->path; - } - - /** - * Validates cookie attributes. - * - * @return bool - */ - public function isValid() - { - try { - $this->validateName($this->name); - $this->validateValue($this->value); - $this->validateMaxAge($this->maxAge); - } catch (\InvalidArgumentException $e) { - return false; - } - - return true; - } - - /** - * Validates the name attribute. - * - * @see http://tools.ietf.org/search/rfc2616#section-2.2 - * - * @param string $name - * - * @throws \InvalidArgumentException If the name is empty or contains invalid characters. - */ - private function validateName($name) - { - if (strlen($name) < 1) { - throw new \InvalidArgumentException('The name cannot be empty'); - } - - // Name attribute is a token as per spec in RFC 2616 - if (preg_match('/[\x00-\x20\x22\x28-\x29\x2C\x2F\x3A-\x40\x5B-\x5D\x7B\x7D\x7F]/', $name)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); - } - } - - /** - * Validates a value. - * - * @see http://tools.ietf.org/html/rfc6265#section-4.1.1 - * - * @param string|null $value - * - * @throws \InvalidArgumentException If the value contains invalid characters. - */ - private function validateValue($value) - { - if (isset($value)) { - if (preg_match('/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/', $value)) { - throw new \InvalidArgumentException(sprintf('The cookie value "%s" contains invalid characters.', $value)); - } - } - } - - /** - * Validates a Max-Age attribute. - * - * @param int|null $maxAge - * - * @throws \InvalidArgumentException If the Max-Age is not an empty or integer value. - */ - private function validateMaxAge($maxAge) - { - if (isset($maxAge)) { - if (!is_int($maxAge)) { - throw new \InvalidArgumentException('Max-Age must be integer'); - } - } - } - - /** - * Remove the leading '.' and lowercase the domain as per spec in RFC 6265. - * - * @see http://tools.ietf.org/html/rfc6265#section-4.1.2.3 - * @see http://tools.ietf.org/html/rfc6265#section-5.1.3 - * @see http://tools.ietf.org/html/rfc6265#section-5.2.3 - * - * @param string|null $domain - * - * @return string - */ - private function normalizeDomain($domain) - { - if (isset($domain)) { - $domain = ltrim(strtolower($domain), '.'); - } - - return $domain; - } - - /** - * Processes path as per spec in RFC 6265. - * - * @see http://tools.ietf.org/html/rfc6265#section-5.1.4 - * @see http://tools.ietf.org/html/rfc6265#section-5.2.4 - * - * @param string|null $path - * - * @return string - */ - private function normalizePath($path) - { - $path = rtrim($path, '/'); - - if (empty($path) or substr($path, 0, 1) !== '/') { - $path = '/'; - } - - return $path; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/CookieJar.php b/sensitive-issue-searcher/vendor/php-http/message/src/CookieJar.php deleted file mode 100644 index ab267d3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/CookieJar.php +++ /dev/null @@ -1,220 +0,0 @@ - - */ -final class CookieJar implements \Countable, \IteratorAggregate -{ - /** - * @var \SplObjectStorage - */ - protected $cookies; - - public function __construct() - { - $this->cookies = new \SplObjectStorage(); - } - - /** - * Checks if there is a cookie. - * - * @param Cookie $cookie - * - * @return bool - */ - public function hasCookie(Cookie $cookie) - { - return $this->cookies->contains($cookie); - } - - /** - * Adds a cookie. - * - * @param Cookie $cookie - */ - public function addCookie(Cookie $cookie) - { - if (!$this->hasCookie($cookie)) { - $cookies = $this->getMatchingCookies($cookie); - - foreach ($cookies as $matchingCookie) { - if ($cookie->getValue() !== $matchingCookie->getValue() || $cookie->getMaxAge() > $matchingCookie->getMaxAge()) { - $this->removeCookie($matchingCookie); - - continue; - } - } - - if ($cookie->hasValue()) { - $this->cookies->attach($cookie); - } - } - } - - /** - * Removes a cookie. - * - * @param Cookie $cookie - */ - public function removeCookie(Cookie $cookie) - { - $this->cookies->detach($cookie); - } - - /** - * Returns the cookies. - * - * @return Cookie[] - */ - public function getCookies() - { - $match = function ($matchCookie) { - return true; - }; - - return $this->findMatchingCookies($match); - } - - /** - * Returns all matching cookies. - * - * @param Cookie $cookie - * - * @return Cookie[] - */ - public function getMatchingCookies(Cookie $cookie) - { - $match = function ($matchCookie) use ($cookie) { - return $matchCookie->match($cookie); - }; - - return $this->findMatchingCookies($match); - } - - /** - * Finds matching cookies based on a callable. - * - * @param callable $match - * - * @return Cookie[] - */ - protected function findMatchingCookies(callable $match) - { - $cookies = []; - - foreach ($this->cookies as $cookie) { - if ($match($cookie)) { - $cookies[] = $cookie; - } - } - - return $cookies; - } - - /** - * Checks if there are cookies. - * - * @return bool - */ - public function hasCookies() - { - return $this->cookies->count() > 0; - } - - /** - * Sets the cookies and removes any previous one. - * - * @param Cookie[] $cookies - */ - public function setCookies(array $cookies) - { - $this->clear(); - $this->addCookies($cookies); - } - - /** - * Adds some cookies. - * - * @param Cookie[] $cookies - */ - public function addCookies(array $cookies) - { - foreach ($cookies as $cookie) { - $this->addCookie($cookie); - } - } - - /** - * Removes some cookies. - * - * @param Cookie[] $cookies - */ - public function removeCookies(array $cookies) - { - foreach ($cookies as $cookie) { - $this->removeCookie($cookie); - } - } - - /** - * Removes cookies which match the given parameters. - * - * Null means that parameter should not be matched - * - * @param string|null $name - * @param string|null $domain - * @param string|null $path - */ - public function removeMatchingCookies($name = null, $domain = null, $path = null) - { - $match = function ($cookie) use ($name, $domain, $path) { - $match = true; - - if (isset($name)) { - $match = $match && ($cookie->getName() === $name); - } - - if (isset($domain)) { - $match = $match && $cookie->matchDomain($domain); - } - - if (isset($path)) { - $match = $match && $cookie->matchPath($path); - } - - return $match; - }; - - $cookies = $this->findMatchingCookies($match); - - $this->removeCookies($cookies); - } - - /** - * Removes all cookies. - */ - public function clear() - { - $this->cookies = new \SplObjectStorage(); - } - - /** - * {@inheritdoc} - */ - public function count() - { - return $this->cookies->count(); - } - - /** - * {@inheritdoc} - */ - public function getIterator() - { - return clone $this->cookies; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/MessageDecorator.php b/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/MessageDecorator.php deleted file mode 100644 index 0ffc7ca..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/MessageDecorator.php +++ /dev/null @@ -1,133 +0,0 @@ - - */ -trait MessageDecorator -{ - /** - * @var MessageInterface - */ - private $message; - - /** - * Returns the decorated message. - * - * Since the underlying Message is immutable as well - * exposing it is not an issue, because it's state cannot be altered - * - * @return MessageInterface - */ - public function getMessage() - { - return $this->message; - } - - /** - * {@inheritdoc} - */ - public function getProtocolVersion() - { - return $this->message->getProtocolVersion(); - } - - /** - * {@inheritdoc} - */ - public function withProtocolVersion($version) - { - $new = clone $this; - $new->message = $this->message->withProtocolVersion($version); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getHeaders() - { - return $this->message->getHeaders(); - } - - /** - * {@inheritdoc} - */ - public function hasHeader($header) - { - return $this->message->hasHeader($header); - } - - /** - * {@inheritdoc} - */ - public function getHeader($header) - { - return $this->message->getHeader($header); - } - - /** - * {@inheritdoc} - */ - public function getHeaderLine($header) - { - return $this->message->getHeaderLine($header); - } - - /** - * {@inheritdoc} - */ - public function withHeader($header, $value) - { - $new = clone $this; - $new->message = $this->message->withHeader($header, $value); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withAddedHeader($header, $value) - { - $new = clone $this; - $new->message = $this->message->withAddedHeader($header, $value); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withoutHeader($header) - { - $new = clone $this; - $new->message = $this->message->withoutHeader($header); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getBody() - { - return $this->message->getBody(); - } - - /** - * {@inheritdoc} - */ - public function withBody(StreamInterface $body) - { - $new = clone $this; - $new->message = $this->message->withBody($body); - - return $new; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/RequestDecorator.php b/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/RequestDecorator.php deleted file mode 100644 index 7c50e58..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/RequestDecorator.php +++ /dev/null @@ -1,88 +0,0 @@ - - */ -trait RequestDecorator -{ - use MessageDecorator { - getMessage as getRequest; - } - - /** - * Exchanges the underlying request with another. - * - * @param RequestInterface $request - * - * @return self - */ - public function withRequest(RequestInterface $request) - { - $new = clone $this; - $new->message = $request; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getRequestTarget() - { - return $this->message->getRequestTarget(); - } - - /** - * {@inheritdoc} - */ - public function withRequestTarget($requestTarget) - { - $new = clone $this; - $new->message = $this->message->withRequestTarget($requestTarget); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getMethod() - { - return $this->message->getMethod(); - } - - /** - * {@inheritdoc} - */ - public function withMethod($method) - { - $new = clone $this; - $new->message = $this->message->withMethod($method); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getUri() - { - return $this->message->getUri(); - } - - /** - * {@inheritdoc} - */ - public function withUri(UriInterface $uri, $preserveHost = false) - { - $new = clone $this; - $new->message = $this->message->withUri($uri, $preserveHost); - - return $new; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/ResponseDecorator.php b/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/ResponseDecorator.php deleted file mode 100644 index 82d9ae0..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/ResponseDecorator.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -trait ResponseDecorator -{ - use MessageDecorator { - getMessage as getResponse; - } - - /** - * Exchanges the underlying response with another. - * - * @param ResponseInterface $response - * - * @return self - */ - public function withResponse(ResponseInterface $response) - { - $new = clone $this; - $new->message = $response; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getStatusCode() - { - return $this->message->getStatusCode(); - } - - /** - * {@inheritdoc} - */ - public function withStatus($code, $reasonPhrase = '') - { - $new = clone $this; - $new->message = $this->message->withStatus($code, $reasonPhrase); - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getReasonPhrase() - { - return $this->message->getReasonPhrase(); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/StreamDecorator.php b/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/StreamDecorator.php deleted file mode 100644 index f405c7a..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Decorator/StreamDecorator.php +++ /dev/null @@ -1,138 +0,0 @@ - - */ -trait StreamDecorator -{ - /** - * @var StreamInterface - */ - protected $stream; - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->stream->__toString(); - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->stream->close(); - } - - /** - * {@inheritdoc} - */ - public function detach() - { - return $this->stream->detach(); - } - - /** - * {@inheritdoc} - */ - public function getSize() - { - return $this->stream->getSize(); - } - - /** - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell(); - } - - /** - * {@inheritdoc} - */ - public function eof() - { - return $this->stream->eof(); - } - - /** - * {@inheritdoc} - */ - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - /** - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - - /** - * {@inheritdoc} - */ - public function rewind() - { - $this->stream->rewind(); - } - - /** - * {@inheritdoc} - */ - public function isWritable() - { - return $this->stream->isWritable(); - } - - /** - * {@inheritdoc} - */ - public function write($string) - { - return $this->stream->write($string); - } - - /** - * {@inheritdoc} - */ - public function isReadable() - { - return $this->stream->isReadable(); - } - - /** - * {@inheritdoc} - */ - public function read($length) - { - return $this->stream->read($length); - } - - /** - * {@inheritdoc} - */ - public function getContents() - { - return $this->stream->getContents(); - } - - /** - * {@inheritdoc} - */ - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/ChunkStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/ChunkStream.php deleted file mode 100644 index 74c2fbd..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/ChunkStream.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class ChunkStream extends FilteredStream -{ - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'chunk'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'dechunk'; - } - - /** - * {@inheritdoc} - */ - protected function fill() - { - parent::fill(); - - if ($this->stream->eof()) { - $this->buffer .= "0\r\n\r\n"; - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/CompressStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/CompressStream.php deleted file mode 100644 index d1013dc..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/CompressStream.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class CompressStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - if (!extension_loaded('zlib')) { - throw new \RuntimeException('The zlib extension must be enabled to use this stream'); - } - - parent::__construct($stream, ['window' => 15, 'level' => $level], ['window' => 15]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.deflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.inflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DechunkStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DechunkStream.php deleted file mode 100644 index 4cade83..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DechunkStream.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -class DechunkStream extends FilteredStream -{ - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'dechunk'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'chunk'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DecompressStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DecompressStream.php deleted file mode 100644 index 4e3a723..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DecompressStream.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class DecompressStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - if (!extension_loaded('zlib')) { - throw new \RuntimeException('The zlib extension must be enabled to use this stream'); - } - - parent::__construct($stream, ['window' => 15], ['window' => 15, 'level' => $level]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.inflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.deflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DeflateStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DeflateStream.php deleted file mode 100644 index 1d7344b..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/DeflateStream.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class DeflateStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - parent::__construct($stream, ['window' => -15, 'level' => $level], ['window' => -15]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.deflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.inflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/Filter/Chunk.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/Filter/Chunk.php deleted file mode 100644 index 0f8f53b..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/Filter/Chunk.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ -class Chunk extends \php_user_filter -{ - /** - * {@inheritdoc} - */ - public function filter($in, $out, &$consumed, $closing) - { - while ($bucket = stream_bucket_make_writeable($in)) { - $lenbucket = stream_bucket_new($this->stream, dechex($bucket->datalen)."\r\n"); - stream_bucket_append($out, $lenbucket); - - $consumed += $bucket->datalen; - stream_bucket_append($out, $bucket); - - $lenbucket = stream_bucket_new($this->stream, "\r\n"); - stream_bucket_append($out, $lenbucket); - } - - return PSFS_PASS_ON; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/FilteredStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/FilteredStream.php deleted file mode 100644 index a32554b..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/FilteredStream.php +++ /dev/null @@ -1,198 +0,0 @@ - - */ -abstract class FilteredStream implements StreamInterface -{ - const BUFFER_SIZE = 8192; - - use StreamDecorator; - - /** - * @var callable - */ - protected $readFilterCallback; - - /** - * @var resource - * - * @deprecated since version 1.5, will be removed in 2.0 - */ - protected $readFilter; - - /** - * @var callable - * - * @deprecated since version 1.5, will be removed in 2.0 - */ - protected $writeFilterCallback; - - /** - * @var resource - * - * @deprecated since version 1.5, will be removed in 2.0 - */ - protected $writeFilter; - - /** - * Internal buffer. - * - * @var string - */ - protected $buffer = ''; - - /** - * @param StreamInterface $stream - * @param mixed|null $readFilterOptions - * @param mixed|null $writeFilterOptions deprecated since 1.5, will be removed in 2.0 - */ - public function __construct(StreamInterface $stream, $readFilterOptions = null, $writeFilterOptions = null) - { - $this->readFilterCallback = Filter\fun($this->readFilter(), $readFilterOptions); - $this->writeFilterCallback = Filter\fun($this->writeFilter(), $writeFilterOptions); - - if (null !== $writeFilterOptions) { - @trigger_error('The $writeFilterOptions argument is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); - } - - $this->stream = $stream; - } - - /** - * {@inheritdoc} - */ - public function read($length) - { - if (strlen($this->buffer) >= $length) { - $read = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - - return $read; - } - - if ($this->stream->eof()) { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - $read = $this->buffer; - $this->buffer = ''; - $this->fill(); - - return $read.$this->read($length - strlen($read)); - } - - /** - * {@inheritdoc} - */ - public function eof() - { - return $this->stream->eof() && $this->buffer === ''; - } - - /** - * Buffer is filled by reading underlying stream. - * - * Callback is reading once more even if the stream is ended. - * This allow to get last data in the PHP buffer otherwise this - * bug is present : https://bugs.php.net/bug.php?id=48725 - */ - protected function fill() - { - $readFilterCallback = $this->readFilterCallback; - $this->buffer .= $readFilterCallback($this->stream->read(self::BUFFER_SIZE)); - - if ($this->stream->eof()) { - $this->buffer .= $readFilterCallback(); - } - } - - /** - * {@inheritdoc} - */ - public function getContents() - { - $buffer = ''; - - while (!$this->eof()) { - $buf = $this->read(self::BUFFER_SIZE); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - - $buffer .= $buf; - } - - return $buffer; - } - - /** - * {@inheritdoc} - */ - public function getSize() - { - return; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return $this->getContents(); - } - - /** - * Returns the read filter name. - * - * @return string - * - * @deprecated since version 1.5, will be removed in 2.0 - */ - public function getReadFilter() - { - @trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); - - return $this->readFilter(); - } - - /** - * Returns the write filter name. - * - * @return string - */ - abstract protected function readFilter(); - - /** - * Returns the write filter name. - * - * @return string - * - * @deprecated since version 1.5, will be removed in 2.0 - */ - public function getWriteFilter() - { - @trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); - - return $this->writeFilter(); - } - - /** - * Returns the write filter name. - * - * @return string - */ - abstract protected function writeFilter(); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipDecodeStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipDecodeStream.php deleted file mode 100644 index 4f958ed..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipDecodeStream.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class GzipDecodeStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - if (!extension_loaded('zlib')) { - throw new \RuntimeException('The zlib extension must be enabled to use this stream'); - } - - parent::__construct($stream, ['window' => 31], ['window' => 31, 'level' => $level]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.inflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.deflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipEncodeStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipEncodeStream.php deleted file mode 100644 index 1066eec..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/GzipEncodeStream.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class GzipEncodeStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - if (!extension_loaded('zlib')) { - throw new \RuntimeException('The zlib extension must be enabled to use this stream'); - } - - parent::__construct($stream, ['window' => 31, 'level' => $level], ['window' => 31]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.deflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.inflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/InflateStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/InflateStream.php deleted file mode 100644 index 7070230..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Encoding/InflateStream.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class InflateStream extends FilteredStream -{ - /** - * @param StreamInterface $stream - * @param int $level - */ - public function __construct(StreamInterface $stream, $level = -1) - { - if (!extension_loaded('zlib')) { - throw new \RuntimeException('The zlib extension must be enabled to use this stream'); - } - - parent::__construct($stream, ['window' => -15], ['window' => -15, 'level' => $level]); - } - - /** - * {@inheritdoc} - */ - protected function readFilter() - { - return 'zlib.inflate'; - } - - /** - * {@inheritdoc} - */ - protected function writeFilter() - { - return 'zlib.deflate'; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter.php b/sensitive-issue-searcher/vendor/php-http/message/src/Formatter.php deleted file mode 100644 index d04d2c3..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -interface Formatter -{ - /** - * Formats a request. - * - * @param RequestInterface $request - * - * @return string - */ - public function formatRequest(RequestInterface $request); - - /** - * Formats a response. - * - * @param ResponseInterface $response - * - * @return string - */ - public function formatResponse(ResponseInterface $response); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php b/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php deleted file mode 100644 index 5364ccc..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/CurlCommandFormatter.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class CurlCommandFormatter implements Formatter -{ - /** - * {@inheritdoc} - */ - public function formatRequest(RequestInterface $request) - { - $command = sprintf('curl %s', escapeshellarg((string) $request->getUri()->withFragment(''))); - if ($request->getProtocolVersion() === '1.0') { - $command .= ' --http1.0'; - } elseif ($request->getProtocolVersion() === '2.0') { - $command .= ' --http2'; - } - - $method = strtoupper($request->getMethod()); - if ('HEAD' === $method) { - $command .= ' --head'; - } elseif ('GET' !== $method) { - $command .= ' --request '.$method; - } - - $command .= $this->getHeadersAsCommandOptions($request); - - $body = $request->getBody(); - if ($body->getSize() > 0) { - if (!$body->isSeekable()) { - return 'Cant format Request as cUrl command if body stream is not seekable.'; - } - $command .= sprintf(' --data %s', escapeshellarg($body->__toString())); - $body->rewind(); - } - - return $command; - } - - /** - * {@inheritdoc} - */ - public function formatResponse(ResponseInterface $response) - { - return ''; - } - - /** - * @param RequestInterface $request - * - * @return string - */ - private function getHeadersAsCommandOptions(RequestInterface $request) - { - $command = ''; - foreach ($request->getHeaders() as $name => $values) { - if ('host' === strtolower($name) && $values[0] === $request->getUri()->getHost()) { - continue; - } - - if ('user-agent' === strtolower($name)) { - $command .= sprintf('-A %s', escapeshellarg($values[0])); - continue; - } - - $command .= sprintf(' -H %s', escapeshellarg($name.': '.$request->getHeaderLine($name))); - } - - return $command; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php b/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php deleted file mode 100644 index 3fa1029..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/FullHttpMessageFormatter.php +++ /dev/null @@ -1,91 +0,0 @@ - - */ -class FullHttpMessageFormatter implements Formatter -{ - /** - * The maximum length of the body. - * - * @var int - */ - private $maxBodyLength; - - /** - * @param int $maxBodyLength - */ - public function __construct($maxBodyLength = 1000) - { - $this->maxBodyLength = $maxBodyLength; - } - - /** - * {@inheritdoc} - */ - public function formatRequest(RequestInterface $request) - { - $message = sprintf( - "%s %s HTTP/%s\n", - $request->getMethod(), - $request->getRequestTarget(), - $request->getProtocolVersion() - ); - - foreach ($request->getHeaders() as $name => $values) { - $message .= $name.': '.implode(', ', $values)."\n"; - } - - return $this->addBody($request, $message); - } - - /** - * {@inheritdoc} - */ - public function formatResponse(ResponseInterface $response) - { - $message = sprintf( - "HTTP/%s %s %s\n", - $response->getProtocolVersion(), - $response->getStatusCode(), - $response->getReasonPhrase() - ); - - foreach ($response->getHeaders() as $name => $values) { - $message .= $name.': '.implode(', ', $values)."\n"; - } - - return $this->addBody($response, $message); - } - - /** - * Add the message body if the stream is seekable. - * - * @param MessageInterface $request - * @param string $message - * - * @return string - */ - private function addBody(MessageInterface $request, $message) - { - $stream = $request->getBody(); - if (!$stream->isSeekable() || $this->maxBodyLength === 0) { - // Do not read the stream - $message .= "\n"; - } else { - $message .= "\n".mb_substr($stream->__toString(), 0, $this->maxBodyLength); - $stream->rewind(); - } - - return $message; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/SimpleFormatter.php b/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/SimpleFormatter.php deleted file mode 100644 index b1fcabd..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Formatter/SimpleFormatter.php +++ /dev/null @@ -1,42 +0,0 @@ - - * @author Márk Sági-Kazár - */ -class SimpleFormatter implements Formatter -{ - /** - * {@inheritdoc} - */ - public function formatRequest(RequestInterface $request) - { - return sprintf( - '%s %s %s', - $request->getMethod(), - $request->getUri()->__toString(), - $request->getProtocolVersion() - ); - } - - /** - * {@inheritdoc} - */ - public function formatResponse(ResponseInterface $response) - { - return sprintf( - '%s %s %s', - $response->getStatusCode(), - $response->getReasonPhrase(), - $response->getProtocolVersion() - ); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/DiactorosMessageFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/DiactorosMessageFactory.php deleted file mode 100644 index 53f08ae..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/DiactorosMessageFactory.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -final class DiactorosMessageFactory implements MessageFactory -{ - /** - * @var DiactorosStreamFactory - */ - private $streamFactory; - - public function __construct() - { - $this->streamFactory = new DiactorosStreamFactory(); - } - - /** - * {@inheritdoc} - */ - public function createRequest( - $method, - $uri, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return (new Request( - $uri, - $method, - $this->streamFactory->createStream($body), - $headers - ))->withProtocolVersion($protocolVersion); - } - - /** - * {@inheritdoc} - */ - public function createResponse( - $statusCode = 200, - $reasonPhrase = null, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return (new Response( - $this->streamFactory->createStream($body), - $statusCode, - $headers - ))->withProtocolVersion($protocolVersion); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/GuzzleMessageFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/GuzzleMessageFactory.php deleted file mode 100644 index 59eb655..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/GuzzleMessageFactory.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -final class GuzzleMessageFactory implements MessageFactory -{ - /** - * {@inheritdoc} - */ - public function createRequest( - $method, - $uri, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return new Request( - $method, - $uri, - $headers, - $body, - $protocolVersion - ); - } - - /** - * {@inheritdoc} - */ - public function createResponse( - $statusCode = 200, - $reasonPhrase = null, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return new Response( - $statusCode, - $headers, - $body, - $protocolVersion, - $reasonPhrase - ); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/SlimMessageFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/SlimMessageFactory.php deleted file mode 100644 index cdad2ec..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/MessageFactory/SlimMessageFactory.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -final class SlimMessageFactory implements MessageFactory -{ - /** - * @var SlimStreamFactory - */ - private $streamFactory; - - /** - * @var SlimUriFactory - */ - private $uriFactory; - - public function __construct() - { - $this->streamFactory = new SlimStreamFactory(); - $this->uriFactory = new SlimUriFactory(); - } - - /** - * {@inheritdoc} - */ - public function createRequest( - $method, - $uri, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return (new Request( - $method, - $this->uriFactory->createUri($uri), - new Headers($headers), - [], - [], - $this->streamFactory->createStream($body), - [] - ))->withProtocolVersion($protocolVersion); - } - - /** - * {@inheritdoc} - */ - public function createResponse( - $statusCode = 200, - $reasonPhrase = null, - array $headers = [], - $body = null, - $protocolVersion = '1.1' - ) { - return (new Response( - $statusCode, - new Headers($headers), - $this->streamFactory->createStream($body) - ))->withProtocolVersion($protocolVersion); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher.php b/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher.php deleted file mode 100644 index 94fe532..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -interface RequestMatcher -{ - /** - * Decides whether the rule(s) implemented by the strategy matches the supplied request. - * - * @param RequestInterface $request The PSR7 request to check for a match - * - * @return bool true if the request matches, false otherwise - */ - public function matches(RequestInterface $request); -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/CallbackRequestMatcher.php b/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/CallbackRequestMatcher.php deleted file mode 100644 index 4d45e32..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/CallbackRequestMatcher.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -final class CallbackRequestMatcher implements RequestMatcher -{ - /** - * @var callable - */ - private $callback; - - /** - * @param callable $callback - */ - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - /** - * {@inheritdoc} - */ - public function matches(RequestInterface $request) - { - return (bool) call_user_func($this->callback, $request); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RegexRequestMatcher.php b/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RegexRequestMatcher.php deleted file mode 100644 index 91f3729..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RegexRequestMatcher.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * @deprecated since version 1.2 and will be removed in 2.0. Use {@link RequestMatcher} instead. - */ -final class RegexRequestMatcher implements RequestMatcher -{ - /** - * Matching regex. - * - * @var string - */ - private $regex; - - /** - * @param string $regex - */ - public function __construct($regex) - { - $this->regex = $regex; - } - - /** - * {@inheritdoc} - */ - public function matches(RequestInterface $request) - { - return (bool) preg_match($this->regex, (string) $request->getUri()); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RequestMatcher.php b/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RequestMatcher.php deleted file mode 100644 index e2aa021..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/RequestMatcher/RequestMatcher.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @author Joel Wurtz - */ -final class RequestMatcher implements RequestMatcherInterface -{ - /** - * @var string - */ - private $path; - - /** - * @var string - */ - private $host; - - /** - * @var array - */ - private $methods = []; - - /** - * @var string[] - */ - private $schemes = []; - - /** - * The regular expressions used for path or host must be specified without delimiter. - * You do not need to escape the forward slash / to match it. - * - * @param string|null $path Regular expression for the path - * @param string|null $host Regular expression for the hostname - * @param string|string[]|null $methods Method or list of methods to match - * @param string|string[]|null $schemes Scheme or list of schemes to match (e.g. http or https) - */ - public function __construct($path = null, $host = null, $methods = [], $schemes = []) - { - $this->path = $path; - $this->host = $host; - $this->methods = array_map('strtoupper', (array) $methods); - $this->schemes = array_map('strtolower', (array) $schemes); - } - - /** - * {@inheritdoc} - * - * @api - */ - public function matches(RequestInterface $request) - { - if ($this->schemes && !in_array($request->getUri()->getScheme(), $this->schemes)) { - return false; - } - - if ($this->methods && !in_array($request->getMethod(), $this->methods)) { - return false; - } - - if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getUri()->getPath()))) { - return false; - } - - if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getUri()->getHost())) { - return false; - } - - return true; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/Stream/BufferedStream.php b/sensitive-issue-searcher/vendor/php-http/message/src/Stream/BufferedStream.php deleted file mode 100644 index 1eac974..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/Stream/BufferedStream.php +++ /dev/null @@ -1,270 +0,0 @@ -stream = $stream; - $this->size = $stream->getSize(); - - if ($useFileBuffer) { - $this->resource = fopen('php://temp/maxmemory:'.$memoryBuffer, 'rw+'); - } else { - $this->resource = fopen('php://memory', 'rw+'); - } - - if (false === $this->resource) { - throw new \RuntimeException('Cannot create a resource over temp or memory implementation'); - } - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - try { - $this->rewind(); - - return $this->getContents(); - } catch (\Throwable $throwable) { - return ''; - } catch (\Exception $exception) { // Layer to be BC with PHP 5, remove this when we only support PHP 7+ - return ''; - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot close on a detached stream'); - } - - $this->stream->close(); - fclose($this->resource); - } - - /** - * {@inheritdoc} - */ - public function detach() - { - if (null === $this->resource) { - return; - } - - // Force reading the remaining data of the stream - $this->getContents(); - - $resource = $this->resource; - $this->stream->close(); - $this->stream = null; - $this->resource = null; - - return $resource; - } - - /** - * {@inheritdoc} - */ - public function getSize() - { - if (null === $this->resource) { - return; - } - - if (null === $this->size && $this->stream->eof()) { - return $this->written; - } - - return $this->size; - } - - /** - * {@inheritdoc} - */ - public function tell() - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot tell on a detached stream'); - } - - return ftell($this->resource); - } - - /** - * {@inheritdoc} - */ - public function eof() - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot call eof on a detached stream'); - } - - // We are at the end only when both our resource and underlying stream are at eof - return $this->stream->eof() && (ftell($this->resource) === $this->written); - } - - /** - * {@inheritdoc} - */ - public function isSeekable() - { - return null !== $this->resource; - } - - /** - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot seek on a detached stream'); - } - - fseek($this->resource, $offset, $whence); - } - - /** - * {@inheritdoc} - */ - public function rewind() - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot rewind on a detached stream'); - } - - rewind($this->resource); - } - - /** - * {@inheritdoc} - */ - public function isWritable() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function write($string) - { - throw new \RuntimeException('Cannot write on this stream'); - } - - /** - * {@inheritdoc} - */ - public function isReadable() - { - return null !== $this->resource; - } - - /** - * {@inheritdoc} - */ - public function read($length) - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot read on a detached stream'); - } - - $read = ''; - - // First read from the resource - if (ftell($this->resource) !== $this->written) { - $read = fread($this->resource, $length); - } - - $bytesRead = strlen($read); - - if ($bytesRead < $length) { - $streamRead = $this->stream->read($length - $bytesRead); - - // Write on the underlying stream what we read - $this->written += fwrite($this->resource, $streamRead); - $read .= $streamRead; - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function getContents() - { - if (null === $this->resource) { - throw new \RuntimeException('Cannot read on a detached stream'); - } - - $read = ''; - - while (!$this->eof()) { - $read .= $this->read(8192); - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function getMetadata($key = null) - { - if (null === $this->resource) { - if (null === $key) { - return []; - } - - return; - } - - $metadata = stream_get_meta_data($this->resource); - - if (null === $key) { - return $metadata; - } - - if (!array_key_exists($key, $metadata)) { - return; - } - - return $metadata[$key]; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/DiactorosStreamFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/DiactorosStreamFactory.php deleted file mode 100644 index a75ec98..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/DiactorosStreamFactory.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class DiactorosStreamFactory implements StreamFactory -{ - /** - * {@inheritdoc} - */ - public function createStream($body = null) - { - if ($body instanceof StreamInterface) { - return $body; - } - - if (is_resource($body)) { - return new Stream($body); - } - - $stream = new Stream('php://memory', 'rw'); - if (null !== $body && '' !== $body) { - $stream->write((string) $body); - } - - return $stream; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/GuzzleStreamFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/GuzzleStreamFactory.php deleted file mode 100644 index 10f4d3f..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/GuzzleStreamFactory.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -final class GuzzleStreamFactory implements StreamFactory -{ - /** - * {@inheritdoc} - */ - public function createStream($body = null) - { - return \GuzzleHttp\Psr7\stream_for($body); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/SlimStreamFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/SlimStreamFactory.php deleted file mode 100644 index efcadc4..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/StreamFactory/SlimStreamFactory.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -final class SlimStreamFactory implements StreamFactory -{ - /** - * {@inheritdoc} - */ - public function createStream($body = null) - { - if ($body instanceof StreamInterface) { - return $body; - } - - if (is_resource($body)) { - return new Stream($body); - } - - $resource = fopen('php://memory', 'r+'); - $stream = new Stream($resource); - if (null !== $body && '' !== $body) { - $stream->write((string) $body); - } - - return $stream; - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/DiactorosUriFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/DiactorosUriFactory.php deleted file mode 100644 index 268c361..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/DiactorosUriFactory.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -final class DiactorosUriFactory implements UriFactory -{ - /** - * {@inheritdoc} - */ - public function createUri($uri) - { - if ($uri instanceof UriInterface) { - return $uri; - } elseif (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/GuzzleUriFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/GuzzleUriFactory.php deleted file mode 100644 index 4c1c286..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/GuzzleUriFactory.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -final class GuzzleUriFactory implements UriFactory -{ - /** - * {@inheritdoc} - */ - public function createUri($uri) - { - return Psr7\uri_for($uri); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/SlimUriFactory.php b/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/SlimUriFactory.php deleted file mode 100644 index c013d54..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/UriFactory/SlimUriFactory.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -final class SlimUriFactory implements UriFactory -{ - /** - * {@inheritdoc} - */ - public function createUri($uri) - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if (is_string($uri)) { - return Uri::createFromString($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/message/src/filters.php b/sensitive-issue-searcher/vendor/php-http/message/src/filters.php deleted file mode 100644 index 15ed73d..0000000 --- a/sensitive-issue-searcher/vendor/php-http/message/src/filters.php +++ /dev/null @@ -1,6 +0,0 @@ - - -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. diff --git a/sensitive-issue-searcher/vendor/php-http/promise/README.md b/sensitive-issue-searcher/vendor/php-http/promise/README.md deleted file mode 100644 index adda2ae..0000000 --- a/sensitive-issue-searcher/vendor/php-http/promise/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Promise - -[![Latest Version](https://img.shields.io/github/release/php-http/promise.svg?style=flat-square)](https://github.com/php-http/promise/releases) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/promise.svg?style=flat-square)](https://travis-ci.org/php-http/promise) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/promise.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/promise) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/promise.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/promise) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/promise.svg?style=flat-square)](https://packagist.org/packages/php-http/promise) - -**Promise used for asynchronous HTTP requests.** - -**Note:** This will eventually be removed/deprecated and replaced with the upcoming Promise PSR. - - -## Install - -Via Composer - -``` bash -$ composer require php-http/promise -``` - - -## Documentation - -Please see the [official documentation](http://docs.php-http.org). - - -## Testing - -``` bash -$ composer test -``` - - -## Contributing - -Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html). - - -## Security - -If you discover any security related issues, please contact us at [security@httplug.io](mailto:security@httplug.io) -or [security@php-http.org](mailto:security@php-http.org). - - -## License - -The MIT License (MIT). Please see [License File](LICENSE) for more information. diff --git a/sensitive-issue-searcher/vendor/php-http/promise/composer.json b/sensitive-issue-searcher/vendor/php-http/promise/composer.json deleted file mode 100644 index ff1d2ce..0000000 --- a/sensitive-issue-searcher/vendor/php-http/promise/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "php-http/promise", - "description": "Promise used for asynchronous HTTP requests", - "license": "MIT", - "keywords": ["promise"], - "homepage": "http://httplug.io", - "authors": [ - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "require-dev": { - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^1.0" - }, - "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" - } - }, - "scripts": { - "test": "vendor/bin/phpspec run", - "test-ci": "vendor/bin/phpspec run -c phpspec.yml.ci" - }, - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/promise/src/FulfilledPromise.php b/sensitive-issue-searcher/vendor/php-http/promise/src/FulfilledPromise.php deleted file mode 100644 index f60f686..0000000 --- a/sensitive-issue-searcher/vendor/php-http/promise/src/FulfilledPromise.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -final class FulfilledPromise implements Promise -{ - /** - * @var mixed - */ - private $result; - - /** - * @param $result - */ - public function __construct($result) - { - $this->result = $result; - } - - /** - * {@inheritdoc} - */ - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - if (null === $onFulfilled) { - return $this; - } - - try { - return new self($onFulfilled($this->result)); - } catch (\Exception $e) { - return new RejectedPromise($e); - } - } - - /** - * {@inheritdoc} - */ - public function getState() - { - return Promise::FULFILLED; - } - - /** - * {@inheritdoc} - */ - public function wait($unwrap = true) - { - if ($unwrap) { - return $this->result; - } - } -} diff --git a/sensitive-issue-searcher/vendor/php-http/promise/src/Promise.php b/sensitive-issue-searcher/vendor/php-http/promise/src/Promise.php deleted file mode 100644 index e2cf5f8..0000000 --- a/sensitive-issue-searcher/vendor/php-http/promise/src/Promise.php +++ /dev/null @@ -1,69 +0,0 @@ - - * @author Márk Sági-Kazár - */ -interface Promise -{ - /** - * Promise has not been fulfilled or rejected. - */ - const PENDING = 'pending'; - - /** - * Promise has been fulfilled. - */ - const FULFILLED = 'fulfilled'; - - /** - * Promise has been rejected. - */ - const REJECTED = 'rejected'; - - /** - * Adds behavior for when the promise is resolved or rejected (response will be available, or error happens). - * - * If you do not care about one of the cases, you can set the corresponding callable to null - * The callback will be called when the value arrived and never more than once. - * - * @param callable $onFulfilled Called when a response will be available. - * @param callable $onRejected Called when an exception occurs. - * - * @return Promise A new resolved promise with value of the executed callback (onFulfilled / onRejected). - */ - public function then(callable $onFulfilled = null, callable $onRejected = null); - - /** - * Returns the state of the promise, one of PENDING, FULFILLED or REJECTED. - * - * @return string - */ - public function getState(); - - /** - * Wait for the promise to be fulfilled or rejected. - * - * When this method returns, the request has been resolved and if callables have been - * specified, the appropriate one has terminated. - * - * When $unwrap is true (the default), the response is returned, or the exception thrown - * on failure. Otherwise, nothing is returned or thrown. - * - * @param bool $unwrap Whether to return resolved value / throw reason or not - * - * @return mixed Resolved value, null if $unwrap is set to false - * - * @throws \Exception The rejection reason if $unwrap is set to true and the request failed. - */ - public function wait($unwrap = true); -} diff --git a/sensitive-issue-searcher/vendor/php-http/promise/src/RejectedPromise.php b/sensitive-issue-searcher/vendor/php-http/promise/src/RejectedPromise.php deleted file mode 100644 index e396a40..0000000 --- a/sensitive-issue-searcher/vendor/php-http/promise/src/RejectedPromise.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -final class RejectedPromise implements Promise -{ - /** - * @var \Exception - */ - private $exception; - - /** - * @param \Exception $exception - */ - public function __construct(\Exception $exception) - { - $this->exception = $exception; - } - - /** - * {@inheritdoc} - */ - public function then(callable $onFulfilled = null, callable $onRejected = null) - { - if (null === $onRejected) { - return $this; - } - - try { - return new FulfilledPromise($onRejected($this->exception)); - } catch (\Exception $e) { - return new self($e); - } - } - - /** - * {@inheritdoc} - */ - public function getState() - { - return Promise::REJECTED; - } - - /** - * {@inheritdoc} - */ - public function wait($unwrap = true) - { - if ($unwrap) { - throw $this->exception; - } - } -} diff --git a/sensitive-issue-searcher/vendor/psr/cache/CHANGELOG.md b/sensitive-issue-searcher/vendor/psr/cache/CHANGELOG.md deleted file mode 100644 index 58ddab0..0000000 --- a/sensitive-issue-searcher/vendor/psr/cache/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Fixed - -- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr -- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr -- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell -- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell - -## 1.0.0 - 2015-12-11 - -Initial stable release; reflects accepted PSR-6 specification diff --git a/sensitive-issue-searcher/vendor/psr/cache/LICENSE.txt b/sensitive-issue-searcher/vendor/psr/cache/LICENSE.txt deleted file mode 100644 index b1c2c97..0000000 --- a/sensitive-issue-searcher/vendor/psr/cache/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP Framework Interoperability Group - -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. diff --git a/sensitive-issue-searcher/vendor/psr/cache/README.md b/sensitive-issue-searcher/vendor/psr/cache/README.md deleted file mode 100644 index c8706ce..0000000 --- a/sensitive-issue-searcher/vendor/psr/cache/README.md +++ /dev/null @@ -1,9 +0,0 @@ -PSR Cache -========= - -This repository holds all interfaces defined by -[PSR-6](http://www.php-fig.org/psr/psr-6/). - -Note that this is not a Cache implementation of its own. It is merely an -interface that describes a Cache implementation. See the specification for more -details. diff --git a/sensitive-issue-searcher/vendor/psr/cache/composer.json b/sensitive-issue-searcher/vendor/psr/cache/composer.json deleted file mode 100644 index e828fec..0000000 --- a/sensitive-issue-searcher/vendor/psr/cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/cache", - "description": "Common interface for caching libraries", - "keywords": ["psr", "psr-6", "cache"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/psr/cache/src/CacheException.php b/sensitive-issue-searcher/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index e27f22f..0000000 --- a/sensitive-issue-searcher/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/psr/http-message/src/MessageInterface.php b/sensitive-issue-searcher/vendor/psr/http-message/src/MessageInterface.php deleted file mode 100644 index dd46e5e..0000000 --- a/sensitive-issue-searcher/vendor/psr/http-message/src/MessageInterface.php +++ /dev/null @@ -1,187 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader($name); - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader($name); - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine($name); - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader($name, $value); - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader($name, $value); - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader($name); - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(); - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body); -} diff --git a/sensitive-issue-searcher/vendor/psr/http-message/src/RequestInterface.php b/sensitive-issue-searcher/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index a96d4fd..0000000 --- a/sensitive-issue-searcher/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,129 +0,0 @@ -getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(); - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query); - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(); - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles); - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data); - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(); - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute($name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute($name, $value); - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute($name); -} diff --git a/sensitive-issue-searcher/vendor/psr/http-message/src/StreamInterface.php b/sensitive-issue-searcher/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index f68f391..0000000 --- a/sensitive-issue-searcher/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,158 +0,0 @@ - - * [user-info@]host[:port] - * - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(); - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(); - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(); - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(); - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(); - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(); - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(); - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme($scheme); - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo($user, $password = null); - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost($host); - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort($port); - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath($path); - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery($query); - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment($fragment); - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(); -} diff --git a/sensitive-issue-searcher/vendor/psr/log/.gitignore b/sensitive-issue-searcher/vendor/psr/log/.gitignore deleted file mode 100644 index 22d0d82..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/sensitive-issue-searcher/vendor/psr/log/LICENSE b/sensitive-issue-searcher/vendor/psr/log/LICENSE deleted file mode 100644 index 474c952..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 PHP Framework Interoperability Group - -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. diff --git a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/AbstractLogger.php b/sensitive-issue-searcher/vendor/psr/log/Psr/Log/AbstractLogger.php deleted file mode 100644 index 90e721a..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/AbstractLogger.php +++ /dev/null @@ -1,128 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/sensitive-issue-searcher/vendor/psr/log/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -logger = $logger; - } -} diff --git a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/LoggerInterface.php b/sensitive-issue-searcher/vendor/psr/log/Psr/Log/LoggerInterface.php deleted file mode 100644 index 5ea7243..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,123 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/NullLogger.php b/sensitive-issue-searcher/vendor/psr/log/Psr/Log/NullLogger.php deleted file mode 100644 index d8cd682..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/NullLogger.php +++ /dev/null @@ -1,28 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/sensitive-issue-searcher/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php deleted file mode 100644 index a0391a5..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +++ /dev/null @@ -1,140 +0,0 @@ - ". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} - -class DummyTest -{ - public function __toString() - { - } -} diff --git a/sensitive-issue-searcher/vendor/psr/log/README.md b/sensitive-issue-searcher/vendor/psr/log/README.md deleted file mode 100644 index 574bc1c..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/README.md +++ /dev/null @@ -1,45 +0,0 @@ -PSR Log -======= - -This repository holds all interfaces/classes/traits related to -[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). - -Note that this is not a logger of its own. It is merely an interface that -describes a logger. See the specification for more details. - -Usage ------ - -If you need a logger, you can use the interface like this: - -```php -logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/sensitive-issue-searcher/vendor/psr/log/composer.json b/sensitive-issue-searcher/vendor/psr/log/composer.json deleted file mode 100644 index 87934d7..0000000 --- a/sensitive-issue-searcher/vendor/psr/log/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "homepage": "https://github.com/php-fig/log", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/.editorconfig b/sensitive-issue-searcher/vendor/psr/simple-cache/.editorconfig deleted file mode 100644 index 48542cb..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/LICENSE.md b/sensitive-issue-searcher/vendor/psr/simple-cache/LICENSE.md deleted file mode 100644 index e49a7c8..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -Copyright (c) 2016 PHP Framework Interoperability Group - -> 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. diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/README.md b/sensitive-issue-searcher/vendor/psr/simple-cache/README.md deleted file mode 100644 index 43641d1..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/README.md +++ /dev/null @@ -1,8 +0,0 @@ -PHP FIG Simple Cache PSR -======================== - -This repository holds all interfaces related to PSR-16. - -Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. - -You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/composer.json b/sensitive-issue-searcher/vendor/psr/simple-cache/composer.json deleted file mode 100644 index 2978fa5..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/simple-cache", - "description": "Common interfaces for simple caching", - "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/src/CacheException.php b/sensitive-issue-searcher/vendor/psr/simple-cache/src/CacheException.php deleted file mode 100644 index eba5381..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ - value pairs. Cache keys that do not exist or are stale will have $default as value. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function getMultiple($keys, $default = null); - - /** - * Persists a set of key => value pairs in the cache, with an optional TTL. - * - * @param iterable $values A list of key => value pairs for a multiple-set operation. - * @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and - * the driver supports TTL then the library may set a default value - * for it or let the driver take care of that. - * - * @return bool True on success and false on failure. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $values is neither an array nor a Traversable, - * or if any of the $values are not a legal value. - */ - public function setMultiple($values, $ttl = null); - - /** - * Deletes multiple cache items in a single operation. - * - * @param iterable $keys A list of string-based keys to be deleted. - * - * @return bool True if the items were successfully removed. False if there was an error. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function deleteMultiple($keys); - - /** - * Determines whether an item is present in the cache. - * - * NOTE: It is recommended that has() is only to be used for cache warming type purposes - * and not to be used within your live applications operations for get/set, as this method - * is subject to a race condition where your has() will return true and immediately after, - * another script can remove it making the state of your app out of date. - * - * @param string $key The cache item key. - * - * @return bool - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function has($key); -} diff --git a/sensitive-issue-searcher/vendor/psr/simple-cache/src/InvalidArgumentException.php b/sensitive-issue-searcher/vendor/psr/simple-cache/src/InvalidArgumentException.php deleted file mode 100644 index 6a9524a..0000000 --- a/sensitive-issue-searcher/vendor/psr/simple-cache/src/InvalidArgumentException.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option outside of or write it inside of - * {@link \Symfony\Component\OptionsResolver\Options::resolve()}. - * - * @author Bernhard Schussek - */ -class AccessException extends \LogicException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/ExceptionInterface.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/ExceptionInterface.php deleted file mode 100644 index b62bb51..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Marker interface for all exceptions thrown by the OptionsResolver component. - * - * @author Bernhard Schussek - */ -interface ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php deleted file mode 100644 index 6d421d6..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when an argument is invalid. - * - * @author Bernhard Schussek - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php deleted file mode 100644 index 6fd4f12..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when the value of an option does not match its validation rules. - * - * You should make sure a valid value is passed to the option. - * - * @author Bernhard Schussek - */ -class InvalidOptionsException extends InvalidArgumentException -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/MissingOptionsException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/MissingOptionsException.php deleted file mode 100644 index faa487f..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/MissingOptionsException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when a required option is missing. - * - * Add the option to the passed options array. - * - * @author Bernhard Schussek - */ -class MissingOptionsException extends InvalidArgumentException -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php deleted file mode 100644 index 4c3280f..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when trying to read an option that has no value set. - * - * When accessing optional options from within a lazy option or normalizer you should first - * check whether the optional option is set. You can do this with `isset($options['optional'])`. - * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can - * occur when evaluating lazy options. - * - * @author Tobias Schultze - */ -class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php deleted file mode 100644 index e8e339d..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Thrown when two lazy options have a cyclic dependency. - * - * @author Bernhard Schussek - */ -class OptionDefinitionException extends \LogicException implements ExceptionInterface -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php deleted file mode 100644 index 6ca3fce..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Exception; - -/** - * Exception thrown when an undefined option is passed. - * - * You should remove the options in question from your code or define them - * beforehand. - * - * @author Bernhard Schussek - */ -class UndefinedOptionsException extends InvalidArgumentException -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/LICENSE b/sensitive-issue-searcher/vendor/symfony/options-resolver/LICENSE deleted file mode 100644 index 17d16a1..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2017 Fabien Potencier - -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. diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Options.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Options.php deleted file mode 100644 index d444ec4..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Options.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -/** - * Contains resolved option values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -interface Options extends \ArrayAccess, \Countable -{ -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/OptionsResolver.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/OptionsResolver.php deleted file mode 100644 index 32ac566..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/OptionsResolver.php +++ /dev/null @@ -1,1039 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver; - -use Symfony\Component\OptionsResolver\Exception\AccessException; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; -use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException; -use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; -use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException; - -/** - * Validates options and merges them with default values. - * - * @author Bernhard Schussek - * @author Tobias Schultze - */ -class OptionsResolver implements Options -{ - /** - * The names of all defined options. - * - * @var array - */ - private $defined = array(); - - /** - * The default option values. - * - * @var array - */ - private $defaults = array(); - - /** - * The names of required options. - * - * @var array - */ - private $required = array(); - - /** - * The resolved option values. - * - * @var array - */ - private $resolved = array(); - - /** - * A list of normalizer closures. - * - * @var \Closure[] - */ - private $normalizers = array(); - - /** - * A list of accepted values for each option. - * - * @var array - */ - private $allowedValues = array(); - - /** - * A list of accepted types for each option. - * - * @var array - */ - private $allowedTypes = array(); - - /** - * A list of closures for evaluating lazy options. - * - * @var array - */ - private $lazy = array(); - - /** - * A list of lazy options whose closure is currently being called. - * - * This list helps detecting circular dependencies between lazy options. - * - * @var array - */ - private $calling = array(); - - /** - * Whether the instance is locked for reading. - * - * Once locked, the options cannot be changed anymore. This is - * necessary in order to avoid inconsistencies during the resolving - * process. If any option is changed after being read, all evaluated - * lazy options that depend on this option would become invalid. - * - * @var bool - */ - private $locked = false; - - private static $typeAliases = array( - 'boolean' => 'bool', - 'integer' => 'int', - 'double' => 'float', - ); - - /** - * Sets the default value of a given option. - * - * If the default value should be set based on other options, you can pass - * a closure with the following signature: - * - * function (Options $options) { - * // ... - * } - * - * The closure will be evaluated when {@link resolve()} is called. The - * closure has access to the resolved values of other options through the - * passed {@link Options} instance: - * - * function (Options $options) { - * if (isset($options['port'])) { - * // ... - * } - * } - * - * If you want to access the previously set default value, add a second - * argument to the closure's signature: - * - * $options->setDefault('name', 'Default Name'); - * - * $options->setDefault('name', function (Options $options, $previousValue) { - * // 'Default Name' === $previousValue - * }); - * - * This is mostly useful if the configuration of the {@link Options} object - * is spread across different locations of your code, such as base and - * sub-classes. - * - * @param string $option The name of the option - * @param mixed $value The default value of the option - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefault($option, $value) - { - // Setting is not possible once resolving starts, because then lazy - // options could manipulate the state of the object, leading to - // inconsistent results. - if ($this->locked) { - throw new AccessException('Default values cannot be set from a lazy option or normalizer.'); - } - - // If an option is a closure that should be evaluated lazily, store it - // in the "lazy" property. - if ($value instanceof \Closure) { - $reflClosure = new \ReflectionFunction($value); - $params = $reflClosure->getParameters(); - - if (isset($params[0]) && null !== ($class = $params[0]->getClass()) && Options::class === $class->name) { - // Initialize the option if no previous value exists - if (!isset($this->defaults[$option])) { - $this->defaults[$option] = null; - } - - // Ignore previous lazy options if the closure has no second parameter - if (!isset($this->lazy[$option]) || !isset($params[1])) { - $this->lazy[$option] = array(); - } - - // Store closure for later evaluation - $this->lazy[$option][] = $value; - $this->defined[$option] = true; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - } - - // This option is not lazy anymore - unset($this->lazy[$option]); - - // Yet undefined options can be marked as resolved, because we only need - // to resolve options with lazy closures, normalizers or validation - // rules, none of which can exist for undefined options - // If the option was resolved before, update the resolved value - if (!isset($this->defined[$option]) || array_key_exists($option, $this->resolved)) { - $this->resolved[$option] = $value; - } - - $this->defaults[$option] = $value; - $this->defined[$option] = true; - - return $this; - } - - /** - * Sets a list of default values. - * - * @param array $defaults The default values to set - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefaults(array $defaults) - { - foreach ($defaults as $option => $value) { - $this->setDefault($option, $value); - } - - return $this; - } - - /** - * Returns whether a default value is set for an option. - * - * Returns true if {@link setDefault()} was called for this option. - * An option is also considered set if it was set to null. - * - * @param string $option The option name - * - * @return bool Whether a default value is set - */ - public function hasDefault($option) - { - return array_key_exists($option, $this->defaults); - } - - /** - * Marks one or more options as required. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setRequired($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be made required from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - $this->required[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is required. - * - * An option is required if it was passed to {@link setRequired()}. - * - * @param string $option The name of the option - * - * @return bool Whether the option is required - */ - public function isRequired($option) - { - return isset($this->required[$option]); - } - - /** - * Returns the names of all required options. - * - * @return string[] The names of the required options - * - * @see isRequired() - */ - public function getRequiredOptions() - { - return array_keys($this->required); - } - - /** - * Returns whether an option is missing a default value. - * - * An option is missing if it was passed to {@link setRequired()}, but not - * to {@link setDefault()}. This option must be passed explicitly to - * {@link resolve()}, otherwise an exception will be thrown. - * - * @param string $option The name of the option - * - * @return bool Whether the option is missing - */ - public function isMissing($option) - { - return isset($this->required[$option]) && !array_key_exists($option, $this->defaults); - } - - /** - * Returns the names of all options missing a default value. - * - * @return string[] The names of the missing options - * - * @see isMissing() - */ - public function getMissingOptions() - { - return array_keys(array_diff_key($this->required, $this->defaults)); - } - - /** - * Defines a valid option name. - * - * Defines an option name without setting a default value. The option will - * be accepted when passed to {@link resolve()}. When not passed, the - * option will not be included in the resolved options. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function setDefined($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be defined from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - $this->defined[$option] = true; - } - - return $this; - } - - /** - * Returns whether an option is defined. - * - * Returns true for any option passed to {@link setDefault()}, - * {@link setRequired()} or {@link setDefined()}. - * - * @param string $option The option name - * - * @return bool Whether the option is defined - */ - public function isDefined($option) - { - return isset($this->defined[$option]); - } - - /** - * Returns the names of all defined options. - * - * @return string[] The names of the defined options - * - * @see isDefined() - */ - public function getDefinedOptions() - { - return array_keys($this->defined); - } - - /** - * Sets the normalizer for an option. - * - * The normalizer should be a closure with the following signature: - * - * ```php - * function (Options $options, $value) { - * // ... - * } - * ``` - * - * The closure is invoked when {@link resolve()} is called. The closure - * has access to the resolved values of other options through the passed - * {@link Options} instance. - * - * The second parameter passed to the closure is the value of - * the option. - * - * The resolved option value is set to the return value of the closure. - * - * @param string $option The option name - * @param \Closure $normalizer The normalizer - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setNormalizer($option, \Closure $normalizer) - { - if ($this->locked) { - throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - $this->normalizers[$option] = $normalizer; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed values for an option. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedValues($option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - $this->allowedValues[$option] = is_array($allowedValues) ? $allowedValues : array($allowedValues); - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed values for an option. - * - * The values are merged with the allowed values defined previously. - * - * Instead of passing values, you may also pass a closures with the - * following signature: - * - * function ($value) { - * // return true or false - * } - * - * The closure receives the value as argument and should return true to - * accept the value and false to reject the value. - * - * @param string $option The option name - * @param mixed $allowedValues One or more acceptable values/closures - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedValues($option, $allowedValues) - { - if ($this->locked) { - throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - if (!is_array($allowedValues)) { - $allowedValues = array($allowedValues); - } - - if (!isset($this->allowedValues[$option])) { - $this->allowedValues[$option] = $allowedValues; - } else { - $this->allowedValues[$option] = array_merge($this->allowedValues[$option], $allowedValues); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Sets allowed types for an option. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string $option The option name - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function setAllowedTypes($option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - $this->allowedTypes[$option] = (array) $allowedTypes; - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Adds allowed types for an option. - * - * The types are merged with the allowed types defined previously. - * - * Any type for which a corresponding is_() function exists is - * acceptable. Additionally, fully-qualified class or interface names may - * be passed. - * - * @param string $option The option name - * @param string|string[] $allowedTypes One or more accepted types - * - * @return $this - * - * @throws UndefinedOptionsException If the option is undefined - * @throws AccessException If called from a lazy option or normalizer - */ - public function addAllowedTypes($option, $allowedTypes) - { - if ($this->locked) { - throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.'); - } - - if (!isset($this->defined[$option])) { - throw new UndefinedOptionsException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - if (!isset($this->allowedTypes[$option])) { - $this->allowedTypes[$option] = (array) $allowedTypes; - } else { - $this->allowedTypes[$option] = array_merge($this->allowedTypes[$option], (array) $allowedTypes); - } - - // Make sure the option is processed - unset($this->resolved[$option]); - - return $this; - } - - /** - * Removes the option with the given name. - * - * Undefined options are ignored. - * - * @param string|string[] $optionNames One or more option names - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function remove($optionNames) - { - if ($this->locked) { - throw new AccessException('Options cannot be removed from a lazy option or normalizer.'); - } - - foreach ((array) $optionNames as $option) { - unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]); - unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option]); - } - - return $this; - } - - /** - * Removes all options. - * - * @return $this - * - * @throws AccessException If called from a lazy option or normalizer - */ - public function clear() - { - if ($this->locked) { - throw new AccessException('Options cannot be cleared from a lazy option or normalizer.'); - } - - $this->defined = array(); - $this->defaults = array(); - $this->required = array(); - $this->resolved = array(); - $this->lazy = array(); - $this->normalizers = array(); - $this->allowedTypes = array(); - $this->allowedValues = array(); - - return $this; - } - - /** - * Merges options with the default values stored in the container and - * validates them. - * - * Exceptions are thrown if: - * - * - Undefined options are passed; - * - Required options are missing; - * - Options have invalid types; - * - Options have invalid values. - * - * @param array $options A map of option names to values - * - * @return array The merged and validated options - * - * @throws UndefinedOptionsException If an option name is undefined - * @throws InvalidOptionsException If an option doesn't fulfill the - * specified validation rules - * @throws MissingOptionsException If a required option is missing - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - * @throws NoSuchOptionException If a lazy option reads an unavailable option - * @throws AccessException If called from a lazy option or normalizer - */ - public function resolve(array $options = array()) - { - if ($this->locked) { - throw new AccessException('Options cannot be resolved from a lazy option or normalizer.'); - } - - // Allow this method to be called multiple times - $clone = clone $this; - - // Make sure that no unknown options are passed - $diff = array_diff_key($options, $clone->defined); - - if (count($diff) > 0) { - ksort($clone->defined); - ksort($diff); - - throw new UndefinedOptionsException(sprintf( - (count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', - implode('", "', array_keys($diff)), - implode('", "', array_keys($clone->defined)) - )); - } - - // Override options set by the user - foreach ($options as $option => $value) { - $clone->defaults[$option] = $value; - unset($clone->resolved[$option], $clone->lazy[$option]); - } - - // Check whether any required option is missing - $diff = array_diff_key($clone->required, $clone->defaults); - - if (count($diff) > 0) { - ksort($diff); - - throw new MissingOptionsException(sprintf( - count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', - implode('", "', array_keys($diff)) - )); - } - - // Lock the container - $clone->locked = true; - - // Now process the individual options. Use offsetGet(), which resolves - // the option itself and any options that the option depends on - foreach ($clone->defaults as $option => $_) { - $clone->offsetGet($option); - } - - return $clone->resolved; - } - - /** - * Returns the resolved value of an option. - * - * @param string $option The option name - * - * @return mixed The option value - * - * @throws AccessException If accessing this method outside of - * {@link resolve()} - * @throws NoSuchOptionException If the option is not set - * @throws InvalidOptionsException If the option doesn't fulfill the - * specified validation rules - * @throws OptionDefinitionException If there is a cyclic dependency between - * lazy options and/or normalizers - */ - public function offsetGet($option) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - // Shortcut for resolved options - if (array_key_exists($option, $this->resolved)) { - return $this->resolved[$option]; - } - - // Check whether the option is set at all - if (!array_key_exists($option, $this->defaults)) { - if (!isset($this->defined[$option])) { - throw new NoSuchOptionException(sprintf( - 'The option "%s" does not exist. Defined options are: "%s".', - $option, - implode('", "', array_keys($this->defined)) - )); - } - - throw new NoSuchOptionException(sprintf( - 'The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', - $option - )); - } - - $value = $this->defaults[$option]; - - // Resolve the option if the default value is lazily evaluated - if (isset($this->lazy[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf( - 'The options "%s" have a cyclic dependency.', - implode('", "', array_keys($this->calling)) - )); - } - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - foreach ($this->lazy[$option] as $closure) { - $value = $closure($this, $value); - } - } finally { - unset($this->calling[$option]); - } - // END - } - - // Validate the type of the resolved option - if (isset($this->allowedTypes[$option])) { - $valid = false; - - foreach ($this->allowedTypes[$option] as $type) { - $type = isset(self::$typeAliases[$type]) ? self::$typeAliases[$type] : $type; - - if (function_exists($isFunction = 'is_'.$type)) { - if ($isFunction($value)) { - $valid = true; - break; - } - - continue; - } - - if ($value instanceof $type) { - $valid = true; - break; - } - } - - if (!$valid) { - throw new InvalidOptionsException(sprintf( - 'The option "%s" with value %s is expected to be of type '. - '"%s", but is of type "%s".', - $option, - $this->formatValue($value), - implode('" or "', $this->allowedTypes[$option]), - $this->formatTypeOf($value) - )); - } - } - - // Validate the value of the resolved option - if (isset($this->allowedValues[$option])) { - $success = false; - $printableAllowedValues = array(); - - foreach ($this->allowedValues[$option] as $allowedValue) { - if ($allowedValue instanceof \Closure) { - if ($allowedValue($value)) { - $success = true; - break; - } - - // Don't include closures in the exception message - continue; - } elseif ($value === $allowedValue) { - $success = true; - break; - } - - $printableAllowedValues[] = $allowedValue; - } - - if (!$success) { - $message = sprintf( - 'The option "%s" with value %s is invalid.', - $option, - $this->formatValue($value) - ); - - if (count($printableAllowedValues) > 0) { - $message .= sprintf( - ' Accepted values are: %s.', - $this->formatValues($printableAllowedValues) - ); - } - - throw new InvalidOptionsException($message); - } - } - - // Normalize the validated option - if (isset($this->normalizers[$option])) { - // If the closure is already being called, we have a cyclic - // dependency - if (isset($this->calling[$option])) { - throw new OptionDefinitionException(sprintf( - 'The options "%s" have a cyclic dependency.', - implode('", "', array_keys($this->calling)) - )); - } - - $normalizer = $this->normalizers[$option]; - - // The following section must be protected from cyclic - // calls. Set $calling for the current $option to detect a cyclic - // dependency - // BEGIN - $this->calling[$option] = true; - try { - $value = $normalizer($this, $value); - } finally { - unset($this->calling[$option]); - } - // END - } - - // Mark as resolved - $this->resolved[$option] = $value; - - return $value; - } - - /** - * Returns whether a resolved option with the given name exists. - * - * @param string $option The option name - * - * @return bool Whether the option is set - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \ArrayAccess::offsetExists() - */ - public function offsetExists($option) - { - if (!$this->locked) { - throw new AccessException('Array access is only supported within closures of lazy options and normalizers.'); - } - - return array_key_exists($option, $this->defaults); - } - - /** - * Not supported. - * - * @throws AccessException - */ - public function offsetSet($option, $value) - { - throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.'); - } - - /** - * Not supported. - * - * @throws AccessException - */ - public function offsetUnset($option) - { - throw new AccessException('Removing options via array access is not supported. Use remove() instead.'); - } - - /** - * Returns the number of set options. - * - * This may be only a subset of the defined options. - * - * @return int Number of options - * - * @throws AccessException If accessing this method outside of {@link resolve()} - * - * @see \Countable::count() - */ - public function count() - { - if (!$this->locked) { - throw new AccessException('Counting is only supported within closures of lazy options and normalizers.'); - } - - return count($this->defaults); - } - - /** - * Returns a string representation of the type of the value. - * - * This method should be used if you pass the type of a value as - * message parameter to a constraint violation. Note that such - * parameters should usually not be included in messages aimed at - * non-technical people. - * - * @param mixed $value The value to return the type of - * - * @return string The type of the value - */ - private function formatTypeOf($value) - { - return is_object($value) ? get_class($value) : gettype($value); - } - - /** - * Returns a string representation of the value. - * - * This method returns the equivalent PHP tokens for most scalar types - * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped - * in double quotes ("). - * - * @param mixed $value The value to format as string - * - * @return string The string representation of the passed value - */ - private function formatValue($value) - { - if (is_object($value)) { - return get_class($value); - } - - if (is_array($value)) { - return 'array'; - } - - if (is_string($value)) { - return '"'.$value.'"'; - } - - if (is_resource($value)) { - return 'resource'; - } - - if (null === $value) { - return 'null'; - } - - if (false === $value) { - return 'false'; - } - - if (true === $value) { - return 'true'; - } - - return (string) $value; - } - - /** - * Returns a string representation of a list of values. - * - * Each of the values is converted to a string using - * {@link formatValue()}. The values are then concatenated with commas. - * - * @param array $values A list of values - * - * @return string The string representation of the value list - * - * @see formatValue() - */ - private function formatValues(array $values) - { - foreach ($values as $key => $value) { - $values[$key] = $this->formatValue($value); - } - - return implode(', ', $values); - } -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/README.md b/sensitive-issue-searcher/vendor/symfony/options-resolver/README.md deleted file mode 100644 index 245e69b..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/README.md +++ /dev/null @@ -1,15 +0,0 @@ -OptionsResolver Component -========================= - -The OptionsResolver component is `array_replace` on steroids. It allows you to -create an options system with required options, defaults, validation (type, -value), normalization and more. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/options_resolver.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/Tests/OptionsResolverTest.php b/sensitive-issue-searcher/vendor/symfony/options-resolver/Tests/OptionsResolverTest.php deleted file mode 100644 index da223bd..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/Tests/OptionsResolverTest.php +++ /dev/null @@ -1,1559 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\OptionsResolver\Tests; - -use PHPUnit\Framework\Assert; -use PHPUnit\Framework\TestCase; -use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; -use Symfony\Component\OptionsResolver\Options; -use Symfony\Component\OptionsResolver\OptionsResolver; - -class OptionsResolverTest extends TestCase -{ - /** - * @var OptionsResolver - */ - private $resolver; - - protected function setUp() - { - $this->resolver = new OptionsResolver(); - } - - //////////////////////////////////////////////////////////////////////////// - // resolve() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - * @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z". - */ - public function testResolveFailsIfNonExistingOption() - { - $this->resolver->setDefault('z', '1'); - $this->resolver->setDefault('a', '2'); - - $this->resolver->resolve(array('foo' => 'bar')); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - * @expectedExceptionMessage The options "baz", "foo", "ping" do not exist. Defined options are: "a", "z". - */ - public function testResolveFailsIfMultipleNonExistingOptions() - { - $this->resolver->setDefault('z', '1'); - $this->resolver->setDefault('a', '2'); - - $this->resolver->resolve(array('ping' => 'pong', 'foo' => 'bar', 'baz' => 'bam')); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testResolveFailsFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->resolve(array()); - }); - - $this->resolver->resolve(); - } - - //////////////////////////////////////////////////////////////////////////// - // setDefault()/hasDefault() - //////////////////////////////////////////////////////////////////////////// - - public function testSetDefaultReturnsThis() - { - $this->assertSame($this->resolver, $this->resolver->setDefault('foo', 'bar')); - } - - public function testSetDefault() - { - $this->resolver->setDefault('one', '1'); - $this->resolver->setDefault('two', '20'); - - $this->assertEquals(array( - 'one' => '1', - 'two' => '20', - ), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetDefaultFromLazyOption() - { - $this->resolver->setDefault('lazy', function (Options $options) { - $options->setDefault('default', 42); - }); - - $this->resolver->resolve(); - } - - public function testHasDefault() - { - $this->assertFalse($this->resolver->hasDefault('foo')); - $this->resolver->setDefault('foo', 42); - $this->assertTrue($this->resolver->hasDefault('foo')); - } - - public function testHasDefaultWithNullValue() - { - $this->assertFalse($this->resolver->hasDefault('foo')); - $this->resolver->setDefault('foo', null); - $this->assertTrue($this->resolver->hasDefault('foo')); - } - - //////////////////////////////////////////////////////////////////////////// - // lazy setDefault() - //////////////////////////////////////////////////////////////////////////// - - public function testSetLazyReturnsThis() - { - $this->assertSame($this->resolver, $this->resolver->setDefault('foo', function (Options $options) {})); - } - - public function testSetLazyClosure() - { - $this->resolver->setDefault('foo', function (Options $options) { - return 'lazy'; - }); - - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); - } - - public function testClosureWithoutTypeHintNotInvoked() - { - $closure = function ($options) { - Assert::fail('Should not be called'); - }; - - $this->resolver->setDefault('foo', $closure); - - $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); - } - - public function testClosureWithoutParametersNotInvoked() - { - $closure = function () { - Assert::fail('Should not be called'); - }; - - $this->resolver->setDefault('foo', $closure); - - $this->assertSame(array('foo' => $closure), $this->resolver->resolve()); - } - - public function testAccessPreviousDefaultValue() - { - // defined by superclass - $this->resolver->setDefault('foo', 'bar'); - - // defined by subclass - $this->resolver->setDefault('foo', function (Options $options, $previousValue) { - Assert::assertEquals('bar', $previousValue); - - return 'lazy'; - }); - - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); - } - - public function testAccessPreviousLazyDefaultValue() - { - // defined by superclass - $this->resolver->setDefault('foo', function (Options $options) { - return 'bar'; - }); - - // defined by subclass - $this->resolver->setDefault('foo', function (Options $options, $previousValue) { - Assert::assertEquals('bar', $previousValue); - - return 'lazy'; - }); - - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); - } - - public function testPreviousValueIsNotEvaluatedIfNoSecondArgument() - { - // defined by superclass - $this->resolver->setDefault('foo', function () { - Assert::fail('Should not be called'); - }); - - // defined by subclass, no $previousValue argument defined! - $this->resolver->setDefault('foo', function (Options $options) { - return 'lazy'; - }); - - $this->assertEquals(array('foo' => 'lazy'), $this->resolver->resolve()); - } - - public function testOverwrittenLazyOptionNotEvaluated() - { - $this->resolver->setDefault('foo', function (Options $options) { - Assert::fail('Should not be called'); - }); - - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testInvokeEachLazyOptionOnlyOnce() - { - $calls = 0; - - $this->resolver->setDefault('lazy1', function (Options $options) use (&$calls) { - Assert::assertSame(1, ++$calls); - - $options['lazy2']; - }); - - $this->resolver->setDefault('lazy2', function (Options $options) use (&$calls) { - Assert::assertSame(2, ++$calls); - }); - - $this->resolver->resolve(); - - $this->assertSame(2, $calls); - } - - //////////////////////////////////////////////////////////////////////////// - // setRequired()/isRequired()/getRequiredOptions() - //////////////////////////////////////////////////////////////////////////// - - public function testSetRequiredReturnsThis() - { - $this->assertSame($this->resolver, $this->resolver->setRequired('foo')); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetRequiredFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setRequired('bar'); - }); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\MissingOptionsException - */ - public function testResolveFailsIfRequiredOptionMissing() - { - $this->resolver->setRequired('foo'); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfRequiredOptionSet() - { - $this->resolver->setRequired('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - public function testResolveSucceedsIfRequiredOptionPassed() - { - $this->resolver->setRequired('foo'); - - $this->assertNotEmpty($this->resolver->resolve(array('foo' => 'bar'))); - } - - public function testIsRequired() - { - $this->assertFalse($this->resolver->isRequired('foo')); - $this->resolver->setRequired('foo'); - $this->assertTrue($this->resolver->isRequired('foo')); - } - - public function testRequiredIfSetBefore() - { - $this->assertFalse($this->resolver->isRequired('foo')); - - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setRequired('foo'); - - $this->assertTrue($this->resolver->isRequired('foo')); - } - - public function testStillRequiredAfterSet() - { - $this->assertFalse($this->resolver->isRequired('foo')); - - $this->resolver->setRequired('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertTrue($this->resolver->isRequired('foo')); - } - - public function testIsNotRequiredAfterRemove() - { - $this->assertFalse($this->resolver->isRequired('foo')); - $this->resolver->setRequired('foo'); - $this->resolver->remove('foo'); - $this->assertFalse($this->resolver->isRequired('foo')); - } - - public function testIsNotRequiredAfterClear() - { - $this->assertFalse($this->resolver->isRequired('foo')); - $this->resolver->setRequired('foo'); - $this->resolver->clear(); - $this->assertFalse($this->resolver->isRequired('foo')); - } - - public function testGetRequiredOptions() - { - $this->resolver->setRequired(array('foo', 'bar')); - $this->resolver->setDefault('bam', 'baz'); - $this->resolver->setDefault('foo', 'boo'); - - $this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions()); - } - - //////////////////////////////////////////////////////////////////////////// - // isMissing()/getMissingOptions() - //////////////////////////////////////////////////////////////////////////// - - public function testIsMissingIfNotSet() - { - $this->assertFalse($this->resolver->isMissing('foo')); - $this->resolver->setRequired('foo'); - $this->assertTrue($this->resolver->isMissing('foo')); - } - - public function testIsNotMissingIfSet() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->assertFalse($this->resolver->isMissing('foo')); - $this->resolver->setRequired('foo'); - $this->assertFalse($this->resolver->isMissing('foo')); - } - - public function testIsNotMissingAfterRemove() - { - $this->resolver->setRequired('foo'); - $this->resolver->remove('foo'); - $this->assertFalse($this->resolver->isMissing('foo')); - } - - public function testIsNotMissingAfterClear() - { - $this->resolver->setRequired('foo'); - $this->resolver->clear(); - $this->assertFalse($this->resolver->isRequired('foo')); - } - - public function testGetMissingOptions() - { - $this->resolver->setRequired(array('foo', 'bar')); - $this->resolver->setDefault('bam', 'baz'); - $this->resolver->setDefault('foo', 'boo'); - - $this->assertSame(array('bar'), $this->resolver->getMissingOptions()); - } - - //////////////////////////////////////////////////////////////////////////// - // setDefined()/isDefined()/getDefinedOptions() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetDefinedFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setDefined('bar'); - }); - - $this->resolver->resolve(); - } - - public function testDefinedOptionsNotIncludedInResolvedOptions() - { - $this->resolver->setDefined('foo'); - - $this->assertSame(array(), $this->resolver->resolve()); - } - - public function testDefinedOptionsIncludedIfDefaultSetBefore() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setDefined('foo'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testDefinedOptionsIncludedIfDefaultSetAfter() - { - $this->resolver->setDefined('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testDefinedOptionsIncludedIfPassedToResolve() - { - $this->resolver->setDefined('foo'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve(array('foo' => 'bar'))); - } - - public function testIsDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setDefined('foo'); - $this->assertTrue($this->resolver->isDefined('foo')); - } - - public function testLazyOptionsAreDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setDefault('foo', function (Options $options) {}); - $this->assertTrue($this->resolver->isDefined('foo')); - } - - public function testRequiredOptionsAreDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setRequired('foo'); - $this->assertTrue($this->resolver->isDefined('foo')); - } - - public function testSetOptionsAreDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setDefault('foo', 'bar'); - $this->assertTrue($this->resolver->isDefined('foo')); - } - - public function testGetDefinedOptions() - { - $this->resolver->setDefined(array('foo', 'bar')); - $this->resolver->setDefault('baz', 'bam'); - $this->resolver->setRequired('boo'); - - $this->assertSame(array('foo', 'bar', 'baz', 'boo'), $this->resolver->getDefinedOptions()); - } - - public function testRemovedOptionsAreNotDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setDefined('foo'); - $this->assertTrue($this->resolver->isDefined('foo')); - $this->resolver->remove('foo'); - $this->assertFalse($this->resolver->isDefined('foo')); - } - - public function testClearedOptionsAreNotDefined() - { - $this->assertFalse($this->resolver->isDefined('foo')); - $this->resolver->setDefined('foo'); - $this->assertTrue($this->resolver->isDefined('foo')); - $this->resolver->clear(); - $this->assertFalse($this->resolver->isDefined('foo')); - } - - //////////////////////////////////////////////////////////////////////////// - // setAllowedTypes() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - */ - public function testSetAllowedTypesFailsIfUnknownOption() - { - $this->resolver->setAllowedTypes('foo', 'string'); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetAllowedTypesFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setAllowedTypes('bar', 'string'); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - /** - * @dataProvider provideInvalidTypes - */ - public function testResolveFailsIfInvalidType($actualType, $allowedType, $exceptionMessage) - { - $this->resolver->setDefined('option'); - $this->resolver->setAllowedTypes('option', $allowedType); - - if (method_exists($this, 'expectException')) { - $this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException'); - $this->expectExceptionMessage($exceptionMessage); - } else { - $this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage); - } - - $this->resolver->resolve(array('option' => $actualType)); - } - - public function provideInvalidTypes() - { - return array( - array(true, 'string', 'The option "option" with value true is expected to be of type "string", but is of type "boolean".'), - array(false, 'string', 'The option "option" with value false is expected to be of type "string", but is of type "boolean".'), - array(fopen(__FILE__, 'r'), 'string', 'The option "option" with value resource is expected to be of type "string", but is of type "resource".'), - array(array(), 'string', 'The option "option" with value array is expected to be of type "string", but is of type "array".'), - array(new OptionsResolver(), 'string', 'The option "option" with value Symfony\Component\OptionsResolver\OptionsResolver is expected to be of type "string", but is of type "Symfony\Component\OptionsResolver\OptionsResolver".'), - array(42, 'string', 'The option "option" with value 42 is expected to be of type "string", but is of type "integer".'), - array(null, 'string', 'The option "option" with value null is expected to be of type "string", but is of type "NULL".'), - array('bar', '\stdClass', 'The option "option" with value "bar" is expected to be of type "\stdClass", but is of type "string".'), - ); - } - - public function testResolveSucceedsIfValidType() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedTypes('foo', 'string'); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - * @expectedExceptionMessage The option "foo" with value 42 is expected to be of type "string" or "bool", but is of type "integer". - */ - public function testResolveFailsIfInvalidTypeMultiple() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedTypes('foo', array('string', 'bool')); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidTypeMultiple() - { - $this->resolver->setDefault('foo', true); - $this->resolver->setAllowedTypes('foo', array('string', 'bool')); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - public function testResolveSucceedsIfInstanceOfClass() - { - $this->resolver->setDefault('foo', new \stdClass()); - $this->resolver->setAllowedTypes('foo', '\stdClass'); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // addAllowedTypes() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - */ - public function testAddAllowedTypesFailsIfUnknownOption() - { - $this->resolver->addAllowedTypes('foo', 'string'); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfAddAllowedTypesFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->addAllowedTypes('bar', 'string'); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfInvalidAddedType() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedTypes('foo', 'string'); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidAddedType() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedTypes('foo', 'string'); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfInvalidAddedTypeMultiple() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedTypes('foo', array('string', 'bool')); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidAddedTypeMultiple() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedTypes('foo', array('string', 'bool')); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - public function testAddAllowedTypesDoesNotOverwrite() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedTypes('foo', 'string'); - $this->resolver->addAllowedTypes('foo', 'bool'); - - $this->resolver->setDefault('foo', 'bar'); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - public function testAddAllowedTypesDoesNotOverwrite2() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedTypes('foo', 'string'); - $this->resolver->addAllowedTypes('foo', 'bool'); - - $this->resolver->setDefault('foo', false); - - $this->assertNotEmpty($this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // setAllowedValues() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - */ - public function testSetAllowedValuesFailsIfUnknownOption() - { - $this->resolver->setAllowedValues('foo', 'bar'); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetAllowedValuesFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setAllowedValues('bar', 'baz'); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar". - */ - public function testResolveFailsIfInvalidValue() - { - $this->resolver->setDefined('foo'); - $this->resolver->setAllowedValues('foo', 'bar'); - - $this->resolver->resolve(array('foo' => 42)); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - * @expectedExceptionMessage The option "foo" with value null is invalid. Accepted values are: "bar". - */ - public function testResolveFailsIfInvalidValueIsNull() - { - $this->resolver->setDefault('foo', null); - $this->resolver->setAllowedValues('foo', 'bar'); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfInvalidValueStrict() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', '42'); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidValue() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', 'bar'); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testResolveSucceedsIfValidValueIsNull() - { - $this->resolver->setDefault('foo', null); - $this->resolver->setAllowedValues('foo', null); - - $this->assertEquals(array('foo' => null), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar", false, null. - */ - public function testResolveFailsIfInvalidValueMultiple() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', array('bar', false, null)); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidValueMultiple() - { - $this->resolver->setDefault('foo', 'baz'); - $this->resolver->setAllowedValues('foo', array('bar', 'baz')); - - $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); - } - - public function testResolveFailsIfClosureReturnsFalse() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', function ($value) use (&$passedValue) { - $passedValue = $value; - - return false; - }); - - try { - $this->resolver->resolve(); - $this->fail('Should fail'); - } catch (InvalidOptionsException $e) { - } - - $this->assertSame(42, $passedValue); - } - - public function testResolveSucceedsIfClosureReturnsTrue() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', function ($value) use (&$passedValue) { - $passedValue = $value; - - return true; - }); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - $this->assertSame('bar', $passedValue); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfAllClosuresReturnFalse() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', array( - function () { return false; }, - function () { return false; }, - function () { return false; }, - )); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfAnyClosureReturnsTrue() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', array( - function () { return false; }, - function () { return true; }, - function () { return false; }, - )); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // addAllowedValues() - //////////////////////////////////////////////////////////////////////////// - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - */ - public function testAddAllowedValuesFailsIfUnknownOption() - { - $this->resolver->addAllowedValues('foo', 'bar'); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfAddAllowedValuesFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->addAllowedValues('bar', 'baz'); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfInvalidAddedValue() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedValues('foo', 'bar'); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidAddedValue() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedValues('foo', 'bar'); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testResolveSucceedsIfValidAddedValueIsNull() - { - $this->resolver->setDefault('foo', null); - $this->resolver->addAllowedValues('foo', null); - - $this->assertEquals(array('foo' => null), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfInvalidAddedValueMultiple() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->addAllowedValues('foo', array('bar', 'baz')); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfValidAddedValueMultiple() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->addAllowedValues('foo', array('bar', 'baz')); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testAddAllowedValuesDoesNotOverwrite() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', 'bar'); - $this->resolver->addAllowedValues('foo', 'baz'); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testAddAllowedValuesDoesNotOverwrite2() - { - $this->resolver->setDefault('foo', 'baz'); - $this->resolver->setAllowedValues('foo', 'bar'); - $this->resolver->addAllowedValues('foo', 'baz'); - - $this->assertEquals(array('foo' => 'baz'), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testResolveFailsIfAllAddedClosuresReturnFalse() - { - $this->resolver->setDefault('foo', 42); - $this->resolver->setAllowedValues('foo', function () { return false; }); - $this->resolver->addAllowedValues('foo', function () { return false; }); - - $this->resolver->resolve(); - } - - public function testResolveSucceedsIfAnyAddedClosureReturnsTrue() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', function () { return false; }); - $this->resolver->addAllowedValues('foo', function () { return true; }); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', function () { return true; }); - $this->resolver->addAllowedValues('foo', function () { return false; }); - - $this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // setNormalizer() - //////////////////////////////////////////////////////////////////////////// - - public function testSetNormalizerReturnsThis() - { - $this->resolver->setDefault('foo', 'bar'); - $this->assertSame($this->resolver, $this->resolver->setNormalizer('foo', function () {})); - } - - public function testSetNormalizerClosure() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setNormalizer('foo', function () { - return 'normalized'; - }); - - $this->assertEquals(array('foo' => 'normalized'), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException - */ - public function testSetNormalizerFailsIfUnknownOption() - { - $this->resolver->setNormalizer('foo', function () {}); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetNormalizerFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setNormalizer('foo', function () {}); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - public function testNormalizerReceivesSetOption() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->resolver->setNormalizer('foo', function (Options $options, $value) { - return 'normalized['.$value.']'; - }); - - $this->assertEquals(array('foo' => 'normalized[bar]'), $this->resolver->resolve()); - } - - public function testNormalizerReceivesPassedOption() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->resolver->setNormalizer('foo', function (Options $options, $value) { - return 'normalized['.$value.']'; - }); - - $resolved = $this->resolver->resolve(array('foo' => 'baz')); - - $this->assertEquals(array('foo' => 'normalized[baz]'), $resolved); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testValidateTypeBeforeNormalization() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->resolver->setAllowedTypes('foo', 'int'); - - $this->resolver->setNormalizer('foo', function () { - Assert::fail('Should not be called.'); - }); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException - */ - public function testValidateValueBeforeNormalization() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->resolver->setAllowedValues('foo', 'baz'); - - $this->resolver->setNormalizer('foo', function () { - Assert::fail('Should not be called.'); - }); - - $this->resolver->resolve(); - } - - public function testNormalizerCanAccessOtherOptions() - { - $this->resolver->setDefault('default', 'bar'); - $this->resolver->setDefault('norm', 'baz'); - - $this->resolver->setNormalizer('norm', function (Options $options) { - /* @var TestCase $test */ - Assert::assertSame('bar', $options['default']); - - return 'normalized'; - }); - - $this->assertEquals(array( - 'default' => 'bar', - 'norm' => 'normalized', - ), $this->resolver->resolve()); - } - - public function testNormalizerCanAccessLazyOptions() - { - $this->resolver->setDefault('lazy', function (Options $options) { - return 'bar'; - }); - $this->resolver->setDefault('norm', 'baz'); - - $this->resolver->setNormalizer('norm', function (Options $options) { - /* @var TestCase $test */ - Assert::assertEquals('bar', $options['lazy']); - - return 'normalized'; - }); - - $this->assertEquals(array( - 'lazy' => 'bar', - 'norm' => 'normalized', - ), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException - */ - public function testFailIfCyclicDependencyBetweenNormalizers() - { - $this->resolver->setDefault('norm1', 'bar'); - $this->resolver->setDefault('norm2', 'baz'); - - $this->resolver->setNormalizer('norm1', function (Options $options) { - $options['norm2']; - }); - - $this->resolver->setNormalizer('norm2', function (Options $options) { - $options['norm1']; - }); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException - */ - public function testFailIfCyclicDependencyBetweenNormalizerAndLazyOption() - { - $this->resolver->setDefault('lazy', function (Options $options) { - $options['norm']; - }); - - $this->resolver->setDefault('norm', 'baz'); - - $this->resolver->setNormalizer('norm', function (Options $options) { - $options['lazy']; - }); - - $this->resolver->resolve(); - } - - public function testCatchedExceptionFromNormalizerDoesNotCrashOptionResolver() - { - $throw = true; - - $this->resolver->setDefaults(array('catcher' => null, 'thrower' => null)); - - $this->resolver->setNormalizer('catcher', function (Options $options) { - try { - return $options['thrower']; - } catch (\Exception $e) { - return false; - } - }); - - $this->resolver->setNormalizer('thrower', function (Options $options) use (&$throw) { - if ($throw) { - $throw = false; - throw new \UnexpectedValueException('throwing'); - } - - return true; - }); - - $this->resolver->resolve(); - } - - public function testCatchedExceptionFromLazyDoesNotCrashOptionResolver() - { - $throw = true; - - $this->resolver->setDefault('catcher', function (Options $options) { - try { - return $options['thrower']; - } catch (\Exception $e) { - return false; - } - }); - - $this->resolver->setDefault('thrower', function (Options $options) use (&$throw) { - if ($throw) { - $throw = false; - throw new \UnexpectedValueException('throwing'); - } - - return true; - }); - - $this->resolver->resolve(); - } - - public function testInvokeEachNormalizerOnlyOnce() - { - $calls = 0; - - $this->resolver->setDefault('norm1', 'bar'); - $this->resolver->setDefault('norm2', 'baz'); - - $this->resolver->setNormalizer('norm1', function ($options) use (&$calls) { - Assert::assertSame(1, ++$calls); - - $options['norm2']; - }); - $this->resolver->setNormalizer('norm2', function () use (&$calls) { - Assert::assertSame(2, ++$calls); - }); - - $this->resolver->resolve(); - - $this->assertSame(2, $calls); - } - - public function testNormalizerNotCalledForUnsetOptions() - { - $this->resolver->setDefined('norm'); - - $this->resolver->setNormalizer('norm', function () { - Assert::fail('Should not be called.'); - }); - - $this->assertEmpty($this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // setDefaults() - //////////////////////////////////////////////////////////////////////////// - - public function testSetDefaultsReturnsThis() - { - $this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar'))); - } - - public function testSetDefaults() - { - $this->resolver->setDefault('one', '1'); - $this->resolver->setDefault('two', 'bar'); - - $this->resolver->setDefaults(array( - 'two' => '2', - 'three' => '3', - )); - - $this->assertEquals(array( - 'one' => '1', - 'two' => '2', - 'three' => '3', - ), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfSetDefaultsFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->setDefaults(array('two' => '2')); - }); - - $this->resolver->resolve(); - } - - //////////////////////////////////////////////////////////////////////////// - // remove() - //////////////////////////////////////////////////////////////////////////// - - public function testRemoveReturnsThis() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame($this->resolver, $this->resolver->remove('foo')); - } - - public function testRemoveSingleOption() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setDefault('baz', 'boo'); - $this->resolver->remove('foo'); - - $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); - } - - public function testRemoveMultipleOptions() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setDefault('baz', 'boo'); - $this->resolver->setDefault('doo', 'dam'); - - $this->resolver->remove(array('foo', 'doo')); - - $this->assertSame(array('baz' => 'boo'), $this->resolver->resolve()); - } - - public function testRemoveLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - return 'lazy'; - }); - $this->resolver->remove('foo'); - - $this->assertSame(array(), $this->resolver->resolve()); - } - - public function testRemoveNormalizer() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setNormalizer('foo', function (Options $options, $value) { - return 'normalized'; - }); - $this->resolver->remove('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testRemoveAllowedTypes() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedTypes('foo', 'int'); - $this->resolver->remove('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testRemoveAllowedValues() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', array('baz', 'boo')); - $this->resolver->remove('foo'); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfRemoveFromLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->remove('bar'); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - public function testRemoveUnknownOptionIgnored() - { - $this->assertNotNull($this->resolver->remove('foo')); - } - - //////////////////////////////////////////////////////////////////////////// - // clear() - //////////////////////////////////////////////////////////////////////////// - - public function testClearReturnsThis() - { - $this->assertSame($this->resolver, $this->resolver->clear()); - } - - public function testClearRemovesAllOptions() - { - $this->resolver->setDefault('one', 1); - $this->resolver->setDefault('two', 2); - - $this->resolver->clear(); - - $this->assertEmpty($this->resolver->resolve()); - } - - public function testClearLazyOption() - { - $this->resolver->setDefault('foo', function (Options $options) { - return 'lazy'; - }); - $this->resolver->clear(); - - $this->assertSame(array(), $this->resolver->resolve()); - } - - public function testClearNormalizer() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setNormalizer('foo', function (Options $options, $value) { - return 'normalized'; - }); - $this->resolver->clear(); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testClearAllowedTypes() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedTypes('foo', 'int'); - $this->resolver->clear(); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - public function testClearAllowedValues() - { - $this->resolver->setDefault('foo', 'bar'); - $this->resolver->setAllowedValues('foo', 'baz'); - $this->resolver->clear(); - $this->resolver->setDefault('foo', 'bar'); - - $this->assertSame(array('foo' => 'bar'), $this->resolver->resolve()); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testFailIfClearFromLazyption() - { - $this->resolver->setDefault('foo', function (Options $options) { - $options->clear(); - }); - - $this->resolver->setDefault('bar', 'baz'); - - $this->resolver->resolve(); - } - - public function testClearOptionAndNormalizer() - { - $this->resolver->setDefault('foo1', 'bar'); - $this->resolver->setNormalizer('foo1', function (Options $options) { - return ''; - }); - $this->resolver->setDefault('foo2', 'bar'); - $this->resolver->setNormalizer('foo2', function (Options $options) { - return ''; - }); - - $this->resolver->clear(); - $this->assertEmpty($this->resolver->resolve()); - } - - //////////////////////////////////////////////////////////////////////////// - // ArrayAccess - //////////////////////////////////////////////////////////////////////////// - - public function testArrayAccess() - { - $this->resolver->setDefault('default1', 0); - $this->resolver->setDefault('default2', 1); - $this->resolver->setRequired('required'); - $this->resolver->setDefined('defined'); - $this->resolver->setDefault('lazy1', function (Options $options) { - return 'lazy'; - }); - - $this->resolver->setDefault('lazy2', function (Options $options) { - Assert::assertTrue(isset($options['default1'])); - Assert::assertTrue(isset($options['default2'])); - Assert::assertTrue(isset($options['required'])); - Assert::assertTrue(isset($options['lazy1'])); - Assert::assertTrue(isset($options['lazy2'])); - Assert::assertFalse(isset($options['defined'])); - - Assert::assertSame(0, $options['default1']); - Assert::assertSame(42, $options['default2']); - Assert::assertSame('value', $options['required']); - Assert::assertSame('lazy', $options['lazy1']); - - // Obviously $options['lazy'] and $options['defined'] cannot be - // accessed - }); - - $this->resolver->resolve(array('default2' => 42, 'required' => 'value')); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testArrayAccessGetFailsOutsideResolve() - { - $this->resolver->setDefault('default', 0); - - $this->resolver['default']; - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testArrayAccessExistsFailsOutsideResolve() - { - $this->resolver->setDefault('default', 0); - - isset($this->resolver['default']); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testArrayAccessSetNotSupported() - { - $this->resolver['default'] = 0; - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testArrayAccessUnsetNotSupported() - { - $this->resolver->setDefault('default', 0); - - unset($this->resolver['default']); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException - * @expectedExceptionMessage The option "undefined" does not exist. Defined options are: "foo", "lazy". - */ - public function testFailIfGetNonExisting() - { - $this->resolver->setDefault('foo', 'bar'); - - $this->resolver->setDefault('lazy', function (Options $options) { - $options['undefined']; - }); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException - * @expectedExceptionMessage The optional option "defined" has no value set. You should make sure it is set with "isset" before reading it. - */ - public function testFailIfGetDefinedButUnset() - { - $this->resolver->setDefined('defined'); - - $this->resolver->setDefault('lazy', function (Options $options) { - $options['defined']; - }); - - $this->resolver->resolve(); - } - - /** - * @expectedException \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException - */ - public function testFailIfCyclicDependency() - { - $this->resolver->setDefault('lazy1', function (Options $options) { - $options['lazy2']; - }); - - $this->resolver->setDefault('lazy2', function (Options $options) { - $options['lazy1']; - }); - - $this->resolver->resolve(); - } - - //////////////////////////////////////////////////////////////////////////// - // Countable - //////////////////////////////////////////////////////////////////////////// - - public function testCount() - { - $this->resolver->setDefault('default', 0); - $this->resolver->setRequired('required'); - $this->resolver->setDefined('defined'); - $this->resolver->setDefault('lazy1', function () {}); - - $this->resolver->setDefault('lazy2', function (Options $options) { - Assert::assertCount(4, $options); - }); - - $this->assertCount(4, $this->resolver->resolve(array('required' => 'value'))); - } - - /** - * In resolve() we count the options that are actually set (which may be - * only a subset of the defined options). Outside of resolve(), it's not - * clear what is counted. - * - * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException - */ - public function testCountFailsOutsideResolve() - { - $this->resolver->setDefault('foo', 0); - $this->resolver->setRequired('bar'); - $this->resolver->setDefined('bar'); - $this->resolver->setDefault('lazy1', function () {}); - - count($this->resolver); - } -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/composer.json b/sensitive-issue-searcher/vendor/symfony/options-resolver/composer.json deleted file mode 100644 index 28cb1d7..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "symfony/options-resolver", - "type": "library", - "description": "Symfony OptionsResolver Component", - "keywords": ["options", "config", "configuration"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.5.9" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - } -} diff --git a/sensitive-issue-searcher/vendor/symfony/options-resolver/phpunit.xml.dist b/sensitive-issue-searcher/vendor/symfony/options-resolver/phpunit.xml.dist deleted file mode 100644 index abf8461..0000000 --- a/sensitive-issue-searcher/vendor/symfony/options-resolver/phpunit.xml.dist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./Resources - ./Tests - ./vendor - - - -