From 673031a7a408260e8c6e8bdb25bdec9ca8fcf130 Mon Sep 17 00:00:00 2001 From: SD Date: Mon, 15 Apr 2019 14:39:56 +0300 Subject: [PATCH 01/10] increase curl timeout from 5 to 10 sec --- vatnumber.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vatnumber.php b/vatnumber.php index ac5adc9..ce94ab8 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -158,9 +158,9 @@ public static function WebServiceCheck($vat_number) $vat = Tools::substr($vat_number, 2); $url = 'http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms='.urlencode($prefix).'&iso='.urlencode($prefix).'&vat='.urlencode($vat); @ini_set('default_socket_timeout', 2); - for ($i = 0; $i < 3; $i++) + for ($i = 0; $i < 2; $i++) { - if ($page_res = Tools::file_get_contents($url)) + if ($page_res = Tools::file_get_contents($url, false, null, 10)) { if (preg_match('/invalid VAT number/i', $page_res)) { From ca316206f40fb99a8ad4b3bbc798cb68f6a474fb Mon Sep 17 00:00:00 2001 From: GoT Date: Mon, 1 Feb 2021 11:43:10 +0100 Subject: [PATCH 02/10] Update Readme.md --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index 3086fb2..73db56e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,7 @@ # European VAT number +**This module has been archived, it’s no longer maintained but you still can fork it if you need it for your shop.** + ## About Enables you to enter the intra-community VAT number when creating the address. You must fill in the company field to allow entering the VAT number. From 42cb2ee818a08885bb9e7e81436bc9bfba36f124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Fernandez?= Date: Fri, 20 Oct 2023 10:17:33 +0200 Subject: [PATCH 03/10] Remove United Kingdom --- vatnumber.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/vatnumber.php b/vatnumber.php index ce94ab8..9ef079f 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -109,8 +109,6 @@ public static function getPrefixIntracomVAT() //Spain 'SE' => 'SE', //Sweden - 'GB' => 'GB', - //United Kingdom 'CY' => 'CY', //Cyprus 'EE' => 'EE', From 1c28225917d3a3b99f9de366c518cd9f87186949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Fernandez?= Date: Fri, 20 Oct 2023 10:37:34 +0200 Subject: [PATCH 04/10] Clean Readme.md --- Readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Readme.md b/Readme.md index 73db56e..3086fb2 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,5 @@ # European VAT number -**This module has been archived, it’s no longer maintained but you still can fork it if you need it for your shop.** - ## About Enables you to enter the intra-community VAT number when creating the address. You must fill in the company field to allow entering the VAT number. From 5e345b86092d32e385b48b252ad119003e164abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= Date: Fri, 20 Oct 2023 15:48:26 +0200 Subject: [PATCH 05/10] Hook to actionTaxManager for 1.7.7+ B2B vat issue --- upgrade/install-2.1.1.php | 9 +++++++++ vatnumber.php | 11 +++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 upgrade/install-2.1.1.php diff --git a/upgrade/install-2.1.1.php b/upgrade/install-2.1.1.php new file mode 100644 index 0000000..a7db3a5 --- /dev/null +++ b/upgrade/install-2.1.1.php @@ -0,0 +1,9 @@ +registerHook('actionTaxManager')); +} diff --git a/vatnumber.php b/vatnumber.php index 9ef079f..d5eb931 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -33,7 +33,7 @@ public function __construct() { $this->name = 'vatnumber'; $this->tab = 'billing_invoicing'; - $this->version = '2.1.0'; + $this->version = '2.1.1'; $this->author = 'PrestaShop'; $this->need_instance = 0; @@ -56,7 +56,8 @@ public function install() return parent::install() && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1) - && $this->registerHook('actionValidateCustomerAddressForm'); + && $this->registerHook('actionValidateCustomerAddressForm') + && $this->registerHook('actionTaxManager'); } public function uninstall() @@ -66,14 +67,12 @@ public function uninstall() public function enable($force_all = false) { - parent::enable($force_all); - Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); + return parent::enable($force_all) && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); } public function disable($force_all = false) { - parent::disable($force_all); - Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); + return parent::disable($force_all) && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); } public static function getPrefixIntracomVAT() From 75a9559ad20134a8152d540cf9e22471f1f95d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= Date: Fri, 20 Oct 2023 16:16:09 +0200 Subject: [PATCH 06/10] add fop author --- vatnumber.php | 1 + 1 file changed, 1 insertion(+) diff --git a/vatnumber.php b/vatnumber.php index d5eb931..a69ac8a 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -19,6 +19,7 @@ * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA +* @author Friends of Presta * @copyright 2007-2017 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA From 0c7c7ed924744682ec3a43a0bedaf44d60342f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= Date: Fri, 20 Oct 2023 16:27:12 +0200 Subject: [PATCH 07/10] author to Friends of Presta --- vatnumber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vatnumber.php b/vatnumber.php index a69ac8a..a90548d 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -35,7 +35,7 @@ public function __construct() $this->name = 'vatnumber'; $this->tab = 'billing_invoicing'; $this->version = '2.1.1'; - $this->author = 'PrestaShop'; + $this->author = 'Friends of Presta'; $this->need_instance = 0; $this->tax_manager_class = 'VATNumberTaxManager'; From 69092aba12363618d271dde1aa47a03e7c7a8dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Fernandez?= Date: Fri, 20 Oct 2023 15:50:44 +0200 Subject: [PATCH 08/10] Add PHP CS Fixer --- .gitignore | 3 + .php-cs-fixer.dist.php | 11 + composer.json | 5 +- composer.lock | 2312 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 2330 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .php-cs-fixer.dist.php create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53f7481 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/vendor/ +/config_*.xml +.php_cs.cache diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..9830d6d --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,11 @@ +setUsingCache(true) + ->getFinder() + ->in(__DIR__) + ->exclude('vendor'); + +return $config; diff --git a/composer.json b/composer.json index 8732995..206cfa9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,10 @@ } ], "require": { - "php": ">=5.3.2" + "php": ">=5.6" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.16" }, "config": { "preferred-install": "dist" diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..197d8be --- /dev/null +++ b/composer.lock @@ -0,0 +1,2312 @@ +{ + "_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": "5b9dad412f6a55ea3272a0f0f71176a1", + "packages": [], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-21T20:24:37+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "shasum": "" + }, + "require": { + "composer/pcre": "^1", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-24T20:20:32+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.14.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1 || ^2", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.14.3" + }, + "time": "2023-02-01T09:20:38+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + }, + "time": "2023-09-27T20:04:15+00:00" + }, + { + "name": "doctrine/lexer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "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": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/2.1.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-14T08:49:07+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.19.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0 || ^8.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4.2", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.19-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-11-15T17:17:55+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v3.1.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", + "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v3.1.5" + }, + "time": "2018-02-28T20:30:58+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, + "abandoned": true, + "time": "2020-10-14T08:39:05+00:00" + }, + { + "name": "prestashop/autoindex", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShopCorp/autoindex.git", + "reference": "92e10242f94a99163dece280f6bd7b7c2b79c158" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShopCorp/autoindex/zipball/92e10242f94a99163dece280f6bd7b7c2b79c158", + "reference": "92e10242f94a99163dece280f6bd7b7c2b79c158", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^3.1", + "php": ">=5.6", + "symfony/console": "^3.4", + "symfony/finder": "^3.4" + }, + "bin": [ + "bin/autoindex" + ], + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\AutoIndex\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "Automatically add an 'index.php' in all the current or specified directories and all sub-directories.", + "homepage": "https://github.com/PrestaShopCorp/autoindex", + "support": { + "source": "https://github.com/PrestaShopCorp/autoindex/tree/v1.0.0" + }, + "time": "2020-03-11T13:37:03+00:00" + }, + { + "name": "prestashop/header-stamp", + "version": "v1.7", + "source": { + "type": "git", + "url": "https://github.com/PrestaShopCorp/header-stamp.git", + "reference": "d77ce6d0a7f066670a4774be88f05e5f07b4b6fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShopCorp/header-stamp/zipball/d77ce6d0a7f066670a4774be88f05e5f07b4b6fc", + "reference": "d77ce6d0a7f066670a4774be88f05e5f07b4b6fc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^3.1", + "php": ">=5.6", + "symfony/console": "^3.4 || ~4.0 || ~5.0", + "symfony/finder": "^3.4 || ~4.0 || ~5.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "1.*" + }, + "bin": [ + "bin/header-stamp" + ], + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\HeaderStamp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "Rewrite your file headers to add the license or to make them up-to-date", + "homepage": "https://github.com/PrestaShopCorp/header-stamp", + "support": { + "issues": "https://github.com/PrestaShopCorp/header-stamp/issues", + "source": "https://github.com/PrestaShopCorp/header-stamp/tree/v1.7" + }, + "time": "2020-12-09T16:40:38+00:00" + }, + { + "name": "prestashop/php-dev-tools", + "version": "v3.16.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/php-dev-tools.git", + "reference": "785108c29ef6f580930372d88b8f551740fdee98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/785108c29ef6f580930372d88b8f551740fdee98", + "reference": "785108c29ef6f580930372d88b8f551740fdee98", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^2.14", + "php": ">=5.6.0", + "prestashop/autoindex": "^1.0", + "prestashop/header-stamp": "^1.0", + "squizlabs/php_codesniffer": "^3.4", + "symfony/console": "~3.2 || ~4.0 || ~5.0", + "symfony/filesystem": "~3.2 || ~4.0 || ~5.0" + }, + "conflict": { + "friendsofphp/php-cs-fixer": "2.18.3" + }, + "bin": [ + "bin/prestashop-coding-standards" + ], + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\CodingStandards\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PrestaShop coding standards", + "support": { + "issues": "https://github.com/PrestaShop/php-dev-tools/issues", + "source": "https://github.com/PrestaShop/php-dev-tools/tree/v3.16.1" + }, + "time": "2021-10-18T07:48:21+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "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": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "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": "squizlabs/php_codesniffer", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2023-02-22T23:07:41+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "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", + "support": { + "source": "https://github.com/symfony/console/tree/v3.4.47" + }, + "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-24T10:57:07+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.4.44", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "^3.4|^4.0|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.44" + }, + "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" + } + ], + "abandoned": "symfony/error-handler", + "time": "2022-07-28T16:29:46+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "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/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.4.26", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", + "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": "" + }, + "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.26" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-06T06:34:20+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "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/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-31T13:04:02+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "reference": "b6b6ad3db3edb1b4b1c1896b1975fb684994de6e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "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/v3.4.47" + }, + "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-16T17:02:08+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.4.21", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:03:56+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-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.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-28T09:04:16+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "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.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.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-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-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.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-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.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-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.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.28", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.4.28" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-07T10:36:04+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-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\\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/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.4.21", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", + "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1|^2|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:03:56+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6" + }, + "platform-dev": [], + "plugin-api-version": "2.6.0" +} From a644270c3dea1981815b3839b8afdb56166c7312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Fernandez?= Date: Fri, 20 Oct 2023 15:54:54 +0200 Subject: [PATCH 09/10] First launch PHP CS Fixer --- VATNumberTaxManager.php | 68 +-- ajax.php | 6 +- index.php | 2 +- translations/index.php | 18 +- upgrade/install-2.0.php | 7 +- upgrade/install-2.1.1.php | 7 +- vatnumber.php | 535 +++++++++--------- views/index.php | 18 +- .../admin/_configure/helpers/form/index.php | 18 +- views/templates/index.php | 18 +- 10 files changed, 337 insertions(+), 360 deletions(-) diff --git a/VATNumberTaxManager.php b/VATNumberTaxManager.php index 6f80c93..dbe0ee4 100755 --- a/VATNumberTaxManager.php +++ b/VATNumberTaxManager.php @@ -26,48 +26,48 @@ class VATNumberTaxManager implements TaxManagerInterface { - public static function isAvailableForThisAddress(Address $address) - { - /* - HOTFIX - - For some reason, this check is called 6 times (?) + public static function isAvailableForThisAddress(Address $address) + { + /* + HOTFIX - 1 w. the real address - 2 w.o. the real address + For some reason, this check is called 6 times (?) - 1 w. the real address - 2 w.o. the real address + 1 w. the real address + 2 w.o. the real address - => [1 0 0 1 0 0] + 1 w. the real address + 2 w.o. the real address - So we need to filter out the weird calls... + => [1 0 0 1 0 0] - We do this by caching the correct calls between calls; - by creating a static variable, which we save the address to, - if it does not contain NULL in some of the other fields. - */ + So we need to filter out the weird calls... - static $cached_address = NULL; + We do this by caching the correct calls between calls; + by creating a static variable, which we save the address to, + if it does not contain NULL in some of the other fields. + */ - if ($address->id_customer != NULL) { - $cached_address = $address; - } + static $cached_address = null; - // Now, check on the cached address object - return (!empty($cached_address->vat_number) - && !empty($cached_address->id_country) - && $cached_address->id_country != Configuration::get('VATNUMBER_COUNTRY') - && Configuration::get('VATNUMBER_MANAGEMENT') - ); - } + if ($address->id_customer != null) { + $cached_address = $address; + } - public function getTaxCalculator() - { - // If the address matches the european vat number criterias no taxes are applied - $tax = new Tax(); - $tax->rate = 0; + // Now, check on the cached address object + return !empty($cached_address->vat_number) + && !empty($cached_address->id_country) + && $cached_address->id_country != Configuration::get('VATNUMBER_COUNTRY') + && Configuration::get('VATNUMBER_MANAGEMENT') + ; + } - return new TaxCalculator(array($tax)); - } + public function getTaxCalculator() + { + // If the address matches the european vat number criterias no taxes are applied + $tax = new Tax(); + $tax->rate = 0; + + return new TaxCalculator([$tax]); + } } diff --git a/ajax.php b/ajax.php index ee3aff6..015db92 100644 --- a/ajax.php +++ b/ajax.php @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ -include(dirname(__FILE__).'/../../config/config.inc.php'); -include(dirname(__FILE__).'/../../init.php'); -include(dirname(__FILE__).'/vatnumber.php'); +include dirname(__FILE__) . '/../../config/config.inc.php'; +include dirname(__FILE__) . '/../../init.php'; +include dirname(__FILE__) . '/vatnumber.php'; echo VatNumber::isApplicable(Tools::getValue('id_country')); diff --git a/index.php b/index.php index 0875d0a..cb62a84 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,7 @@ */ header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); diff --git a/translations/index.php b/translations/index.php index 54e037c..d75f4f0 100644 --- a/translations/index.php +++ b/translations/index.php @@ -23,13 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); exit; diff --git a/upgrade/install-2.0.php b/upgrade/install-2.0.php index 656b4d1..a3756b6 100644 --- a/upgrade/install-2.0.php +++ b/upgrade/install-2.0.php @@ -1,9 +1,10 @@ registerHook('actionValidateCustomerAddressForm')); + return $object->registerHook('actionValidateCustomerAddressForm'); } diff --git a/upgrade/install-2.1.1.php b/upgrade/install-2.1.1.php index a7db3a5..f5d6589 100644 --- a/upgrade/install-2.1.1.php +++ b/upgrade/install-2.1.1.php @@ -1,9 +1,10 @@ registerHook('actionTaxManager')); + return $object->registerHook('actionTaxManager'); } diff --git a/vatnumber.php b/vatnumber.php index a90548d..7fdff07 100644 --- a/vatnumber.php +++ b/vatnumber.php @@ -25,287 +25,262 @@ * International Registered Trademark & Property of PrestaShop SA */ -if (!defined('_PS_VERSION_')) - exit; +if (!defined('_PS_VERSION_')) { + exit; +} class VatNumber extends TaxManagerModule { - public function __construct() - { - $this->name = 'vatnumber'; - $this->tab = 'billing_invoicing'; - $this->version = '2.1.1'; - $this->author = 'Friends of Presta'; - $this->need_instance = 0; - - $this->tax_manager_class = 'VATNumberTaxManager'; - - $this->bootstrap = true; - parent::__construct(); - $id_country = (int)Configuration::get('VATNUMBER_COUNTRY'); - - if ($id_country == 0) - $this->warning = $this->l('No default country set.'); - - $this->displayName = $this->l('European VAT number'); - $this->description = $this->l('Enables you to enter the intra-community VAT number when creating the address. You must fill in the company field to allow entering the VAT number.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); - } - - public function install() - { - return - parent::install() - && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1) - && $this->registerHook('actionValidateCustomerAddressForm') - && $this->registerHook('actionTaxManager'); - } - - public function uninstall() - { - return (parent::uninstall() && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0)); - } - - public function enable($force_all = false) - { - return parent::enable($force_all) && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); - } - - public function disable($force_all = false) - { - return parent::disable($force_all) && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); - } - - public static function getPrefixIntracomVAT() - { - $intracom_array = array( - 'AT' => 'AT', - //Austria - 'BE' => 'BE', - //Belgium - 'DK' => 'DK', - //Denmark - 'FI' => 'FI', - //Finland - 'FR' => 'FR', - //France - 'FX' => 'FR', - //France métropolitaine - 'DE' => 'DE', - //Germany - 'GR' => 'EL', - //Greece - 'IE' => 'IE', - //Irland - 'IT' => 'IT', - //Italy - 'LU' => 'LU', - //Luxembourg - 'NL' => 'NL', - //Netherlands - 'PT' => 'PT', - //Portugal - 'ES' => 'ES', - //Spain - 'SE' => 'SE', - //Sweden - 'CY' => 'CY', - //Cyprus - 'EE' => 'EE', - //Estonia - 'HU' => 'HU', - //Hungary - 'LV' => 'LV', - //Latvia - 'LT' => 'LT', - //Lithuania - 'MT' => 'MT', - //Malta - 'PL' => 'PL', - //Poland - 'SK' => 'SK', - //Slovakia - 'CZ' => 'CZ', - //Czech Republic - 'SI' => 'SI', - //Slovenia - 'RO' => 'RO', - //Romania - 'BG' => 'BG', - //Bulgaria - 'HR' => 'HR', - //Croatia - ); - - return $intracom_array; - } - - public static function isApplicable($id_country) - { - return (((int)$id_country && array_key_exists(Country::getIsoById($id_country), self::getPrefixIntracomVAT())) ? 1 : 0); - } - - public static function WebServiceCheck($vat_number) - { - if (empty($vat_number)) - return array(); - $vat_number = str_replace(' ', '', $vat_number); - $prefix = Tools::substr($vat_number, 0, 2); - if (array_search($prefix, self::getPrefixIntracomVAT()) === false) - return array(Tools::displayError('Invalid VAT number')); - $vat = Tools::substr($vat_number, 2); - $url = 'http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms='.urlencode($prefix).'&iso='.urlencode($prefix).'&vat='.urlencode($vat); - @ini_set('default_socket_timeout', 2); - for ($i = 0; $i < 2; $i++) - { - if ($page_res = Tools::file_get_contents($url, false, null, 10)) - { - if (preg_match('/invalid VAT number/i', $page_res)) - { - @ini_restore('default_socket_timeout'); - - return array(Tools::displayError('VAT number not found')); - } - else if (preg_match('/valid VAT number/i', $page_res)) - { - @ini_restore('default_socket_timeout'); - - return array(); - } - else - ++$i; - } - else - sleep(1); - } - @ini_restore('default_socket_timeout'); - - return array(Tools::displayError('VAT number validation service unavailable')); - } - - public function getContent() - { - $echo = ''; - - if (Tools::isSubmit('submitVatNumber')) - { - if (Configuration::updateValue('VATNUMBER_COUNTRY', (int)Tools::getValue('VATNUMBER_COUNTRY'))) - $echo .= $this->displayConfirmation($this->l('Your country has been updated.')); - - if (Configuration::updateValue('VATNUMBER_CHECKING', (int)Tools::getValue('VATNUMBER_CHECKING'))) - $echo .= ((bool)Tools::getValue('VATNUMBER_CHECKING') ? $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now enabled.')) : $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now disabled.'))); - } - $echo .= $this->renderForm(); - - return $echo; - } - - public function renderForm() - { - $countries = Country::getCountries($this->context->language->id); - - $countries_fmt = array( - 0 => array( - 'id' => 0, - 'name' => $this->l('-- Choose a country --') - ) - ); - - foreach ($countries as $country) - $countries_fmt[] = array( - 'id' => $country['id_country'], - 'name' => $country['name'] - ); - - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs' - ), - 'input' => array( - array( - 'type' => 'select', - 'label' => $this->l('Customers\' country'), - 'desc' => $this->l('Filter customers\' country.'), - 'name' => 'VATNUMBER_COUNTRY', - 'required' => false, - 'default_value' => (int)$this->context->country->id, - 'options' => array( - 'query' => $countries_fmt, - 'id' => 'id', - 'name' => 'name', - ) - ), - array( - 'type' => 'switch', - 'label' => $this->l('Enable checking of the VAT number with the web service'), - 'name' => 'VATNUMBER_CHECKING', - 'is_bool' => true, - 'desc' => $this->l('The verification by the web service is slow. Enabling this option can slow down your shop.'), - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Enabled') - ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('Disabled') - ) - ), - ) - ), - 'submit' => array( - 'title' => $this->l('Save'), - ) - ), - ); - - $helper = new HelperForm(); - $helper->module = $this; - $helper->show_toolbar = false; - $helper->table = $this->table; - $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); - $helper->default_form_language = $lang->id; - $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; - $this->fields_form = array(); - - $helper->identifier = $this->identifier; - $helper->submit_action = 'submitVatNumber'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => $this->getConfigFieldsValues(), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - - return $helper->generateForm(array($fields_form)); - } - - public function getConfigFieldsValues() - { - return array( - 'VATNUMBER_COUNTRY' => Tools::getValue('VATNUMBER_COUNTRY', Configuration::get('VATNUMBER_COUNTRY')), - 'VATNUMBER_CHECKING' => Tools::getValue('VATNUMBER_CHECKING', Configuration::get('VATNUMBER_CHECKING')), - ); - } - - public function hookActionValidateCustomerAddressForm(&$params) - { - $form = $params['form']; - $is_valid = true; - - if (($vatNumber = $form->getField('vat_number')) && Configuration::get('VATNUMBER_MANAGEMENT') && Configuration::get('VATNUMBER_CHECKING')) { - $isAVatNumber = VatNumber::WebServiceCheck($vatNumber->getValue()); - if (is_array($isAVatNumber) && count($isAVatNumber) > 0) { - $vatNumber->addError($isAVatNumber[0]); - $is_valid = false; - } - } - - return $is_valid; - } + public function __construct() + { + $this->name = 'vatnumber'; + $this->tab = 'billing_invoicing'; + $this->version = '2.1.1'; + $this->author = 'Friends of Presta'; + $this->need_instance = 0; + + $this->tax_manager_class = 'VATNumberTaxManager'; + + $this->bootstrap = true; + parent::__construct(); + $id_country = (int) Configuration::get('VATNUMBER_COUNTRY'); + + if ($id_country == 0) { + $this->warning = $this->l('No default country set.'); + } + + $this->displayName = $this->l('European VAT number'); + $this->description = $this->l('Enables you to enter the intra-community VAT number when creating the address. You must fill in the company field to allow entering the VAT number.'); + $this->ps_versions_compliancy = ['min' => '1.6', 'max' => _PS_VERSION_]; + } + + public function install() + { + return parent::install() + && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1) + && $this->registerHook('actionValidateCustomerAddressForm') + && $this->registerHook('actionTaxManager'); + } + + public function uninstall() + { + return parent::uninstall() + && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); + } + + public function enable($force_all = false) + { + return parent::enable($force_all) + && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); + } + + public function disable($force_all = false) + { + return parent::disable($force_all) + && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); + } + + public static function getPrefixIntracomVAT() + { + $intracom_array = [ + 'AT' => 'AT', // Austria + 'BE' => 'BE', // Belgium + 'DK' => 'DK', // Denmark + 'FI' => 'FI', // Finland + 'FR' => 'FR', // France + 'FX' => 'FR', // France Métropolitaine + 'DE' => 'DE', // Germany + 'GR' => 'EL', // Greece + 'IE' => 'IE', // Ireland + 'IT' => 'IT', // Italy + 'LU' => 'LU', // Luxembourg + 'NL' => 'NL', // Netherlands + 'PT' => 'PT', // Portugal + 'ES' => 'ES', // Spain + 'SE' => 'SE', // Sweden + 'CY' => 'CY', // Cyprus + 'EE' => 'EE', // Estonia + 'HU' => 'HU', // Hungary + 'LV' => 'LV', // Latvia + 'LT' => 'LT', // Lithuania + 'MT' => 'MT', // Malta + 'PL' => 'PL', // Poland + 'SK' => 'SK', // Slovakia + 'CZ' => 'CZ', // Czech Republic + 'SI' => 'SI', // Slovenia + 'RO' => 'RO', // Romania + 'BG' => 'BG', // Bulgaria + 'HR' => 'HR', // Croatia + ]; + + return $intracom_array; + } + + public static function isApplicable($id_country) + { + return ((int) $id_country && array_key_exists(Country::getIsoById($id_country), self::getPrefixIntracomVAT())) ? 1 : 0; + } + + public static function WebServiceCheck($vat_number) + { + if (empty($vat_number)) { + return []; + } + $vat_number = str_replace(' ', '', $vat_number); + $prefix = Tools::substr($vat_number, 0, 2); + if (array_search($prefix, self::getPrefixIntracomVAT()) === false) { + return [Tools::displayError('Invalid VAT number')]; + } + $vat = Tools::substr($vat_number, 2); + $url = 'http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms=' . urlencode($prefix) . '&iso=' . urlencode($prefix) . '&vat=' . urlencode($vat); + @ini_set('default_socket_timeout', 2); + for ($i = 0; $i < 2; ++$i) { + if ($page_res = Tools::file_get_contents($url, false, null, 10)) { + if (preg_match('/invalid VAT number/i', $page_res)) { + @ini_restore('default_socket_timeout'); + + return [Tools::displayError('VAT number not found')]; + } elseif (preg_match('/valid VAT number/i', $page_res)) { + @ini_restore('default_socket_timeout'); + + return []; + } else { + ++$i; + } + } else { + sleep(1); + } + } + @ini_restore('default_socket_timeout'); + + return [Tools::displayError('VAT number validation service unavailable')]; + } + + public function getContent() + { + $echo = ''; + + if (Tools::isSubmit('submitVatNumber')) { + if (Configuration::updateValue('VATNUMBER_COUNTRY', (int) Tools::getValue('VATNUMBER_COUNTRY'))) { + $echo .= $this->displayConfirmation($this->l('Your country has been updated.')); + } + + if (Configuration::updateValue('VATNUMBER_CHECKING', (int) Tools::getValue('VATNUMBER_CHECKING'))) { + $echo .= ((bool) Tools::getValue('VATNUMBER_CHECKING') ? $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now enabled.')) : $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now disabled.'))); + } + } + $echo .= $this->renderForm(); + + return $echo; + } + + public function renderForm() + { + $countries = Country::getCountries($this->context->language->id); + + $countries_fmt = [ + 0 => [ + 'id' => 0, + 'name' => $this->l('-- Choose a country --'), + ], + ]; + + foreach ($countries as $country) { + $countries_fmt[] = [ + 'id' => $country['id_country'], + 'name' => $country['name'], + ]; + } + + $fields_form = [ + 'form' => [ + 'legend' => [ + 'title' => $this->l('Settings'), + 'icon' => 'icon-cogs', + ], + 'input' => [ + [ + 'type' => 'select', + 'label' => $this->l('Customers\' country'), + 'desc' => $this->l('Filter customers\' country.'), + 'name' => 'VATNUMBER_COUNTRY', + 'required' => false, + 'default_value' => (int) $this->context->country->id, + 'options' => [ + 'query' => $countries_fmt, + 'id' => 'id', + 'name' => 'name', + ], + ], + [ + 'type' => 'switch', + 'label' => $this->l('Enable checking of the VAT number with the web service'), + 'name' => 'VATNUMBER_CHECKING', + 'is_bool' => true, + 'desc' => $this->l('The verification by the web service is slow. Enabling this option can slow down your shop.'), + 'values' => [ + [ + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled'), + ], + [ + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled'), + ], + ], + ], + ], + 'submit' => [ + 'title' => $this->l('Save'), + ], + ], + ]; + + $helper = new HelperForm(); + $helper->module = $this; + $helper->show_toolbar = false; + $helper->table = $this->table; + $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT')); + $helper->default_form_language = $lang->id; + $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + $this->fields_form = []; + + $helper->identifier = $this->identifier; + $helper->submit_action = 'submitVatNumber'; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->tpl_vars = [ + 'fields_value' => $this->getConfigFieldsValues(), + 'languages' => $this->context->controller->getLanguages(), + 'id_language' => $this->context->language->id, + ]; + + return $helper->generateForm([$fields_form]); + } + + public function getConfigFieldsValues() + { + return [ + 'VATNUMBER_COUNTRY' => Tools::getValue('VATNUMBER_COUNTRY', Configuration::get('VATNUMBER_COUNTRY')), + 'VATNUMBER_CHECKING' => Tools::getValue('VATNUMBER_CHECKING', Configuration::get('VATNUMBER_CHECKING')), + ]; + } + + public function hookActionValidateCustomerAddressForm(&$params) + { + $form = $params['form']; + $is_valid = true; + + if (($vatNumber = $form->getField('vat_number')) && Configuration::get('VATNUMBER_MANAGEMENT') && Configuration::get('VATNUMBER_CHECKING')) { + $isAVatNumber = VatNumber::WebServiceCheck($vatNumber->getValue()); + if (is_array($isAVatNumber) && count($isAVatNumber) > 0) { + $vatNumber->addError($isAVatNumber[0]); + $is_valid = false; + } + } + + return $is_valid; + } } diff --git a/views/index.php b/views/index.php index d8f3648..2086be0 100644 --- a/views/index.php +++ b/views/index.php @@ -23,13 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../../"); + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); exit; diff --git a/views/templates/admin/_configure/helpers/form/index.php b/views/templates/admin/_configure/helpers/form/index.php index 54e037c..d75f4f0 100644 --- a/views/templates/admin/_configure/helpers/form/index.php +++ b/views/templates/admin/_configure/helpers/form/index.php @@ -23,13 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); exit; diff --git a/views/templates/index.php b/views/templates/index.php index 54e037c..d75f4f0 100644 --- a/views/templates/index.php +++ b/views/templates/index.php @@ -23,13 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); exit; From 932fbd10ae5a1b37cf3ca305f0a98bfd1bd2f7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= Date: Tue, 31 Oct 2023 10:29:28 +0100 Subject: [PATCH 10/10] Add Github release drafter and PR template --- .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++++++++ .github/release-drafter.yml | 15 +++++++++++++++ .github/workflows/build-release.yml | 7 +++++++ 3 files changed, 38 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/build-release.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..de605c9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ + + +| Questions | Answers +| ------------- | ------------------------------------------------------- +| Description? | Please be specific when describing the PR.
Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table. +| Type? | bug fix / improvement / new feature / refacto / critical +| BC breaks? | yes / no +| Deprecations? | yes / no +| Fixed ticket? | Fixes PrestaShop/Prestashop#{issue number here}. +| How to test? | Please indicate how to best verify that this PR is correct. + + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..7209621 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,15 @@ +branches: + - master +name-template: v$NEXT_PATCH_VERSION +tag-template: v$NEXT_PATCH_VERSION +categories: + - title: 🚀 Improvements + label: enhancement + - title: 🐛 Bug Fixes + label: bug +change-template: '- #$NUMBER: $TITLE by @$AUTHOR' +template: | + # Changes + + $CHANGES + diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..28ba23f --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,7 @@ +name: Build +on: [push, pull_request] + +jobs: + build-and-release-draft: + name: Build & Release draft + uses: PrestaShop/.github/.github/workflows/build-release.yml@master