From 5e8af43aa1e0d949c1643b74d76c109e0d04b933 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 17 Feb 2022 16:28:03 +0100 Subject: [PATCH] :sparkles: Add CRUD methods on ContactsApi --- LICENSE.md | 21 + README.md | 313 ++- composer.lock | 2842 -------------------- src/Api/AbstractApi.php | 90 +- src/Api/ContactsApi.php | 122 +- src/Collections/ContactCollection.php | 20 + src/Contracts/EntityCollectionContract.php | 15 + src/Contracts/EntityContract.php | 15 + src/Core/Client.php | 5 + src/Core/Config.php | 17 +- src/Core/Connection.php | 15 + src/Entities/Address.php | 86 + src/Entities/Contact.php | 130 + src/Entities/ContactSocials.php | 37 + src/Entities/ContactSync.php | 32 + src/Entities/Geocode.php | 27 + src/Entities/Pagination.php | 37 + src/Exceptions/ApiClientErrorException.php | 10 + src/Exceptions/ApiServerErrorException.php | 10 + 19 files changed, 971 insertions(+), 2873 deletions(-) create mode 100644 LICENSE.md delete mode 100644 composer.lock create mode 100644 src/Collections/ContactCollection.php create mode 100644 src/Contracts/EntityCollectionContract.php create mode 100644 src/Contracts/EntityContract.php create mode 100644 src/Entities/Address.php create mode 100644 src/Entities/Contact.php create mode 100644 src/Entities/ContactSocials.php create mode 100644 src/Entities/ContactSync.php create mode 100644 src/Entities/Geocode.php create mode 100644 src/Entities/Pagination.php create mode 100644 src/Exceptions/ApiClientErrorException.php create mode 100644 src/Exceptions/ApiServerErrorException.php diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4889694 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Thomas Georgel + +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. \ No newline at end of file diff --git a/README.md b/README.md index 6944ef4..7ea8da6 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,321 @@ -# Sellsy Client +# Sellsy API V2 PHP client + +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) +[![Latest Version on Packagist](https://img.shields.io/packagist/v/hydrat-agency/sellsy-client.svg?style=flat-square)](https://packagist.org/packages/hydrat-agency/sellsy-client) +[![Total Downloads](https://img.shields.io/packagist/dt/hydrat-agency/sellsy-client.svg?style=flat-square)](https://packagist.org/packages/hydrat-agency/sellsy-client) + +- [Introduction](#introduction) +- [Installation](#installation) +- [Usage](#usage) + - [Authenticate](#usage_auth) + - [Query the API](#usage_query) + - [The basics](#usage_query_basic) + - [Operations](#usage_query_operations) + - [Show a resource](#usage_query_show) + - [Create a resource](#usage_query_create) +- [Contribute](#contribute) +- [Credits](#credits) +- [License](#license) + ⚠️ This client is used to query the Sellsy API V2. If you're looking for a client to query the V1 API, checkout [TeknooSoftware/sellsy-client](https://github.com/TeknooSoftware/sellsy-client) instead. ## Introduction + +// TODO ## Installation + + +This library requires PHP >= `7.4`. + +Grab the library using composer : ``` composer require hydrat-agency/sellsy-client -``` \ No newline at end of file +``` + +## Usage + + +## Authenticate + + +This package only supports Single user OAuth authentication. +Before calling any api class nor the client helper, you MUST provide your credentials via the `Config` class : + +```php +use Hydrat\Sellsy\Api\ContactsApi; +use Hydrat\Sellsy\Core\Client; +use Hydrat\Sellsy\Core\Config; + +$config = Config::getInstance(); + +$config->set('url', 'https://api.sellsy.com/v2/') // optionnal, this is the default value. + ->set('client_id', 'f48f0fgm-2703-5689-2005-27403b5adb8d') + ->set('client_secret', 'av8v94jx0ildsjje50sm9x1hnmjsg27bnqyryc0zgbmtxxmzpjzlw2vnj9aockwe'); + +$this->v2 = new Client(); +``` + +[Learn more](https://api.sellsy.com/doc/v2/#section/Authentication) about Sellsy API v2 credentials. + +## Query the API + + +### The basics + + +Using the Client helper : + +```php +use Hydrat\Sellsy\Core\Client; + +$client = new Client(); + +$client->contacts()->index() +$client->contacts()->show($client_id) +$client->contacts()->update() +$client->contacts()->create() + +// Or statically : +Client::contacts()->index() +``` + +Using the API class : + +```php +use Hydrat\Sellsy\Api\ContactsApi; + +$contacts = new ContactsApi(); + +$contacts->index() +$contacts->show($client_id) +$contacts->update() +$contacts->create() +``` + +### Operations + + +ℹ️ To illustrate this part of the documentation we will query the [ContactsApi](https://api.sellsy.com/doc/v2/#tag/Contacts). + +This client is using the CRUD operations keywords to name API methods : + +| Client Keyword | Related operation | +|---|---|---| +| `index` | List resources. | +| `show` | Get a single resource. | +| `create` | Create a single resource. | +| `update` | Update a single resource. | +| `destroy` | Delete a single resource. | + +e.g: To list Contacts, you should use `index()` method : + +```php +use Hydrat\Sellsy\Api\ContactsApi; + +$contacts = new ContactsApi(); + +$contacts->index()->entity(); # Get resources entities +$contacts->index()->json(); # Get raw data from response +``` + +#### List a resource + + +To show a resource, we use the `index()` method. This method accept query parameters as argument. + +```php +$contacts = new ContactsApi(); + +$index = $contacts->index(); + +$index->entities(); // The api entities +$index->pagination(); // The pagination object +``` + +#### Show a resource + + +To show a resource, we use the `show()` method. This method accept the contact ID as first parameter : + +```php +$contacts = new ContactsApi(); + +$contacts->show(35520506)->entity(); +``` + +This returns a `Hydrat\Sellsy\Entities\Contact` instance : + +```php +Hydrat\Sellsy\Entities\Contact^ { + +id: 35520506 + +civility: "ms" + +first_name: "Amélie" + +last_name: "PETIT" + +email: "contact+atest@sellsy.com" + +website: null + +phone_number: null + +mobile_number: null + +fax_number: null + +position: "Gérante" + +birth_date: null + +avatar: null + +note: "" + +social: Hydrat\Sellsy\Entities\ContactSocials^ { + +twitter: null + +facebook: null + +linkedin: null + +viadeo: null + } + +sync: Hydrat\Sellsy\Entities\ContactSync^ { + +mailchimp: true + +mailjet: true + +simplemail: true + } + +is_archived: false + +invoicing_address_id: null + +delivery_address_id: null + +invoicing_address: null + +delivery_address: null + +created: "2022-02-16T15:56:17+01:00" + +owner: array:2 [ + "id" => 214007 + "type" => "staff" + ] +} +``` + +As described in the [Sellsy documentation](https://api.sellsy.com/doc/v2/#operation/get-contact), you may also send query parameters `embed` and `field`. This can be done by specifying the query parameters as the second argument of the `show()` method : + +```php +$query = [ + 'embed' => [ + 'invoicing_address', + ], + 'field' => [ + 'first_name', + 'email', + ], +]; + +$contacts->show(123, $query)->entity(); +``` + +When specifing `$embed` entities, the client will automatically parse them into subsequent entity classes : + +```php +Hydrat\Sellsy\Entities\Contact^ { + +id: 35520506 + +civility: "ms" + +first_name: "Amélie" + +last_name: "PETIT" + +email: "contact+atest@sellsy.com" + [...] + +invoicing_address: Hydrat\Sellsy\Entities\Address^ { + +id: 128934588 + +name: "Domicile" + +address_line_1: "34 Rue du moulin" + +address_line_2: "" + +address_line_3: "" + +address_line_4: "" + +postal_code: "75001" + +city: "Paris" + +country: "France" + +country_code: "FR" + +is_invoicing_address: true + +is_delivery_address: false + +geocode: Hydrat\Sellsy\Entities\Geocode^ { + +lat: 42.1040 + +lng: 6.43010 + } + } +} +``` + +#### Create a resource + + +When creating a resource, the `store()` method should be called. This method expect the entity object as first parameter : + +```php +use Hydrat\Sellsy\Entities\Contact; +use Hydrat\Sellsy\Entities\ContactSync; +use Hydrat\Sellsy\Entities\ContactSocials; + +$contacts = new ContactsApi(); + +$contacts->store(new Contact([ + 'civility' => 'mr', + 'first_name' => 'Jean', + 'last_name' => 'MOULIN', + 'email' => 'user@example.com', + 'website' => 'example.com', + 'mobile_number' => '0612121212', + 'position' => 'Directeur', + 'social' => new ContactSocials([ + 'twitter' => 'https://twitter.com/u/example', + ]), + 'sync' => new ContactSync(), +])); +``` + +The API returns the entity, and therefore you can chain `->entity()` to retreive the created entity. +The `store()` method accept a `$query` parameters variable as second argument. + + +#### Update a resource + + +When updating a resource, the `update()` method should be called. This method expect the Contact entity to be updated : + +```php +use Hydrat\Sellsy\Entities\Contact; + +$contacts = new ContactsApi(); + +$contacts->update(new Contact([ + 'id' => 35536947, + 'first_name' => 'Jean', + 'last_name' => 'CASTEX', + 'note' => '', +])); +``` + +The API returns the entity, and therefore you can chain `->entity()` to retreive the created entity. +The `store()` method accept a `$query` parameters variable as second argument. + +#### Delete a resource + + +When deleting a resource, the `destroy()` method should be called. This method expect the Contact ID to be deleted : + +```php +$contacts->delete(35536947)->json(); +``` + +This client return DTO objects, and expect DTO objects as argument when updating or creating entities in the API. +Under the hood, we are using the [spatie/data-transfer-object](https://github.com/spatie/data-transfer-object) library, so make sure to consult their ducumentation to use DTO Entities objects properly. + + +## Contribute + + +Feel free to contribute to the package ! +If you find any security issue, please contact me at thomas@hydrat.agency instead of creating a public github issue. + +[First contribution guide](https://github.com/firstcontributions/first-contributions/blob/master/README.md) + + +## Credits + + +- [Thomas Georgel](https://github.com/tgeorgel) +- [All Contributors](../../contributors) + +## License + + +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. \ No newline at end of file diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 6420142..0000000 --- a/composer.lock +++ /dev/null @@ -1,2842 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "59282fd9bd04717989bd0f4a8b0b4e9a", - "packages": [ - { - "name": "doctrine/inflector", - "version": "2.1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "3249de584daab089c823ddc3f8efb108cee85a10" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/3249de584daab089c823ddc3f8efb108cee85a10", - "reference": "3249de584daab089c823ddc3f8efb108cee85a10", - "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", - "vimeo/psalm": "^4.10" - }, - "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": "2021-10-22T20:33:24+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "c1fd316f0a0f3325ed1e7cdbe61030418b868f9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/c1fd316f0a0f3325ed1e7cdbe61030418b868f9f", - "reference": "c1fd316f0a0f3325ed1e7cdbe61030418b868f9f", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.4-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/master" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2021-12-13T16:13:08+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2021-10-22T20:56:57+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "c5b547b9904106507e48c645b76ff74f18eea84e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c5b547b9904106507e48c645b76ff74f18eea84e", - "reference": "c5b547b9904106507e48c645b76ff74f18eea84e", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/master" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2022-01-02T11:26:46+00:00" - }, - { - "name": "illuminate/contracts", - "version": "7.x-dev", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "2449f2ea949ddf995a3dcffe5e21c768cf7d6478" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/2449f2ea949ddf995a3dcffe5e21c768cf7d6478", - "reference": "2449f2ea949ddf995a3dcffe5e21c768cf7d6478", - "shasum": "" - }, - "require": { - "php": "^7.2.5|^8.0", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.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": "2021-11-17T15:00:14+00:00" - }, - { - "name": "illuminate/filesystem", - "version": "7.x-dev", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "2013f94a3a7dff008be54884774548e3c222c3e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/2013f94a3a7dff008be54884774548e3c222c3e8", - "reference": "2013f94a3a7dff008be54884774548e3c222c3e8", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/finder": "^5.0" - }, - "suggest": { - "ext-ftp": "Required to use the Flysystem FTP driver.", - "illuminate/http": "Required for handling uploaded files (^7.0).", - "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.1).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/mime": "Required to enable support for guessing extensions (^5.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2020-10-27T15:11:37+00:00" - }, - { - "name": "illuminate/http", - "version": "7.x-dev", - "source": { - "type": "git", - "url": "https://github.com/illuminate/http.git", - "reference": "39d6e9eca58b575016be5d85cc1f223f632c0e95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/39d6e9eca58b575016be5d85cc1f223f632c0e95", - "reference": "39d6e9eca58b575016be5d85cc1f223f632c0e95", - "shasum": "" - }, - "require": { - "ext-json": "*", - "illuminate/session": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0" - }, - "suggest": { - "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", - "guzzlehttp/guzzle": "Required to use the HTTP Client (^6.3.1|^7.0.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Http\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Http package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2021-01-21T14:08:35+00:00" - }, - { - "name": "illuminate/session", - "version": "7.x-dev", - "source": { - "type": "git", - "url": "https://github.com/illuminate/session.git", - "reference": "b18bc348f4af2afae78e72ea332a4390c5c01a72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/b18bc348f4af2afae78e72ea332a4390c5c01a72", - "reference": "b18bc348f4af2afae78e72ea332a4390c5c01a72", - "shasum": "" - }, - "require": { - "ext-json": "*", - "illuminate/contracts": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5|^8.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0" - }, - "suggest": { - "illuminate/console": "Required to use the session:table command (^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Session\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Session package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2020-10-27T15:11:37+00:00" - }, - { - "name": "illuminate/support", - "version": "7.x-dev", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "c7b42acd009c94a3f8b749a65f6835db90174d58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/c7b42acd009c94a3f8b749a65f6835db90174d58", - "reference": "c7b42acd009c94a3f8b749a65f6835db90174d58", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^1.4|^2.0", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/contracts": "^7.0", - "nesbot/carbon": "^2.31", - "php": "^7.2.5|^8.0", - "voku/portable-ascii": "^1.4.8" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^7.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7|^4.0).", - "symfony/process": "Required to use the composer class (^5.0).", - "symfony/var-dumper": "Required to use the dd function (^5.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^4.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "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": "2021-12-06T19:25:06+00:00" - }, - { - "name": "nesbot/carbon", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "cc324085cec16beb7852ca86daf0188907bbcc27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cc324085cec16beb7852ca86daf0188907bbcc27", - "reference": "cc324085cec16beb7852ca86daf0188907bbcc27", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.1.8 || ^8.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", - "squizlabs/php_codesniffer": "^3.4" - }, - "default-branch": true, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.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": "https://markido.com" - }, - { - "name": "kylekatarnls", - "homepage": "https://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "docs": "https://carbon.nesbot.com/docs", - "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": "2022-02-12T11:03:37+00:00" - }, - { - "name": "psr/container", - "version": "1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "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/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "aa4f89e91c423b516ff226c50dc83f824011c253" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/aa4f89e91c423b516ff226c50dc83f824011c253", - "reference": "aa4f89e91c423b516ff226c50dc83f824011c253", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "suggest": { - "fig/event-dispatcher-util": "Provides some useful PSR-14 utilities" - }, - "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": "2021-02-08T21:15:39+00:00" - }, - { - "name": "psr/http-client", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "22b2ef5687f43679481615605d7a15c557ce85b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/22b2ef5687f43679481615605d7a15c557ce85b1", - "reference": "22b2ef5687f43679481615605d7a15c557ce85b1", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "time": "2020-09-19T09:12:31+00:00" - }, - { - "name": "psr/http-factory", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/36fa03d50ff82abcae81860bdaf4ed9a1510c7cd", - "reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2020-09-17T16:52:55+00:00" - }, - { - "name": "psr/http-message", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", - "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2019-08-29T13:16:46+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "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": "2017-10-23T01:57:42+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "spatie/data-transfer-object", - "version": "v2.x-dev", - "source": { - "type": "git", - "url": "https://github.com/spatie/data-transfer-object.git", - "reference": "167ebbe56ead65ef23abcfae7b75f932afd496a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/167ebbe56ead65ef23abcfae7b75f932afd496a4", - "reference": "167ebbe56ead65ef23abcfae7b75f932afd496a4", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "suggest": { - "phpstan/phpstan": "Take advantage of checkUninitializedProperties with \\Spatie\\DataTransferObject\\PHPstan\\PropertiesAreAlwaysInitializedExtension" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\DataTransferObject\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brent Roose", - "email": "brent@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Data transfer objects with batteries included", - "homepage": "https://github.com/spatie/data-transfer-object", - "keywords": [ - "data-transfer-object", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/data-transfer-object/issues", - "source": "https://github.com/spatie/data-transfer-object/tree/v2" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-12-07T05:41:11+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "2.5.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-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": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/error-handler", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5", - "reference": "c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" - }, - "default-branch": true, - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.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": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "2.5.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-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/2.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/finder", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "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": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-26T16:34:36+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "22f3df0753697142f18ee957cd5b202457ca35c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/22f3df0753697142f18ee957cd5b202457ca35c8", - "reference": "22f3df0753697142f18ee957cd5b202457ca35c8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "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": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/5.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-04T18:39:09+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "8a2ad2a1942c45554d283ed8720fe0aca3eba3f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8a2ad2a1942c45554d283ed8720fe0aca3eba3f3", - "reference": "8a2ad2a1942c45554d283ed8720fe0aca3eba3f3", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/5.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-03T16:18:51+00:00" - }, - { - "name": "symfony/mime", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "e1503cfb5c9a225350f549d3bb99296f4abfb80f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/e1503cfb5c9a225350f549d3bb99296f4abfb80f", - "reference": "e1503cfb5c9a225350f549d3bb99296f4abfb80f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.1|^6.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows manipulating MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-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/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-14T14:02:44+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "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.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "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/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-06-05T21:20:04+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-13T13:58:33+00:00" - }, - { - "name": "symfony/translation", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "7e4d52d39e5d86f3f04bef46fa29a1091786bc73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/7e4d52d39e5d86f3f04bef46fa29a1091786bc73", - "reference": "7e4d52d39e5d86f3f04bef46fa29a1091786bc73", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" - }, - "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" - }, - "provide": { - "symfony/translation-implementation": "2.3" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.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": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/5.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-09T15:49:12+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "2.5.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-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/2.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-08-17T14:20:01+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "5.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "a0f56a2256ca20e5ebdc7da261569a0238240b6c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a0f56a2256ca20e5ebdc7da261569a0238240b6c", - "reference": "a0f56a2256ca20e5ebdc7da261569a0238240b6c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", - "twig/twig": "^2.13|^3.0.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "default-branch": true, - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/5.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-02-04T18:39:09+00:00" - }, - { - "name": "voku/portable-ascii", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/voku/portable-ascii.git", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", - "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.6.1" - }, - "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": "2022-01-24T18:55:24+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/src/Api/AbstractApi.php b/src/Api/AbstractApi.php index 4bd925a..1e4c576 100644 --- a/src/Api/AbstractApi.php +++ b/src/Api/AbstractApi.php @@ -3,6 +3,10 @@ namespace Hydrat\Sellsy\Api; use Hydrat\Sellsy\Core\Connection; +use Illuminate\Http\Client\Response; +use Hydrat\Sellsy\Entities\Pagination; +use Hydrat\Sellsy\Contracts\EntityContract; +use Hydrat\Sellsy\Contracts\EntityCollectionContract; /** * The default API client class to extend. @@ -18,9 +22,30 @@ abstract class AbstractApi /** * The Connection instance used to generate API requests. * - * @var Connection + * @var \Hydrat\Sellsy\Core\Connection */ - protected $connection; + protected ?Connection $connection; + + /** + * The last request response. + * + * @var \Illuminate\Http\Client\Response + */ + protected ?Response $response; + + /** + * The related entity. + * + * @var string \Hydrat\Sellsy\Contracts\EntityContract + */ + protected string $entity; + + /** + * The related entity collection. + * + * @var string \Hydrat\Sellsy\Contracts\EntityCollectionContract + */ + protected string $collection; /** * The Api class constructor, setting up common tools. @@ -29,4 +54,65 @@ public function __construct() { $this->connection = Connection::getInstance(); } + + /** + * Get the last request response. + * + * @return \Illuminate\Http\Client\Response + */ + public function response(): Response + { + return $this->response; + } + + /** + * Get the last request json data. + * + * @return array + */ + public function json(): ?array + { + $data = $this->response->json(); + + if (isset($data['_embed'])) { + $data = array_merge($data, array_merge($data, $data['_embed'])); + unset($data['_embed']); + } + + return $data; + } + + /** + * Get the last request parsed entity. + * + * @return EntityContract + */ + public function entity(): ?EntityContract + { + return new $this->entity($this->json()); + } + + /** + * Get the last request parsed entity. + * + * @return EntityContract + */ + public function entities(): ?EntityCollectionContract + { + $data = $this->json(); + + return isset($data['data']) ? new $this->collection($data['data']) : null; + } + + /** + * Get the last request parsed entity. + * + * @return EntityContract + */ + public function pagination(): ?Pagination + { + $data = $this->json(); + + return isset($data['pagination']) ? new Pagination($data['pagination']) : null; + } } diff --git a/src/Api/ContactsApi.php b/src/Api/ContactsApi.php index da8c368..6b6f81d 100644 --- a/src/Api/ContactsApi.php +++ b/src/Api/ContactsApi.php @@ -2,6 +2,9 @@ namespace Hydrat\Sellsy\Api; +use Hydrat\Sellsy\Entities\Contact; +use Hydrat\Sellsy\Collections\ContactCollection; + /** * The API client for the `contacts` namespace. * @@ -13,62 +16,129 @@ class ContactsApi extends AbstractApi { /** - * Get all contacts. + * @inheritdoc + */ + public function __construct() + { + parent::__construct(); + + $this->entity = Contact::class; + $this->collection = ContactCollection::class; + } + + + /** + * List all contacts. * - * @param array $options The options as described in the documentation. + * @param array $query Query parameters. * * @return \Illuminate\Http\Client\Response + * @see https://api.sellsy.com/doc/v2/#operation/get-contacts */ - public function index(array $options = []) + public function index(array $query = []) { - return $this->connection - ->request('contacts') - ->get($options); + $response = $this->connection + ->request('contacts') + ->get($query); + + $this->response = $response; + $this->response->throw(); + + return $this; } /** * Show a single contact by id. * - * @param string $id The contact id to retrieve. + * @param string $id The contact id to retrieve. + * @param array $query Query parameters. * - * @return \Illuminate\Http\Client\Response + * @return self + * @see https://api.sellsy.com/doc/v2/#operation/get-contact */ - public function show(string $id) + public function show(string $id, array $query = []): self { - return $this->connection - ->request("contacts/{$id}") - ->get(); + $response = $this->connection + ->request("contacts/{$id}") + ->get($query); + + $this->response = $response; + $this->response->throw(); + + return $this; } /** * Store (create) an contact. * - * @param array $data The contact data. + * @param Contact $contact The contact entity to store. + * @param array $query Query parameters. * - * @return \Illuminate\Http\Client\Response + * @return self + * @see https://api.sellsy.com/doc/v2/#operation/create-contact */ - public function store(array $data = []) + public function store(Contact $contact, array $query = []): self { - return $this->connection - ->request('contacts') - ->post($data); + $body = $contact->except('id') + ->except('owner') + ->toArray(); + + $response = $this->connection + ->request('contacts') + ->post(array_filter($body) + $query); + + $this->response = $response; + $this->response->throw(); + + return $this; } /** - * Update an existing contact by id. + * Update an existing contact. * - * @param string $id The contact ID to update. - * @param array $data The contact data. + * @param Contact $contact The contact entity to store. + * @param array $query Query parameters. * - * @return \Illuminate\Http\Client\Response + * @return self + * @see https://api.sellsy.com/doc/v2/#operation/update-contact + */ + public function update(Contact $contact, array $query = []): self + { + $body = $contact->except('id') + ->except('owner') + ->toArray(); + + $response = $this->connection + ->request("contacts/{$contact->id}") + ->put(array_filter($body) + $query); + + $this->response = $response; + $this->response->throw(); + + return $this; + } + + + /** + * Delete an existing contact. + * + * @param int $id The contact id to be deleted. + * + * @return self + * @see https://api.sellsy.com/doc/v2/#operation/delete-contact */ - public function update(string $id, array $data = []) + public function destroy(int $id): self { - return $this->connection - ->request("contacts/{$id}") - ->put($data); + $response = $this->connection + ->request("contacts/{$id}") + ->delete(); + + $this->response = $response; + $this->response->throw(); + + return $this; } } diff --git a/src/Collections/ContactCollection.php b/src/Collections/ContactCollection.php new file mode 100644 index 0000000..483a2fd --- /dev/null +++ b/src/Collections/ContactCollection.php @@ -0,0 +1,20 @@ + + * @version 1.0 + * @access public + * + * @method \Hydrat\Sellsy\Entities\Contact current + */ +class ContactCollection extends DataTransferObjectCollection implements EntityCollectionContract +{ +} diff --git a/src/Contracts/EntityCollectionContract.php b/src/Contracts/EntityCollectionContract.php new file mode 100644 index 0000000..26c84ec --- /dev/null +++ b/src/Contracts/EntityCollectionContract.php @@ -0,0 +1,15 @@ + + * @version 1.0 + * @access public + */ +interface EntityCollectionContract +{ +} diff --git a/src/Contracts/EntityContract.php b/src/Contracts/EntityContract.php new file mode 100644 index 0000000..bf9e97c --- /dev/null +++ b/src/Contracts/EntityContract.php @@ -0,0 +1,15 @@ + + * @version 1.0 + * @access public + */ +interface EntityContract +{ +} diff --git a/src/Core/Client.php b/src/Core/Client.php index 56a3afb..39a3e4d 100644 --- a/src/Core/Client.php +++ b/src/Core/Client.php @@ -15,6 +15,11 @@ */ class Client { + public function __call(string $name, array $arguments) + { + return static::__callStatic($name, $arguments); + } + /** * To return the collection instance, initiated by the definition. * diff --git a/src/Core/Config.php b/src/Core/Config.php index 9de50ab..2de910f 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -42,13 +42,28 @@ private function __construct() { } + /** + * Singletons should not be cloneable. + */ + protected function __clone() + { + } + + /** + * Singletons should not be restorable from strings. + */ + public function __wakeup() + { + throw new \Exception("Cannot unserialize a singleton."); + } + /** * The configuration array. * * @var array */ protected array $config = [ - 'url' => '', + 'url' => 'https://api.sellsy.com/v2/', 'client_id' => '', 'client_secret' => '', 'authentication' => [ diff --git a/src/Core/Connection.php b/src/Core/Connection.php index abc8586..c16d2ff 100644 --- a/src/Core/Connection.php +++ b/src/Core/Connection.php @@ -50,6 +50,21 @@ private function __construct() { $this->config = Config::getInstance(); } + + /** + * Singletons should not be cloneable. + */ + protected function __clone() + { + } + + /** + * Singletons should not be restorable from strings. + */ + public function __wakeup() + { + throw new \Exception("Cannot unserialize a singleton."); + } /** * Build up Request with prepared Auth and Endpoint. diff --git a/src/Entities/Address.php b/src/Entities/Address.php new file mode 100644 index 0000000..e327df3 --- /dev/null +++ b/src/Entities/Address.php @@ -0,0 +1,86 @@ + + * @version 1.0 + * @access public + */ +class Address extends FlexibleDataTransferObject implements EntityContract +{ + /** + * Address ID from Sellsy. + */ + public ?int $id; + + /** + * Address name. + */ + public ?string $name; + + /** + * Address line 1 + */ + public ?string $address_line_1; + + /** + * Address line 2 + */ + public ?string $address_line_2; + + /** + * Address line 3 + */ + public ?string $address_line_3; + + /** + * Address line 4 + */ + public ?string $address_line_4; + + /** + * Address postal code. + */ + public ?string $postal_code; + + /** + * Address city. + * e.g: Paris + */ + public ?string $city; + + /** + * Address country. + * e.g: France + */ + public ?string $country; + + /** + * Address country_code. + * e.g: FR + */ + public ?string $country_code; + + /** + * Weither the address is used as invoicing address or not. + */ + public bool $is_invoicing_address; + + /** + * Weither the address is used as delivery address or not. + */ + public bool $is_delivery_address; + + /** + * Address Georcoding + */ + public ?Geocode $geocode; +} diff --git a/src/Entities/Contact.php b/src/Entities/Contact.php new file mode 100644 index 0000000..a07a74e --- /dev/null +++ b/src/Entities/Contact.php @@ -0,0 +1,130 @@ + + * @version 1.0 + * @access public + */ +class Contact extends FlexibleDataTransferObject implements EntityContract +{ + /** + * Contact ID from Sellsy. + */ + public ?int $id; + + /** + * Civility of staff. + * One of ["mr", "mrs", "ms"]. + */ + public ?string $civility; + + /** + * Contact first name. + */ + public ?string $first_name; + + /** + * Contact name. + */ + public ?string $last_name; + + /** + * Contact email. + */ + public ?string $email; + + /** + * Contact website. + */ + public ?string $website; + + /** + * Contact phone number. + */ + public ?string $phone_number; + + /** + * Contact mobile number. + */ + public ?string $mobile_number; + + /** + * Contact fax number. + */ + public ?string $fax_number; + + /** + * Contact job. + */ + public ?string $position; + + /** + * Contact birth date. + */ + public ?string $birth_date; + + /** + * Contact avatar URL. + */ + public ?string $avatar; + + /** + * Note on contact. + */ + public string $note = ''; + + /** + * Associative array with contact socials. + */ + public ?ContactSocials $social; + + /** + * Associative array synchronisation to turn on or off. + */ + public ?ContactSync $sync; + + /** + * Status archived or not. + */ + public bool $is_archived = false; + + /** + * Contact invoicing address ID from Sellsy. + */ + public ?int $invoicing_address_id; + + /** + * Contact delivery address ID from Sellsy. + */ + public ?int $delivery_address_id; + + /** + * Contact invoicing address. + */ + public ?Address $invoicing_address; + + /** + * Contact delivery address. + */ + public ?Address $delivery_address; + + /** + * Contact creates date from Sellsy. + */ + public ?string $created; + + /** + * Contact updated date from Sellsy. + */ + public ?array $owner; +} diff --git a/src/Entities/ContactSocials.php b/src/Entities/ContactSocials.php new file mode 100644 index 0000000..456d0c1 --- /dev/null +++ b/src/Entities/ContactSocials.php @@ -0,0 +1,37 @@ + + * @version 1.0 + * @access public + */ +class ContactSocials extends FlexibleDataTransferObject implements EntityContract +{ + /** + * The contact twitter account link. + */ + public ?string $twitter; + + /** + * The contact facebook account link. + */ + public ?string $facebook; + + /** + * The contact linkedin account link. + */ + public ?string $linkedin; + + /** + * The contact viadeo account link. + */ + public ?string $viadeo; +} diff --git a/src/Entities/ContactSync.php b/src/Entities/ContactSync.php new file mode 100644 index 0000000..d5c87b9 --- /dev/null +++ b/src/Entities/ContactSync.php @@ -0,0 +1,32 @@ + + * @version 1.0 + * @access public + */ +class ContactSync extends FlexibleDataTransferObject implements EntityContract +{ + /** + * Weither the contact should be synchronised with mailchimp. + */ + public bool $mailchimp = true; + + /** + * Weither the contact should be synchronised with mailjet. + */ + public bool $mailjet = true; + + /** + * Weither the contact should be synchronised with simplemail. + */ + public bool $simplemail = true; +} diff --git a/src/Entities/Geocode.php b/src/Entities/Geocode.php new file mode 100644 index 0000000..611af1f --- /dev/null +++ b/src/Entities/Geocode.php @@ -0,0 +1,27 @@ + + * @version 1.0 + * @access public + */ +class Geocode extends FlexibleDataTransferObject implements EntityContract +{ + /** + * Geocode latitude. + */ + public ?float $lat; + + /** + * Geocode longitude. + */ + public ?float $lng; +} diff --git a/src/Entities/Pagination.php b/src/Entities/Pagination.php new file mode 100644 index 0000000..b76fd96 --- /dev/null +++ b/src/Entities/Pagination.php @@ -0,0 +1,37 @@ + + * @version 1.0 + * @access public + */ +class Pagination extends FlexibleDataTransferObject implements EntityContract +{ + /** + * The per_page pagination results. + */ + public int $limit; + + /** + * The total number of results available. + */ + public int $total; + + /** + * The number of results returned in this query. + */ + public int $count; + + /** + * The offset. + */ + public int $offset; +} diff --git a/src/Exceptions/ApiClientErrorException.php b/src/Exceptions/ApiClientErrorException.php new file mode 100644 index 0000000..884a386 --- /dev/null +++ b/src/Exceptions/ApiClientErrorException.php @@ -0,0 +1,10 @@ +