From ba58fa5ac48871413aea56bc69e01d9b0401edf8 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Tue, 30 Jun 2020 12:32:27 +0200 Subject: [PATCH 1/2] add subnet mask IP support for maintenance mode process code review points alter version constraint for symfony/http-foundation to match previous version --- composer.json | 1 + composer.lock | 395 +++++++++--------- .../Magento/Framework/App/MaintenanceMode.php | 16 +- .../App/Test/Unit/MaintenanceModeTest.php | 48 ++- .../Magento/Framework/HTTP/IpChecker.php | 29 ++ lib/internal/Magento/Framework/composer.json | 1 + .../Magento/Setup/Validator/IpValidator.php | 34 +- 7 files changed, 311 insertions(+), 213 deletions(-) create mode 100644 lib/internal/Magento/Framework/HTTP/IpChecker.php diff --git a/composer.json b/composer.json index 25e6c6c5435bf..df1f2c211c8eb 100644 --- a/composer.json +++ b/composer.json @@ -76,6 +76,7 @@ "ramsey/uuid": "~3.8.0", "symfony/console": "~4.4.0", "symfony/event-dispatcher": "~4.4.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", "symfony/process": "~4.4.0", "tedivm/jshrink": "~1.3.0", "tubalmartin/cssmin": "4.1.1", diff --git a/composer.lock b/composer.lock index 39282cb149dc6..3cebd318efb2c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4abc523fda743ab847f07f9905bb2731", + "content-hash": "d7c7843c0a3bff9ef5ee4f56b769acef", "packages": [ { "name": "colinmollenhour/cache-backend-file", @@ -4155,11 +4155,6 @@ "MIT" ], "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -4167,6 +4162,11 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -4673,6 +4673,138 @@ "homepage": "https://symfony.com", "time": "2020-05-20T17:43:50+00:00" }, + { + "name": "symfony/http-foundation", + "version": "v4.4.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "3adfbd7098c850b02d107330b7b9deacf2581578" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3adfbd7098c850b02d107330b7b9deacf2581578", + "reference": "3adfbd7098c850b02d107330b7b9deacf2581578", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/mime": "^4.3|^5.0", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "^3.4|^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "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": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "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-05-23T09:11:46+00:00" + }, + { + "name": "symfony/mime", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/mailer": "<4.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "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": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "time": "2020-05-25T12:33:44+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.17.0", @@ -4965,6 +5097,68 @@ ], "time": "2020-05-12T16:47:27+00:00" }, + { + "name": "symfony/polyfill-php80", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-05-12T16:47:27+00:00" + }, { "name": "symfony/process", "version": "v4.4.8", @@ -9737,130 +9931,6 @@ "homepage": "https://symfony.com", "time": "2020-05-27T08:34:37+00:00" }, - { - "name": "symfony/http-foundation", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", - "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.15" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/mime": "^4.4|^5.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "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": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2020-05-24T12:18:07+00:00" - }, - { - "name": "symfony/mime", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/mailer": "<4.4" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^4.4|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "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": "A library to manipulate MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "time": "2020-05-25T12:33:44+00:00" - }, { "name": "symfony/options-resolver", "version": "v5.0.8", @@ -9974,68 +10044,6 @@ ], "time": "2020-05-12T16:47:27+00:00" }, - { - "name": "symfony/polyfill-php80", - "version": "v1.17.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", - "shasum": "" - }, - "require": { - "php": ">=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.17-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2020-05-12T16:47:27+00:00" - }, { "name": "symfony/stopwatch", "version": "v5.0.8", @@ -10537,5 +10545,6 @@ "ext-zip": "*", "lib-libxml": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/lib/internal/Magento/Framework/App/MaintenanceMode.php b/lib/internal/Magento/Framework/App/MaintenanceMode.php index 11347e4220c26..3fba6cb59eb66 100644 --- a/lib/internal/Magento/Framework/App/MaintenanceMode.php +++ b/lib/internal/Magento/Framework/App/MaintenanceMode.php @@ -6,8 +6,10 @@ namespace Magento\Framework\App; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Filesystem; use Magento\Framework\Event\Manager; +use Magento\Framework\HTTP\IpChecker; /** * Application Maintenance Mode @@ -44,14 +46,22 @@ class MaintenanceMode */ private $eventManager; + /** + * @var IpChecker + */ + private $ipChecker; + /** * @param \Magento\Framework\Filesystem $filesystem * @param Manager|null $eventManager + * @param IpChecker|null $ipChecker + * @throws FileSystemException */ - public function __construct(Filesystem $filesystem, ?Manager $eventManager = null) + public function __construct(Filesystem $filesystem, ?Manager $eventManager = null, ?IpChecker $ipChecker = null) { $this->flagDir = $filesystem->getDirectoryWrite(self::FLAG_DIR); $this->eventManager = $eventManager ?: ObjectManager::getInstance()->get(Manager::class); + $this->ipChecker = $ipChecker ?: ObjectManager::getInstance()->get(IpChecker::class); } /** @@ -68,7 +78,7 @@ public function isOn($remoteAddr = '') return false; } $info = $this->getAddressInfo(); - return !in_array($remoteAddr, $info); + return $info === [] || !$this->ipChecker->isInRange($remoteAddr, $info); } /** @@ -122,7 +132,7 @@ public function getAddressInfo() { if ($this->flagDir->isExist(self::IP_FILENAME)) { $temp = $this->flagDir->readFile(self::IP_FILENAME); - return explode(',', trim($temp)); + return array_filter(explode(',', trim($temp))); } else { return []; } diff --git a/lib/internal/Magento/Framework/App/Test/Unit/MaintenanceModeTest.php b/lib/internal/Magento/Framework/App/Test/Unit/MaintenanceModeTest.php index 50373c29da2ec..7c2a77489b899 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/MaintenanceModeTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/MaintenanceModeTest.php @@ -11,6 +11,7 @@ use Magento\Framework\Event\Manager; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\Directory\WriteInterface; +use Magento\Framework\HTTP\IpChecker; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -32,6 +33,11 @@ class MaintenanceModeTest extends TestCase */ private $eventManager; + /** + * @var object + */ + private $ipChecker; + /** * @inheritdoc */ @@ -44,9 +50,11 @@ protected function setup(): void $this->eventManager = $this->createMock(Manager::class); $objectManager = new ObjectManager($this); + $this->ipChecker = $objectManager->getObject(IpChecker::class); $this->model = $objectManager->getObject(MaintenanceMode::class, [ 'filesystem' => $filesystem, 'eventManager' => $this->eventManager, + 'ipChecker' => $this->ipChecker, ]); } @@ -95,7 +103,7 @@ public function testisOnWithIP() $this->flagDir->expects($this->exactly(2)) ->method('isExist') ->willReturnMap($mapisExist); - $this->assertFalse($this->model->isOn()); + $this->assertTrue($this->model->isOn()); } /** @@ -178,7 +186,7 @@ public function testSetAddresses() ->willReturn(''); $this->model->setAddresses(''); - $this->assertEquals([''], $this->model->getAddressInfo()); + $this->assertEquals([], $this->model->getAddressInfo()); } /** @@ -229,13 +237,23 @@ public function testOnSetMultipleAddresses() $this->flagDir->method('readFile') ->with(MaintenanceMode::IP_FILENAME) - ->willReturn('address1,10.50.60.123'); + ->willReturn('address1,10.50.60.123,192.168.0.0/16,2620:0:2d0:200::7/32,1620:0:2d0:200::7'); - $expectedArray = ['address1', '10.50.60.123']; - $this->model->setAddresses('address1,10.50.60.123'); + $expectedArray = ['address1', '10.50.60.123', '192.168.0.0/16', '2620:0:2d0:200::7/32', '1620:0:2d0:200::7']; + $this->model->setAddresses('address1,10.50.60.123,192.168.0.0/16,2620:0:2d0:200::7/32,1620:0:2d0:200::7'); $this->assertEquals($expectedArray, $this->model->getAddressInfo()); - $this->assertFalse($this->model->isOn('address1')); - $this->assertTrue($this->model->isOn('address3')); + $this->assertTrue($this->model->isOn('address1')); // not a valid IPv4 or IPv6 Address + $this->assertTrue($this->model->isOn('address3')); // not a valid IPv4 or IPv6 Address + $this->assertFalse($this->model->isOn('10.50.60.123')); // exact match + $this->assertTrue($this->model->isOn('10.50.60.125')); // exact mismatch + $this->assertFalse($this->model->isOn('192.168.22.1')); // range match + $this->assertTrue($this->model->isOn('192.22.1.1')); // range mismatch + $this->assertTrue($this->model->isOn('address1')); // not an IP address + $this->assertTrue($this->model->isOn('172.16.0.4')); // complete mismatch + $this->assertFalse($this->model->isOn('1620:0:2d0:200::7')); // ipv6 match + $this->assertFalse($this->model->isOn('1620:0:2d0:200:0:0:0:7')); // ipv6 expanded match + $this->assertFalse($this->model->isOn('2620::ff43:0:ff')); // ipv6 range match + $this->assertTrue($this->model->isOn('2720::ff43:0:ff')); // ipv6 range mismatch } /** @@ -256,12 +274,22 @@ public function testOffSetMultipleAddresses() $this->flagDir->method('readFile') ->with(MaintenanceMode::IP_FILENAME) - ->willReturn('address1,10.50.60.123'); + ->willReturn('address1,10.50.60.123,192.168.0.0/16,2620:0:2d0:200::7/32,1620:0:2d0:200::7'); - $expectedArray = ['address1', '10.50.60.123']; - $this->model->setAddresses('address1,10.50.60.123'); + $expectedArray = ['address1', '10.50.60.123', '192.168.0.0/16', '2620:0:2d0:200::7/32', '1620:0:2d0:200::7']; + $this->model->setAddresses('address1,10.50.60.123,192.168.0.0/16,2620:0:2d0:200::7/32,1620:0:2d0:200::7'); $this->assertEquals($expectedArray, $this->model->getAddressInfo()); $this->assertFalse($this->model->isOn('address1')); $this->assertFalse($this->model->isOn('address3')); + $this->assertFalse($this->model->isOn('10.50.60.123')); // exact match + $this->assertFalse($this->model->isOn('10.50.60.125')); // exact mismatch + $this->assertFalse($this->model->isOn('192.168.22.1')); // range match + $this->assertFalse($this->model->isOn('192.22.1.1')); // range mismatch + $this->assertFalse($this->model->isOn('address1')); // not an IP address + $this->assertFalse($this->model->isOn('172.16.0.4')); // complete mismatch + $this->assertFalse($this->model->isOn('1620:0:2d0:200::7')); // ipv6 match + $this->assertFalse($this->model->isOn('1620:0:2d0:200:0:0:0:7')); // ipv6 expanded match + $this->assertFalse($this->model->isOn('2620::ff43:0:ff')); // ipv6 range match + $this->assertFalse($this->model->isOn('2720::ff43:0:ff')); // ipv6 range mismatch } } diff --git a/lib/internal/Magento/Framework/HTTP/IpChecker.php b/lib/internal/Magento/Framework/HTTP/IpChecker.php new file mode 100644 index 0000000000000..a10f8fbc96be9 --- /dev/null +++ b/lib/internal/Magento/Framework/HTTP/IpChecker.php @@ -0,0 +1,29 @@ +validIps[] = $ip; - } elseif ($ip == 'none') { - $this->none[] = $ip; - } else { - $this->invalidIps[] = $ip; + foreach ($ips as $range) { + if ($range === 'none') { + $this->none[] = $range; + continue; + } + + $subnetMask = 32; + $ip = $range; + if (strpos($range, '/') !== false) { + [$ip, $subnetMask] = explode('/', $range); + } + + $ipValidator = new Ip(); + if (!$ipValidator->isValid($ip)) { + $this->invalidIps[] = $range; + continue; + } + + $ipv4Validator = new Ip(['allowipv6' => false]); + $maxBits = $ipv4Validator->isValid($ip) ? 32 : 128; + if ($subnetMask < 0 || $subnetMask > $maxBits) { + $this->invalidIps[] = $range; + continue; } + + $this->validIps[] = $range; } } } From afc232f4d6beb8e6603fb029263f79a8985fa860 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Thu, 16 Jul 2020 13:10:44 +0200 Subject: [PATCH 2/2] update symfony/http-foundation from v5.1.0 to v5.1.2 --- composer.lock | 182 ++++++++++++++++++++++++++------------------------ 1 file changed, 94 insertions(+), 88 deletions(-) diff --git a/composer.lock b/composer.lock index 4a7b4af4235d2..968f14fd0cb9f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d7c7843c0a3bff9ef5ee4f56b769acef", + "content-hash": "4cd577aecba061613e8986d8d06a3edf", "packages": [ { "name": "colinmollenhour/cache-backend-file", @@ -4446,6 +4446,52 @@ "homepage": "https://symfony.com", "time": "2020-05-20T17:43:50+00:00" }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "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", + "time": "2020-05-27T08:34:37+00:00" + }, { "name": "symfony/event-dispatcher", "version": "v4.4.8", @@ -4675,31 +4721,37 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.10", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578" + "reference": "f93055171b847915225bd5b0a5792888419d8d75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3adfbd7098c850b02d107330b7b9deacf2581578", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75", + "reference": "f93055171b847915225bd5b0a5792888419d8d75", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/mime": "^4.3|^5.0", - "symfony/polyfill-mbstring": "~1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4740,70 +4792,7 @@ "type": "tidelift" } ], - "time": "2020-05-23T09:11:46+00:00" - }, - { - "name": "symfony/mime", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/mailer": "<4.4" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "^4.4|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "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": "A library to manipulate MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "time": "2020-05-25T12:33:44+00:00" + "time": "2020-06-15T06:52:54+00:00" }, { "name": "symfony/polyfill-ctype", @@ -9887,31 +9876,44 @@ "time": "2020-04-28T17:58:55+00:00" }, { - "name": "symfony/deprecation-contracts", - "version": "v2.1.2", + "name": "symfony/mime", + "version": "v5.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" + "url": "https://github.com/symfony/mime.git", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", - "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2.5", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/mailer": "<4.4" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.1-dev" } }, "autoload": { - "files": [ - "function.php" + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -9920,17 +9922,21 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", + "description": "A library to manipulate MIME messages", "homepage": "https://symfony.com", - "time": "2020-05-27T08:34:37+00:00" + "keywords": [ + "mime", + "mime-type" + ], + "time": "2020-05-25T12:33:44+00:00" }, { "name": "symfony/options-resolver",