diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml deleted file mode 100644 index 8b3642c..0000000 --- a/.github/workflows/php.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: PHP Composer - -on: - workflow_dispatch: - push: - tags: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --ignore-platform-reqs - - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md - - - name: Run test suite - run: composer run-script test diff --git a/.github/workflows/php8.yml b/.github/workflows/php8.yml deleted file mode 100644 index ca029f0..0000000 --- a/.github/workflows/php8.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: PHP Composer - -on: - workflow_dispatch: - push: - tags: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --ignore-platform-reqs - - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md - - - name: Run test suite - run: composer run-script test diff --git a/.github/workflows/phpv8.yml b/.github/workflows/phpv8.yml deleted file mode 100644 index ca029f0..0000000 --- a/.github/workflows/phpv8.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: PHP Composer - -on: - workflow_dispatch: - push: - tags: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --ignore-platform-reqs - - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md - - - name: Run test suite - run: composer run-script test diff --git a/.gitignore b/.gitignore index 7861fba..389cabd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,129 +1,3 @@ -src/tmp/* -tests/tmp/* -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# ========================= -# Operating System Files -# ========================= - -# OSX -# ========================= - -.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Vendor -vendor/ - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml -.idea/deployment.xml -.idea/misc.xml -.idea/modules.xml -.idea/zipcode.iml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -composer.phar -.idea/php.xml -.idea/* -.idea/**/ -.idea - -# Removing composer.lock according to recommendation: -# https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/ -composer.lock +/vendor/ +/nbproject/private/ +/nbproject/ \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 20efd1b..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/README.md b/README.md index b901f90..3ac3a31 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ --- [![Downloads](https://img.shields.io/packagist/dt/canducci/zipcode.svg?style=flat)](https://packagist.org/packages/canducci/zipcode) +[![License](https://img.shields.io/packagist/l/canducci/zipcode.svg)](https://packagist.org/packages/canducci/zipcode) [![Version](https://img.shields.io/packagist/v/canducci/zipcode.svg?label=version)](https://packagist.org/packages/canducci/zipcode) ![PHP Composer](https://github.com/netdragoon/zipcode/workflows/PHP%20Composer/badge.svg) @@ -22,7 +23,6 @@ Adicione as classes no final do array de `providers` no arquivo `config/app.php` 'providers' => [ // ..., Canducci\ZipCode\Providers\ZipCodeServiceProvider::class, - Canducci\ZipCode\Providers\ZipCodeAddressServiceProvider::class, ], ``` @@ -32,7 +32,7 @@ e adicione os seus apelidos no array `aliases`: 'aliases' => [ // ..., 'ZipCode' => Canducci\ZipCode\Facades\ZipCode::class, - 'Address' => Canducci\ZipCode\Facades\ZipCodeAddress::class, + 'Address' => Canducci\ZipCode\Facades\Address::class, ], ``` @@ -58,23 +58,23 @@ Temos 4 caminhos para usufruir desse pacote: ```php use Canducci\ZipCode\Facades\ZipCode; -$zipCodeInfo = ZipCode::find('01414-001'); +$response = ZipCode::find('01414-001'); ``` ### Helper ```php -$zipCodeInfo = zipcode('01414000'); +$response = zipcode('01414000'); ``` ### Injection ```php -use Canducci\ZipCode\Contracts\ZipCodeContract; +use Canducci\ZipCode\ZipCode; -public function index(ZipCodeContract $zipcode) +public function index(ZipCode $zipcode) { - $zipCodeInfo = $zipcode->find('01414-000'); + $response = $zipcode->find('01414-000'); } ``` @@ -89,7 +89,7 @@ class WelcomeController extends Controller public function index() { - $zipCodeInfo = $this->zipcode('01414000'); + $response = $this->zipcode('01414000'); } } ``` @@ -97,58 +97,45 @@ class WelcomeController extends Controller Há diversas formas de chegar no mesmo resultado: ```php -$zipCodeInfo = ZipCode::find('01414000'); // Facade +$response = ZipCode::find('01414000'); // Facade -$zipCodeInfo = $zipcode->find('01414-000'); // Contract +$response = $zipcode->find('01414-000'); // Injection -$zipCodeInfo = zipcode('01414000'); // Helper +$response = zipcode('01414000'); // Helper -$zipCodeInfo = $this->zipcode('01414-000'); // Trait -``` - ---- - -### Cache renovar - -Pode forçar um item a renovar seu cache com o segundo parâmetro: - -```php -$zipCodeInfo = ZipCode::find('01414000', true); // Facade - -$zipCodeInfo = $zipcode->find('01414-000', true); // Contract - -$zipCodeInfo = zipcode('01414000', true); // Helper - -$zipCodeInfo = $this->zipcode('01414-000', true); // Trait +$response = $this->zipcode('01414-000'); // Trait ``` --- ### Tipos de retornos -Por padrão o retorno é nulo ou a instância da classe `Canducci\ZipCode\ZipCodeInfo`, e com esse retorno de classe existe os tipos `array`, `object` e `json` texto: +Por padrão o retorno é nulo ou a instância da classe `Canducci\ZipCode\ZipCodeResponse`, e com esse retorno de classe existe os tipos `array`, `object`, `json` ou `Canducci\ZipCode\ZipCodeItem`: - [Array](#array) - [Json](#json) - [Object](#object) +- [Canducci\ZipCode\ZipCodeItem](#Canducci\ZipCode\ZipCodeItem) ```php -if ($zipCodeInfo) // null or ZipCodeInfo +if ($response && $response->isValid()) // null or response { - $arr = $zipCodeInfo->getArray(); // Array + $arr = $response->getArray(); // Array - $json = $zipCodeInfo->getJson(); // Json + $json = $response->getJson(); // Json - $obj = $zipCodeInfo->getObject(); // Object + $obj = $response->getObject(); // Object + + $item = $response->getZipCodeItem(); // Type `Canducci\ZipCode\ZipCodeItem` } ``` #### Array ```php -if ($zipCodeInfo) +if ($response && $response->isValid()) { - $arr = $zipCodeInfo->getArray(); + $arr = $response->getArray(); /* Array ( @@ -161,10 +148,7 @@ if ($zipCodeInfo) [complemento] => [gia] => 1004, [siafi] => 0 - [ddd] = 11, - [unidade] = '', - [estado] = '', - [regiao] = '' + [ddd] = 11 ) */ } @@ -173,9 +157,9 @@ if ($zipCodeInfo) #### Json ```php -if ($zipCodeInfo) +if ($response && $response->isValid()) { - $json = $zipCodeInfo->getJson(); + $json = $response->getJson(); /* { "cep": "01414-001", @@ -187,10 +171,7 @@ if ($zipCodeInfo) "complemento": "" "gia": 1004, "ddd": "11", - "siafi": 0, - "unidade": '', - "estado": '', - "regiao": '' + "siafi": 0 } */ } @@ -199,9 +180,9 @@ if ($zipCodeInfo) #### Object ```php -if ($zipCodeInfo) +if ($response && $response->isValid()) { - $obj = $zipCodeInfo->getObject(); + $obj = $response->getObject(); /* stdClass Object ( @@ -214,10 +195,31 @@ if ($zipCodeInfo) [complemento] => [gia] => 1004 [siafi] => 0 - [ddd] = 011, - [unidade] = '', - [estado] = '', - [regiao] = '' + [ddd] = 011 + ) + */ +} +``` + +#### Canducci\ZipCode\ZipCodeItem + +```php +if ($response && $response->isValid()) +{ + $obj = $response->getZipCodeItem(); + /* + Canducci\ZipCode\ZipCodeItem Object + ( + [cep] => 01414-001 + [logradouro] => Rua Haddock Lobo + [bairro] => Cerqueira César + [localidade] => São Paulo + [uf] => SP + [ibge] => 3550308 + [complemento] => + [gia] => 1004 + [siafi] => 0 + [ddd] = 011 ) */ } @@ -227,25 +229,187 @@ if ($zipCodeInfo) ### Faça a buscas de varios endereços informando, `uf`, `cidade` e `endereço`: +Com a classe `Canducci\ZipCode\Address` tem um retorna de um class `Canducci\ZipCode\AdressResponse` quem implementou o `Interator` trazendo os resultados em lista em um `array` associativo: + +### Facade + ```php -public function get(Request $request) -{ +use Canducci\ZipCode\Facades\ZipCode; + +class HomeController { + + public function get(Request $request) + { + $uf = $request->get('uf'); + $city = $request->get('cidade'); + $street = $request->get('endereco') + + $response = ZipCode::find($uf, $city, $street); + if ($response && $response->count() > 0) + return $response->all(); + return Response::json(['error' => 1]); + } +} +``` + +### Inject + +```php +class HomeController { + + public function get(Request $request, Canducci\ZipCode\Adress $address) + { + $uf = $request->get('uf'); + $city = $request->get('cidade'); + $street = $request->get('endereco') + + $response = $address($uf, $city, $street); + if ($response && $response->count() > 0) + return $response->all(); + return Response::json(['error' => 1]); + } +} +``` + +### Trait + +```php +class HomeController { + + use Canducci\ZipCode\AdressTrait; + + public function get(Request $request) + { + $uf = $request->get('uf'); + $city = $request->get('cidade'); + $street = $request->get('endereco') + + $response = $this->address($uf, $city, $street); + if ($response && $response->count() > 0) + return $response->all(); + return Response::json(['error' => 1]); + } +} +``` + +### Helper + +```php +class HomeController { + + public function get(Request $request) + { $uf = $request->get('uf'); $city = $request->get('cidade'); - $address = $request->get('endereco') - $zipcodeaddressinfo = zipcodeaddress($uf, $city, $address); - if ($zipcodeaddressinfo) - return $zipcodeaddressinfo->getJson(); + $street = $request->get('endereco') + + $response = address($uf, $city, $street); + if ($response && $response->count() > 0) + return $response->all(); return Response::json(['error' => 1]); + } } ``` --- -### Lista de Unidade Federativa: +### Lista de Unidade Federativas da Nação (Brasil): ```php use Canducci\ZipCode\ZipCodeUf; $lists = ZipCodeUf::lists(); ``` + +Resultado da lista: + +```php +array(27) { + ["AC"]=> + string(2) "ac" + ["AL"]=> + string(2) "al" + ["AP"]=> + string(2) "ap" + ["AM"]=> + string(2) "am" + ["BA"]=> + string(2) "ba" + ["CE"]=> + string(2) "ce" + ["DF"]=> + string(2) "df" + ["ES"]=> + string(2) "es" + ["GO"]=> + string(2) "go" + ["MA"]=> + string(2) "ma" + ["MT"]=> + string(2) "mt" + ["MS"]=> + string(2) "ms" + ["MG"]=> + string(2) "mg" + ["PR"]=> + string(2) "pr" + ["PB"]=> + string(2) "pb" + ["PA"]=> + string(2) "pa" + ["PE"]=> + string(2) "pe" + ["PI"]=> + string(2) "pi" + ["RJ"]=> + string(2) "rj" + ["RN"]=> + string(2) "rn" + ["RS"]=> + string(2) "rs" + ["RO"]=> + string(2) "ro" + ["RR"]=> + string(2) "rr" + ["SC"]=> + string(2) "sc" + ["SE"]=> + string(2) "se" + ["SP"]=> + string(2) "sp" + ["TO"]=> + string(2) "to" +} +``` + +Essa classe `ZipCodeUf` possui as 27 constantes de Unidade Federativa da Nação que pode ser utilizados no método onde precisa passar na variável `string $uf` chamar por exemplo `ZipCodeUf::SP`, exemplo: + +```php +ZipCodeUf::AC +ZipCodeUf::AL +ZipCodeUf::AP +ZipCodeUf::AM +ZipCodeUf::BA +ZipCodeUf::CE +ZipCodeUf::DF +ZipCodeUf::ES +ZipCodeUf::GO +ZipCodeUf::MA +ZipCodeUf::MT +ZipCodeUf::MS +ZipCodeUf::MG +ZipCodeUf::PR +ZipCodeUf::PB +ZipCodeUf::PA +ZipCodeUf::PE +ZipCodeUf::PI +ZipCodeUf::RJ +ZipCodeUf::RN +ZipCodeUf::RS +ZipCodeUf::RO +ZipCodeUf::RR +ZipCodeUf::SC +ZipCodeUf::SE +ZipCodeUf::SP +ZipCodeUf::TO +``` diff --git a/composer.json b/composer.json index 80c89bc..8344d58 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,12 @@ { "name": "canducci/zipcode", + "description": "Canducci ZipCode - Cep Of Brazil", "type": "library", - "description": "ZipCode From Brazil", + "require": { + "php": ">=8.0.0", + "php-extended/php-simple-cache-filesystem": "dev-master" + }, + "license": "MIT", "keywords": [ "cep", "zip", @@ -10,45 +15,27 @@ "laravel" ], "homepage": "https://github.com/netdragoon/zipcode", - "license": "MIT", "authors": [ { - "name": "Fúlvio", - "email": "fulviocanducci@hotmail.com", - "role": "Developer" + "name": "fulviocanducci", + "email": "fulviocanducci@hotmail.com" } ], - "require": { - "php": ">=8.3.2", - "php-extended/php-simple-cache-filesystem": "^7.0", - "php-extended/php-file-object": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "8.5.41", - "phpspec/phpspec": "7.5.0" - }, + "minimum-stability": "dev", "autoload": { "psr-4": { "Canducci\\ZipCode\\": "src/Canducci/ZipCode/" }, "files": [ - "src/Canducci/ZipCode/ZipCodeHelper.php", - "src/Canducci/ZipCode/ZipCodeAddressHelper.php" + "src/Canducci/ZipCode/helpers.php" ] }, "scripts": { "test": "phpunit tests/" }, - "extra": { - "laravel": { - "providers": [ - "Canducci\\ZipCode\\Providers\\ZipCodeServiceProvider", - "Canducci\\ZipCode\\Providers\\ZipCodeAddressServiceProvider" - ], - "aliases": { - "ZipCode": "Canducci\\ZipCode\\Facades\\ZipCode", - "Address": "Canducci\\ZipCode\\Facades\\ZipCodeAddress" - } - } + "require-dev": { + "phpunit/phpunit": "10.0.x-dev", + "phpspec/phpspec": "7.0.x-dev", + "illuminate/support": "9.x-dev" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..7c4b883 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4294 @@ +{ + "_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": "59b00df3ff89cde85bb49b01c00a34d7", + "packages": [ + { + "name": "php-extended/php-simple-cache-filesystem", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://gitlab.com/php-extended/php-simple-cache-filesystem.git", + "reference": "478252a45a39fdb7752312829f66062edb8e22fa" + }, + "dist": { + "type": "zip", + "url": "https://gitlab.com/api/v4/projects/php-extended%2Fphp-simple-cache-filesystem/repository/archive.zip?sha=478252a45a39fdb7752312829f66062edb8e22fa", + "reference": "478252a45a39fdb7752312829f66062edb8e22fa", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "php-extended/polyfill-php80-stringable": "^1", + "psr/simple-cache": "^1" + }, + "provide": { + "psr/simple-cache-implementation": "^1" + }, + "require-dev": { + "phpunit/phpunit": "^7 || ^8" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "PhpExtended\\SimpleCache\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anastaszor", + "homepage": "https://gitlab.com/Anastaszor", + "role": "developer" + } + ], + "description": "A psr-16 compliant cache that uses filesystems to store cache data.", + "homepage": "https://gitlab.com/php-extended/php-simple-cache-filesystem", + "keywords": [ + "Simple", + "cache", + "filesystem", + "php", + "psr-16" + ], + "support": { + "issues": "https://gitlab.com/php-extended/php-simple-cache-filesystem/issues", + "source": "https://gitlab.com/php-extended/php-simple-cache-filesystem" + }, + "time": "2020-11-22T15:11:10+00:00" + }, + { + "name": "php-extended/polyfill-php80-stringable", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://gitlab.com/php-extended/polyfill-php80-stringable.git", + "reference": "83e2806fabe6d3f8bf21d0d115629df3399c3f54" + }, + "dist": { + "type": "zip", + "url": "https://gitlab.com/api/v4/projects/php-extended%2Fpolyfill-php80-stringable/repository/archive.zip?sha=83e2806fabe6d3f8bf21d0d115629df3399c3f54", + "reference": "83e2806fabe6d3f8bf21d0d115629df3399c3f54", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anastaszor", + "homepage": "https://gitlab.com/Anastaszor", + "role": "developer" + } + ], + "description": "A polyfill that adds the stringable interface added in php8.0 to previous versions of php", + "homepage": "https://gitlab.com/php-extended/polyfill-php80-stringable", + "keywords": [ + "php", + "php8", + "polyfill", + "stringable" + ], + "support": { + "issues": "https://gitlab.com/php-extended/polyfill-php80-stringable/issues", + "source": "https://gitlab.com/php-extended/polyfill-php80-stringable" + }, + "time": "2020-11-22T09:58:51+00:00" + }, + { + "name": "psr/simple-cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "5a7b96b1dda5d957e01bc1bfe77dcca09c5a7474" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/5a7b96b1dda5d957e01bc1bfe77dcca09c5a7474", + "reference": "5a7b96b1dda5d957e01bc1bfe77dcca09c5a7474", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "time": "2020-04-21T06:43:17+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/inflector", + "version": "2.1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "c6a0da4f0e06aa5cd83a2c1a4e449fae98c8bad7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/c6a0da4f0e06aa5cd83a2c1a4e449fae98c8bad7", + "reference": "c6a0da4f0e06aa5cd83a2c1a4e449fae98c8bad7", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.1.x" + }, + "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%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-10-28T16:09:51+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "6410c4b8352cb64218641457cef64997e6b784fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/6410c4b8352cb64218641457cef64997e6b784fb", + "reference": "6410c4b8352cb64218641457cef64997e6b784fb", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "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/1.4.x" + }, + "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": "2020-11-10T19:05:51+00:00" + }, + { + "name": "illuminate/collections", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "ef846f0babc11c1494f5e162a465669fe1f572ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/ef846f0babc11c1494f5e162a465669fe1f572ac", + "reference": "ef846f0babc11c1494f5e162a465669fe1f572ac", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.0", + "illuminate/macroable": "^9.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.2)." + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Collections package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-12-11T20:00:14+00:00" + }, + { + "name": "illuminate/contracts", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "bd002bbff2c2fff258058dd2e680def930327715" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/bd002bbff2c2fff258058dd2e680def930327715", + "reference": "bd002bbff2c2fff258058dd2e680def930327715", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-12-11T20:00:14+00:00" + }, + { + "name": "illuminate/macroable", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "c2f2869b9ceed5b87606a039d81afbb6d7cc8ac6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/c2f2869b9ceed5b87606a039d81afbb6d7cc8ac6", + "reference": "c2f2869b9ceed5b87606a039d81afbb6d7cc8ac6", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Macroable package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-10-27T16:23:06+00:00" + }, + { + "name": "illuminate/support", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "3169b9ffcfd5172bac3b98c9ae2d928a64f0c1e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/3169b9ffcfd5172bac3b98c9ae2d928a64f0c1e6", + "reference": "3169b9ffcfd5172bac3b98c9ae2d928a64f0c1e6", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.4|^2.0", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/collections": "^9.0", + "illuminate/contracts": "^9.0", + "illuminate/macroable": "^9.0", + "nesbot/carbon": "^2.31", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.4.8" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (^9.0).", + "ramsey/uuid": "Required to use Str::uuid() (^4.0).", + "symfony/process": "Required to use the composer class (^5.2).", + "symfony/var-dumper": "Required to use the dd function (^5.2).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)." + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2020-12-09T20:20:55+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nesbot/carbon", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "a810c01ed9fcaeaa95e8919c4201c953bc9118fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a810c01ed9fcaeaa95e8919c4201c953bc9118fb", + "reference": "a810c01ed9fcaeaa95e8919c4201c953bc9118fb", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^3.4 || ^4.0 || ^5.0" + }, + "require-dev": { + "doctrine/orm": "^2.7", + "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^7.5 || ^8.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "default-branch": true, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + }, + { + "name": "kylekatarnls", + "homepage": "http://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2020-12-11T10:59:35+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", + "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "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/v4.10.3" + }, + "time": "2020-12-03T17:45:45+00:00" + }, + { + "name": "phar-io/manifest", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "default-branch": true, + "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.1" + }, + "time": "2020-06-27T14:33:11+00:00" + }, + { + "name": "phar-io/version", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "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.0.4" + }, + "time": "2020-12-13T23:18:30+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/cf8df60735d98fd18070b7cab0019ba0831e219c", + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + }, + "time": "2020-06-19T17:42:03+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", + "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-11-18T14:27:38+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/php-diff", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/php-diff.git", + "reference": "fc1156187f9f6c8395886fe85ed88a0a245d72e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/fc1156187f9f6c8395886fe85ed88a0a245d72e9", + "reference": "fc1156187f9f6c8395886fe85ed88a0a245d72e9", + "shasum": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Diff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Chris Boulton", + "homepage": "http://github.com/chrisboulton" + } + ], + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "support": { + "source": "https://github.com/phpspec/php-diff/tree/v1.1.3" + }, + "time": "2020-09-18T13:47:07+00:00" + }, + { + "name": "phpspec/phpspec", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/phpspec/phpspec.git", + "reference": "9b82625c790d9092d3b9a50358358834d4713766" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/9b82625c790d9092d3b9a50358358834d4713766", + "reference": "9b82625c790d9092d3b9a50358358834d4713766", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "ext-tokenizer": "*", + "php": "^7.3 || 8.0.*", + "phpspec/php-diff": "^1.0.0", + "phpspec/prophecy": "^1.9", + "sebastian/exporter": "^3.0 || ^4.0", + "symfony/console": "^3.4 || ^4.4 || ^5.0", + "symfony/event-dispatcher": "^3.4 || ^4.4 || ^5.0", + "symfony/finder": "^3.4 || ^4.4 || ^5.0", + "symfony/process": "^3.4 || ^4.4 || ^5.0", + "symfony/yaml": "^3.4 || ^4.4 || ^5.0" + }, + "conflict": { + "sebastian/comparator": "<1.2.4" + }, + "require-dev": { + "behat/behat": "^3.3", + "phpunit/phpunit": "^8.0 || ^9.0", + "symfony/filesystem": "^3.4 || ^4.0 || ^5.0" + }, + "suggest": { + "phpspec/nyan-formatters": "Adds Nyan formatters" + }, + "default-branch": true, + "bin": [ + "bin/phpspec" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "7.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "PhpSpec": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" + }, + { + "name": "Ciaran McNulty", + "homepage": "https://ciaranmcnulty.com/" + } + ], + "description": "Specification-oriented BDD framework for PHP 7.1+", + "homepage": "http://phpspec.net/", + "keywords": [ + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification", + "testing", + "tests" + ], + "support": { + "issues": "https://github.com/phpspec/phpspec/issues", + "source": "https://github.com/phpspec/phpspec/tree/7.0.0" + }, + "time": "2020-11-03T11:28:23+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.1" + }, + "time": "2020-09-29T09:10:42+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "fc8fd9194f696432e3887df09098f8bacfe07f16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fc8fd9194f696432e3887df09098f8bacfe07f16", + "reference": "fc8fd9194f696432e3887df09098f8bacfe07f16", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "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": "*", + "ext-xdebug": "*" + }, + "default-branch": true, + "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", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:03+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "32f330e983b0ad25134c5b1a32a4cf4523178086" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/32f330e983b0ad25134c5b1a32a4cf4523178086", + "reference": "32f330e983b0ad25134c5b1a32a4cf4523178086", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:27+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "af6fff7777c93ca23726690b75e6b35936619a2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/af6fff7777c93ca23726690b75e6b35936619a2a", + "reference": "af6fff7777c93ca23726690b75e6b35936619a2a", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:35+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "1875733758aac84b2dafea3f27629e0201571e60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/1875733758aac84b2dafea3f27629e0201571e60", + "reference": "1875733758aac84b2dafea3f27629e0201571e60", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:39:08+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e7957e44bf97c25931c802da2bb1cc42ddfdd4eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e7957e44bf97c25931c802da2bb1cc42ddfdd4eb", + "reference": "e7957e44bf97c25931c802da2bb1cc42ddfdd4eb", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:43+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "f31afe24b9988a960c468170c42faa897bac0b05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f31afe24b9988a960c468170c42faa897bac0b05", + "reference": "f31afe24b9988a960c468170c42faa897bac0b05", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.4", + "phpunit/php-code-coverage": "^9.2.3", + "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": "^2.0", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "default-branch": true, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "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", + "source": "https://github.com/sebastianbergmann/phpunit/tree/master" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-14T13:29:15+00:00" + }, + { + "name": "psr/container", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "381524e8568e07f31d504a945b88556548c8c42e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/381524e8568e07f31d504a945b88556548c8c42e", + "reference": "381524e8568e07f31d504a945b88556548c8c42e", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.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/master" + }, + "time": "2020-10-13T07:07:53+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "3ef040d7c05652f55bd05115baf059a445cfc79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/3ef040d7c05652f55bd05115baf059a445cfc79c", + "reference": "3ef040d7c05652f55bd05115baf059a445cfc79c", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "default-branch": true, + "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": "https://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "source": "https://github.com/php-fig/event-dispatcher/tree/master" + }, + "time": "2020-09-18T06:44:18+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "922f683e943fef277c005e27b3b2ea97299d997e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/922f683e943fef277c005e27b3b2ea97299d997e", + "reference": "922f683e943fef277c005e27b3b2ea97299d997e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-14T10:23:09+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1127071912dfad41b180161c39e0b1a45f3eb2d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1127071912dfad41b180161c39e0b1a45f3eb2d0", + "reference": "1127071912dfad41b180161c39e0b1a45f3eb2d0", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "default-branch": true, + "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": "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-13T10:02:39+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "bdf3ed620874ff8e19be0d8b42c475f3ffeefb18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/bdf3ed620874ff8e19be0d8b42c475f3ffeefb18", + "reference": "bdf3ed620874ff8e19be0d8b42c475f3ffeefb18", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:20+00:00" + }, + { + "name": "sebastian/comparator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fbecc625ac00815b8f019e932b9cc11d75ec1405" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fbecc625ac00815b8f019e932b9cc11d75ec1405", + "reference": "fbecc625ac00815b8f019e932b9cc11d75ec1405", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:28+00:00" + }, + { + "name": "sebastian/complexity", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "cbec8097a839b5840b2f40eeff3566f5b2346ff0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/cbec8097a839b5840b2f40eeff3566f5b2346ff0", + "reference": "cbec8097a839b5840b2f40eeff3566f5b2346ff0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:39:17+00:00" + }, + { + "name": "sebastian/diff", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "cd1158ecb8c9f33f321b96a6df746725b861d1ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/cd1158ecb8c9f33f321b96a6df746725b861d1ae", + "reference": "cd1158ecb8c9f33f321b96a6df746725b861d1ae", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:36+00:00" + }, + { + "name": "sebastian/environment", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d9a92208bc71528923f91a079f30f9cbadb5faf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d9a92208bc71528923f91a079f30f9cbadb5faf5", + "reference": "d9a92208bc71528923f91a079f30f9cbadb5faf5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:45+00:00" + }, + { + "name": "sebastian/exporter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "5ac88b179db846dbf7ea631602e5e4594280a531" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/5ac88b179db846dbf7ea631602e5e4594280a531", + "reference": "5ac88b179db846dbf7ea631602e5e4594280a531", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:37:53+00:00" + }, + { + "name": "sebastian/global-state", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "dbf516227d7ae4fc1a4a86419b159474d31a9c16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/dbf516227d7ae4fc1a4a86419b159474d31a9c16", + "reference": "dbf516227d7ae4fc1a4a86419b159474d31a9c16", + "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": "*" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:02+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "ace45fe9f4cd96d6d3d6a210bfaf5bdd3e9e6664" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/ace45fe9f4cd96d6d3d6a210bfaf5bdd3e9e6664", + "reference": "ace45fe9f4cd96d6d3d6a210bfaf5bdd3e9e6664", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:39:25+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d3cd2a77ac07ae8bb05920b7ed8f75102dbfac36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d3cd2a77ac07ae8bb05920b7ed8f75102dbfac36", + "reference": "d3cd2a77ac07ae8bb05920b7ed8f75102dbfac36", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:10+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9aa0ca52ec0e20696c154eb139ec2cc5715922a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9aa0ca52ec0e20696c154eb139ec2cc5715922a7", + "reference": "9aa0ca52ec0e20696c154eb139ec2cc5715922a7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:19+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "9ac02731471d22991df2591760cfa1937a6e9512" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9ac02731471d22991df2591760cfa1937a6e9512", + "reference": "9ac02731471d22991df2591760cfa1937a6e9512", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "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": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:38:51+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "9c58afbf51a4a1d0c738e4d7490d82fc9ae034a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9c58afbf51a4a1d0c738e4d7490d82fc9ae034a9", + "reference": "9c58afbf51a4a1d0c738e4d7490d82fc9ae034a9", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-09T08:39:00+00:00" + }, + { + "name": "sebastian/version", + "version": "dev-master", + "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" + }, + "default-branch": true, + "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/console", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "1ba3caf8ed39a49e39fc8a6cad666724524a5342" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/1ba3caf8ed39a49e39fc8a6cad666724524a5342", + "reference": "1ba3caf8ed39a49e39fc8a6cad666724524a5342", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "default-branch": true, + "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": "Symfony Console Component", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/5.x" + }, + "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": "2020-12-12T00:32:42+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "be5a36670fd7ccb6f6e03d9c9bd7345e2a9a8515" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/be5a36670fd7ccb6f6e03d9c9bd7345e2a9a8515", + "reference": "be5a36670fd7ccb6f6e03d9c9bd7345e2a9a8515", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-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/main" + }, + "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": "2020-10-14T17:08:19+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aa13a09811e6d2ad43f8fb336bebdb7691d85d3c", + "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "default-branch": true, + "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": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.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": "2020-11-01T16:14:45+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "8e3016b6e4f491433751b9ef0ef090cac6b08170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8e3016b6e4f491433751b9ef0ef090cac6b08170", + "reference": "8e3016b6e4f491433751b9ef0ef090cac6b08170", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-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/main" + }, + "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": "2020-10-14T17:08:19+00:00" + }, + { + "name": "symfony/finder", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba", + "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "default-branch": true, + "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": "Symfony Finder Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/5.x" + }, + "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": "2020-12-08T17:02:38+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "fade6deebd931cfd7a544f68479405a6a08979a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3", + "reference": "fade6deebd931cfd7a544f68479405a6a08979a3", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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/main" + }, + "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": "2020-10-26T13:35:45+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/be092746c3ab9f9c62608c82e0f04687f8a879f9", + "reference": "be092746c3ab9f9c62608c82e0f04687f8a879f9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for 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/main" + }, + "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": "2020-11-13T15:40:22+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/69609f9f06790591b4b13a45ee117e7bab6395aa", + "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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/main" + }, + "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": "2020-10-26T13:35:45+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/401c9d9d3400c53a8f1a39425f0543406c137a43", + "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/main" + }, + "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": "2020-10-26T13:35:45+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8c0d39c1526009b97f43beea4cc685bbc353a70b", + "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/main" + }, + "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": "2020-10-26T13:35:45+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/3a11f3dfb34ad50f978cb2b8cf936933b87739aa", + "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.21-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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/main" + }, + "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": "2020-10-26T13:35:45+00:00" + }, + { + "name": "symfony/process", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd", + "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "default-branch": true, + "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": "Symfony Process Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/5.x" + }, + "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": "2020-12-08T17:03:37+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "0aeee2f70f4550e6c48c9a796d98f5ceda58dfda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/0aeee2f70f4550e6c48c9a796d98f5ceda58dfda", + "reference": "0aeee2f70f4550e6c48c9a796d98f5ceda58dfda", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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/main" + }, + "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": "2020-10-14T17:08:19+00:00" + }, + { + "name": "symfony/string", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "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": "Symfony String component", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/5.x" + }, + "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": "2020-12-05T07:33:16+00:00" + }, + { + "name": "symfony/translation", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/a04209ba0d1391c828e5b2373181dac63c52ee70", + "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/translation-contracts": "^2.3" + }, + "conflict": { + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" + }, + "provide": { + "symfony/translation-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "default-branch": true, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/5.x" + }, + "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": "2020-12-08T17:03:37+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "5d449c8a6bde5ce34ce3290db5e3efa063bfa48e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/5d449c8a6bde5ce34ce3290db5e3efa063bfa48e", + "reference": "5d449c8a6bde5ce34ce3290db5e3efa063bfa48e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "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 translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/main" + }, + "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": "2020-11-04T15:35:46+00:00" + }, + { + "name": "symfony/yaml", + "version": "5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "d2d600fb284494bdb1270a1d19dcf27cb57e3264" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d2d600fb284494bdb1270a1d19dcf27cb57e3264", + "reference": "d2d600fb284494bdb1270a1d19dcf27cb57e3264", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "default-branch": true, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/5.x" + }, + "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": "2020-12-08T17:04:48+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "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/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.5.6", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "80953678b19901e5165c56752d087fc11526017c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c", + "reference": "80953678b19901e5165c56752d087fc11526017c", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "support": { + "issues": "https://github.com/voku/portable-ascii/issues", + "source": "https://github.com/voku/portable-ascii/tree/1.5.6" + }, + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://opencollective.com/portable-ascii", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2020-11-12T00:07:28+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozart/assert/issues", + "source": "https://github.com/webmozart/assert/tree/master" + }, + "time": "2020-07-08T17:02:28+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "php-extended/php-simple-cache-filesystem": 20, + "phpunit/phpunit": 20, + "phpspec/phpspec": 20, + "illuminate/support": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0.0" + }, + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/src/Canducci/ZipCode/Address.php b/src/Canducci/ZipCode/Address.php new file mode 100644 index 0000000..c9e2922 --- /dev/null +++ b/src/Canducci/ZipCode/Address.php @@ -0,0 +1,95 @@ +request = $request; + } + + /** + * find + * + * @param string $uf + * @param string $city + * @param string $street + * @return AddressResponse|null + */ + public function find(string $uf, string $city, string $street): ?AddressResponse + { + if (!$this->parse($uf, $city, $street)) { + throw new \Exception('Uf invalid or City invalid or Adress invalid'); + } + return $this->getOrSet($uf, $city, $street); + } + + /** + * parse + * + * @param string $uf + * @param string $city + * @param string $street + * @return boolean + */ + private function parse(string $uf, string $city, string $street): bool + { + return mb_strlen($uf) === 2 && mb_strlen($city) > 2 && mb_strlen($street) > 2; + } + + /** + * getOrSet + * + * @param string $uf + * @param string $city + * @param string $street + * @return AddressResponse|null + */ + private function getOrSet(string $uf, string $city, string $street): ?AddressResponse + { + $response = $this->request->get($this->url($uf, $city, $street)); + if (!is_null($response)) { + return new AddressResponse($response['json'], $response['httpResponse']); + } + return null; + } + + /** + * url + * + * @param string $uf + * @param string $city + * @param string $address + * @return string + */ + private function url(string $uf, string $city, string $street): string + { + return sprintf( + 'https://viacep.com.br/ws/%s/%s/%s/json/', + strtolower($uf), + strtolower($city), + strtolower($street), + ); + } +} diff --git a/src/Canducci/ZipCode/AddressResponse.php b/src/Canducci/ZipCode/AddressResponse.php new file mode 100644 index 0000000..f0c030a --- /dev/null +++ b/src/Canducci/ZipCode/AddressResponse.php @@ -0,0 +1,118 @@ +current = 0; + $this->json = $json; + $this->httpResponse = $httpResponse; + if (!empty($this->json)) { + $this->data = json_decode($this->json, true); + } + } + + /** + * current + * + * @return array + */ + public function current(): array + { + return $this->data[$this->current]; + } + + /** + * key + * + * @return integer + */ + public function key(): int + { + return $this->current; + } + + /** + * next + * + * @return void + */ + public function next(): void + { + $this->current++; + } + + /** + * rewind + * + * @return void + */ + public function rewind(): void + { + $this->current = 0; + } + + /** + * valid + * + * @return boolean + */ + public function valid(): bool + { + return $this->current < count($this->data); + } + + /** + * count + * + * @return integer + */ + public function count(): int + { + return count($this->data); + } + + /** + * all + * + * @return array + */ + public function all(): array + { + return $this->data; + } +} diff --git a/src/Canducci/ZipCode/AddressTrait.php b/src/Canducci/ZipCode/AddressTrait.php new file mode 100644 index 0000000..d7cf1ff --- /dev/null +++ b/src/Canducci/ZipCode/AddressTrait.php @@ -0,0 +1,22 @@ +app['Canducci\ZipCode\Contracts\ZipCodeRequestContract']) === false) { - $this->app->singleton('Canducci\ZipCode\Contracts\ZipCodeRequestContract', 'Canducci\ZipCode\ZipCodeRequest'); - } - $this->app->singleton('Canducci\ZipCode\Contracts\ZipCodeAddressContract', function ($app) { - return new ZipCodeAddress($app['Canducci\ZipCode\Contracts\ZipCodeRequestContract']); - }); - } -} diff --git a/src/Canducci/ZipCode/Providers/ZipCodeServiceProvider.php b/src/Canducci/ZipCode/Providers/ZipCodeServiceProvider.php index 84094dc..1a0723e 100644 --- a/src/Canducci/ZipCode/Providers/ZipCodeServiceProvider.php +++ b/src/Canducci/ZipCode/Providers/ZipCodeServiceProvider.php @@ -2,34 +2,51 @@ namespace Canducci\ZipCode\Providers; -use Canducci\ZipCode\ZipCode; use Illuminate\Support\ServiceProvider; +/** + * ZipCodeServiceProvider class + */ class ZipCodeServiceProvider extends ServiceProvider { - public function boot() - { - $this->publishes([ - __DIR__ . '/../config/simplecache.php' => config_path('simplecache.php'), - ], 'simplecache'); - } - public function register() - { - if (isset($this->app['PhpExtended\SimpleCache\SimpleCacheFilesystem']) === false) { - $this->app->singleton( - 'PhpExtended\SimpleCache\SimpleCacheFilesystem', - function ($app) { - $path = config('simplecache.path') ?? __DIR__; - $fileSystem = new \PhpExtended\File\FileSystem($path); - return new \PhpExtended\SimpleCache\SimpleCacheFilesystem($fileSystem); - } - ); - } - if (isset($this->app[\Canducci\ZipCode\Contracts\ZipCodeRequestContract::class]) === false) { - $this->app->singleton(\Canducci\ZipCode\Contracts\ZipCodeRequestContract::class, \Canducci\ZipCode\ZipCodeRequest::class); - } - $this->app->singleton(\Canducci\ZipCode\Contracts\ZipCodeContract::class, function ($app) { - return new ZipCode($app[\PhpExtended\SimpleCache\SimpleCacheFilesystem::class], $app[\Canducci\ZipCode\Contracts\ZipCodeRequestContract::class]); - }); - } + + public function boot() + { + $this->publishes([ + __DIR__ . '/../config/simplecache.php' => config_path('simplecache.php'), + ], 'simplecache'); + } + + public function register() + { + + if (isset($this->app[\PhpExtended\SimpleCache\SimpleCacheFilesystem::class]) === false) { + $this->app->singleton( + 'PhpExtended\SimpleCache\SimpleCacheFilesystem', + function ($app) { + return new \PhpExtended\SimpleCache\SimpleCacheFilesystem(config('simplecache.path') ?? __DIR__); + } + ); + } + + if (isset($this->app[\Canducci\ZipCode\ZipCodeRequest::class]) === false) { + $this->app->singleton( + \Canducci\ZipCode\ZipCodeRequest::class, + \Canducci\ZipCode\ZipCodeRequest::class + ); + } + + $this->app->singleton(\Canducci\ZipCode\ZipCode::class, function ($app) { + return new \Canducci\ZipCode\ZipCode( + $app[\PhpExtended\SimpleCache\SimpleCacheFilesystem::class], + $app[\Canducci\ZipCode\ZipCodeRequest::class] + ); + }); + + $this->app->singleton(\Canducci\ZipCode\Address::class, function ($app) { + return new \Canducci\ZipCode\Address( + $app[\Canducci\ZipCode\ZipCodeRequest::class] + ); + }); + } } diff --git a/src/Canducci/ZipCode/ZipCode.php b/src/Canducci/ZipCode/ZipCode.php index f2729f8..3252435 100644 --- a/src/Canducci/ZipCode/ZipCode.php +++ b/src/Canducci/ZipCode/ZipCode.php @@ -1,137 +1,99 @@ cache = $cache; + $this->request = $request; + } - /** - * Construct ZipCode - * - * @param SimpleCacheFilesystem $cache - * @param ZipCodeRequestContract $request - */ - public function __construct(SimpleCacheFilesystem $cache, ZipCodeRequestContract $request) - { - $this->value = ''; - $this->renew = false; - $this->cache = $cache; - $this->request = $request; + /** + * find + * + * @param string $value + * @return ZipCodeResponse|null + */ + public function find(string $value): ?ZipCodeResponse + { + if (!$this->parse($value)) { + throw new Exception('Cep invalid'); } + return $this->getOrSet($value); + } - /** - * @param $value - * @param bool $renew - * @return Canducci\ZipCode\ZipCodeInfo|ZipCodeInfo|null - * @throws ZipCodeException - */ - public function find(string $value, bool $renew = false): ?ZipCodeInfo - { - $message = ''; - if (is_string($value)) { - $value = str_replace('.', '', $value); - $value = str_replace('-', '', $value); - if (mb_strlen($value) === 8 && preg_match('/^(\d){8}$/', $value)) { - $this->value = $value; - } else { - $message = 'ZipCode invalid'; - } - } else { - $message = 'ZipCode invalid'; - } - if (is_bool($renew)) { - $this->renew = $renew; - } else { - if ($message != '') { - $message .= PHP_EOL; - } - $message .= 'ZipCode argument renew is invalid'; - } - if ($message === '') { - $valueInfo = $this->getZipCodeInfo(); - if ($valueInfo === null) { - return null; - } - return new ZipCodeInfo($valueInfo); - } - throw new ZipCodeException($message); - } + /** + * parse + * + * @param string $value + * @return boolean + */ + private function parse(string &$value): bool + { + $value = str_replace(['.', '-'], [''], $value); + return mb_strlen($value) === 8 && preg_match('/^(\d){8}$/', $value); + } - /** - * @return null|string - */ - private function getZipCodeInfo(): ?string - { - $this->renew(); - if ($this->cache->has('zipcode_' . $this->value)) { - $getCache = $this->cache->get('zipcode_' . $this->value); - if (isset($getCache) && is_array($getCache)) { - if (isset($getCache['erro']) && $getCache['erro'] == true) { - return null; - } - return json_encode($getCache, JSON_PRETTY_PRINT); - } - } else { - $response = $this->request->get($this->url()); - if ($response && $response->getStatusCode() === 200) { - $getResponse = $response->getArray(); - $this->cache->set('zipcode_' . $this->value, $getResponse, 86400); - if (isset($getResponse['erro']) && $getResponse['erro'] == true) { - return null; - } - return json_encode($getResponse); - } - } - return null; + /** + * getOrSet + * + * @param string $value + * @return ZipCodeResponse|null + */ + private function getOrSet(string $value): ?ZipCodeResponse + { + $name = sprintf('%s_%s', ZipCode::NAME, $value); + $response = $this->cache->get($name); + if (is_null($response)) { + $data = $this->request->get($this->url($value)); + if (!is_null($data)) { + $response = new ZipCodeResponse($data['json'], $data['httpResponse']); + $this->cache->set($name, $response); + } } + return $response; + } - /** - * @return mixed - */ - private function renew(): ZipCode - { - if ($this->renew && (is_null($this->value) === false)) { - if ($this->cache->has('zipcode_' . $this->value)) { - $this->cache->delete('zipcode_' . $this->value); - } - $this->renew = false; - } - return $this; - } - - /** - * @return mixed - */ - private function url(): string - { - return str_replace('[cep]', $this->value, 'https://viacep.com.br/ws/[cep]/json/'); - } + /** + * url + * + * @param string $value + * @return string + */ + private function url(string $value): string + { + return str_replace('[cep]', $value, 'https://viacep.com.br/ws/[cep]/json/'); + } } diff --git a/src/Canducci/ZipCode/ZipCodeAddress.php b/src/Canducci/ZipCode/ZipCodeAddress.php deleted file mode 100644 index bc2dd13..0000000 --- a/src/Canducci/ZipCode/ZipCodeAddress.php +++ /dev/null @@ -1,119 +0,0 @@ -request = $request; - } - - /** - * @param string $uf - * @param string $city - * @param string $address - * @return ZipCodeAddressInfo - * @throws ZipCodeException - */ - public function find(string $uf, string $city, string $address) - { - $message = ''; - if (strlen($uf) < 2) { - $message .= PHP_EOL . 'Uf invalid'; - } - if (strlen($city) < 3) { - $message .= PHP_EOL . "City invalid"; - } - if (strlen($address) < 3) { - $message .= PHP_EOL . 'Address invalid'; - } - if ($message != '') { - throw new ZipCodeException($message); - } - try { - $response = $this->request->get($this->url($uf, $city, $address, 'json')); - if ($response && $response->getStatusCode() === 200) { - return new ZipCodeAddressInfo($response->getJson()); - } - throw new ZipCodeException('Request invalid', $response->getStatusCode()); - } catch (Exception $e) { - throw new ZipCodeException($e->getMessage(), $e->getCode(), $e->getPrevious()); - } - } - - /** - * @param $uf - * @param $city - * @param $address - * @param $type - * @return string - */ - protected function url($uf, $city, $address, $type) - { - $this->clean($uf); - $this->clean($city); - $this->clean($address); - return sprintf( - 'https://viacep.com.br/ws/%s/%s/%s/%s/', - strtolower($uf), - strtolower($city), - strtolower($address), - strtolower($type) - ); - } - - /** - * @param $value - * @return string - */ - protected function clean(&$value) - { - $map = array( - 'á' => 'a', - 'à' => 'a', - 'ã' => 'a', - 'â' => 'a', - 'é' => 'e', - 'ê' => 'e', - 'í' => 'i', - 'ó' => 'o', - 'ô' => 'o', - 'õ' => 'o', - 'ú' => 'u', - 'ü' => 'u', - 'ç' => 'c', - 'Á' => 'A', - 'À' => 'A', - 'Ã' => 'A', - 'Â' => 'A', - 'É' => 'E', - 'Ê' => 'E', - 'Í' => 'I', - 'Ó' => 'O', - 'Ô' => 'O', - 'Õ' => 'O', - 'Ú' => 'U', - 'Ü' => 'U', - 'Ç' => 'C' - ); - $value = strtr($value, $map); - return $value; - } -} diff --git a/src/Canducci/ZipCode/ZipCodeAddressHelper.php b/src/Canducci/ZipCode/ZipCodeAddressHelper.php deleted file mode 100644 index d30484a..0000000 --- a/src/Canducci/ZipCode/ZipCodeAddressHelper.php +++ /dev/null @@ -1,21 +0,0 @@ -find($uf, $city, $address); - } -} diff --git a/src/Canducci/ZipCode/ZipCodeAddressInfo.php b/src/Canducci/ZipCode/ZipCodeAddressInfo.php deleted file mode 100644 index 3c35a87..0000000 --- a/src/Canducci/ZipCode/ZipCodeAddressInfo.php +++ /dev/null @@ -1,103 +0,0 @@ -value = $value; - if ($this->jsonValidate() === false) { - throw new ZipCodeException('Format invalid'); - } - } else { - throw new ZipCodeException('JSON empty'); - } - } - - /** - * @return Contracts\JSON|null|string - */ - public function getJson(): string - { - return $this->value; - } - - /** - * @return Contracts\Array|mixed|null - */ - public function getArray(): array - { - return json_decode($this->getJson(), true); - } - - /** - * @return mixed|null|\stdClass - */ - public function getObject(): array - { - return json_decode($this->getJson(), false); - } - - /** - * @return int - */ - public function count(): int - { - return count($this->getArray()); - } - - /** - * @return bool - */ - private function jsonValidate() - { - $ret = @json_decode($this->value, true); - return json_last_error() === JSON_ERROR_NONE && is_array($ret); - } - - /** - * @return array|Contracts\Array - */ - public function getZipCodeItem(): array - { - $array = array(); - foreach ($this->getArray() as $ret) { - $array[] = new ZipCodeItem( - $ret['cep'], - $ret['logradouro'], - $ret['complemento'], - $ret['bairro'], - $ret['localidade'], - $ret['uf'], - $ret['ibge'], - $ret['gia'], - $ret['ddd'], - $ret['siafi'], - $ret['unidade'], - $ret['estado'], - $ret['regiao'] - ); - } - return $array; - } -} diff --git a/src/Canducci/ZipCode/ZipCodeAddressTrait.php b/src/Canducci/ZipCode/ZipCodeAddressTrait.php deleted file mode 100644 index 5043bef..0000000 --- a/src/Canducci/ZipCode/ZipCodeAddressTrait.php +++ /dev/null @@ -1,23 +0,0 @@ -find($value, $renew); - } -} diff --git a/src/Canducci/ZipCode/ZipCodeInfo.php b/src/Canducci/ZipCode/ZipCodeInfo.php deleted file mode 100644 index 5347e4a..0000000 --- a/src/Canducci/ZipCode/ZipCodeInfo.php +++ /dev/null @@ -1,120 +0,0 @@ -valueJson = $valueJson; - if ($this->json_validate_zipcode() === false) { - throw new ZipCodeException("JSON invalid"); - } - } else { - throw new ZipCodeException("Format invalid"); - } - } - - /** - * return JSON Javascript - * - * @return JSON Javascript - */ - public function getJson(): string - { - if (!empty($this->valueJson)) { - return $this->valueJson; - } - return null; - } - - /** - * return Array - * - * @return Array - */ - public function getArray(): array - { - if (!empty($this->valueJson)) { - return json_decode($this->valueJson, true); - } - return null; - } - - /** - * return stdClass (Object) - * - * @return \stdClass - */ - public function getObject(): stdClass - { - if (!empty($this->valueJson)) { - return json_decode($this->valueJson, false); - } - return null; - } - - /** - * validate zipcode format - * - * @return bool - */ - private function json_validate_zipcode(): bool - { - if (!empty($this->valueJson) && is_string($this->valueJson)) { - $ret = @json_decode($this->valueJson, true); - return (json_last_error() === JSON_ERROR_NONE && - isset($ret['cep']) && - isset($ret['logradouro']) && - isset($ret['complemento']) && - isset($ret['bairro']) && - isset($ret['localidade']) && - isset($ret['uf']) && - isset($ret['ibge']) && - isset($ret['gia'])) && - isset($ret['ddd']) && - isset($ret['siafi']); - } - return false; - } - - /** - * @return ZipCodeItem - */ - public function getZipCodeItem(): ZipCodeItem - { - $ret = $this->getArray(); - return new ZipCodeItem( - $ret['cep'], - $ret['logradouro'], - $ret['complemento'], - $ret['bairro'], - $ret['localidade'], - $ret['uf'], - $ret['ibge'], - $ret['gia'], - $ret['ddd'], - $ret['siafi'] - ); - } -} diff --git a/src/Canducci/ZipCode/ZipCodeItem.php b/src/Canducci/ZipCode/ZipCodeItem.php index bb45cbb..c843463 100644 --- a/src/Canducci/ZipCode/ZipCodeItem.php +++ b/src/Canducci/ZipCode/ZipCodeItem.php @@ -3,8 +3,7 @@ namespace Canducci\ZipCode; /** - * Class ZipCodeItem - * @package Canducci\ZipCode + * ZipCodeItem class */ class ZipCodeItem { @@ -19,45 +18,18 @@ class ZipCodeItem protected $gia; protected $ddd; protected $siafi; - protected $unidade; - protected $estado; - protected $regiao; - /** - * ZipCodeItem constructor. - * @param $cep - * @param $logradouro - * @param $complemento - * @param $bairro - * @param $localidade - * @param $uf - * @param $ibge - * @param $gia - * @param $ddd - * @param @siafi - * @param $unidade - * @param $estado - * @param @regiao - */ - public function __construct($cep, $logradouro, $complemento, $bairro, $localidade, $uf, $ibge, $gia, $ddd, $siafi, $unidade, $estado, $regiao) + public function __construct(array $data) { - $this->cep = $cep; - $this->logradouro = $logradouro; - $this->complemento = $complemento; - $this->bairro = $bairro; - $this->localidade = $localidade; - $this->uf = $uf; - $this->ibge = $ibge; - $this->gia = $gia; - $this->ddd = $ddd; - $this->siafi = $siafi; - $this->unidade = $unidade; - $this->estado = $estado; - $this->regiao = $regiao; + foreach ($data as $key => $value) { + $this->$key = $value; + } } /** - * @return mixed + * getCep + * + * @return string */ public function getCep(): string { @@ -65,7 +37,9 @@ public function getCep(): string } /** - * @return mixed + * getLogradouro + * + * @return string */ public function getLogradouro(): string { @@ -73,7 +47,9 @@ public function getLogradouro(): string } /** - * @return mixed + * getComplemento + * + * @return string */ public function getComplemento(): string { @@ -81,7 +57,9 @@ public function getComplemento(): string } /** - * @return mixed + * getBairro + * + * @return string */ public function getBairro(): string { @@ -89,7 +67,9 @@ public function getBairro(): string } /** - * @return mixed + * getLocalidade + * + * @return string */ public function getLocalidade(): string { @@ -97,7 +77,9 @@ public function getLocalidade(): string } /** - * @return mixed + * getUf + * + * @return string */ public function getUf(): string { @@ -105,7 +87,9 @@ public function getUf(): string } /** - * @return mixed + * getIbge + * + * @return string */ public function getIbge(): string { @@ -113,7 +97,9 @@ public function getIbge(): string } /** - * @return mixed + * getGia + * + * @return string */ public function getGia(): string { @@ -121,7 +107,9 @@ public function getGia(): string } /** - * @return mixed + * getDdd + * + * @return string */ public function getDdd(): string { @@ -129,7 +117,9 @@ public function getDdd(): string } /** - * @return mixed + * getSiafi + * + * @return string */ public function getSiafi(): string { @@ -137,32 +127,10 @@ public function getSiafi(): string } /** - * @return mixed - */ - public function getUnidade(): string - { - return $this->unidade; - } - - /** - * @return mixed - */ - public function getEstado(): string - { - return $this->estado; - } - - /** - * @return mixed - */ - public function getRegiao(): string - { - return $this->regiao; - } - - /** - * @param $name - * @return mixed + * __get + * + * @param string $name + * @return void */ function __get($name) { @@ -170,8 +138,10 @@ function __get($name) } /** - * @param $name - * @param $value + * __set + * + * @param string $name + * @param mixed $value */ function __set($name, $value) { diff --git a/src/Canducci/ZipCode/ZipCodeRequest.php b/src/Canducci/ZipCode/ZipCodeRequest.php index cfd383c..b91766f 100644 --- a/src/Canducci/ZipCode/ZipCodeRequest.php +++ b/src/Canducci/ZipCode/ZipCodeRequest.php @@ -1,20 +1,21 @@ $json, 'httpResponse' => $httpResponse); } catch (Exception $ex) { throw $ex; } } -} \ No newline at end of file +} diff --git a/src/Canducci/ZipCode/ZipCodeResponse.php b/src/Canducci/ZipCode/ZipCodeResponse.php index c7d6cc8..b4d5a54 100644 --- a/src/Canducci/ZipCode/ZipCodeResponse.php +++ b/src/Canducci/ZipCode/ZipCodeResponse.php @@ -2,40 +2,117 @@ namespace Canducci\ZipCode; -use Canducci\ZipCode\Contracts\ZipCodeResponseContract; -use stdClass; - /** - * Class ZipCodeResponse - * @package Canducci\ZipCode + * ZipCodeResponse class */ -class ZipCodeResponse implements ZipCodeResponseContract +class ZipCodeResponse { + + /** + * $httpResponse + * + * @var array + */ + private $httpResponse; + + /** + * $json + * + * @var string + */ private $json; - private $statusCode; - public function __construct($json, $statusCode) + + /** + * __construct + * + * @param string $json + * @param array $httpResponse + */ + public function __construct(string $json, array $httpResponse) { $this->json = $json; - $this->statusCode = $statusCode; + $this->httpResponse = $httpResponse; + } + + /** + * isError + * + * @return boolean + */ + public function isError(): bool + { + $array = $this->getArray(); + return array_key_exists('erro', $array) && $array['erro'] === true; + } + + /** + * isValid + * + * @return boolean + */ + public function isValid(): bool + { + $array = $this->getArray(); + return array_key_exists('erro', $array) === false; + } + + /** + * getHttpCode + * + * @return integer + */ + public function getHttpCode(): int + { + return $this->httpResponse['http_code']; } - public function getStatusCode(): int + /** + * getHttpResponse + * + * @return array + */ + public function getHttpResponse(): array { - return $this->statusCode; + return $this->httpResponse; } + /** + * getJson + * + * @return string + */ public function getJson(): string { return $this->json; } + /** + * getArray + * + * @return array + */ public function getArray(): array { return json_decode($this->getJson(), true); } - public function getObject(): stdClass + /** + * getObject + * + * @return \stdClass + */ + public function getObject(): \stdClass { return json_decode($this->getJson(), false); } + + /** + * getZipCodeItem + * + * @return ZipCodeItem + */ + public function getZipCodeItem(): ZipCodeItem + { + return new ZipCodeItem($this->getArray()); + } } diff --git a/src/Canducci/ZipCode/ZipCodeTrait.php b/src/Canducci/ZipCode/ZipCodeTrait.php index 7c85a0e..6bf179c 100644 --- a/src/Canducci/ZipCode/ZipCodeTrait.php +++ b/src/Canducci/ZipCode/ZipCodeTrait.php @@ -3,22 +3,18 @@ namespace Canducci\ZipCode; /** - * Trait ZipCodeTrait - * @package Canducci\ZipCode + * ZipCodeTrait */ trait ZipCodeTrait { - - /** - * Traits ZipCode - * - * @param string $value - * @param bool $renew - * @return Canducci\ZipCode\ZipCodeInfo - * @throws Canducci\ZipCode\ZipCodeException - */ - public function zipcode($value, $renew = false): ZipCodeInfo - { - return zipcode($value, $renew); - } + /** + * zipcode + * + * @param string $value + * @return ZipCodeResponse|null + */ + public function zipcode(string $value): ?ZipCodeResponse + { + return zipcode($value); + } } diff --git a/src/Canducci/ZipCode/ZipCodeUf.php b/src/Canducci/ZipCode/ZipCodeUf.php index 7bc8310..862a3c3 100644 --- a/src/Canducci/ZipCode/ZipCodeUf.php +++ b/src/Canducci/ZipCode/ZipCodeUf.php @@ -1,48 +1,50 @@ -getConstants(); - unset($rf); - return $data; - } -} \ No newline at end of file + /** + * lists + * + * @return array + */ + public static function lists(): array + { + $rf = new \ReflectionClass(\Canducci\ZipCode\ZipCodeUf::class); + $data = $rf->getConstants(); + unset($rf); + return $data; + } +} diff --git a/src/Canducci/ZipCode/config/simplecache.php b/src/Canducci/ZipCode/config/simplecache.php index 9cfd707..871f85f 100644 --- a/src/Canducci/ZipCode/config/simplecache.php +++ b/src/Canducci/ZipCode/config/simplecache.php @@ -1,4 +1,4 @@ - storage_path('framework/cache') - ]; \ No newline at end of file + storage_path('framework/cache') +]; diff --git a/src/Canducci/ZipCode/helpers.php b/src/Canducci/ZipCode/helpers.php new file mode 100644 index 0000000..14406c2 --- /dev/null +++ b/src/Canducci/ZipCode/helpers.php @@ -0,0 +1,42 @@ +find($value); + } +} + +if (!function_exists('address')) { + /** + * address + * + * @param string $uf + * @param string $city + * @param string $street + * @return \Canducci\ZipCode\AddressResponse|null + */ + function address(string $uf, string $city, string $street): ?\Canducci\ZipCode\AddressResponse + { + if (function_exists('app')) { + $address = app(\Canducci\ZipCode\Address::class); + } else { + $request = new \Canducci\ZipCode\ZipCodeRequest(); + $address = new \Canducci\ZipCode\Address($request); + } + return $address->find($uf, $city, $street); + } +} diff --git a/tests/17/30/710080446765f2f9a73f4b8053af1fec9c8435894d06205c02aadca01f6be323764dac5930c80ae0a1b782038640ac9bba5bba9611e76250aecf80aaeee6 b/tests/17/30/710080446765f2f9a73f4b8053af1fec9c8435894d06205c02aadca01f6be323764dac5930c80ae0a1b782038640ac9bba5bba9611e76250aecf80aaeee6 new file mode 100644 index 0000000..9550bb9 Binary files /dev/null and b/tests/17/30/710080446765f2f9a73f4b8053af1fec9c8435894d06205c02aadca01f6be323764dac5930c80ae0a1b782038640ac9bba5bba9611e76250aecf80aaeee6 differ diff --git a/tests/2f/5e/2f8bab8c07ff6a51a7d96a29d3efce87128aef8d3c85faa1626fc1c4cc8440df9b35cb0843ac06d18c36271cf678c135b019c8ebe313a7237086fcf38ca7 b/tests/2f/5e/2f8bab8c07ff6a51a7d96a29d3efce87128aef8d3c85faa1626fc1c4cc8440df9b35cb0843ac06d18c36271cf678c135b019c8ebe313a7237086fcf38ca7 new file mode 100644 index 0000000..acaa25f Binary files /dev/null and b/tests/2f/5e/2f8bab8c07ff6a51a7d96a29d3efce87128aef8d3c85faa1626fc1c4cc8440df9b35cb0843ac06d18c36271cf678c135b019c8ebe313a7237086fcf38ca7 differ diff --git a/tests/AddressTest.php b/tests/AddressTest.php new file mode 100644 index 0000000..afe2166 --- /dev/null +++ b/tests/AddressTest.php @@ -0,0 +1,81 @@ +assertInstanceOf(Address::class, $address); + } + + public function testValueAddressInvalid() + { + $this->expectException(Exception::class); + $address = new Address( + new ZipCodeRequest() + ); + $this->assertInstanceOf(Address::class, $address); + $address->find('', '', ''); + } + + public function testValueAddressResponse() + { + $address = new Address( + new ZipCodeRequest() + ); + $response = $address->find('sp', 'são paulo', 'ave'); + $this->assertInstanceOf(AddressResponse::class, $response); + } + + public function testValueAddressResponseCountMoreThanZero() + { + $address = new Address( + new ZipCodeRequest() + ); + $response = $address->find('sp', 'são paulo', 'ave'); + $this->assertInstanceOf(AddressResponse::class, $response); + $this->assertIsInt($response->count()); + $this->assertTrue($response->count() > 0); + } + + public function testValueAddressResponseCountEquaalZero() + { + $address = new Address( + new ZipCodeRequest() + ); + $response = $address->find('sp', 'são paulosss', 'avessss'); + $this->assertInstanceOf(AddressResponse::class, $response); + $this->assertIsInt($response->count()); + $this->assertTrue($response->count() === 0); + } + + public function testValueAddressResponseAllToArray() + { + $address = new Address( + new ZipCodeRequest() + ); + $response = $address->find('sp', 'são paulosss', 'avessss'); + $this->assertInstanceOf(AddressResponse::class, $response); + $this->assertIsArray($response->all()); + } + + // public function testValueAddressResponseAllCountFunctionToArray() + // { + // $address = new Address( + // new ZipCodeRequest() + // ); + // $response = address('sp', 'pirapozinho', 'ave'); + // $this->assertInstanceOf(AddressResponse::class, $response); + // $this->assertIsArray($response->all()); + // $this->assertIsArray($response->count() === 1); + // } +} diff --git a/tests/ZipCodeTest.php b/tests/ZipCodeTest.php index 4194c3c..62401cf 100644 --- a/tests/ZipCodeTest.php +++ b/tests/ZipCodeTest.php @@ -3,221 +3,212 @@ declare(strict_types=1); use Canducci\ZipCode\ZipCode; -use Canducci\ZipCode\ZipCodeAddress; -use Canducci\ZipCode\ZipCodeAddressInfo; -use Canducci\ZipCode\ZipCodeInfo; +use Canducci\ZipCode\ZipCodeItem; use Canducci\ZipCode\ZipCodeRequest; -use Canducci\ZipCode\ZipCodeTrait; use PhpExtended\SimpleCache\SimpleCacheFilesystem; use PHPUnit\Framework\TestCase; -use PhpExtended\File\FileSystem; + class ZipCodeTest extends TestCase { - use ZipCodeTrait; - - private ZipCode $zipCode; - private ZipCodeAddress $address; - - protected function setUp(): void - { - $this->setZipCodeInstance(); - $this->setZipCodeAddressInstance(); - } - - public function setZipCodeInstance(): void - { - if (realpath(__DIR__ . '/tmp') === false) { - mkdir(__DIR__ . '/tmp'); - } - $path = realpath(__DIR__ . '/tmp'); - $this->zipCode = new ZipCode( - new SimpleCacheFilesystem(new Filesystem($path)), - new ZipCodeRequest() - ); - } - - public function setZipCodeAddressInstance(): void - { - $this->address = new ZipCodeAddress(new ZipCodeRequest()); - } - - public function testZipCode(): void - { - $this->assertNotNull($this->zipCode); - $this->assertInstanceOf(ZipCode::class, $this->zipCode); - } - - public function testZipCodeAddress(): void - { - $this->assertNotNull($this->address); - $this->assertInstanceOf(ZipCodeAddress::class, $this->address); - } - - - public function testZipCodeInfo(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $this->assertNotNull($zipCodeInfo); - $this->assertInstanceOf(ZipCodeInfo::class, $zipCodeInfo); - } - - public function testZipCodeInfoTestMethods(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $this->assertNotNull($zipCodeInfo); - $this->assertIsString($zipCodeInfo->getJson()); - $this->assertIsArray($zipCodeInfo->getArray()); - $this->assertIsObject($zipCodeInfo->getObject()); - } - - public function testZipCodeAddressInfo(): void - { - $zipCodeAddressInfo = $this->address->find('sp', 'paulo', 'ave'); - $this->assertNotNull($zipCodeAddressInfo); - $this->assertInstanceOf(ZipCodeAddressInfo::class, $zipCodeAddressInfo); - } - - public function testZipCodeAddressInfoTestMethods(): void - { - $zipCodeAddressInfo = $this->address->find('sp', 'paulo', 'ave'); - $this->assertNotNull($zipCodeAddressInfo); - $this->assertIsString($zipCodeAddressInfo->getJson()); - $this->assertIsArray($zipCodeAddressInfo->getArray()); - $this->assertIsArray($zipCodeAddressInfo->getObject()); - $this->assertIsNumeric($zipCodeAddressInfo->count()); - } - - public function testZipCodeReturnCep(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $data = $zipCodeInfo->getArray(); - $this->assertIsArray($data); - } - - - public function testZipCodeAddressReturnCeps(): void - { - $zipCodeAddressInfo = $this->address->find('sp', 'paulo', 'ave'); - $datas = $zipCodeAddressInfo->getArray(); - $this->assertIsArray($datas); - $this->assertEquals(50, $zipCodeAddressInfo->count()); - $this->assertArrayHasKey('cep', $datas[0]); - } - - public function testZipCodeAddressTestKeys(): void - { - $zipCodeAddressInfo = $this->address->find('sp', 'paulo', 'ave'); - $datas = $zipCodeAddressInfo->getArray(); - $this->assertArrayHasKey('cep', $datas[0]); - $this->assertArrayHasKey('logradouro', $datas[0]); - $this->assertArrayHasKey('complemento', $datas[0]); - $this->assertArrayHasKey('bairro', $datas[0]); - $this->assertArrayHasKey('localidade', $datas[0]); - $this->assertArrayHasKey('uf', $datas[0]); - $this->assertArrayHasKey('ddd', $datas[0]); - $this->assertArrayHasKey('siafi', $datas[0]); - $this->assertArrayHasKey('ibge', $datas[0]); - $this->assertArrayHasKey('gia', $datas[0]); - } - - public function testZipCodeFieldObject(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $model = $zipCodeInfo->getObject(); - - $this->assertNotNull($model->cep); - $this->assertNotNull($model->logradouro); - $this->assertNotNull($model->complemento); - $this->assertNotNull($model->bairro); - $this->assertNotNull($model->localidade); - $this->assertNotNull($model->uf); - $this->assertNotNull($model->ddd); - $this->assertNotNull($model->siafi); - $this->assertNotNull($model->ibge); - $this->assertNotNull($model->gia); - } - - public function testZipCodeFieldArray(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $model = $zipCodeInfo->getArray(); - - $this->assertNotNull($model['cep']); - $this->assertNotNull($model['logradouro']); - $this->assertNotNull($model['complemento']); - $this->assertNotNull($model['bairro']); - $this->assertNotNull($model['localidade']); - $this->assertNotNull($model['uf']); - $this->assertNotNull($model['ddd']); - $this->assertNotNull($model['siafi']); - $this->assertNotNull($model['ibge']); - $this->assertNotNull($model['gia']); - } - - public function testZipCodeTestValues(): void - { - $zipCodeInfo = $this->zipCode->find('01001000'); - $model = $zipCodeInfo->getArray(); - $this->assertEquals($model['cep'], '01001-000'); - $this->assertEquals($model['logradouro'], 'Praça da Sé'); - $this->assertEquals($model['complemento'], 'lado ímpar'); - $this->assertEquals($model['bairro'], 'Sé'); - $this->assertEquals($model['localidade'], 'São Paulo'); - $this->assertEquals($model['uf'], 'SP'); - $this->assertEquals($model['ddd'], '11'); - $this->assertEquals($model['siafi'], '7107'); - $this->assertEquals($model['ibge'], '3550308'); - $this->assertEquals($model['gia'], '1004'); - } - - public function testZipCodeFunctionFieldObject(): void - { - $zipCodeInfo = zipcode('01001000'); - $model = $zipCodeInfo->getObject(); - - $this->assertNotNull($model->cep); - $this->assertNotNull($model->logradouro); - $this->assertNotNull($model->complemento); - $this->assertNotNull($model->bairro); - $this->assertNotNull($model->localidade); - $this->assertNotNull($model->uf); - $this->assertNotNull($model->ddd); - $this->assertNotNull($model->siafi); - $this->assertNotNull($model->ibge); - $this->assertNotNull($model->gia); - } - - public function testZipCodeFunctionFieldArray(): void - { - $zipCodeInfo = zipcode('01001000'); - $model = $zipCodeInfo->getArray(); - - $this->assertNotNull($model['cep']); - $this->assertNotNull($model['logradouro']); - $this->assertNotNull($model['complemento']); - $this->assertNotNull($model['bairro']); - $this->assertNotNull($model['localidade']); - $this->assertNotNull($model['uf']); - $this->assertNotNull($model['ddd']); - $this->assertNotNull($model['siafi']); - $this->assertNotNull($model['ibge']); - $this->assertNotNull($model['gia']); - } - - public function testZipCodeFunctionTestValues(): void - { - $zipCodeInfo = zipcode('01001-000'); - $model = $zipCodeInfo->getArray(); - $this->assertEquals($model['cep'], '01001-000'); - $this->assertEquals($model['logradouro'], 'Praça da Sé'); - $this->assertEquals($model['complemento'], 'lado ímpar'); - $this->assertEquals($model['bairro'], 'Sé'); - $this->assertEquals($model['localidade'], 'São Paulo'); - $this->assertEquals($model['uf'], 'SP'); - $this->assertEquals($model['ddd'], '11'); - $this->assertEquals($model['siafi'], '7107'); - $this->assertEquals($model['ibge'], '3550308'); - $this->assertEquals($model['gia'], '1004'); - } + const CACHE = __DIR__; + + public function testInstance() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $this->assertInstanceOf(ZipCode::class, $zipCode); + } + + public function testValueCepInValid() + { + $this->expectException(Exception::class); + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = ''; + $zipCode->find($value); + } + + public function testValueCepValidGetArray() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '19.200-000'; + $response = $zipCode->find($value); + $array = $response->getArray(); + $this->assertIsArray($array); + $this->assertEquals($array['cep'], str_replace(['.'], '', $value)); + } + + public function testValueCepValidGetJson() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '19.200-000'; + $response = $zipCode->find($value); + $json = $response->getJson(); + $this->assertIsString($json); + } + + public function testValueCepValidGetStdClass() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '19.200-000'; + $response = $zipCode->find($value); + $obj = $response->getObject(); + $this->assertIsObject($obj); + } + + // public function testValueCepValidFunctionGetStdClass() + // { + // $value = '19.200-000'; + // $response = zipcode($value); + // $obj = $response->getObject(); + // $this->assertIsObject($obj); + // $this->assertIsBool($response->isValid()); + // $this->assertTrue($response->isValid()); + // } + + public function testValueCepValidGetZipCodeItem() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '01.001-000'; + $response = $zipCode->find($value); + $zipCodeItem = $response->getZipCodeItem(); + $this->assertInstanceOf(ZipCodeItem::class, $zipCodeItem); + $this->assertEquals($zipCodeItem->getCep(), '01001-000'); + } + + public function testValueCepValidGetZipCodeItemError() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '00000000'; + $response = $zipCode->find($value); + $zipCodeItem = $response->getZipCodeItem(); + $this->assertInstanceOf(ZipCodeItem::class, $zipCodeItem); + $this->assertEquals($response->getHttpCode(), 200); + $this->assertIsInt($response->getHttpCode()); + $this->assertIsBool($response->isError()); + $this->assertTrue($response->isError()); + } + + public function testValueCepValidGetObjectEqualsValues() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '01001-000'; + $response = $zipCode->find($value); + $data = $response->getObject(); + + $this->assertIsObject($data); + $this->assertEquals($response->getHttpCode(), 200); + $this->assertIsInt($response->getHttpCode()); + $this->assertIsBool($response->isError()); + $this->assertFalse($response->isError()); + + $this->assertEquals($data->cep, "01001-000"); + $this->assertEquals($data->logradouro, "Praça da Sé"); + $this->assertEquals($data->complemento, "lado ímpar"); + $this->assertEquals($data->bairro, "Sé"); + $this->assertEquals($data->localidade, "São Paulo"); + $this->assertEquals($data->uf, "SP"); + $this->assertEquals($data->ibge, "3550308"); + $this->assertEquals($data->gia, "1004"); + $this->assertEquals($data->ddd, "11"); + $this->assertEquals($data->siafi, "7107"); + } + + public function testValueCepValidGetArrayEqualsValues() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '01001-000'; + $response = $zipCode->find($value); + $data = $response->getArray(); + + $this->assertIsArray($data); + $this->assertEquals($response->getHttpCode(), 200); + $this->assertIsInt($response->getHttpCode()); + $this->assertIsBool($response->isError()); + $this->assertFalse($response->isError()); + + $this->assertEquals($data['cep'], "01001-000"); + $this->assertEquals($data['logradouro'], "Praça da Sé"); + $this->assertEquals($data['complemento'], "lado ímpar"); + $this->assertEquals($data['bairro'], "Sé"); + $this->assertEquals($data['localidade'], "São Paulo"); + $this->assertEquals($data['uf'], "SP"); + $this->assertEquals($data['ibge'], "3550308"); + $this->assertEquals($data['gia'], "1004"); + $this->assertEquals($data['ddd'], "11"); + $this->assertEquals($data['siafi'], "7107"); + } + + public function testValueCepValidGetZipCodeItemEqualsValues() + { + $zipCode = new ZipCode( + new SimpleCacheFilesystem(ZipCodeTest::CACHE), + new ZipCodeRequest() + ); + $value = '01001-000'; + $response = $zipCode->find($value); + $zipCodeItem = $response->getZipCodeItem(); + + $this->assertInstanceOf(ZipCodeItem::class, $zipCodeItem); + $this->assertEquals($response->getHttpCode(), 200); + $this->assertIsInt($response->getHttpCode()); + $this->assertIsBool($response->isError()); + $this->assertFalse($response->isError()); + + $this->assertEquals($zipCodeItem->cep, "01001-000"); + $this->assertEquals($zipCodeItem->getCep(), "01001-000"); + + $this->assertEquals($zipCodeItem->logradouro, "Praça da Sé"); + $this->assertEquals($zipCodeItem->getLogradouro(), "Praça da Sé"); + + $this->assertEquals($zipCodeItem->complemento, "lado ímpar"); + $this->assertEquals($zipCodeItem->getComplemento(), "lado ímpar"); + + $this->assertEquals($zipCodeItem->bairro, "Sé"); + $this->assertEquals($zipCodeItem->getBairro(), "Sé"); + + $this->assertEquals($zipCodeItem->localidade, "São Paulo"); + $this->assertEquals($zipCodeItem->getLocalidade(), "São Paulo"); + + $this->assertEquals($zipCodeItem->uf, "SP"); + $this->assertEquals($zipCodeItem->getUf(), "SP"); + + $this->assertEquals($zipCodeItem->ibge, "3550308"); + $this->assertEquals($zipCodeItem->getIbge(), "3550308"); + + $this->assertEquals($zipCodeItem->gia, "1004"); + $this->assertEquals($zipCodeItem->getGia(), "1004"); + + $this->assertEquals($zipCodeItem->ddd, "11"); + $this->assertEquals($zipCodeItem->getDdd(), "11"); + + $this->assertEquals($zipCodeItem->siafi, "7107"); + $this->assertEquals($zipCodeItem->getSiafi(), "7107"); + } } diff --git a/tests/ZipCodeUfTest.php b/tests/ZipCodeUfTest.php new file mode 100644 index 0000000..4ed578d --- /dev/null +++ b/tests/ZipCodeUfTest.php @@ -0,0 +1,87 @@ +assertIsArray($data); + } + + public function testArrayListUfCount27() + { + $data = ZipCodeUf::lists(); + $this->assertIsArray($data); + $this->assertIsInt(count($data)); + $this->assertTrue(count($data) > 0); + $this->assertTrue(count($data) === 27); + } + + public function testArrayListUfValues() + { + $this->assertEquals('ac', ZipCodeUf::AC); + $this->assertEquals('al', ZipCodeUf::AL); + $this->assertEquals('ap', ZipCodeUf::AP); + $this->assertEquals('am', ZipCodeUf::AM); + $this->assertEquals('ba', ZipCodeUf::BA); + $this->assertEquals('ce', ZipCodeUf::CE); + $this->assertEquals('df', ZipCodeUf::DF); + $this->assertEquals('es', ZipCodeUf::ES); + $this->assertEquals('go', ZipCodeUf::GO); + $this->assertEquals('ma', ZipCodeUf::MA); + $this->assertEquals('mt', ZipCodeUf::MT); + $this->assertEquals('ms', ZipCodeUf::MS); + $this->assertEquals('mg', ZipCodeUf::MG); + $this->assertEquals('pr', ZipCodeUf::PR); + $this->assertEquals('pb', ZipCodeUf::PB); + $this->assertEquals('pa', ZipCodeUf::PA); + $this->assertEquals('pe', ZipCodeUf::PE); + $this->assertEquals('pi', ZipCodeUf::PI); + $this->assertEquals('rj', ZipCodeUf::RJ); + $this->assertEquals('rn', ZipCodeUf::RN); + $this->assertEquals('rs', ZipCodeUf::RS); + $this->assertEquals('ro', ZipCodeUf::RO); + $this->assertEquals('rr', ZipCodeUf::RR); + $this->assertEquals('sc', ZipCodeUf::SC); + $this->assertEquals('se', ZipCodeUf::SE); + $this->assertEquals('sp', ZipCodeUf::SP); + $this->assertEquals('to', ZipCodeUf::TO); + } + + public function testArrayDataUfValues() + { + $data = ZipCodeUf::lists(); + $this->assertEquals($data['AC'], ZipCodeUf::AC); + $this->assertEquals($data['AL'], ZipCodeUf::AL); + $this->assertEquals($data['AP'], ZipCodeUf::AP); + $this->assertEquals($data['AM'], ZipCodeUf::AM); + $this->assertEquals($data['BA'], ZipCodeUf::BA); + $this->assertEquals($data['CE'], ZipCodeUf::CE); + $this->assertEquals($data['DF'], ZipCodeUf::DF); + $this->assertEquals($data['ES'], ZipCodeUf::ES); + $this->assertEquals($data['GO'], ZipCodeUf::GO); + $this->assertEquals($data['MA'], ZipCodeUf::MA); + $this->assertEquals($data['MT'], ZipCodeUf::MT); + $this->assertEquals($data['MS'], ZipCodeUf::MS); + $this->assertEquals($data['MG'], ZipCodeUf::MG); + $this->assertEquals($data['PR'], ZipCodeUf::PR); + $this->assertEquals($data['PB'], ZipCodeUf::PB); + $this->assertEquals($data['PA'], ZipCodeUf::PA); + $this->assertEquals($data['PE'], ZipCodeUf::PE); + $this->assertEquals($data['PI'], ZipCodeUf::PI); + $this->assertEquals($data['RJ'], ZipCodeUf::RJ); + $this->assertEquals($data['RN'], ZipCodeUf::RN); + $this->assertEquals($data['RS'], ZipCodeUf::RS); + $this->assertEquals($data['RO'], ZipCodeUf::RO); + $this->assertEquals($data['RR'], ZipCodeUf::RR); + $this->assertEquals($data['SC'], ZipCodeUf::SC); + $this->assertEquals($data['SE'], ZipCodeUf::SE); + $this->assertEquals($data['SP'], ZipCodeUf::SP); + $this->assertEquals($data['TO'], ZipCodeUf::TO); + } +} diff --git a/tests/ba/67/85b445a5b7abc1cd344221046a45bb90dd46260d13d0ac345fbbdb116bc38cd7830bf9d0d0fcb7a54871e1aa7c98a9c4cbc7c20f863c3145f53eb304dd8f b/tests/ba/67/85b445a5b7abc1cd344221046a45bb90dd46260d13d0ac345fbbdb116bc38cd7830bf9d0d0fcb7a54871e1aa7c98a9c4cbc7c20f863c3145f53eb304dd8f new file mode 100644 index 0000000..8376a21 Binary files /dev/null and b/tests/ba/67/85b445a5b7abc1cd344221046a45bb90dd46260d13d0ac345fbbdb116bc38cd7830bf9d0d0fcb7a54871e1aa7c98a9c4cbc7c20f863c3145f53eb304dd8f differ