diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 5bd77a89..d0c3132d 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -10,31 +10,28 @@ jobs:
build:
runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- php-versions: ['8.2', '8.3']
+ env:
+ PHP_VERSION: '8.3'
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
- php-version: ${{ matrix.php-versions }}
+ php-version: ${{ env.PHP_VERSION }}
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
- key: ${{ runner.os }}-php${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
+ key: ${{ runner.os }}-php${{ env.PHP_VERSION }}-${{ hashFiles('**/composer.json') }}
- name: Install dependencies
- uses: php-actions/composer@v5
+ uses: php-actions/composer@v6
with:
command: install
- args: --prefer-dist --no-progress --no-suggest --verbose
- php_version: ${{ matrix.php-versions }}
- version: 1
+ args: --prefer-dist --no-progress --verbose
+ php_version: ${{ env.PHP_VERSION }}
- name: Run lint
run: make lint
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
new file mode 100644
index 00000000..4db92b61
--- /dev/null
+++ b/.github/workflows/semgrep.yml
@@ -0,0 +1,25 @@
+
+on:
+ pull_request: {}
+ workflow_dispatch: {}
+ push:
+ branches:
+ - main
+ - master
+ schedule:
+ - cron: '0 0 * * *'
+name: Semgrep config
+jobs:
+ semgrep:
+ name: semgrep/ci
+ runs-on: ubuntu-latest
+ env:
+ SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
+ SEMGREP_URL: https://cloudflare.semgrep.dev
+ SEMGREP_APP_URL: https://cloudflare.semgrep.dev
+ SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
+ container:
+ image: returntocorp/semgrep
+ steps:
+ - uses: actions/checkout@v3
+ - run: semgrep ci
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 33f6ee57..cb8280b1 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -13,10 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
- php-versions: ['8.2', '8.3']
+ lowest: ['0', '1']
+ php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
@@ -26,15 +27,16 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/composer-cache
- key: ${{ runner.os }}-php${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
+ key: ${{ runner.os }}-php${{ matrix.php-versions }}-lowest${{ matrix.lowest }}-${{ hashFiles('**/composer.json') }}
- name: Install dependencies
- uses: php-actions/composer@v5
+ uses: php-actions/composer@v6
+ env:
+ COMPOSER_PREFER_LOWEST: ${{ matrix.lowest }}
with:
- command: install
- args: --prefer-dist --no-progress --no-suggest --verbose
+ command: update
+ args: --prefer-dist --no-progress --verbose
php_version: ${{ matrix.php-versions }}
- version: 1
- name: Run tests
run: make test
diff --git a/.gitignore b/.gitignore
index 3aa184ce..99f3cc37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
/.idea
-/vendor/
\ No newline at end of file
+/composer.lock
+/vendor/
+/.phpunit.result.cache
\ No newline at end of file
diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index 5fb6a082..0378b14b 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -5,9 +5,9 @@
->in(__DIR__ . '/tests')
;
-$config = new PhpCsFixer\Config();
-$config->setUsingCache(false);
-return $config->setRules([
+return (new PhpCsFixer\Config())
+ ->setUsingCache(false)
+ ->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
])
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..2dfe62d6
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,29 @@
+# Changelog
+
+## 2.0.0
+
+### Breaking Changes
+
+- **Minimum PHP version raised from 7.2.5 to 8.1.** PHP 7.x and 8.0 are no
+ longer supported. All of these versions are past end-of-life upstream.
+
+### Changes
+
+- Add support for `psr/http-message` v2.0 (constraint is now `^1.1 || ^2.0`).
+ This resolves dependency conflicts with libraries that require PSR-7 v2,
+ including `league/oauth2-server` and newer Drupal modules.
+ ([#275](https://github.com/cloudflare/cloudflare-php/pull/275))
+- Fix PHP 8.4 implicit-nullable deprecation warnings in `Guzzle::__construct()`
+ and `Zones::cachePurge()`.
+ ([#280](https://github.com/cloudflare/cloudflare-php/pull/280))
+- Upgrade `guzzlehttp/guzzle` constraint from `^7.0.1` to `^7.4`.
+- Upgrade `phpunit/phpunit` from `^5.7` to `^9.6 || ^10.0 || ^11.0`.
+- Upgrade `friendsofphp/php-cs-fixer` from `^2.6` to `^3.0`.
+- Remove committed `composer.lock` (correct practice for libraries).
+- Update GitHub Actions workflows: `actions/checkout` v4, `actions/cache` v4,
+ `php-actions/composer` v6, Semgrep runner to `ubuntu-latest`.
+- Fix PHP test matrix to 8.1, 8.2, 8.3, 8.4.
+- Migrate linter config from `.php_cs` to `.php-cs-fixer.php`.
+- Add PHPMD ruleset file (`phpmd.xml`).
+- Remove unused test variables in `DNSAnalyticsTest`.
+- Update README to reflect PHP 8.1+ requirement and current project status.
diff --git a/Makefile b/Makefile
index 3b72d89f..0b7a26f9 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,12 @@
all: lint test
fix:
- php vendor/bin/php-cs-fixer fix --config=.php_cs
+ php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php
lint:
php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run
- php vendor/bin/phpmd src/ text cleancode,codesize,controversial,design,naming,unusedcode
- php vendor/bin/phpmd tests/ text cleancode,codesize,controversial,design,naming,unusedcode
+ php vendor/bin/phpmd src/ text phpmd.xml
+ php vendor/bin/phpmd tests/ text phpmd.xml
test:
php vendor/bin/phpunit --configuration phpunit.xml
diff --git a/README.md b/README.md
index f07db941..0cd3648f 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,33 @@
-# Cloudflare SDK (v4 API Binding for PHP 7)
+# Cloudflare SDK (v4 API Binding for PHP)
-[](https://travis-ci.org/cloudflare/cloudflare-php)
+> **Note:** This is a community-maintained PHP SDK covering a subset of the
+> Cloudflare API. A comprehensive, auto-generated PHP SDK is planned for the
+> future. In the meantime, for full API coverage consider using the
+> [Cloudflare API](https://developers.cloudflare.com/api/) directly.
+
+## Requirements
+
+- PHP 8.1 or later
## Installation
-The recommended way to install this package is via the Packagist Dependency Manager ([cloudflare/sdk](https://packagist.org/packages/cloudflare/sdk)). You can get specific usage examples on the Cloudflare Knowledge Base under: [Cloudflare PHP API Binding](https://support.cloudflare.com/hc/en-us/articles/115001661191)
+Install via Composer ([cloudflare/sdk](https://packagist.org/packages/cloudflare/sdk)):
+
+```
+composer require cloudflare/sdk
+```
## Cloudflare API version 4
-The Cloudflare API can be found [here](https://api.cloudflare.com/).
+The Cloudflare API can be found [here](https://developers.cloudflare.com/api/).
Each API call is provided via a similarly named function within various classes in the **Cloudflare\API\Endpoints** namespace:
- [x] [DNS Records](https://www.cloudflare.com/dns/)
-- [x] [DNS Analytics](https://api.cloudflare.com/#dns-analytics-table)
+- [x] DNS Analytics
- [x] Zones
- [x] User Administration (partial)
- [x] [Cloudflare IPs](https://www.cloudflare.com/ips/)
-- [x] [Page Rules](https://support.cloudflare.com/hc/en-us/articles/200168306-Is-there-a-tutorial-for-Page-Rules-)
+- [x] Page Rules
- [x] [Web Application Firewall (WAF)](https://www.cloudflare.com/waf/)
- [ ] Virtual DNS Management
- [x] Custom hostnames
@@ -30,8 +41,6 @@ Each API call is provided via a similarly named function within various classes
- [x] Load Balancers
- [x] Firewall Settings
-Note that this repository is currently under development, additional classes and endpoints being actively added.
-
## Getting Started
```php
diff --git a/composer.json b/composer.json
index 5eaf9575..61f451b2 100644
--- a/composer.json
+++ b/composer.json
@@ -3,15 +3,15 @@
"description": "PHP binding for v4 of the Cloudflare Client API.",
"type": "library",
"require": {
- "guzzlehttp/guzzle": "^7.3.0",
- "php": ">=8.2",
- "psr/http-message": "~1.0",
+ "guzzlehttp/guzzle": "^7.0.1",
+ "php": ">=8.1",
+ "psr/http-message": "^1.0 || ^2.0",
"ext-json": "*"
},
"require-dev": {
- "phpunit/phpunit": "^9.1.2",
+ "phpunit/phpunit": "^9.6.11",
"phpmd/phpmd" : "@stable",
- "friendsofphp/php-cs-fixer": "^3.13"
+ "friendsofphp/php-cs-fixer": "^3.0"
},
"license": "BSD-3-Clause",
"authors": [
diff --git a/composer.lock b/composer.lock
deleted file mode 100644
index 33341050..00000000
--- a/composer.lock
+++ /dev/null
@@ -1,4410 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "d156286686d1b25bdc513fedeb5caf40",
- "packages": [
- {
- "name": "guzzlehttp/guzzle",
- "version": "7.8.1",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/guzzle.git",
- "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
- "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
- "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
- "php": "^7.2.5 || ^8.0",
- "psr/http-client": "^1.0",
- "symfony/deprecation-contracts": "^2.2 || ^3.0"
- },
- "provide": {
- "psr/http-client-implementation": "1.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.2",
- "ext-curl": "*",
- "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
- "php-http/message-factory": "^1.1",
- "phpunit/phpunit": "^8.5.36 || ^9.6.15",
- "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": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "autoload": {
- "files": [
- "src/functions_include.php"
- ],
- "psr-4": {
- "GuzzleHttp\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Jeremy Lindblom",
- "email": "jeremeamia@gmail.com",
- "homepage": "https://github.com/jeremeamia"
- },
- {
- "name": "George Mponos",
- "email": "gmponos@gmail.com",
- "homepage": "https://github.com/gmponos"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://github.com/sagikazarmark"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "Guzzle is a PHP HTTP client library",
- "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/7.8.1"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-03T20:35:24+00:00"
- },
- {
- "name": "guzzlehttp/promises",
- "version": "2.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/promises.git",
- "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
- "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.36 || ^9.6.15"
- },
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Promise\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "Guzzle promises library",
- "keywords": [
- "promise"
- ],
- "support": {
- "issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/2.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-03T20:19:20+00:00"
- },
- {
- "name": "guzzlehttp/psr7",
- "version": "2.6.2",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
- "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.1 || ^2.0",
- "ralouphie/getallheaders": "^3.0"
- },
- "provide": {
- "psr/http-factory-implementation": "1.0",
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.2",
- "http-interop/http-factory-tests": "^0.9",
- "phpunit/phpunit": "^8.5.36 || ^9.6.15"
- },
- "suggest": {
- "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
- },
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "George Mponos",
- "email": "gmponos@gmail.com",
- "homepage": "https://github.com/gmponos"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://github.com/sagikazarmark"
- },
- {
- "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",
- "keywords": [
- "http",
- "message",
- "psr-7",
- "request",
- "response",
- "stream",
- "uri",
- "url"
- ],
- "support": {
- "issues": "https://github.com/guzzle/psr7/issues",
- "source": "https://github.com/guzzle/psr7/tree/2.6.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-03T20:05:35+00:00"
- },
- {
- "name": "psr/http-client",
- "version": "1.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-client.git",
- "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
- "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
- "shasum": ""
- },
- "require": {
- "php": "^7.0 || ^8.0",
- "psr/http-message": "^1.0 || ^2.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Client\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP clients",
- "homepage": "https://github.com/php-fig/http-client",
- "keywords": [
- "http",
- "http-client",
- "psr",
- "psr-18"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-client"
- },
- "time": "2023-09-23T14:17:50+00:00"
- },
- {
- "name": "psr/http-factory",
- "version": "1.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-factory.git",
- "reference": "e616d01114759c4c489f93b099585439f795fe35"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
- "reference": "e616d01114759c4c489f93b099585439f795fe35",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0.0",
- "psr/http-message": "^1.0 || ^2.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interfaces for PSR-7 HTTP message factories",
- "keywords": [
- "factory",
- "http",
- "message",
- "psr",
- "psr-17",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
- },
- "time": "2023-04-10T20:10:41+00:00"
- },
- {
- "name": "psr/http-message",
- "version": "1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "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"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-message/tree/1.1"
- },
- "time": "2023-04-04T09:50:52+00:00"
- },
- {
- "name": "ralouphie/getallheaders",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/ralouphie/getallheaders.git",
- "reference": "120b605dfeb996808c31b6477290a714d356e822"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
- "reference": "120b605dfeb996808c31b6477290a714d356e822",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "^2.1",
- "phpunit/phpunit": "^5 || ^6.5"
- },
- "type": "library",
- "autoload": {
- "files": [
- "src/getallheaders.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ralph Khattar",
- "email": "ralph.khattar@gmail.com"
- }
- ],
- "description": "A polyfill for getallheaders.",
- "support": {
- "issues": "https://github.com/ralouphie/getallheaders/issues",
- "source": "https://github.com/ralouphie/getallheaders/tree/develop"
- },
- "time": "2019-03-08T08:55:37+00:00"
- },
- {
- "name": "symfony/deprecation-contracts",
- "version": "v3.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-05-23T14:45:45+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "composer/pcre",
- "version": "3.1.3",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/pcre.git",
- "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
- "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
- "shasum": ""
- },
- "require": {
- "php": "^7.4 || ^8.0"
- },
- "require-dev": {
- "phpstan/phpstan": "^1.3",
- "phpstan/phpstan-strict-rules": "^1.1",
- "symfony/phpunit-bridge": "^5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Composer\\Pcre\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jordi Boggiano",
- "email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
- }
- ],
- "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
- "keywords": [
- "PCRE",
- "preg",
- "regex",
- "regular expression"
- ],
- "support": {
- "issues": "https://github.com/composer/pcre/issues",
- "source": "https://github.com/composer/pcre/tree/3.1.3"
- },
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-19T10:26:25+00:00"
- },
- {
- "name": "composer/semver",
- "version": "3.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/semver.git",
- "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
- "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
- "shasum": ""
- },
- "require": {
- "php": "^5.3.2 || ^7.0 || ^8.0"
- },
- "require-dev": {
- "phpstan/phpstan": "^1.4",
- "symfony/phpunit-bridge": "^4.2 || ^5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Composer\\Semver\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nils Adermann",
- "email": "naderman@naderman.de",
- "homepage": "http://www.naderman.de"
- },
- {
- "name": "Jordi Boggiano",
- "email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
- },
- {
- "name": "Rob Bast",
- "email": "rob.bast@gmail.com",
- "homepage": "http://robbast.nl"
- }
- ],
- "description": "Semver library that offers utilities, version constraint parsing and validation.",
- "keywords": [
- "semantic",
- "semver",
- "validation",
- "versioning"
- ],
- "support": {
- "irc": "ircs://irc.libera.chat:6697/composer",
- "issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/3.4.0"
- },
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "time": "2023-08-31T09:50:34+00:00"
- },
- {
- "name": "composer/xdebug-handler",
- "version": "3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/xdebug-handler.git",
- "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
- "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255",
- "shasum": ""
- },
- "require": {
- "composer/pcre": "^1 || ^2 || ^3",
- "php": "^7.2.5 || ^8.0",
- "psr/log": "^1 || ^2 || ^3"
- },
- "require-dev": {
- "phpstan/phpstan": "^1.0",
- "phpstan/phpstan-strict-rules": "^1.1",
- "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Composer\\XdebugHandler\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "John Stevenson",
- "email": "john-stevenson@blueyonder.co.uk"
- }
- ],
- "description": "Restarts a process without Xdebug.",
- "keywords": [
- "Xdebug",
- "performance"
- ],
- "support": {
- "irc": "ircs://irc.libera.chat:6697/composer",
- "issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/3.0.4"
- },
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-26T18:29:49+00:00"
- },
- {
- "name": "doctrine/instantiator",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "shasum": ""
- },
- "require": {
- "php": "^8.1"
- },
- "require-dev": {
- "doctrine/coding-standard": "^11",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^1.2",
- "phpstan/phpstan": "^1.9.4",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5.27",
- "vimeo/psalm": "^5.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "https://ocramius.github.io/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
- "type": "tidelift"
- }
- ],
- "time": "2022-12-30T00:23:10+00:00"
- },
- {
- "name": "friendsofphp/php-cs-fixer",
- "version": "v3.53.0",
- "source": {
- "type": "git",
- "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
- "reference": "69a19093a9ded8d1baac62ed6c009b8bc148d008"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/69a19093a9ded8d1baac62ed6c009b8bc148d008",
- "reference": "69a19093a9ded8d1baac62ed6c009b8bc148d008",
- "shasum": ""
- },
- "require": {
- "composer/semver": "^3.4",
- "composer/xdebug-handler": "^3.0.3",
- "ext-filter": "*",
- "ext-json": "*",
- "ext-tokenizer": "*",
- "php": "^7.4 || ^8.0",
- "sebastian/diff": "^4.0 || ^5.0 || ^6.0",
- "symfony/console": "^5.4 || ^6.0 || ^7.0",
- "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
- "symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
- "symfony/finder": "^5.4 || ^6.0 || ^7.0",
- "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0",
- "symfony/polyfill-mbstring": "^1.28",
- "symfony/polyfill-php80": "^1.28",
- "symfony/polyfill-php81": "^1.28",
- "symfony/process": "^5.4 || ^6.0 || ^7.0",
- "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
- },
- "require-dev": {
- "facile-it/paraunit": "^1.3 || ^2.0",
- "infection/infection": "^0.27.11",
- "justinrainbow/json-schema": "^5.2",
- "keradus/cli-executor": "^2.1",
- "mikey179/vfsstream": "^1.6.11",
- "php-coveralls/php-coveralls": "^2.7",
- "php-cs-fixer/accessible-object": "^1.1",
- "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
- "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
- "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
- "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
- "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
- },
- "suggest": {
- "ext-dom": "For handling output formats in XML",
- "ext-mbstring": "For handling non-UTF8 characters."
- },
- "bin": [
- "php-cs-fixer"
- ],
- "type": "application",
- "autoload": {
- "psr-4": {
- "PhpCsFixer\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Dariusz Rumiński",
- "email": "dariusz.ruminski@gmail.com"
- }
- ],
- "description": "A tool to automatically fix PHP code style",
- "keywords": [
- "Static code analysis",
- "fixer",
- "standards",
- "static analysis"
- ],
- "support": {
- "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
- "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.53.0"
- },
- "funding": [
- {
- "url": "https://github.com/keradus",
- "type": "github"
- }
- ],
- "time": "2024-04-08T15:03:00+00:00"
- },
- {
- "name": "myclabs/deep-copy",
- "version": "1.11.1",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "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",
- "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.11.1"
- },
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
- "type": "tidelift"
- }
- ],
- "time": "2023-03-08T13:26:56+00:00"
- },
- {
- "name": "nikic/php-parser",
- "version": "v5.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13",
- "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13",
- "shasum": ""
- },
- "require": {
- "ext-ctype": "*",
- "ext-json": "*",
- "ext-tokenizer": "*",
- "php": ">=7.4"
- },
- "require-dev": {
- "ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
- },
- "bin": [
- "bin/php-parse"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "PhpParser\\": "lib/PhpParser"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Nikita Popov"
- }
- ],
- "description": "A PHP parser written in PHP",
- "keywords": [
- "parser",
- "php"
- ],
- "support": {
- "issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2"
- },
- "time": "2024-03-05T20:51:40+00:00"
- },
- {
- "name": "pdepend/pdepend",
- "version": "2.16.2",
- "source": {
- "type": "git",
- "url": "https://github.com/pdepend/pdepend.git",
- "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/pdepend/pdepend/zipball/f942b208dc2a0868454d01b29f0c75bbcfc6ed58",
- "reference": "f942b208dc2a0868454d01b29f0c75bbcfc6ed58",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.7",
- "symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0",
- "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0",
- "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0",
- "symfony/polyfill-mbstring": "^1.19"
- },
- "require-dev": {
- "easy-doc/easy-doc": "0.0.0|^1.2.3",
- "gregwar/rst": "^1.0",
- "squizlabs/php_codesniffer": "^2.0.0"
- },
- "bin": [
- "src/bin/pdepend"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "PDepend\\": "src/main/php/PDepend"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "description": "Official version of pdepend to be handled with Composer",
- "keywords": [
- "PHP Depend",
- "PHP_Depend",
- "dev",
- "pdepend"
- ],
- "support": {
- "issues": "https://github.com/pdepend/pdepend/issues",
- "source": "https://github.com/pdepend/pdepend/tree/2.16.2"
- },
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-17T18:09:59+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": "phpmd/phpmd",
- "version": "2.15.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpmd/phpmd.git",
- "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0",
- "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0",
- "shasum": ""
- },
- "require": {
- "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0",
- "ext-xml": "*",
- "pdepend/pdepend": "^2.16.1",
- "php": ">=5.3.9"
- },
- "require-dev": {
- "easy-doc/easy-doc": "0.0.0 || ^1.3.2",
- "ext-json": "*",
- "ext-simplexml": "*",
- "gregwar/rst": "^1.0",
- "mikey179/vfsstream": "^1.6.8",
- "squizlabs/php_codesniffer": "^2.9.2 || ^3.7.2"
- },
- "bin": [
- "src/bin/phpmd"
- ],
- "type": "library",
- "autoload": {
- "psr-0": {
- "PHPMD\\": "src/main/php"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Manuel Pichler",
- "email": "github@manuel-pichler.de",
- "homepage": "https://github.com/manuelpichler",
- "role": "Project Founder"
- },
- {
- "name": "Marc Würth",
- "email": "ravage@bluewin.ch",
- "homepage": "https://github.com/ravage84",
- "role": "Project Maintainer"
- },
- {
- "name": "Other contributors",
- "homepage": "https://github.com/phpmd/phpmd/graphs/contributors",
- "role": "Contributors"
- }
- ],
- "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.",
- "homepage": "https://phpmd.org/",
- "keywords": [
- "dev",
- "mess detection",
- "mess detector",
- "pdepend",
- "phpmd",
- "pmd"
- ],
- "support": {
- "irc": "irc://irc.freenode.org/phpmd",
- "issues": "https://github.com/phpmd/phpmd/issues",
- "source": "https://github.com/phpmd/phpmd/tree/2.15.0"
- },
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-11T08:22:20+00:00"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "9.2.31",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965",
- "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-libxml": "*",
- "ext-xmlwriter": "*",
- "nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.3",
- "phpunit/php-text-template": "^2.0.2",
- "sebastian/code-unit-reverse-lookup": "^2.0.2",
- "sebastian/complexity": "^2.0",
- "sebastian/environment": "^5.1.2",
- "sebastian/lines-of-code": "^1.0.3",
- "sebastian/version": "^3.0.1",
- "theseer/tokenizer": "^1.2.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "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-master": "9.2-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
- "keywords": [
- "coverage",
- "testing",
- "xunit"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-02T06:37:42+00:00"
- },
- {
- "name": "phpunit/php-file-iterator",
- "version": "3.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "keywords": [
- "filesystem",
- "iterator"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2021-12-02T12:48:52+00:00"
- },
- {
- "name": "phpunit/php-invoker",
- "version": "3.1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "ext-pcntl": "*",
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-pcntl": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Invoke callables with a timeout",
- "homepage": "https://github.com/sebastianbergmann/php-invoker/",
- "keywords": [
- "process"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
- "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-09-28T05:58:55+00:00"
- },
- {
- "name": "phpunit/php-text-template",
- "version": "2.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
- "keywords": [
- "template"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-10-26T05:33:50+00:00"
- },
- {
- "name": "phpunit/php-timer",
- "version": "5.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "keywords": [
- "timer"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-10-26T13:16:10+00:00"
- },
- {
- "name": "phpunit/phpunit",
- "version": "9.6.19",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8",
- "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.3.1 || ^2",
- "ext-dom": "*",
- "ext-json": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "ext-xml": "*",
- "ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
- "php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.28",
- "phpunit/php-file-iterator": "^3.0.5",
- "phpunit/php-invoker": "^3.1.1",
- "phpunit/php-text-template": "^2.0.3",
- "phpunit/php-timer": "^5.0.2",
- "sebastian/cli-parser": "^1.0.1",
- "sebastian/code-unit": "^1.0.6",
- "sebastian/comparator": "^4.0.8",
- "sebastian/diff": "^4.0.3",
- "sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.5",
- "sebastian/global-state": "^5.0.1",
- "sebastian/object-enumerator": "^4.0.3",
- "sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.2",
- "sebastian/version": "^3.0.2"
- },
- "suggest": {
- "ext-soap": "To be able to generate mocks based on WSDL files",
- "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
- },
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "9.6-dev"
- }
- },
- "autoload": {
- "files": [
- "src/Framework/Assert/Functions.php"
- ],
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "The PHP Unit Testing framework.",
- "homepage": "https://phpunit.de/",
- "keywords": [
- "phpunit",
- "testing",
- "xunit"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19"
- },
- "funding": [
- {
- "url": "https://phpunit.de/sponsors.html",
- "type": "custom"
- },
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
- "type": "tidelift"
- }
- ],
- "time": "2024-04-05T04:35:58+00:00"
- },
- {
- "name": "psr/container",
- "version": "2.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ],
- "support": {
- "issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/2.0.2"
- },
- "time": "2021-11-05T16:47:00+00:00"
- },
- {
- "name": "psr/event-dispatcher",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/event-dispatcher.git",
- "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
- "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\EventDispatcher\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Standard interfaces for event handling.",
- "keywords": [
- "events",
- "psr",
- "psr-14"
- ],
- "support": {
- "issues": "https://github.com/php-fig/event-dispatcher/issues",
- "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
- },
- "time": "2019-01-08T18:20:26+00:00"
- },
- {
- "name": "psr/log",
- "version": "3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/log.git",
- "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
- "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
- "shasum": ""
- },
- "require": {
- "php": ">=8.0.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Log\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for logging libraries",
- "homepage": "https://github.com/php-fig/log",
- "keywords": [
- "log",
- "psr",
- "psr-3"
- ],
- "support": {
- "source": "https://github.com/php-fig/log/tree/3.0.0"
- },
- "time": "2021-07-14T16:46:02+00:00"
- },
- {
- "name": "sebastian/cli-parser",
- "version": "1.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library for parsing CLI options",
- "homepage": "https://github.com/sebastianbergmann/cli-parser",
- "support": {
- "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-02T06:27:43+00:00"
- },
- {
- "name": "sebastian/code-unit",
- "version": "1.0.8",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Collection of value objects that represent the PHP code units",
- "homepage": "https://github.com/sebastianbergmann/code-unit",
- "support": {
- "issues": "https://github.com/sebastianbergmann/code-unit/issues",
- "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-10-26T13:08:54+00:00"
- },
- {
- "name": "sebastian/code-unit-reverse-lookup",
- "version": "2.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Looks up which function or method a line of code belongs to",
- "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-09-28T05:30:19+00:00"
- },
- {
- "name": "sebastian/comparator",
- "version": "4.0.8",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3",
- "sebastian/diff": "^4.0",
- "sebastian/exporter": "^4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "https://github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2022-09-14T12:41:17+00:00"
- },
- {
- "name": "sebastian/complexity",
- "version": "2.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
- "shasum": ""
- },
- "require": {
- "nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library for calculating the complexity of PHP code units",
- "homepage": "https://github.com/sebastianbergmann/complexity",
- "support": {
- "issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2023-12-22T06:19:30+00:00"
- },
- {
- "name": "sebastian/diff",
- "version": "4.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3",
- "symfony/process": "^4.2 || ^5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- }
- ],
- "description": "Diff implementation",
- "homepage": "https://github.com/sebastianbergmann/diff",
- "keywords": [
- "diff",
- "udiff",
- "unidiff",
- "unified diff"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-02T06:30:58+00:00"
- },
- {
- "name": "sebastian/environment",
- "version": "5.1.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-posix": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
- "keywords": [
- "Xdebug",
- "environment",
- "hhvm"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2023-02-03T06:03:51+00:00"
- },
- {
- "name": "sebastian/exporter",
- "version": "4.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3",
- "sebastian/recursion-context": "^4.0"
- },
- "require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@gmail.com"
- }
- ],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "https://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-02T06:33:00+00:00"
- },
- {
- "name": "sebastian/global-state",
- "version": "5.0.7",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
- },
- "require-dev": {
- "ext-dom": "*",
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-uopz": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Snapshotting of global state",
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
- "keywords": [
- "global state"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-02T06:35:11+00:00"
- },
- {
- "name": "sebastian/lines-of-code",
- "version": "1.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
- "shasum": ""
- },
- "require": {
- "nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library for counting the lines of code in PHP source code",
- "homepage": "https://github.com/sebastianbergmann/lines-of-code",
- "support": {
- "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2023-12-22T06:20:34+00:00"
- },
- {
- "name": "sebastian/object-enumerator",
- "version": "4.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Traverses array structures and object graphs to enumerate all referenced objects",
- "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-10-26T13:12:34+00:00"
- },
- {
- "name": "sebastian/object-reflector",
- "version": "2.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Allows reflection of object attributes, including inherited and non-public ones",
- "homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-10-26T13:14:26+00:00"
- },
- {
- "name": "sebastian/recursion-context",
- "version": "4.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "https://github.com/sebastianbergmann/recursion-context",
- "support": {
- "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2023-02-03T06:07:39+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-14T16:00:52+00:00"
- },
- {
- "name": "sebastian/type",
- "version": "3.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/type.git",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.2-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Collection of value objects that represent the types of the PHP type system",
- "homepage": "https://github.com/sebastianbergmann/type",
- "support": {
- "issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2023-02-03T06:13:03+00:00"
- },
- {
- "name": "sebastian/version",
- "version": "3.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "c6c1022351a901512170118436c764e473f6de8c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
- "reference": "c6c1022351a901512170118436c764e473f6de8c",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "support": {
- "issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-09-28T06:39:44+00:00"
- },
- {
- "name": "symfony/config",
- "version": "v7.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/config.git",
- "reference": "7fc7e18a73ec8125fd95928c0340470d64760deb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/7fc7e18a73ec8125fd95928c0340470d64760deb",
- "reference": "7fc7e18a73ec8125fd95928c0340470d64760deb",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/deprecation-contracts": "^2.5|^3",
- "symfony/filesystem": "^6.4|^7.0",
- "symfony/polyfill-ctype": "~1.8"
- },
- "conflict": {
- "symfony/finder": "<6.4",
- "symfony/service-contracts": "<2.5"
- },
- "require-dev": {
- "symfony/event-dispatcher": "^6.4|^7.0",
- "symfony/finder": "^6.4|^7.0",
- "symfony/messenger": "^6.4|^7.0",
- "symfony/service-contracts": "^2.5|^3",
- "symfony/yaml": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Config\\": ""
- },
- "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": "Helps you find, load, combine, autofill and validate configuration values of any kind",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/config/tree/v7.0.6"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-27T19:55:25+00:00"
- },
- {
- "name": "symfony/console",
- "version": "v7.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
- "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/service-contracts": "^2.5|^3",
- "symfony/string": "^6.4|^7.0"
- },
- "conflict": {
- "symfony/dependency-injection": "<6.4",
- "symfony/dotenv": "<6.4",
- "symfony/event-dispatcher": "<6.4",
- "symfony/lock": "<6.4",
- "symfony/process": "<6.4"
- },
- "provide": {
- "psr/log-implementation": "1.0|2.0|3.0"
- },
- "require-dev": {
- "psr/log": "^1|^2|^3",
- "symfony/config": "^6.4|^7.0",
- "symfony/dependency-injection": "^6.4|^7.0",
- "symfony/event-dispatcher": "^6.4|^7.0",
- "symfony/http-foundation": "^6.4|^7.0",
- "symfony/http-kernel": "^6.4|^7.0",
- "symfony/lock": "^6.4|^7.0",
- "symfony/messenger": "^6.4|^7.0",
- "symfony/process": "^6.4|^7.0",
- "symfony/stopwatch": "^6.4|^7.0",
- "symfony/var-dumper": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Eases the creation of beautiful and testable command line interfaces",
- "homepage": "https://symfony.com",
- "keywords": [
- "cli",
- "command-line",
- "console",
- "terminal"
- ],
- "support": {
- "source": "https://github.com/symfony/console/tree/v7.0.6"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-04-01T11:04:53+00:00"
- },
- {
- "name": "symfony/dependency-injection",
- "version": "v7.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/dependency-injection.git",
- "reference": "ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9",
- "reference": "ff57b5c7d518c39eeb4e69dc0d1ec70723a117b9",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "psr/container": "^1.1|^2.0",
- "symfony/deprecation-contracts": "^2.5|^3",
- "symfony/service-contracts": "^3.3",
- "symfony/var-exporter": "^6.4|^7.0"
- },
- "conflict": {
- "ext-psr": "<1.1|>=2",
- "symfony/config": "<6.4",
- "symfony/finder": "<6.4",
- "symfony/yaml": "<6.4"
- },
- "provide": {
- "psr/container-implementation": "1.1|2.0",
- "symfony/service-implementation": "1.1|2.0|3.0"
- },
- "require-dev": {
- "symfony/config": "^6.4|^7.0",
- "symfony/expression-language": "^6.4|^7.0",
- "symfony/yaml": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\DependencyInjection\\": ""
- },
- "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": "Allows you to standardize and centralize the way objects are constructed in your application",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/dependency-injection/tree/v7.0.6"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-28T09:20:36+00:00"
- },
- {
- "name": "symfony/event-dispatcher",
- "version": "v7.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e",
- "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/event-dispatcher-contracts": "^2.5|^3"
- },
- "conflict": {
- "symfony/dependency-injection": "<6.4",
- "symfony/service-contracts": "<2.5"
- },
- "provide": {
- "psr/event-dispatcher-implementation": "1.0",
- "symfony/event-dispatcher-implementation": "2.0|3.0"
- },
- "require-dev": {
- "psr/log": "^1|^2|^3",
- "symfony/config": "^6.4|^7.0",
- "symfony/dependency-injection": "^6.4|^7.0",
- "symfony/error-handler": "^6.4|^7.0",
- "symfony/expression-language": "^6.4|^7.0",
- "symfony/http-foundation": "^6.4|^7.0",
- "symfony/service-contracts": "^2.5|^3",
- "symfony/stopwatch": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\EventDispatcher\\": ""
- },
- "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": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-23T15:02:46+00:00"
- },
- {
- "name": "symfony/event-dispatcher-contracts",
- "version": "v3.4.2",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/event-dispatcher-contracts.git",
- "reference": "4e64b49bf370ade88e567de29465762e316e4224"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/4e64b49bf370ade88e567de29465762e316e4224",
- "reference": "4e64b49bf370ade88e567de29465762e316e4224",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "psr/event-dispatcher": "^1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\EventDispatcher\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Generic abstractions related to dispatching event",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "support": {
- "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.2"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-23T14:51:35+00:00"
- },
- {
- "name": "symfony/filesystem",
- "version": "v7.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/filesystem.git",
- "reference": "408105dff4c104454100730bdfd1a9cdd993f04d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/408105dff4c104454100730bdfd1a9cdd993f04d",
- "reference": "408105dff4c104454100730bdfd1a9cdd993f04d",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-mbstring": "~1.8"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Filesystem\\": ""
- },
- "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": "Provides basic utilities for the filesystem",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/filesystem/tree/v7.0.6"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-21T19:37:36+00:00"
- },
- {
- "name": "symfony/finder",
- "version": "v7.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/finder.git",
- "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56",
- "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2"
- },
- "require-dev": {
- "symfony/filesystem": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- },
- "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": "Finds files and directories via an intuitive fluent interface",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/finder/tree/v7.0.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-10-31T17:59:56+00:00"
- },
- {
- "name": "symfony/options-resolver",
- "version": "v7.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/options-resolver.git",
- "reference": "700ff4096e346f54cb628ea650767c8130f1001f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f",
- "reference": "700ff4096e346f54cb628ea650767c8130f1001f",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/deprecation-contracts": "^2.5|^3"
- },
- "type": "library",
- "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": "Provides an improved replacement for the array_replace PHP function",
- "homepage": "https://symfony.com",
- "keywords": [
- "config",
- "configuration",
- "options"
- ],
- "support": {
- "source": "https://github.com/symfony/options-resolver/tree/v7.0.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-08-08T10:20:21+00:00"
- },
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
- "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/polyfill-intl-grapheme",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f",
- "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's grapheme_* functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "grapheme",
- "intl",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/polyfill-intl-normalizer",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "bc45c394692b948b4d383a08d7753968bed9a83d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d",
- "reference": "bc45c394692b948b4d383a08d7753968bed9a83d",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "intl",
- "normalizer",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
- "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-mbstring": "*"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
- "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "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"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/polyfill-php81",
- "version": "v1.29.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php81.git",
- "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d",
- "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Php81\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-29T20:11:03+00:00"
- },
- {
- "name": "symfony/process",
- "version": "v7.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9",
- "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Process\\": ""
- },
- "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": "Executes commands in sub-processes",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/process/tree/v7.0.4"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-02-22T20:27:20+00:00"
- },
- {
- "name": "symfony/service-contracts",
- "version": "v3.4.2",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "11bbf19a0fb7b36345861e85c5768844c552906e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e",
- "reference": "11bbf19a0fb7b36345861e85c5768844c552906e",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "psr/container": "^1.1|^2.0"
- },
- "conflict": {
- "ext-psr": "<1.1|>=2"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Service\\": ""
- },
- "exclude-from-classmap": [
- "/Test/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Generic abstractions related to writing services",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "support": {
- "source": "https://github.com/symfony/service-contracts/tree/v3.4.2"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-12-19T21:51:00+00:00"
- },
- {
- "name": "symfony/stopwatch",
- "version": "v7.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/stopwatch.git",
- "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/983900d6fddf2b0cbaacacbbad07610854bd8112",
- "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/service-contracts": "^2.5|^3"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Stopwatch\\": ""
- },
- "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": "Provides a way to profile code",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/stopwatch/tree/v7.0.3"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-01-23T15:02:46+00:00"
- },
- {
- "name": "symfony/string",
- "version": "v7.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/string.git",
- "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b",
- "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-intl-grapheme": "~1.0",
- "symfony/polyfill-intl-normalizer": "~1.0",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "conflict": {
- "symfony/translation-contracts": "<2.5"
- },
- "require-dev": {
- "symfony/error-handler": "^6.4|^7.0",
- "symfony/http-client": "^6.4|^7.0",
- "symfony/intl": "^6.4|^7.0",
- "symfony/translation-contracts": "^2.5|^3.0",
- "symfony/var-exporter": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "files": [
- "Resources/functions.php"
- ],
- "psr-4": {
- "Symfony\\Component\\String\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
- "homepage": "https://symfony.com",
- "keywords": [
- "grapheme",
- "i18n",
- "string",
- "unicode",
- "utf-8",
- "utf8"
- ],
- "support": {
- "source": "https://github.com/symfony/string/tree/v7.0.4"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-02-01T13:17:36+00:00"
- },
- {
- "name": "symfony/var-exporter",
- "version": "v7.0.6",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/var-exporter.git",
- "reference": "c74c568d2a15a1d407cf40d61ea82bc2d521e27b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/c74c568d2a15a1d407cf40d61ea82bc2d521e27b",
- "reference": "c74c568d2a15a1d407cf40d61ea82bc2d521e27b",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2"
- },
- "require-dev": {
- "symfony/property-access": "^6.4|^7.0",
- "symfony/serializer": "^6.4|^7.0",
- "symfony/var-dumper": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\VarExporter\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Allows exporting any serializable PHP data structure to plain PHP code",
- "homepage": "https://symfony.com",
- "keywords": [
- "clone",
- "construct",
- "export",
- "hydrate",
- "instantiate",
- "lazy-loading",
- "proxy",
- "serialize"
- ],
- "support": {
- "source": "https://github.com/symfony/var-exporter/tree/v7.0.6"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-03-20T21:25:22+00:00"
- },
- {
- "name": "theseer/tokenizer",
- "version": "1.2.3",
- "source": {
- "type": "git",
- "url": "https://github.com/theseer/tokenizer.git",
- "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
- "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-tokenizer": "*",
- "ext-xmlwriter": "*",
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- }
- ],
- "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "support": {
- "issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
- },
- "funding": [
- {
- "url": "https://github.com/theseer",
- "type": "github"
- }
- ],
- "time": "2024-03-03T12:36:25+00:00"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": {
- "phpmd/phpmd": 0
- },
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": {
- "php": ">=7.2.5",
- "ext-json": "*"
- },
- "platform-dev": [],
- "plugin-api-version": "2.6.0"
-}
diff --git a/phpmd.xml b/phpmd.xml
new file mode 100644
index 00000000..dd8386ae
--- /dev/null
+++ b/phpmd.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Adapter/Guzzle.php b/src/Adapter/Guzzle.php
index eeb51ade..540816a9 100644
--- a/src/Adapter/Guzzle.php
+++ b/src/Adapter/Guzzle.php
@@ -15,7 +15,7 @@ class Guzzle implements Adapter
/**
* @inheritDoc
*/
- public function __construct(Auth $auth, string $baseURI = null)
+ public function __construct(Auth $auth, ?string $baseURI = null)
{
if ($baseURI === null) {
$baseURI = 'https://api.cloudflare.com/client/v4/';
diff --git a/src/Endpoints/WorkersRoute.php b/src/Endpoints/WorkersRoute.php
index efb7df9a..b1d48d94 100644
--- a/src/Endpoints/WorkersRoute.php
+++ b/src/Endpoints/WorkersRoute.php
@@ -47,7 +47,7 @@ public function createRoute(string $zoneID, string $pattern, ?string $script = n
'pattern' => $pattern
];
- if($script) {
+ if ($script) {
$options['script'] = $script;
}
@@ -68,7 +68,7 @@ public function updateRoute(string $zoneID, string $routeID, string $pattern, ?s
'pattern' => $pattern
];
- if($script) {
+ if ($script) {
$options['script'] = $script;
}
diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php
index fd9e18b0..24fc940a 100644
--- a/src/Endpoints/Zones.php
+++ b/src/Endpoints/Zones.php
@@ -1,4 +1,5 @@
adapter->get("zones/$zoneID/environments");
+ $envs = json_decode($env->getBody(), true);
+ foreach ($envs["result"]["environments"] as $env) {
+ $this->adapter->post("zones/$zoneID/environments/{$env["ref"]}/purge_cache", ['purge_everything' => true]);
+ }
+ }
$user = $this->adapter->post('zones/' . $zoneID . '/purge_cache', ['purge_everything' => true]);
$this->body = json_decode($user->getBody());
@@ -230,7 +240,10 @@ public function cachePurgeEverything(string $zoneID): bool
return false;
}
- public function cachePurge(string $zoneID, array $files = null, array $tags = null, array $hosts = null): bool
+ /**
+ * @SuppressWarnings(PHPMD)
+ */
+ public function cachePurge(string $zoneID, ?array $files = null, ?array $tags = null, ?array $hosts = null, bool $includeEnvironments = false): bool
{
if ($files === null && $tags === null && $hosts === null) {
throw new EndpointException('No files, tags or hosts to purge.');
@@ -249,6 +262,14 @@ public function cachePurge(string $zoneID, array $files = null, array $tags = nu
$options['hosts'] = $hosts;
}
+ if ($includeEnvironments) {
+ $env = $this->adapter->get("zones/$zoneID/environments");
+ $envs = json_decode($env->getBody(), true);
+ foreach ($envs["result"]["environments"] as $env) {
+ $this->adapter->post("zones/$zoneID/environments/{$env["ref"]}/purge_cache", $options);
+ }
+ }
+
$user = $this->adapter->post('zones/' . $zoneID . '/purge_cache', $options);
$this->body = json_decode($user->getBody());
diff --git a/tests/Adapter/GuzzleTest.php b/tests/Adapter/GuzzleTest.php
index b083616c..e8807cb6 100644
--- a/tests/Adapter/GuzzleTest.php
+++ b/tests/Adapter/GuzzleTest.php
@@ -1,23 +1,22 @@
getMockBuilder(Auth::class)
+ parent::setUp();
+ $auth = $this->getMockBuilder(\Cloudflare\API\Auth\Auth::class)
->setMethods(['getHeaders'])
->getMock();
$auth->method('getHeaders')
->willReturn(['X-Testing' => 'Test']);
- $this->client = new Guzzle($auth, 'https://httpbin.org/');
+ $this->client = new \Cloudflare\API\Adapter\Guzzle($auth, 'https://httpbin.org/');
}
public function testGet()
diff --git a/tests/Auth/APIKeyTest.php b/tests/Auth/APIKeyTest.php
index 36910c21..10a788bb 100644
--- a/tests/Auth/APIKeyTest.php
+++ b/tests/Auth/APIKeyTest.php
@@ -1,7 +1,5 @@
getHeaders();
$this->assertArrayHasKey('X-Auth-Key', $headers);
diff --git a/tests/Auth/APITokenTest.php b/tests/Auth/APITokenTest.php
index 016af31d..ea7ec3c3 100644
--- a/tests/Auth/APITokenTest.php
+++ b/tests/Auth/APITokenTest.php
@@ -1,7 +1,5 @@
getHeaders();
$this->assertArrayHasKey('Authorization', $headers);
diff --git a/tests/Auth/NoneTest.php b/tests/Auth/NoneTest.php
index 55af9e72..7e46b42b 100644
--- a/tests/Auth/NoneTest.php
+++ b/tests/Auth/NoneTest.php
@@ -1,7 +1,4 @@
getHeaders();
$this->assertEquals([], $headers);
diff --git a/tests/Auth/UserServiceKeyTest.php b/tests/Auth/UserServiceKeyTest.php
index f450c5c7..53e29b30 100644
--- a/tests/Auth/UserServiceKeyTest.php
+++ b/tests/Auth/UserServiceKeyTest.php
@@ -1,7 +1,5 @@
getHeaders();
$this->assertArrayHasKey('X-Auth-User-Service-Key', $headers);
diff --git a/tests/Configurations/ConfigurationsUARulesTest.php b/tests/Configurations/ConfigurationsUARulesTest.php
index 03ad4a1e..bd6d45b2 100644
--- a/tests/Configurations/ConfigurationsUARulesTest.php
+++ b/tests/Configurations/ConfigurationsUARulesTest.php
@@ -1,7 +1,5 @@
addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4');
$array = $configuration->getArray();
diff --git a/tests/Configurations/ConfigurationsZoneLockdownTest.php b/tests/Configurations/ConfigurationsZoneLockdownTest.php
index 4d4daabc..7614042b 100644
--- a/tests/Configurations/ConfigurationsZoneLockdownTest.php
+++ b/tests/Configurations/ConfigurationsZoneLockdownTest.php
@@ -1,7 +1,5 @@
addIP('1.2.3.4');
$array = $configuration->getArray();
diff --git a/tests/Configurations/LoadBalancerTest.php b/tests/Configurations/LoadBalancerTest.php
index ae2cf44f..9ad3810f 100644
--- a/tests/Configurations/LoadBalancerTest.php
+++ b/tests/Configurations/LoadBalancerTest.php
@@ -11,7 +11,7 @@
class LoadBalancerTest extends TestCase
{
/**
- * @dataProvider dataProviderTestArguments
+ * @dataProvider argumentsDataProvider
*/
public function testArguments($setFunction, $arguments, $getFunction, $invalid)
{
@@ -28,9 +28,10 @@ public function testArguments($setFunction, $arguments, $getFunction, $invalid)
$this->assertEquals($argument, $loadBalancer->{$getFunction}());
}
}
+ $this->assertTrue(true, 'This test should perform assertions.');
}
- public function dataProviderTestArguments()
+ public function argumentsDataProvider()
{
return [
'steeringPolicy arguments valid' => [
diff --git a/tests/Configurations/PoolTest.php b/tests/Configurations/PoolTest.php
index cf6f7a3f..3b2458d8 100644
--- a/tests/Configurations/PoolTest.php
+++ b/tests/Configurations/PoolTest.php
@@ -11,10 +11,12 @@
class PoolTest extends TestCase
{
/**
- * @dataProvider dataProviderTestArguments
+ * @dataProvider argumentsDataProvider
*/
public function testArguments($setFunction, $arguments, $getFunction, $invalid)
{
+ $this->assertNotEmpty($arguments, 'Arguments should not be empty.');
+
$pool = new Pool('bogus', []);
foreach ($arguments as $argument) {
if ($invalid) {
@@ -30,7 +32,7 @@ public function testArguments($setFunction, $arguments, $getFunction, $invalid)
}
}
- public function dataProviderTestArguments()
+ public function argumentsDataProvider()
{
return [
'origins arguments valid' => [
diff --git a/tests/Endpoints/AccessRulesTest.php b/tests/Endpoints/AccessRulesTest.php
index 7bec02c7..b39a3b1b 100644
--- a/tests/Endpoints/AccessRulesTest.php
+++ b/tests/Endpoints/AccessRulesTest.php
@@ -1,16 +1,15 @@
getPsr7JsonResponseForFixture('Endpoints/listAccessRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -24,7 +23,7 @@ public function testListRules()
])
);
- $zones = new AccessRules($mock);
+ $zones = new \Cloudflare\API\Endpoints\AccessRules($mock);
$result = $zones->listRules('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('result', $result);
@@ -37,12 +36,15 @@ public function testListRules()
public function testCreateRule()
{
- $config = new AccessRulesConfiguration();
+ $config = new \Cloudflare\API\Configurations\AccessRules();
$config->setIP('1.2.3.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createAccessRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -56,7 +58,7 @@ public function testCreateRule()
])
);
- $rules = new AccessRules($mock);
+ $rules = new \Cloudflare\API\Endpoints\AccessRules($mock);
$rules->createRule(
'023e105f4ecef8ad9ca31a8372d0c353',
'challenge',
@@ -70,7 +72,10 @@ public function testUpdateRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateAccessRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -83,7 +88,7 @@ public function testUpdateRule()
])
);
- $rules = new AccessRules($mock);
+ $rules = new \Cloudflare\API\Endpoints\AccessRules($mock);
$rules->updateRule(
'023e105f4ecef8ad9ca31a8372d0c353',
'92f17202ed8bd63d69a66b86a49a8f6b',
@@ -97,7 +102,10 @@ public function testDeleteRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteAccessRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -109,7 +117,7 @@ public function testDeleteRule()
])
);
- $rules = new AccessRules($mock);
+ $rules = new \Cloudflare\API\Endpoints\AccessRules($mock);
$rules->deleteRule('023e105f4ecef8ad9ca31a8372d0c353', '92f17202ed8bd63d69a66b86a49a8f6b');
$this->assertEquals('92f17202ed8bd63d69a66b86a49a8f6b', $rules->getBody()->result->id);
}
diff --git a/tests/Endpoints/AccountMembersTest.php b/tests/Endpoints/AccountMembersTest.php
index e5054849..a757feb9 100644
--- a/tests/Endpoints/AccountMembersTest.php
+++ b/tests/Endpoints/AccountMembersTest.php
@@ -9,7 +9,10 @@ public function testAddAccountMember()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createAccountMember.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -34,7 +37,10 @@ public function testListAccountMembers()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listAccountMembers.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
diff --git a/tests/Endpoints/AccountRolesTest.php b/tests/Endpoints/AccountRolesTest.php
index a9f349cd..b10326f5 100644
--- a/tests/Endpoints/AccountRolesTest.php
+++ b/tests/Endpoints/AccountRolesTest.php
@@ -12,7 +12,10 @@ public function testListAccountRoles()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listAccountRoles.json');
- $adapter = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $adapter = $this->getMockBuilder(Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$adapter->method('get')->willReturn($response);
$adapter->expects($this->once())
diff --git a/tests/Endpoints/AccountsTest.php b/tests/Endpoints/AccountsTest.php
index d7905d15..f0c01cb0 100644
--- a/tests/Endpoints/AccountsTest.php
+++ b/tests/Endpoints/AccountsTest.php
@@ -1,6 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/listAccounts.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -43,7 +45,10 @@ public function testAddAccountWithDefaultType()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createStandardAccount.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -66,7 +71,10 @@ public function testAddAccountWithCustomType()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createEnterpriseAccount.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
diff --git a/tests/Endpoints/CertificatesTest.php b/tests/Endpoints/CertificatesTest.php
index 95057c7c..c0f39c05 100644
--- a/tests/Endpoints/CertificatesTest.php
+++ b/tests/Endpoints/CertificatesTest.php
@@ -1,7 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/listCertificates.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -42,7 +43,10 @@ public function testGetCertificate()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getCertificate.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -73,7 +77,10 @@ public function testRevokeCertificate()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getCertificate.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -95,15 +102,18 @@ public function testRevokeCertificate()
public function testCreateCertificate()
{
- $certificate = new Certificate();
+ $certificate = new \Cloudflare\API\Configurations\Certificate();
$certificate->setHostnames(['foo.example.com', 'bar.exapmle.com']);
- $certificate->setRequestType(Certificate::ORIGIN_ECC);
+ $certificate->setRequestType(\Cloudflare\API\Configurations\Certificate::ORIGIN_ECC);
$certificate->setRequestedValidity(365);
$certificate->setCsr('some-csr-data-barbar');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getCertificate.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
diff --git a/tests/Endpoints/CryptoTest.php b/tests/Endpoints/CryptoTest.php
index af0f058b..b1f77b1f 100644
--- a/tests/Endpoints/CryptoTest.php
+++ b/tests/Endpoints/CryptoTest.php
@@ -1,15 +1,15 @@
getPsr7JsonResponseForFixture('Endpoints/getOpportunisticEncryptionSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -18,7 +18,7 @@ public function testGetOpportunisticEncryptionSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/opportunistic_encryption')
);
- $cryptoMock = new Crypto($mock);
+ $cryptoMock = new \Cloudflare\API\Endpoints\Crypto($mock);
$result = $cryptoMock->getOpportunisticEncryptionSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -28,7 +28,10 @@ public function testGetOnionRoutingSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getOnionRoutingSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -37,7 +40,7 @@ public function testGetOnionRoutingSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/opportunistic_onion')
);
- $cryptoMock = new Crypto($mock);
+ $cryptoMock = new \Cloudflare\API\Endpoints\Crypto($mock);
$result = $cryptoMock->getOnionRoutingSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -47,7 +50,10 @@ public function testUpdateOpportunisticEncryptionSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateOpportunisticEncryptionSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -57,7 +63,7 @@ public function testUpdateOpportunisticEncryptionSetting()
$this->equalTo(['value' => 'off'])
);
- $cryptoMock = new Crypto($mock);
+ $cryptoMock = new \Cloudflare\API\Endpoints\Crypto($mock);
$result = $cryptoMock->updateOpportunisticEncryptionSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'off');
$this->assertTrue($result);
@@ -67,7 +73,10 @@ public function testUpdateOnionRoutingSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateOnionRoutingSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -77,7 +86,7 @@ public function testUpdateOnionRoutingSetting()
$this->equalTo(['value' => 'off'])
);
- $cryptoMock = new Crypto($mock);
+ $cryptoMock = new \Cloudflare\API\Endpoints\Crypto($mock);
$result = $cryptoMock->updateOnionRoutingSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'off');
$this->assertTrue($result);
diff --git a/tests/Endpoints/CustomHostnamesTest.php b/tests/Endpoints/CustomHostnamesTest.php
index 6a6f749a..65a49fa4 100644
--- a/tests/Endpoints/CustomHostnamesTest.php
+++ b/tests/Endpoints/CustomHostnamesTest.php
@@ -6,7 +6,6 @@
* Time: 22:23
*/
-use Cloudflare\API\Adapter\Adapter;
use Cloudflare\API\Endpoints\CustomHostnames;
class CustomHostnamesTest extends TestCase
@@ -17,7 +16,10 @@ public function testAddHostname()
$customSsl = $this->getCustomSsl();
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -68,7 +70,10 @@ public function testListHostnames()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listHostnames.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -86,7 +91,7 @@ public function testListHostnames()
])
);
- $zones = new CustomHostnames($mock);
+ $zones = new \Cloudflare\API\Endpoints\CustomHostnames($mock);
$result = $zones->listHostnames('023e105f4ecef8ad9ca31a8372d0c353', 'app.example.com', '0d89c70d-ad9f-4843-b99f-6cc0252067e9', 1, 20, 'ssl', 'desc', 0);
$this->assertObjectHasProperty('result', $result);
@@ -101,7 +106,10 @@ public function testGetHostname()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getHostname.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -110,7 +118,7 @@ public function testGetHostname()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/0d89c70d-ad9f-4843-b99f-6cc0252067e9')
);
- $zones = new CustomHostnames($mock);
+ $zones = new \Cloudflare\API\Endpoints\CustomHostnames($mock);
$result = $zones->getHostname('023e105f4ecef8ad9ca31a8372d0c353', '0d89c70d-ad9f-4843-b99f-6cc0252067e9', '0d89c70d-ad9f-4843-b99f-6cc0252067e9');
$this->assertObjectHasProperty('id', $result);
@@ -124,7 +132,10 @@ public function testUpdateHostname()
$customSsl = $this->getCustomSsl();
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -150,7 +161,7 @@ public function testUpdateHostname()
])
);
- $zones = new CustomHostnames($mock);
+ $zones = new \Cloudflare\API\Endpoints\CustomHostnames($mock);
$sslSettings = [
'http2' => 'on',
'http3' => 'on',
@@ -181,7 +192,10 @@ public function testDeleteHostname()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteHostname.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -190,7 +204,7 @@ public function testDeleteHostname()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/0d89c70d-ad9f-4843-b99f-6cc0252067e9')
);
- $zones = new CustomHostnames($mock);
+ $zones = new \Cloudflare\API\Endpoints\CustomHostnames($mock);
$result = $zones->deleteHostname('023e105f4ecef8ad9ca31a8372d0c353', '0d89c70d-ad9f-4843-b99f-6cc0252067e9');
$this->assertEquals('0d89c70d-ad9f-4843-b99f-6cc0252067e9', $result->id);
@@ -201,7 +215,10 @@ public function testGetHostnameFallbackOrigin()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getCustomHostnameFallbackOrigin.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $authMock = $this->createMock(\Cloudflare\API\Auth\Auth::class);
+ $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)
+ ->setConstructorArgs([$authMock, 'https://example.com'])
+ ->getMock();
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -210,7 +227,7 @@ public function testGetHostnameFallbackOrigin()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/fallback_origin')
);
- $zones = new CustomHostnames($mock);
+ $zones = new \Cloudflare\API\Endpoints\CustomHostnames($mock);
$result = $zones->getFallbackOrigin('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('origin', $result);
diff --git a/tests/Endpoints/DNSAnalyticsTest.php b/tests/Endpoints/DNSAnalyticsTest.php
index ea3ca8fa..28e693c1 100644
--- a/tests/Endpoints/DNSAnalyticsTest.php
+++ b/tests/Endpoints/DNSAnalyticsTest.php
@@ -1,8 +1,5 @@
getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock
@@ -29,7 +26,7 @@ public function testGetDNSAnalyticsReportTable()
)
);
- $analytics = new DNSAnalytics($mock);
+ $analytics = new \Cloudflare\API\Endpoints\DNSAnalytics($mock);
$since = '2020-02-01T00:00:00Z';
$until = '2020-02-28T23:59:59Z';
$filters = 'responseCode==NOERROR AND queryType==A';
@@ -55,7 +52,7 @@ public function testGetDNSAnalyticsReportByTime()
'Endpoints/getDNSAnalyticsReportByTime.json'
);
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock
@@ -67,7 +64,7 @@ public function testGetDNSAnalyticsReportByTime()
)
);
- $analytics = new DNSAnalytics($mock);
+ $analytics = new \Cloudflare\API\Endpoints\DNSAnalytics($mock);
$since = '2020-02-01T00:00:00Z';
$until = '2020-02-28T23:59:59Z';
$filters = 'responseCode==NOERROR AND queryType==A';
diff --git a/tests/Endpoints/DNSTest.php b/tests/Endpoints/DNSTest.php
index 1a85187e..886ab5a8 100644
--- a/tests/Endpoints/DNSTest.php
+++ b/tests/Endpoints/DNSTest.php
@@ -1,8 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/addRecord.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -31,7 +28,7 @@ public function testAddRecord()
])
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$dns->addRecord('023e105f4ecef8ad9ca31a8372d0c353', 'A', 'example.com', '127.0.0.1', '120', false);
}
@@ -39,7 +36,7 @@ public function testAddMXRecordPriority10()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/addRecord.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -56,7 +53,7 @@ public function testAddMXRecordPriority10()
])
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$dns->addRecord('023e105f4ecef8ad9ca31a8372d0c353', 'MX', 'example.com', '127.0.0.1', '120', false, 10);
}
@@ -64,7 +61,7 @@ public function testAddMXRecordPriority0()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/addRecord.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -81,7 +78,7 @@ public function testAddMXRecordPriority0()
])
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$dns->addRecord('023e105f4ecef8ad9ca31a8372d0c353', 'MX', 'example.com', '127.0.0.1', '120', false, 0);
}
@@ -90,7 +87,7 @@ public function testListRecords()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listRecords.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -109,7 +106,7 @@ public function testListRecords()
])
);
- $zones = new DNS($mock);
+ $zones = new \Cloudflare\API\Endpoints\DNS($mock);
$result = $zones->listRecords('023e105f4ecef8ad9ca31a8372d0c353', 'A', 'example.com', '127.0.0.1', 1, 20, 'type', 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -124,7 +121,7 @@ public function testGetDNSRecordDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getDNSRecordDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -133,7 +130,7 @@ public function testGetDNSRecordDetails()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59')
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$result = $dns->getRecordDetails('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $result->id);
@@ -144,7 +141,7 @@ public function testGetRecordID()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getRecordId.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -153,7 +150,7 @@ public function testGetRecordID()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records')
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$result = $dns->getRecordID('023e105f4ecef8ad9ca31a8372d0c353', 'A', 'example.com');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $result);
@@ -163,7 +160,7 @@ public function testUpdateDNSRecord()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateDNSRecord.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$details = [
@@ -181,7 +178,7 @@ public function testUpdateDNSRecord()
$this->equalTo($details)
);
- $dns = new DNS($mock);
+ $dns = new \Cloudflare\API\Endpoints\DNS($mock);
$result = $dns->updateRecordDetails('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59', $details);
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $result->result->id);
diff --git a/tests/Endpoints/FirewallSettingsTest.php b/tests/Endpoints/FirewallSettingsTest.php
index d136bd0b..de6312eb 100644
--- a/tests/Endpoints/FirewallSettingsTest.php
+++ b/tests/Endpoints/FirewallSettingsTest.php
@@ -1,14 +1,12 @@
getPsr7JsonResponseForFixture('Endpoints/getSecurityLevelSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -17,7 +15,7 @@ public function testGetSecurityLevelSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/security_level')
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->getSecurityLevelSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('medium', $result);
@@ -27,7 +25,7 @@ public function testGetChallengeTTLSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getChallengeTTLSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -36,7 +34,7 @@ public function testGetChallengeTTLSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/challenge_ttl')
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->getChallengeTTLSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals(1800, $result);
@@ -46,7 +44,7 @@ public function testGetBrowserIntegrityCheckSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getBrowserIntegrityCheckSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -55,7 +53,7 @@ public function testGetBrowserIntegrityCheckSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/browser_check')
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->getBrowserIntegrityCheckSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('on', $result);
@@ -65,7 +63,7 @@ public function testUpdateSecurityLevelSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateSecurityLevelSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -75,7 +73,7 @@ public function testUpdateSecurityLevelSetting()
$this->equalTo(['value' => 'medium'])
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->updateSecurityLevelSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'medium');
$this->assertTrue($result);
@@ -85,7 +83,7 @@ public function testUpdateChallengeTTLSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateChallengeTTLSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -95,7 +93,7 @@ public function testUpdateChallengeTTLSetting()
$this->equalTo(['value' => 1800])
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->updateChallengeTTLSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 1800);
$this->assertTrue($result);
@@ -105,7 +103,7 @@ public function testUpdateBrowserIntegrityCheckSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateBrowserIntegrityCheckSetting.json');
- $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -115,7 +113,7 @@ public function testUpdateBrowserIntegrityCheckSetting()
$this->equalTo(['value' => 'on'])
);
- $firewallSettingsMock = new FirewallSettings($mock);
+ $firewallSettingsMock = new \Cloudflare\API\Endpoints\FirewallSettings($mock);
$result = $firewallSettingsMock->updateBrowserIntegrityCheckSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'on');
$this->assertTrue($result);
diff --git a/tests/Endpoints/FirewallTest.php b/tests/Endpoints/FirewallTest.php
index a1b50fb5..4812b48b 100644
--- a/tests/Endpoints/FirewallTest.php
+++ b/tests/Endpoints/FirewallTest.php
@@ -1,16 +1,12 @@
getPsr7JsonResponseForFixture('Endpoints/createFirewallRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -37,7 +33,7 @@ public function testCreatePageRules()
])
);
- $firewall = new Firewall($mock);
+ $firewall = new Cloudflare\API\Endpoints\Firewall($mock);
$result = $firewall->createFirewallRules(
'023e105f4ecef8ad9ca31a8372d0c353',
[
@@ -66,7 +62,7 @@ public function testCreatePageRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createFirewallRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -86,8 +82,8 @@ public function testCreatePageRule()
])
);
- $firewall = new Firewall($mock);
- $options = new FirewallRuleOptions();
+ $firewall = new Cloudflare\API\Endpoints\Firewall($mock);
+ $options = new \Cloudflare\API\Configurations\FirewallRuleOptions();
$options->setActionBlock();
$result = $firewall->createFirewallRule(
'023e105f4ecef8ad9ca31a8372d0c353',
@@ -102,7 +98,7 @@ public function testListFirewallRules()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listFirewallRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -115,7 +111,7 @@ public function testListFirewallRules()
])
);
- $firewall = new Firewall($mock);
+ $firewall = new Cloudflare\API\Endpoints\Firewall($mock);
$result = $firewall->listFirewallRules('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('result', $result);
@@ -128,7 +124,7 @@ public function testDeleteFirewallRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteFirewallRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -137,7 +133,7 @@ public function testDeleteFirewallRule()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/rules/970b10321e3f4adda674c912b5f76591')
);
- $firewall = new Firewall($mock);
+ $firewall = new Cloudflare\API\Endpoints\Firewall($mock);
$firewall->deleteFirewallRule('023e105f4ecef8ad9ca31a8372d0c353', '970b10321e3f4adda674c912b5f76591');
}
@@ -145,7 +141,7 @@ public function testUpdateFirewallRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateFirewallRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -165,8 +161,8 @@ public function testUpdateFirewallRule()
])
);
- $firewall = new Firewall($mock);
- $options = new FirewallRuleOptions();
+ $firewall = new Cloudflare\API\Endpoints\Firewall($mock);
+ $options = new \Cloudflare\API\Configurations\FirewallRuleOptions();
$options->setActionBlock();
$result = $firewall->updateFirewallRule(
'023e105f4ecef8ad9ca31a8372d0c353',
diff --git a/tests/Endpoints/IPsTest.php b/tests/Endpoints/IPsTest.php
index b524b55b..e8c265d2 100644
--- a/tests/Endpoints/IPsTest.php
+++ b/tests/Endpoints/IPsTest.php
@@ -1,8 +1,4 @@
getPsr7JsonResponseForFixture('Endpoints/listIPs.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -25,7 +21,7 @@ public function testListIPs()
$this->equalTo('ips')
);
- $ipsMock = new IPs($mock);
+ $ipsMock = new \Cloudflare\API\Endpoints\IPs($mock);
$ips = $ipsMock->listIPs();
$this->assertObjectHasProperty('ipv4_cidrs', $ips);
$this->assertObjectHasProperty('ipv6_cidrs', $ips);
diff --git a/tests/Endpoints/LoadBalancersTest.php b/tests/Endpoints/LoadBalancersTest.php
index 46a11287..0524aa94 100644
--- a/tests/Endpoints/LoadBalancersTest.php
+++ b/tests/Endpoints/LoadBalancersTest.php
@@ -24,7 +24,7 @@ public function testCreateLoadBalancer()
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createLoadBalancer.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -45,7 +45,7 @@ public function testListLoadBalancer()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listLoadBalancers.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -63,7 +63,7 @@ public function testGetLoadBalancerDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getLoadBalancerDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -89,7 +89,7 @@ public function testUpdateLoadBalancer()
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateLoadBalancer.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -110,7 +110,7 @@ public function testDeleteLoadBalancer()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteLoadBalancer.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
diff --git a/tests/Endpoints/MembershipTest.php b/tests/Endpoints/MembershipTest.php
index c542094d..6a80f29d 100644
--- a/tests/Endpoints/MembershipTest.php
+++ b/tests/Endpoints/MembershipTest.php
@@ -1,16 +1,13 @@
getPsr7JsonResponseForFixture('Endpoints/listMemberships.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -27,7 +24,7 @@ public function testListMemberships()
])
);
- $zones = new Membership($mock);
+ $zones = new \Cloudflare\API\Endpoints\Membership($mock);
$result = $zones->listMemberships('Demo Account', 'accepted', 1, 20, 'status', 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -42,10 +39,10 @@ public function testGetMembershipDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getMembershipDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
- $membership = new Membership($mock);
+ $membership = new \Cloudflare\API\Endpoints\Membership($mock);
$details = $membership->getMembershipDetails('4536bcfad5faccb111b47003c79917fa');
$this->assertObjectHasProperty('id', $details);
@@ -59,7 +56,7 @@ public function testUpdateMembershipDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateMembershipStatus.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -71,7 +68,7 @@ public function testUpdateMembershipDetails()
])
);
- $membership = new Membership($mock);
+ $membership = new \Cloudflare\API\Endpoints\Membership($mock);
$membership->updateMembershipStatus('4536bcfad5faccb111b47003c79917fa', 'accepted');
$this->assertEquals('4536bcfad5faccb111b47003c79917fa', $membership->getBody()->result->id);
}
@@ -80,14 +77,14 @@ public function testDeleteMembership()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteMembership.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
->method('delete')
->with($this->equalTo('memberships/4536bcfad5faccb111b47003c79917fa'));
- $membership = new Membership($mock);
+ $membership = new \Cloudflare\API\Endpoints\Membership($mock);
$membership->deleteMembership('4536bcfad5faccb111b47003c79917fa');
diff --git a/tests/Endpoints/PageRulesTest.php b/tests/Endpoints/PageRulesTest.php
index 9b319b44..ac5d0907 100644
--- a/tests/Endpoints/PageRulesTest.php
+++ b/tests/Endpoints/PageRulesTest.php
@@ -1,10 +1,4 @@
setAlwaysOnline(true);
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createPageRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -37,7 +31,7 @@ public function testCreatePageRule()
])
);
- $pageRules = new PageRules($mock);
+ $pageRules = new \Cloudflare\API\Endpoints\PageRules($mock);
$result = $pageRules->createPageRule('023e105f4ecef8ad9ca31a8372d0c353', $target, $action, true, 1);
$this->assertTrue($result);
@@ -48,7 +42,7 @@ public function testListPageRules()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listPageRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -63,7 +57,7 @@ public function testListPageRules()
])
);
- $pageRules = new PageRules($mock);
+ $pageRules = new \Cloudflare\API\Endpoints\PageRules($mock);
$pageRules->listPageRules('023e105f4ecef8ad9ca31a8372d0c353', 'active', 'status', 'desc', 'all');
$this->assertEquals('9a7806061c88ada191ed06f989cc3dac', $pageRules->getBody()->result[0]->id);
}
@@ -72,7 +66,7 @@ public function testGetPageRuleDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getPageRuleDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -81,20 +75,20 @@ public function testGetPageRuleDetails()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac')
);
- $pageRules = new PageRules($mock);
+ $pageRules = new \Cloudflare\API\Endpoints\PageRules($mock);
$pageRules->getPageRuleDetails('023e105f4ecef8ad9ca31a8372d0c353', '9a7806061c88ada191ed06f989cc3dac');
$this->assertEquals('9a7806061c88ada191ed06f989cc3dac', $pageRules->getBody()->result->id);
}
public function testUpdatePageRule()
{
- $target = new PageRulesTargets('*example.com/images/*');
- $action = new PageRulesActions();
+ $target = new \Cloudflare\API\Configurations\PageRulesTargets('*example.com/images/*');
+ $action = new \Cloudflare\API\Configurations\PageRulesActions();
$action->setAlwaysOnline(true);
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updatePageRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -109,7 +103,7 @@ public function testUpdatePageRule()
])
);
- $pageRules = new PageRules($mock);
+ $pageRules = new \Cloudflare\API\Endpoints\PageRules($mock);
$result = $pageRules->updatePageRule('023e105f4ecef8ad9ca31a8372d0c353', '9a7806061c88ada191ed06f989cc3dac', $target, $action, true, 1);
$this->assertTrue($result);
@@ -120,7 +114,7 @@ public function testDeletePageRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deletePageRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -129,7 +123,7 @@ public function testDeletePageRule()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac')
);
- $pageRules = new PageRules($mock);
+ $pageRules = new \Cloudflare\API\Endpoints\PageRules($mock);
$result = $pageRules->deletePageRule('023e105f4ecef8ad9ca31a8372d0c353', '9a7806061c88ada191ed06f989cc3dac');
$this->assertTrue($result);
diff --git a/tests/Endpoints/PoolsTest.php b/tests/Endpoints/PoolsTest.php
index 7891296a..8a70ca3d 100644
--- a/tests/Endpoints/PoolsTest.php
+++ b/tests/Endpoints/PoolsTest.php
@@ -2,7 +2,6 @@
use Cloudflare\API\Adapter\Adapter;
use Cloudflare\API\Endpoints\Pools;
-use Cloudflare\API\Configurations\Pool;
/**
* @author Martijn Smidt
@@ -23,11 +22,11 @@ public function testCreatePool()
]
];
- $poolConfiguration = new Pool('primary-dc-1', $origins);
+ $poolConfiguration = new \Cloudflare\API\Configurations\Pool('primary-dc-1', $origins);
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createPool.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -48,7 +47,7 @@ public function testListPools()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listPools.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -66,7 +65,7 @@ public function testGetPoolDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getPoolDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -91,11 +90,11 @@ public function testUpdatePool()
]
];
- $poolConfiguration = new Pool('primary-dc-1', $origins);
+ $poolConfiguration = new \Cloudflare\API\Configurations\Pool('primary-dc-1', $origins);
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updatePool.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -116,7 +115,7 @@ public function testDeletePool()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deletePool.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
diff --git a/tests/Endpoints/RailgunTest.php b/tests/Endpoints/RailgunTest.php
index d1011a71..200ff79a 100644
--- a/tests/Endpoints/RailgunTest.php
+++ b/tests/Endpoints/RailgunTest.php
@@ -1,8 +1,4 @@
getPsr7JsonResponseForFixture('Endpoints/createRailgun.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -30,7 +26,7 @@ public function testcreate()
$this->equalTo(['name' => $details['name']])
);
- $railgun = new Railgun($mock);
+ $railgun = new \Cloudflare\API\Endpoints\Railgun($mock);
$result = $railgun->create($details['name']);
$this->assertObjectHasProperty('result', $result);
@@ -45,7 +41,7 @@ public function testlist()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listRailguns.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -59,7 +55,7 @@ public function testlist()
])
);
- $railgun = new Railgun($mock);
+ $railgun = new \Cloudflare\API\Endpoints\Railgun($mock);
$result = $railgun->list(1, 20, 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -71,7 +67,7 @@ public function testget()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getRailgun.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -80,7 +76,7 @@ public function testget()
$this->equalTo('railguns/e928d310693a83094309acf9ead50448')
);
- $railgun = new Railgun($mock);
+ $railgun = new \Cloudflare\API\Endpoints\Railgun($mock);
$result = $railgun->get('e928d310693a83094309acf9ead50448');
$this->assertEquals('e928d310693a83094309acf9ead50448', $result->id);
@@ -91,7 +87,7 @@ public function testgetZones()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listRailgunZones.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -100,7 +96,7 @@ public function testgetZones()
$this->equalTo('railguns/e928d310693a83094309acf9ead50448/zones')
);
- $railgun = new Railgun($mock);
+ $railgun = new \Cloudflare\API\Endpoints\Railgun($mock);
$result = $railgun->getZones('e928d310693a83094309acf9ead50448');
$this->assertObjectHasProperty('result', $result);
@@ -112,7 +108,7 @@ public function testupdate()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateRailgun.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$details = [
@@ -126,7 +122,7 @@ public function testupdate()
$this->equalTo($details)
);
- $waf = new Railgun($mock);
+ $waf = new \Cloudflare\API\Endpoints\Railgun($mock);
$result = $waf->update('e928d310693a83094309acf9ead50448', true);
$this->assertEquals('e928d310693a83094309acf9ead50448', $result->id);
@@ -137,7 +133,7 @@ public function testdelete()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteRailgun.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -146,7 +142,7 @@ public function testdelete()
$this->equalTo('railguns/e928d310693a83094309acf9ead50448')
);
- $waf = new Railgun($mock);
+ $waf = new \Cloudflare\API\Endpoints\Railgun($mock);
$waf->delete('e928d310693a83094309acf9ead50448');
$this->assertEquals('e928d310693a83094309acf9ead50448', $waf->getBody()->result->id);
}
diff --git a/tests/Endpoints/SSLTest.php b/tests/Endpoints/SSLTest.php
index e6c05ca7..7140a87e 100644
--- a/tests/Endpoints/SSLTest.php
+++ b/tests/Endpoints/SSLTest.php
@@ -1,15 +1,12 @@
getPsr7JsonResponseForFixture('Endpoints/getSSLSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -18,7 +15,7 @@ public function testGetSSLSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/ssl')
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->getSSLSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -28,7 +25,7 @@ public function testGetSSLVerificationStatus()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getSSLVerificationStatus.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -37,7 +34,7 @@ public function testGetSSLVerificationStatus()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/ssl/verification')
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->getSSLVerificationStatus('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertObjectHasProperty('result', $result);
@@ -48,7 +45,7 @@ public function testGetHTTPSRedirectSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getHTTPSRedirectSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -57,7 +54,7 @@ public function testGetHTTPSRedirectSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/always_use_https')
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->getHTTPSRedirectSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -67,7 +64,7 @@ public function testGetHTTPSRewritesSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getHTTPSRewritesSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -76,7 +73,7 @@ public function testGetHTTPSRewritesSetting()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/automatic_https_rewrites')
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->getHTTPSRewritesSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -86,7 +83,7 @@ public function testUpdateSSLSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateSSLSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -96,7 +93,7 @@ public function testUpdateSSLSetting()
$this->equalTo(['value' => 'full'])
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->updateSSLSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'full');
$this->assertTrue($result);
@@ -106,7 +103,7 @@ public function testUpdateHTTPSRedirectSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateHTTPSRedirectSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -116,7 +113,7 @@ public function testUpdateHTTPSRedirectSetting()
$this->equalTo(['value' => 'off'])
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->updateHTTPSRedirectSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'off');
$this->assertTrue($result);
@@ -126,7 +123,7 @@ public function testUpdateHTTPSRewritesSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateHTTPSRewritesSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -136,7 +133,7 @@ public function testUpdateHTTPSRewritesSetting()
$this->equalTo(['value' => 'off'])
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->updateHTTPSRewritesSetting('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'off');
$this->assertTrue($result);
@@ -146,7 +143,7 @@ public function testUpdateSSLCertificatePackValidationMethod()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateSSLCertificatePackValidationMethod.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -156,7 +153,7 @@ public function testUpdateSSLCertificatePackValidationMethod()
$this->equalTo(['validation_method' => 'txt'])
);
- $sslMock = new SSL($mock);
+ $sslMock = new \Cloudflare\API\Endpoints\SSL($mock);
$result = $sslMock->updateSSLCertificatePackValidationMethod('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'a77f8bd7-3b47-46b4-a6f1-75cf98109948', 'txt');
$this->assertTrue($result);
diff --git a/tests/Endpoints/TLSTest.php b/tests/Endpoints/TLSTest.php
index 7a33744e..9268bc3f 100644
--- a/tests/Endpoints/TLSTest.php
+++ b/tests/Endpoints/TLSTest.php
@@ -1,8 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/getTLSClientAuth.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -25,7 +22,7 @@ public function testGetTLSClientAuth()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/settings/tls_client_auth')
);
- $tlsMock = new TLS($mock);
+ $tlsMock = new \Cloudflare\API\Endpoints\TLS($mock);
$result = $tlsMock->getTLSClientAuth('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertEquals('off', $result);
@@ -35,7 +32,7 @@ public function testEnableTLS13()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/enableTLS13.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -45,7 +42,7 @@ public function testEnableTLS13()
$this->equalTo(['value' => 'on'])
);
- $tlsMock = new TLS($mock);
+ $tlsMock = new \Cloudflare\API\Endpoints\TLS($mock);
$result = $tlsMock->enableTLS13('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', true);
$this->assertTrue($result);
@@ -55,7 +52,7 @@ public function testDisableTLS13()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/disableTLS13.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -65,7 +62,7 @@ public function testDisableTLS13()
$this->equalTo(['value' => 'off'])
);
- $tlsMock = new TLS($mock);
+ $tlsMock = new \Cloudflare\API\Endpoints\TLS($mock);
$result = $tlsMock->disableTLS13('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', true);
$this->assertTrue($result);
@@ -75,7 +72,7 @@ public function testChangeMinimimTLSVersion()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/changeMinimumTLSVersion.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -85,7 +82,7 @@ public function testChangeMinimimTLSVersion()
$this->equalTo(['value' => '1.1'])
);
- $tlsMock = new TLS($mock);
+ $tlsMock = new \Cloudflare\API\Endpoints\TLS($mock);
$result = $tlsMock->changeMinimumTLSVersion('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', '1.1');
$this->assertTrue($result);
@@ -95,7 +92,7 @@ public function testUpdateTLSClientAuth()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateTLSClientAuth.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -105,7 +102,7 @@ public function testUpdateTLSClientAuth()
$this->equalTo(['value' => 'off'])
);
- $tlsMock = new TLS($mock);
+ $tlsMock = new \Cloudflare\API\Endpoints\TLS($mock);
$result = $tlsMock->updateTLSClientAuth('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', 'off');
$this->assertTrue($result);
diff --git a/tests/Endpoints/UARulesTest.php b/tests/Endpoints/UARulesTest.php
index 7db9642b..2db0cff6 100644
--- a/tests/Endpoints/UARulesTest.php
+++ b/tests/Endpoints/UARulesTest.php
@@ -1,9 +1,4 @@
getPsr7JsonResponseForFixture('Endpoints/listRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -30,7 +25,7 @@ public function testListRules()
])
);
- $zones = new UARules($mock);
+ $zones = new \Cloudflare\API\Endpoints\UARules($mock);
$result = $zones->listRules('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('result', $result);
@@ -43,12 +38,12 @@ public function testListRules()
public function testCreateRule()
{
- $config = new UARulesConfiguration();
+ $config = new \Cloudflare\API\Configurations\UARules();
$config->addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -63,7 +58,7 @@ public function testCreateRule()
])
);
- $rules = new UARules($mock);
+ $rules = new \Cloudflare\API\Endpoints\UARules($mock);
$rules->createRule(
'023e105f4ecef8ad9ca31a8372d0c353',
'js_challenge',
@@ -78,7 +73,7 @@ public function getRuleDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getRuleDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -87,7 +82,7 @@ public function getRuleDetails()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59')
);
- $lockdown = new UARules($mock);
+ $lockdown = new \Cloudflare\API\Endpoints\UARules($mock);
$result = $lockdown->getRuleDetails('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $result->id);
@@ -96,12 +91,12 @@ public function getRuleDetails()
public function testUpdateRule()
{
- $config = new UARulesConfiguration();
+ $config = new \Cloudflare\API\Configurations\UARules();
$config->addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -116,7 +111,7 @@ public function testUpdateRule()
])
);
- $rules = new UARules($mock);
+ $rules = new \Cloudflare\API\Endpoints\UARules($mock);
$rules->updateRule(
'023e105f4ecef8ad9ca31a8372d0c353',
'372e67954025e0ba6aaa6d586b9e0b59',
@@ -131,7 +126,7 @@ public function testDeleteRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -140,7 +135,7 @@ public function testDeleteRule()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules/372e67954025e0ba6aaa6d586b9e0b59')
);
- $rules = new UARules($mock);
+ $rules = new \Cloudflare\API\Endpoints\UARules($mock);
$rules->deleteRule('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $rules->getBody()->result->id);
}
diff --git a/tests/Endpoints/UserTest.php b/tests/Endpoints/UserTest.php
index e92a8164..b29acc8e 100644
--- a/tests/Endpoints/UserTest.php
+++ b/tests/Endpoints/UserTest.php
@@ -1,8 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/getUserDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
- $user = new User($mock);
+ $user = new \Cloudflare\API\Endpoints\User($mock);
$details = $user->getUserDetails();
$this->assertObjectHasProperty('id', $details);
@@ -31,10 +28,10 @@ public function testGetUserID()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getUserId.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
- $user = new User($mock);
+ $user = new \Cloudflare\API\Endpoints\User($mock);
$this->assertEquals('7c5dae5552338874e5053f2534d2767a', $user->getUserID());
$this->assertEquals('7c5dae5552338874e5053f2534d2767a', $user->getBody()->result->id);
}
@@ -43,12 +40,12 @@ public function testGetUserEmail()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getUserEmail.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())->method('get');
- $user = new User($mock);
+ $user = new \Cloudflare\API\Endpoints\User($mock);
$this->assertEquals('user@example.com', $user->getUserEmail());
$this->assertEquals('user@example.com', $user->getBody()->result->email);
}
@@ -57,14 +54,14 @@ public function testUpdateUserDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateUserDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
->method('patch')
->with($this->equalTo('user'), $this->equalTo(['email' => 'user2@example.com']));
- $user = new User($mock);
+ $user = new \Cloudflare\API\Endpoints\User($mock);
$user->updateUserDetails(['email' => 'user2@example.com']);
$this->assertEquals('7c5dae5552338874e5053f2534d2767a', $user->getBody()->result->id);
}
diff --git a/tests/Endpoints/WAFTest.php b/tests/Endpoints/WAFTest.php
index 0d244e53..2074d563 100644
--- a/tests/Endpoints/WAFTest.php
+++ b/tests/Endpoints/WAFTest.php
@@ -1,8 +1,4 @@
getPsr7JsonResponseForFixture('Endpoints/listPackages.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -32,7 +28,7 @@ public function testgetPackages()
])
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->getPackages('023e105f4ecef8ad9ca31a8372d0c353', 1, 20, 'status', 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -47,7 +43,7 @@ public function testgetPackageInfo()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getPackageInfo.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -56,7 +52,7 @@ public function testgetPackageInfo()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b')
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->getPackageInfo('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b');
$this->assertEquals('a25a9a7e9c00afc1fb2e0245519d725b', $result->id);
@@ -67,7 +63,7 @@ public function testgetRules()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listPackageRules.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -83,7 +79,7 @@ public function testgetRules()
])
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->getRules('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 1, 20, 'status', 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -98,7 +94,7 @@ public function testgetRuleInfo()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getPackageRuleInfo.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -107,7 +103,7 @@ public function testgetRuleInfo()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/rules/f939de3be84e66e757adcdcb87908023')
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->getRuleInfo('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 'f939de3be84e66e757adcdcb87908023');
$this->assertEquals('f939de3be84e66e757adcdcb87908023', $result->id);
@@ -118,7 +114,7 @@ public function testupdateRule()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updatePackageRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$details = [
@@ -132,7 +128,7 @@ public function testupdateRule()
$this->equalTo($details)
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->updateRule('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 'f939de3be84e66e757adcdcb87908023', 'on');
$this->assertEquals('f939de3be84e66e757adcdcb87908023', $result->id);
@@ -145,40 +141,14 @@ public function testupdateRule()
public function getGroups(): array
{
- $response = $this->getPsr7JsonResponseForFixture('Endpoints/listPackageGroups.json');
-
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
- $mock->method('get')->willReturn($response);
-
- $mock->expects($this->once())
- ->method('get')
- ->with(
- $this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/groups'),
- $this->equalTo([
- 'page' => 1,
- 'per_page' => 20,
- 'match' => 'all',
- 'order' => 'status',
- 'direction' => 'desc'
- ])
- );
-
- $waf = new WAF($mock);
- $result = $waf->getGroups('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 1, 20, 'status', 'desc');
-
- $this->assertObjectHasProperty('result', $result);
- $this->assertObjectHasProperty('result_info', $result);
-
- $this->assertEquals('de677e5818985db1285d0e80225f06e5', $result->result[0]->id);
- $this->assertEquals(1, $result->result_info->page);
- $this->assertEquals('de677e5818985db1285d0e80225f06e5', $waf->getBody()->result[0]->id);
+ return parent::getGroups();
}
public function testgetGroupInfo()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getPackageGroupInfo.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -187,7 +157,7 @@ public function testgetGroupInfo()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/groups/de677e5818985db1285d0e80225f06e5')
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->getGroupInfo('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 'de677e5818985db1285d0e80225f06e5');
$this->assertEquals('de677e5818985db1285d0e80225f06e5', $result->id);
@@ -198,7 +168,7 @@ public function testupdateGroup()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updatePackageGroup.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$details = [
@@ -212,7 +182,7 @@ public function testupdateGroup()
$this->equalTo($details)
);
- $waf = new WAF($mock);
+ $waf = new \Cloudflare\API\Endpoints\WAF($mock);
$result = $waf->updateGroup('023e105f4ecef8ad9ca31a8372d0c353', 'a25a9a7e9c00afc1fb2e0245519d725b', 'de677e5818985db1285d0e80225f06e5', 'off');
$this->assertEquals('de677e5818985db1285d0e80225f06e5', $result->id);
diff --git a/tests/Endpoints/ZoneCacheTest.php b/tests/Endpoints/ZoneCacheTest.php
index 52b68554..f2129186 100644
--- a/tests/Endpoints/ZoneCacheTest.php
+++ b/tests/Endpoints/ZoneCacheTest.php
@@ -1,15 +1,12 @@
getPsr7JsonResponseForFixture('Endpoints/cachePurgeEverything.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -19,7 +16,7 @@ public function testCachePurgeEverything()
$this->equalTo(['purge_everything' => true])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->cachePurgeEverything('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertTrue($result);
@@ -30,7 +27,7 @@ public function testCachePurgeHost()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/cachePurgeHost.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -46,7 +43,7 @@ public function testCachePurgeHost()
)
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->cachePurge('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', [], [], ['dash.cloudflare.com']);
$this->assertTrue($result);
@@ -57,20 +54,21 @@ public function testCachePurge()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/cachePurge.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
->method('post')
->with(
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/purge_cache'),
- $this->equalTo(['files' => [
- 'https://example.com/file.jpg',
- ]
+ $this->equalTo([
+ 'files' => [
+ 'https://example.com/file.jpg',
+ ]
])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->cachePurge('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', [
'https://example.com/file.jpg',
]);
@@ -78,4 +76,106 @@ public function testCachePurge()
$this->assertTrue($result);
$this->assertEquals('023e105f4ecef8ad9ca31a8372d0c353', $zones->getBody()->result->id);
}
+
+ public function testCachePurgeIncludingEnvironments()
+ {
+ $envResp = $this->getPsr7JsonResponseForFixture('Endpoints/getEnvironments.json');
+ $cacheResp = $this->getPsr7JsonResponseForFixture('Endpoints/cachePurge.json');
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
+
+ $mock->expects($this->once())
+ ->method('get')
+ ->willReturn($envResp)
+ ->with(
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments')
+ );
+
+ $mock->expects($this->exactly(4))
+ ->method('post')
+ ->willReturn($cacheResp)
+ ->withConsecutive(
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/first/purge_cache'),
+ $this->equalTo([
+ 'files' => [
+ 'https://example.com/file.jpg',
+ ]
+ ])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/second/purge_cache'),
+ $this->equalTo([
+ 'files' => [
+ 'https://example.com/file.jpg',
+ ]
+ ])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/third/purge_cache'),
+ $this->equalTo([
+ 'files' => [
+ 'https://example.com/file.jpg',
+ ]
+ ])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/purge_cache'),
+ $this->equalTo([
+ 'files' => [
+ 'https://example.com/file.jpg',
+ ]
+ ])
+ ]
+ );
+
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
+ $result = $zones->cachePurge('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', [
+ 'https://example.com/file.jpg',
+ ], null, null, true);
+
+ $this->assertTrue($result);
+ $this->assertEquals('023e105f4ecef8ad9ca31a8372d0c353', $zones->getBody()->result->id);
+ }
+
+ public function testCachePurgeEverythingIncludingEnvironments()
+ {
+ $envResp = $this->getPsr7JsonResponseForFixture('Endpoints/getEnvironments.json');
+ $cacheResp = $this->getPsr7JsonResponseForFixture('Endpoints/cachePurgeEverything.json');
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
+
+ $mock->expects($this->once())
+ ->method('get')
+ ->willReturn($envResp)
+ ->with(
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments')
+ );
+
+ $mock->expects($this->exactly(4))
+ ->method('post')
+ ->willReturn($cacheResp)
+ ->withConsecutive(
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/first/purge_cache'),
+ $this->equalTo(['purge_everything' => true])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/second/purge_cache'),
+ $this->equalTo(['purge_everything' => true])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/environments/third/purge_cache'),
+ $this->equalTo(['purge_everything' => true])
+ ],
+ [
+ $this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/purge_cache'),
+ $this->equalTo(['purge_everything' => true])
+ ]
+ );
+
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
+ $result = $zones->cachePurgeEverything('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', true);
+
+ $this->assertTrue($result);
+ $this->assertEquals('023e105f4ecef8ad9ca31a8372d0c353', $zones->getBody()->result->id);
+ }
}
diff --git a/tests/Endpoints/ZoneDeleteTest.php b/tests/Endpoints/ZoneDeleteTest.php
index fb24499e..a207d59f 100644
--- a/tests/Endpoints/ZoneDeleteTest.php
+++ b/tests/Endpoints/ZoneDeleteTest.php
@@ -1,21 +1,17 @@
getPsr7JsonResponseForFixture('Endpoints/deleteZoneTest.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
->method('delete')
->with(
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353')
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->deleteZone('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertTrue($result);
$this->assertEquals('9a7806061c88ada191ed06f989cc3dac', $zones->getBody()->result->id);
diff --git a/tests/Endpoints/ZoneLockdownTest.php b/tests/Endpoints/ZoneLockdownTest.php
index 228349af..64a222e2 100644
--- a/tests/Endpoints/ZoneLockdownTest.php
+++ b/tests/Endpoints/ZoneLockdownTest.php
@@ -1,9 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/listLockdowns.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -29,7 +25,7 @@ public function testListLockdowns()
])
);
- $zones = new ZoneLockdown($mock);
+ $zones = new \Cloudflare\API\Endpoints\ZoneLockdown($mock);
$result = $zones->listLockdowns('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('result', $result);
@@ -42,12 +38,12 @@ public function testListLockdowns()
public function testAddLockdown()
{
- $config = new ZoneLockdownConfiguration();
+ $config = new \Cloudflare\API\Configurations\ZoneLockdown();
$config->addIP('1.2.3.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/addLockdown.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -62,7 +58,7 @@ public function testAddLockdown()
])
);
- $zoneLockdown = new ZoneLockdown($mock);
+ $zoneLockdown = new \Cloudflare\API\Endpoints\ZoneLockdown($mock);
$zoneLockdown->createLockdown(
'023e105f4ecef8ad9ca31a8372d0c353',
['api.mysite.com/some/endpoint*'],
@@ -77,7 +73,7 @@ public function testGetRecordDetails()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getRecordDetails.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -86,7 +82,7 @@ public function testGetRecordDetails()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59')
);
- $lockdown = new ZoneLockdown($mock);
+ $lockdown = new \Cloudflare\API\Endpoints\ZoneLockdown($mock);
$result = $lockdown->getLockdownDetails('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $result->id);
@@ -95,12 +91,12 @@ public function testGetRecordDetails()
public function testUpdateLockdown()
{
- $config = new ZoneLockdownConfiguration();
+ $config = new \Cloudflare\API\Configurations\ZoneLockdown();
$config->addIP('1.2.3.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateLockdown.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -115,7 +111,7 @@ public function testUpdateLockdown()
])
);
- $zoneLockdown = new ZoneLockdown($mock);
+ $zoneLockdown = new \Cloudflare\API\Endpoints\ZoneLockdown($mock);
$zoneLockdown->updateLockdown(
'023e105f4ecef8ad9ca31a8372d0c353',
'372e67954025e0ba6aaa6d586b9e0b59',
@@ -128,12 +124,12 @@ public function testUpdateLockdown()
public function testDeleteLockdown()
{
- $config = new ZoneLockdownConfiguration();
+ $config = new \Cloudflare\API\Configurations\ZoneLockdown();
$config->addIP('1.2.3.4');
$response = $this->getPsr7JsonResponseForFixture('Endpoints/deleteLockdown.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('delete')->willReturn($response);
$mock->expects($this->once())
@@ -142,7 +138,7 @@ public function testDeleteLockdown()
$this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/lockdowns/372e67954025e0ba6aaa6d586b9e0b59')
);
- $zoneLockdown = new ZoneLockdown($mock);
+ $zoneLockdown = new \Cloudflare\API\Endpoints\ZoneLockdown($mock);
$zoneLockdown->deleteLockdown('023e105f4ecef8ad9ca31a8372d0c353', '372e67954025e0ba6aaa6d586b9e0b59');
$this->assertEquals('372e67954025e0ba6aaa6d586b9e0b59', $zoneLockdown->getBody()->result->id);
}
diff --git a/tests/Endpoints/ZoneSettingsTest.php b/tests/Endpoints/ZoneSettingsTest.php
index 3f3ba93e..e342908a 100644
--- a/tests/Endpoints/ZoneSettingsTest.php
+++ b/tests/Endpoints/ZoneSettingsTest.php
@@ -11,7 +11,7 @@ public function testGetServerSideExcludeSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getServerSideExclude.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())->method('get');
@@ -26,7 +26,7 @@ public function testUpdateServerSideExcludeSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateServerSideExclude.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())->method('patch');
@@ -41,7 +41,7 @@ public function testGetBrowserCacheTtlSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getBrowserCacheTtlSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())->method('get');
@@ -56,7 +56,7 @@ public function testUpdateBrowserCacheTtlSetting()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/updateBrowserCacheTtlSetting.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())->method('patch');
diff --git a/tests/Endpoints/ZoneSubscriptionsTest.php b/tests/Endpoints/ZoneSubscriptionsTest.php
index 8a81fa85..ccc356a0 100644
--- a/tests/Endpoints/ZoneSubscriptionsTest.php
+++ b/tests/Endpoints/ZoneSubscriptionsTest.php
@@ -9,7 +9,7 @@ public function testListZoneSubscriptions()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listZoneSubscriptions.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -30,7 +30,7 @@ public function testAddZoneSubscriptionIfMissing()
$postResponse = $this->getPsr7JsonResponseForFixture('Endpoints/createZoneSubscription.json');
$getResponse = $this->getPsr7JsonResponseForFixture('Endpoints/listEmptyZoneSubscriptions.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($postResponse);
$mock->method('get')->willReturn($getResponse);
@@ -57,7 +57,7 @@ public function testAddZoneSubscriptionIfExisting()
$postResponse = $this->getPsr7JsonResponseForFixture('Endpoints/createZoneSubscription.json');
$getResponse = $this->getPsr7JsonResponseForFixture('Endpoints/listZoneSubscriptions.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($postResponse);
$mock->method('get')->willReturn($getResponse);
diff --git a/tests/Endpoints/ZonesTest.php b/tests/Endpoints/ZonesTest.php
index 9a807c9c..38715e59 100644
--- a/tests/Endpoints/ZonesTest.php
+++ b/tests/Endpoints/ZonesTest.php
@@ -1,8 +1,5 @@
getPsr7JsonResponseForFixture('Endpoints/addZone.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -25,7 +22,7 @@ public function testAddZone()
$this->equalTo(['name' => 'example.com', 'jump_start' => false])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->addZone('example.com');
$this->assertObjectHasProperty('id', $result);
@@ -33,7 +30,7 @@ public function testAddZone()
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createPageRule.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -49,7 +46,7 @@ public function testAddZone()
])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$zones->addZone('example.com', true, '01a7362d577a6c3019a474fd6f485823');
$this->assertEquals('9a7806061c88ada191ed06f989cc3dac', $zones->getBody()->result->id);
}
@@ -58,7 +55,7 @@ public function testAddZoneWithAccountId()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/addZone.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('post')->willReturn($response);
$mock->expects($this->once())
@@ -74,7 +71,7 @@ public function testAddZoneWithAccountId()
])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->addZone('example.com', false, '023e105f4ecef8ad9ca31a8372d0c353');
$this->assertObjectHasProperty('id', $result);
@@ -85,7 +82,7 @@ public function testActivationTest()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/activationTest.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('put')->willReturn($response);
$mock->expects($this->once())
@@ -94,7 +91,7 @@ public function testActivationTest()
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/activation_check')
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->activationCheck('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertTrue($result);
@@ -105,7 +102,7 @@ public function testListZones()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/listZones.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -123,7 +120,7 @@ public function testListZones()
])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->listZones('example.com', 'active', 1, 20, 'status', 'desc');
$this->assertObjectHasProperty('result', $result);
@@ -138,14 +135,14 @@ public function testGetZoneByID()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getZoneById.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
->method('get')
->with($this->equalTo('zones/023e105f4ecef8ad9ca31a8372d0c353'));
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->getZoneById('023e105f4ecef8ad9ca31a8372d0c353');
$this->assertInstanceOf(\stdClass::class, $result);
@@ -157,7 +154,7 @@ public function testGetZoneID()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getZoneId.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -172,7 +169,7 @@ public function testGetZoneID()
])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->getZoneID('example.com');
$this->assertEquals('023e105f4ecef8ad9ca31a8372d0c353', $result);
@@ -183,7 +180,7 @@ public function testGetAnalyticsDashboard()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/getAnalyticsDashboard.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('get')->willReturn($response);
$mock->expects($this->once())
@@ -193,7 +190,7 @@ public function testGetAnalyticsDashboard()
$this->equalTo(['since' => '-10080', 'until' => '0', 'continuous' => var_export(true, true)])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$analytics = $zones->getAnalyticsDashboard('c2547eb745079dac9320b638f5e225cf483cc5cfdda41');
$this->assertObjectHasProperty('since', $analytics->totals);
@@ -204,7 +201,7 @@ public function testChangeDevelopmentMode()
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/changeDevelopmentMode.json');
- $mock = $this->getMockBuilder(Adapter::class)->disableOriginalConstructor()->getMock();
+ $mock = $this->createMock(\Cloudflare\API\Adapter\Adapter::class);
$mock->method('patch')->willReturn($response);
$mock->expects($this->once())
@@ -214,7 +211,7 @@ public function testChangeDevelopmentMode()
$this->equalTo(['value' => 'on'])
);
- $zones = new Zones($mock);
+ $zones = new \Cloudflare\API\Endpoints\Zones($mock);
$result = $zones->changeDevelopmentMode('c2547eb745079dac9320b638f5e225cf483cc5cfdda41', true);
$this->assertTrue($result);
diff --git a/tests/Fixtures/Endpoints/getEnvironments.json b/tests/Fixtures/Endpoints/getEnvironments.json
new file mode 100644
index 00000000..3a97bfe9
--- /dev/null
+++ b/tests/Fixtures/Endpoints/getEnvironments.json
@@ -0,0 +1,40 @@
+{
+ "result": {
+ "environments": [
+ {
+ "name": "Production",
+ "ref": "first",
+ "version": 0,
+ "expression": "expression_1",
+ "locked_on_deployment": false,
+ "position": {
+ "before": "second"
+ }
+ },
+ {
+ "name": "Staging",
+ "ref": "second",
+ "version": 0,
+ "expression": "expression_2",
+ "locked_on_deployment": false,
+ "position": {
+ "before": "third",
+ "after": "first"
+ }
+ },
+ {
+ "name": "Development",
+ "ref": "third",
+ "version": 0,
+ "expression": "expression_3",
+ "locked_on_deployment": false,
+ "position": {
+ "after": "second"
+ }
+ }
+ ]
+ },
+ "success": true,
+ "errors": [],
+ "messages": []
+}
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 7508a0b6..7c196520 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -12,9 +12,7 @@ abstract class TestCase extends BaseTestCase
* Returns a PSR7 Stream for a given fixture.
*
* @param string $fixture The fixture to create the stream for.
- *
* @return Psr7\Stream
- * @SuppressWarnings(PHPMD.StaticAccess)
*/
protected function getPsr7StreamForFixture($fixture): Psr7\Stream
{