From 9383fe1e8933adf30e0f18be383738719856442f Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Tue, 24 Dec 2019 13:54:35 +0200 Subject: [PATCH 01/99] Static properties serialization fix. --- .../integration/etc/di/preferences/ce.php | 2 + .../TestFramework/Serialize/Serializer.php | 52 +++++++++++++++++++ .../Workaround/Cleanup/StaticProperties.php | 4 +- 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 dev/tests/integration/framework/Magento/TestFramework/Serialize/Serializer.php diff --git a/dev/tests/integration/etc/di/preferences/ce.php b/dev/tests/integration/etc/di/preferences/ce.php index 2770283637dc7..2546866ceeaf5 100644 --- a/dev/tests/integration/etc/di/preferences/ce.php +++ b/dev/tests/integration/etc/di/preferences/ce.php @@ -16,6 +16,8 @@ \Magento\Framework\App\Response\Http::class => \Magento\TestFramework\Response::class, \Magento\Framework\Interception\PluginListInterface::class => \Magento\TestFramework\Interception\PluginList::class, + \Magento\Framework\Serialize\SerializerInterface::class => + \Magento\TestFramework\Serialize\Serializer::class, \Magento\Framework\Interception\ObjectManager\ConfigInterface::class => \Magento\TestFramework\ObjectManager\Config::class, \Magento\Framework\Interception\ObjectManager\Config\Developer::class => diff --git a/dev/tests/integration/framework/Magento/TestFramework/Serialize/Serializer.php b/dev/tests/integration/framework/Magento/TestFramework/Serialize/Serializer.php new file mode 100644 index 0000000000000..60f2a7ce6c4cc --- /dev/null +++ b/dev/tests/integration/framework/Magento/TestFramework/Serialize/Serializer.php @@ -0,0 +1,52 @@ + 0; + // phpcs:ignore Magento2.Functions.DiscouragedFunction + && strpos(file_get_contents($classFile), ' static ') > 0; } ); $namespacePattern = '/namespace [a-zA-Z0-9\\\\]+;/'; From e2123017375ee389cb49514c7b1e3d60b9aa6e1b Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Sat, 4 Jan 2020 09:15:47 +1030 Subject: [PATCH 02/99] GH-26255: Refactor CacheInvalidate sendPurgeRequest to allow correct purge batching, regardless of the size and content of provided tag pattern. --- .../CacheInvalidate/Model/PurgeCache.php | 35 +++++++++++-------- .../Observer/FlushAllCacheObserver.php | 2 +- .../Observer/InvalidateVarnishObserver.php | 2 +- .../Test/Unit/Model/PurgeCacheTest.php | 5 +-- .../Observer/FlushAllCacheObserverTest.php | 2 +- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index b2aa0d000e9cf..551d1fe1d188a 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -39,7 +39,7 @@ class PurgeCache * * @var int */ - private $requestSize = 7680; + private $requestSize; /** * Constructor @@ -47,31 +47,38 @@ class PurgeCache * @param \Magento\PageCache\Model\Cache\Server $cacheServer * @param \Magento\CacheInvalidate\Model\SocketFactory $socketAdapterFactory * @param InvalidateLogger $logger + * @param int $maxHeaderSize */ public function __construct( \Magento\PageCache\Model\Cache\Server $cacheServer, \Magento\CacheInvalidate\Model\SocketFactory $socketAdapterFactory, - InvalidateLogger $logger + InvalidateLogger $logger, + $maxHeaderSize = 7680 ) { $this->cacheServer = $cacheServer; $this->socketAdapterFactory = $socketAdapterFactory; $this->logger = $logger; + $this->requestSize = $maxHeaderSize; } /** * Send curl purge request to invalidate cache by tags pattern * - * @param string $tagsPattern + * @param array|string $tags * @return bool Return true if successful; otherwise return false */ - public function sendPurgeRequest($tagsPattern) + public function sendPurgeRequest($tags) { + if (!is_string($tags)) { + $tags = [$tags]; + } + $successful = true; $socketAdapter = $this->socketAdapterFactory->create(); $servers = $this->cacheServer->getUris(); $socketAdapter->setOptions(['timeout' => 10]); - $formattedTagsChunks = $this->splitTags($tagsPattern); + $formattedTagsChunks = $this->chunkTags($tags); foreach ($formattedTagsChunks as $formattedTagsChunk) { if (!$this->sendPurgeRequestToServers($socketAdapter, $servers, $formattedTagsChunk)) { $successful = false; @@ -82,24 +89,24 @@ public function sendPurgeRequest($tagsPattern) } /** - * Split tags by batches + * Split tags into batches to suit Varnish max. header size * - * @param string $tagsPattern + * @param array $tags * @return \Generator */ - private function splitTags($tagsPattern) + private function chunkTags($tags) { - $tagsBatchSize = 0; + $currentBatchSize = 0; $formattedTagsChunk = []; - $formattedTags = explode('|', $tagsPattern); - foreach ($formattedTags as $formattedTag) { - if ($tagsBatchSize + strlen($formattedTag) > $this->requestSize - count($formattedTagsChunk) - 1) { + foreach ($tags as $formattedTag) { + // Check if (currentBatchSize + length of next tag + number of pipe delimiters) would exceed header size. + if ($currentBatchSize + strlen($formattedTag) + count($formattedTagsChunk) > $this->requestSize) { yield implode('|', $formattedTagsChunk); $formattedTagsChunk = []; - $tagsBatchSize = 0; + $currentBatchSize = 0; } - $tagsBatchSize += strlen($formattedTag); + $currentBatchSize += strlen($formattedTag); $formattedTagsChunk[] = $formattedTag; } if (!empty($formattedTagsChunk)) { diff --git a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php index 97e11e8bd2f3f..067f101131bf0 100644 --- a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php @@ -43,7 +43,7 @@ public function __construct( public function execute(\Magento\Framework\Event\Observer $observer) { if ($this->config->getType() == \Magento\PageCache\Model\Config::VARNISH && $this->config->isEnabled()) { - $this->purgeCache->sendPurgeRequest('.*'); + $this->purgeCache->sendPurgeRequest(['.*']); } } } diff --git a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php index 3527d4f6cdf4e..b5f473e649bf0 100644 --- a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php @@ -62,7 +62,7 @@ public function execute(\Magento\Framework\Event\Observer $observer) $tags[] = sprintf($pattern, $tag); } if (!empty($tags)) { - $this->purgeCache->sendPurgeRequest(implode('|', array_unique($tags))); + $this->purgeCache->sendPurgeRequest(array_unique($tags)); } } } diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php index c66e27ea41025..1bc1f8d0cf84f 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php @@ -53,6 +53,7 @@ protected function setUp() public function testSendPurgeRequest($hosts) { $uris = []; + /** @var array $host */ foreach ($hosts as $host) { $port = isset($host['port']) ? $host['port'] : \Magento\PageCache\Model\Cache\Server::DEFAULT_PORT; $uris[] = UriFactory::factory('')->setHost($host['host']) @@ -81,7 +82,7 @@ public function testSendPurgeRequest($hosts) $this->loggerMock->expects($this->once()) ->method('execute'); - $this->assertTrue($this->model->sendPurgeRequest('tags')); + $this->assertTrue($this->model->sendPurgeRequest(['tags'])); } /** @@ -119,6 +120,6 @@ public function testSendPurgeRequestWithException() $this->loggerMock->expects($this->once()) ->method('critical'); - $this->assertFalse($this->model->sendPurgeRequest('tags')); + $this->assertFalse($this->model->sendPurgeRequest(['tags'])); } } diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php index 5143683153e39..c37a3ecc9edc0 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php @@ -47,7 +47,7 @@ public function testFlushAllCache() $this->returnValue(\Magento\PageCache\Model\Config::VARNISH) ); - $this->purgeCache->expects($this->once())->method('sendPurgeRequest')->with('.*'); + $this->purgeCache->expects($this->once())->method('sendPurgeRequest')->with(['.*']); $this->model->execute($this->observerMock); } } From 4c223031e12bf6de7380ff8b13688d475f92f8d0 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Mon, 6 Jan 2020 11:58:13 +1030 Subject: [PATCH 03/99] GH-26255: Fix logic error around handling both string/array params. Fix failing test case. --- app/code/Magento/CacheInvalidate/Model/PurgeCache.php | 2 +- .../Test/Unit/Observer/InvalidateVarnishObserverTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index 551d1fe1d188a..f93f0ff5b9ee9 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -69,7 +69,7 @@ public function __construct( */ public function sendPurgeRequest($tags) { - if (!is_string($tags)) { + if (is_string($tags)) { $tags = [$tags]; } diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/InvalidateVarnishObserverTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/InvalidateVarnishObserverTest.php index b333fcaaa678a..9ce6535d3bfd4 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/InvalidateVarnishObserverTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/InvalidateVarnishObserverTest.php @@ -54,7 +54,7 @@ protected function setUp() public function testInvalidateVarnish() { $tags = ['cache_1', 'cache_group']; - $pattern = '((^|,)cache_1(,|$))|((^|,)cache_group(,|$))'; + $pattern = ['((^|,)cache_1(,|$))', '((^|,)cache_group(,|$))']; $this->configMock->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); $this->configMock->expects( From fc2ce73d3352ad7180f64540c5369193ebb413f9 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Mon, 6 Jan 2020 12:03:38 +1030 Subject: [PATCH 04/99] GH-26255: Fix codesniff errors/warnings --- app/code/Magento/CacheInvalidate/Model/PurgeCache.php | 1 + .../CacheInvalidate/Observer/FlushAllCacheObserver.php | 4 ++++ .../Observer/InvalidateVarnishObserver.php | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index f93f0ff5b9ee9..8d3cf142bd319 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -9,6 +9,7 @@ /** * Class PurgeCache + * @package Magento\CacheInvalidate\Model */ class PurgeCache { diff --git a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php index 067f101131bf0..0b22a83c1f27a 100644 --- a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php @@ -7,6 +7,10 @@ use Magento\Framework\Event\ObserverInterface; +/** + * Class FlushAllCacheObserver + * @package Magento\CacheInvalidate\Observer + */ class FlushAllCacheObserver implements ObserverInterface { /** diff --git a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php index b5f473e649bf0..15d8c8e0ed467 100644 --- a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php @@ -7,6 +7,10 @@ use Magento\Framework\Event\ObserverInterface; +/** + * Class InvalidateVarnishObserver + * @package Magento\CacheInvalidate\Observer + */ class InvalidateVarnishObserver implements ObserverInterface { /** @@ -41,8 +45,7 @@ public function __construct( } /** - * If Varnish caching is enabled it collects array of tags - * of incoming object and asks to clean cache. + * If Varnish caching is enabled, it collects array of tags of incoming object and asks to clean cache. * * @param \Magento\Framework\Event\Observer $observer * @return void @@ -68,6 +71,8 @@ public function execute(\Magento\Framework\Event\Observer $observer) } /** + * Resolve tags for the provided model instance being purged. + * * @deprecated 100.1.2 * @return \Magento\Framework\App\Cache\Tag\Resolver */ From a9d376d7c9c9a0e0dd37cb4c485ff7e93f56c764 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Wed, 8 Jan 2020 09:33:01 +1030 Subject: [PATCH 05/99] GH-26255: Add test coverage for multi-request purge tag splitting. --- .../CacheInvalidate/Model/PurgeCache.php | 3 +- .../Test/Unit/Model/PurgeCacheTest.php | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index 8d3cf142bd319..4531eeeee3fce 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -9,7 +9,6 @@ /** * Class PurgeCache - * @package Magento\CacheInvalidate\Model */ class PurgeCache { @@ -54,7 +53,7 @@ public function __construct( \Magento\PageCache\Model\Cache\Server $cacheServer, \Magento\CacheInvalidate\Model\SocketFactory $socketAdapterFactory, InvalidateLogger $logger, - $maxHeaderSize = 7680 + int $maxHeaderSize = 7680 ) { $this->cacheServer = $cacheServer; $this->socketAdapterFactory = $socketAdapterFactory; diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php index 1bc1f8d0cf84f..5979e82dd726b 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php @@ -42,6 +42,7 @@ protected function setUp() 'cacheServer' => $this->cacheServer, 'socketAdapterFactory' => $socketFactoryMock, 'logger' => $this->loggerMock, + 'maxHeaderSize' => 256 ] ); } @@ -85,6 +86,49 @@ public function testSendPurgeRequest($hosts) $this->assertTrue($this->model->sendPurgeRequest(['tags'])); } + public function testSendMultiPurgeRequest() + { + $tags = [ + '(^|,)cat_p_95(,|$)', '(^|,)cat_p_96(,|$)', '(^|,)cat_p_97(,|$)', '(^|,)cat_p_98(,|$)', + '(^|,)cat_p_99(,|$)', '(^|,)cat_p_100(,|$)', '(^|,)cat_p_10038(,|$)', '(^|,)cat_p_142985(,|$)', + '(^|,)cat_p_199(,|$)', '(^|,)cat_p_300(,|$)', '(^|,)cat_p_12038(,|$)', '(^|,)cat_p_152985(,|$)', + '(^|,)cat_p_299(,|$)', '(^|,)cat_p_400(,|$)', '(^|,)cat_p_13038(,|$)', '(^|,)cat_p_162985(,|$)', + ]; + + $tagsSplitA = array_slice($tags, 0, 12); + $tagsSplitB = array_slice($tags, 12, 4); + + $uri = UriFactory::factory('')->setHost('localhost') + ->setPort(80) + ->setScheme('http'); + + $this->cacheServer->expects($this->once()) + ->method('getUris') + ->willReturn([$uri]); + + $this->socketAdapterMock->expects($this->exactly(2)) + ->method('connect') + ->with($uri->getHost(), $uri->getPort()); + + $this->socketAdapterMock->expects($this->exactly(2)) + ->method('write') + ->withConsecutive( + [ + 'PURGE', $uri, '1.1', + ['X-Magento-Tags-Pattern' => implode('|', $tagsSplitA), 'Host' => $uri->getHost()] + ], + [ + 'PURGE', $uri, '1.1', + ['X-Magento-Tags-Pattern' => implode('|', $tagsSplitB), 'Host' => $uri->getHost()] + ] + ); + + $this->socketAdapterMock->expects($this->exactly(2)) + ->method('close'); + + $this->assertTrue($this->model->sendPurgeRequest($tags)); + } + /** * @return array */ From 5e69e824709d2a3eece6cffd4b04c82f9c891dd0 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Wed, 8 Jan 2020 09:59:31 +1030 Subject: [PATCH 06/99] GH-26255: Add class descriptions to satisfy codesniff rules --- app/code/Magento/CacheInvalidate/Model/PurgeCache.php | 2 +- .../Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php | 3 +-- .../CacheInvalidate/Observer/InvalidateVarnishObserver.php | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index 4531eeeee3fce..db629db4d0de0 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -8,7 +8,7 @@ use Magento\Framework\Cache\InvalidateLogger; /** - * Class PurgeCache + * Invalidate external HTTP cache(s) based on tag pattern */ class PurgeCache { diff --git a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php index 0b22a83c1f27a..574263ca1ee0c 100644 --- a/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/FlushAllCacheObserver.php @@ -8,8 +8,7 @@ use Magento\Framework\Event\ObserverInterface; /** - * Class FlushAllCacheObserver - * @package Magento\CacheInvalidate\Observer + * Clear configured Varnish hosts when triggering a full cache flush (e.g. from the Cache Management admin dashboard) */ class FlushAllCacheObserver implements ObserverInterface { diff --git a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php index 15d8c8e0ed467..62619d3054409 100644 --- a/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php +++ b/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php @@ -8,8 +8,7 @@ use Magento\Framework\Event\ObserverInterface; /** - * Class InvalidateVarnishObserver - * @package Magento\CacheInvalidate\Observer + * Trigger invalidations on configured HTTP cache hosts upon cache_clean_by_tags */ class InvalidateVarnishObserver implements ObserverInterface { From 3343d815c472354e44de9280d845e4917bbd5d0e Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Wed, 18 Mar 2020 12:57:53 +0200 Subject: [PATCH 07/99] Static properties serialization fix - update. --- dev/tests/integration/etc/di/preferences/ce.php | 2 -- .../TestFramework/Workaround/Cleanup/StaticProperties.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dev/tests/integration/etc/di/preferences/ce.php b/dev/tests/integration/etc/di/preferences/ce.php index 2546866ceeaf5..2770283637dc7 100644 --- a/dev/tests/integration/etc/di/preferences/ce.php +++ b/dev/tests/integration/etc/di/preferences/ce.php @@ -16,8 +16,6 @@ \Magento\Framework\App\Response\Http::class => \Magento\TestFramework\Response::class, \Magento\Framework\Interception\PluginListInterface::class => \Magento\TestFramework\Interception\PluginList::class, - \Magento\Framework\Serialize\SerializerInterface::class => - \Magento\TestFramework\Serialize\Serializer::class, \Magento\Framework\Interception\ObjectManager\ConfigInterface::class => \Magento\TestFramework\ObjectManager\Config::class, \Magento\Framework\Interception\ObjectManager\Config\Developer::class => diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php index c5ecee34feb2e..d4b7f1b04f68e 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php @@ -168,7 +168,7 @@ public static function backupStaticVariables() $objectManager = Bootstrap::getInstance()->getObjectManager(); $cache = $objectManager->get(CacheInterface::class); - $serializer = $objectManager->get(SerializerInterface::class); + $serializer = $objectManager->get(\Magento\TestFramework\Serialize\Serializer::class); $cachedProperties = $cache->load(self::CACHE_NAME); if ($cachedProperties) { From e5271144dd535e4473bed3b72a1fa4c3ecfe805e Mon Sep 17 00:00:00 2001 From: "v.prokopov" Date: Sat, 11 Apr 2020 18:21:36 +0300 Subject: [PATCH 08/99] refactored code --- .../CatalogInventory/Model/StockState.php | 53 ++++++++----------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/StockState.php b/app/code/Magento/CatalogInventory/Model/StockState.php index ac6dc16366798..c22a670420cc1 100644 --- a/app/code/Magento/CatalogInventory/Model/StockState.php +++ b/app/code/Magento/CatalogInventory/Model/StockState.php @@ -9,6 +9,7 @@ use Magento\CatalogInventory\Api\StockStateInterface; use Magento\CatalogInventory\Model\Spi\StockRegistryProviderInterface; use Magento\CatalogInventory\Model\Spi\StockStateProviderInterface; +use Magento\Framework\DataObject; /** * Interface StockState @@ -50,12 +51,11 @@ public function __construct( * @param int $scopeId * @return bool */ - public function verifyStock($productId, $scopeId = null) + public function verifyStock($productId, $scopeId = null): bool { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->verifyStock($stockItem); } @@ -64,12 +64,11 @@ public function verifyStock($productId, $scopeId = null) * @param int $scopeId * @return bool */ - public function verifyNotification($productId, $scopeId = null) + public function verifyNotification($productId, $scopeId = null): bool { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->verifyNotification($stockItem); } @@ -79,15 +78,13 @@ public function verifyNotification($productId, $scopeId = null) * @param int $productId * @param float $qty * @param int $scopeId - * @exception \Magento\Framework\Exception\LocalizedException * @return bool */ - public function checkQty($productId, $qty, $scopeId = null) + public function checkQty($productId, $qty, $scopeId = null): bool { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->checkQty($stockItem, $qty); } @@ -100,12 +97,11 @@ public function checkQty($productId, $qty, $scopeId = null) * @param int $scopeId * @return float */ - public function suggestQty($productId, $qty, $scopeId = null) + public function suggestQty($productId, $qty, $scopeId = null): float { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->suggestQty($stockItem, $qty); } @@ -116,12 +112,11 @@ public function suggestQty($productId, $qty, $scopeId = null) * @param int $scopeId * @return float */ - public function getStockQty($productId, $scopeId = null) + public function getStockQty($productId, $scopeId = null): float { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->getStockQty($stockItem); } @@ -129,14 +124,13 @@ public function getStockQty($productId, $scopeId = null) * @param int $productId * @param float $qty * @param int $websiteId - * @return \Magento\Framework\DataObject + * @return DataObject */ - public function checkQtyIncrements($productId, $qty, $websiteId = null) + public function checkQtyIncrements($productId, $qty, $websiteId = null): DataObject { - // if ($websiteId === null) { - $websiteId = $this->stockConfiguration->getDefaultScopeId(); - // } + $websiteId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $websiteId); + return $this->stockStateProvider->checkQtyIncrements($stockItem, $qty); } @@ -148,12 +142,11 @@ public function checkQtyIncrements($productId, $qty, $websiteId = null) * @param int $scopeId * @return int */ - public function checkQuoteItemQty($productId, $itemQty, $qtyToCheck, $origQty, $scopeId = null) + public function checkQuoteItemQty($productId, $itemQty, $qtyToCheck, $origQty, $scopeId = null): int { - // if ($scopeId === null) { - $scopeId = $this->stockConfiguration->getDefaultScopeId(); - // } + $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); + return $this->stockStateProvider->checkQuoteItemQty($stockItem, $itemQty, $qtyToCheck, $origQty); } } From 7199dfe99bc248c04c91bec7c920ca20b0819575 Mon Sep 17 00:00:00 2001 From: "v.prokopov" Date: Sun, 12 Apr 2020 13:30:51 +0300 Subject: [PATCH 09/99] removed return types --- .../Magento/CatalogInventory/Model/StockState.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/StockState.php b/app/code/Magento/CatalogInventory/Model/StockState.php index c22a670420cc1..8549803dd858f 100644 --- a/app/code/Magento/CatalogInventory/Model/StockState.php +++ b/app/code/Magento/CatalogInventory/Model/StockState.php @@ -51,7 +51,7 @@ public function __construct( * @param int $scopeId * @return bool */ - public function verifyStock($productId, $scopeId = null): bool + public function verifyStock($productId, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); @@ -64,7 +64,7 @@ public function verifyStock($productId, $scopeId = null): bool * @param int $scopeId * @return bool */ - public function verifyNotification($productId, $scopeId = null): bool + public function verifyNotification($productId, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); @@ -78,9 +78,10 @@ public function verifyNotification($productId, $scopeId = null): bool * @param int $productId * @param float $qty * @param int $scopeId + * @exception \Magento\Framework\Exception\LocalizedException * @return bool */ - public function checkQty($productId, $qty, $scopeId = null): bool + public function checkQty($productId, $qty, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); @@ -97,7 +98,7 @@ public function checkQty($productId, $qty, $scopeId = null): bool * @param int $scopeId * @return float */ - public function suggestQty($productId, $qty, $scopeId = null): float + public function suggestQty($productId, $qty, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); @@ -112,7 +113,7 @@ public function suggestQty($productId, $qty, $scopeId = null): float * @param int $scopeId * @return float */ - public function getStockQty($productId, $scopeId = null): float + public function getStockQty($productId, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); @@ -126,7 +127,7 @@ public function getStockQty($productId, $scopeId = null): float * @param int $websiteId * @return DataObject */ - public function checkQtyIncrements($productId, $qty, $websiteId = null): DataObject + public function checkQtyIncrements($productId, $qty, $websiteId = null) { $websiteId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $websiteId); @@ -142,7 +143,7 @@ public function checkQtyIncrements($productId, $qty, $websiteId = null): DataObj * @param int $scopeId * @return int */ - public function checkQuoteItemQty($productId, $itemQty, $qtyToCheck, $origQty, $scopeId = null): int + public function checkQuoteItemQty($productId, $itemQty, $qtyToCheck, $origQty, $scopeId = null) { $scopeId = $this->stockConfiguration->getDefaultScopeId(); $stockItem = $this->stockRegistryProvider->getStockItem($productId, $scopeId); From 6d024bb2f344b59b014f34a04e2e86364f7c4b4b Mon Sep 17 00:00:00 2001 From: "v.prokopov" Date: Sun, 12 Apr 2020 16:33:03 +0300 Subject: [PATCH 10/99] added short descriptions for methods --- .../Magento/CatalogInventory/Model/StockState.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogInventory/Model/StockState.php b/app/code/Magento/CatalogInventory/Model/StockState.php index 8549803dd858f..1ac9f5dc54478 100644 --- a/app/code/Magento/CatalogInventory/Model/StockState.php +++ b/app/code/Magento/CatalogInventory/Model/StockState.php @@ -12,6 +12,8 @@ use Magento\Framework\DataObject; /** + * Provides functionality for stock state information + * * Interface StockState */ class StockState implements StockStateInterface @@ -32,6 +34,8 @@ class StockState implements StockStateInterface protected $stockConfiguration; /** + * StockState constructor + * * @param StockStateProviderInterface $stockStateProvider * @param StockRegistryProviderInterface $stockRegistryProvider * @param StockConfigurationInterface $stockConfiguration @@ -47,6 +51,8 @@ public function __construct( } /** + * Verify stock by product id + * * @param int $productId * @param int $scopeId * @return bool @@ -60,6 +66,8 @@ public function verifyStock($productId, $scopeId = null) } /** + * Verify notification by product id + * * @param int $productId * @param int $scopeId * @return bool @@ -90,8 +98,7 @@ public function checkQty($productId, $qty, $scopeId = null) } /** - * Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions - * or original qty if such value does not exist + * Returns suggested qty that satisfies qty increments/minQty/maxQty/minSaleQty/maxSaleQty conditions else original qty * * @param int $productId * @param float $qty @@ -122,6 +129,8 @@ public function getStockQty($productId, $scopeId = null) } /** + * Check qty increments by product id + * * @param int $productId * @param float $qty * @param int $websiteId @@ -136,6 +145,8 @@ public function checkQtyIncrements($productId, $qty, $websiteId = null) } /** + * Check quote item qty + * * @param int $productId * @param float $itemQty * @param float $qtyToCheck From 707297a309600de4c46bb5969913e3126a7fa4bb Mon Sep 17 00:00:00 2001 From: "v.prokopov" Date: Mon, 13 Apr 2020 08:45:22 +0300 Subject: [PATCH 11/99] changed count characters in short description line --- app/code/Magento/CatalogInventory/Model/StockState.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogInventory/Model/StockState.php b/app/code/Magento/CatalogInventory/Model/StockState.php index 1ac9f5dc54478..e28a2096942d4 100644 --- a/app/code/Magento/CatalogInventory/Model/StockState.php +++ b/app/code/Magento/CatalogInventory/Model/StockState.php @@ -98,7 +98,7 @@ public function checkQty($productId, $qty, $scopeId = null) } /** - * Returns suggested qty that satisfies qty increments/minQty/maxQty/minSaleQty/maxSaleQty conditions else original qty + * Returns suggested qty that satisfies qty increments/minQty/maxQty/minSaleQty/maxSaleQty else returns original qty * * @param int $productId * @param float $qty From 116c1910520fe2081e09e91dca6b04716f25dbbb Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Thu, 23 Apr 2020 21:13:40 +0930 Subject: [PATCH 12/99] Variable name consistency, param and return type hinting on private methods. --- .../CacheInvalidate/Model/PurgeCache.php | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php index 9868b2ffb9e1a..5b952e0e50429 100644 --- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php +++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php @@ -6,6 +6,9 @@ namespace Magento\CacheInvalidate\Model; use Magento\Framework\Cache\InvalidateLogger; +use Magento\PageCache\Model\Cache\Server; +use Laminas\Http\Client\Adapter\Socket; +use Laminas\Uri\Uri; /** * Invalidate external HTTP cache(s) based on tag pattern @@ -15,12 +18,12 @@ class PurgeCache const HEADER_X_MAGENTO_TAGS_PATTERN = 'X-Magento-Tags-Pattern'; /** - * @var \Magento\PageCache\Model\Cache\Server + * @var Server */ protected $cacheServer; /** - * @var \Magento\CacheInvalidate\Model\SocketFactory + * @var SocketFactory */ protected $socketAdapterFactory; @@ -39,26 +42,26 @@ class PurgeCache * * @var int */ - private $requestSize; + private $maxHeaderSize; /** * Constructor * - * @param \Magento\PageCache\Model\Cache\Server $cacheServer - * @param \Magento\CacheInvalidate\Model\SocketFactory $socketAdapterFactory + * @param Server $cacheServer + * @param SocketFactory $socketAdapterFactory * @param InvalidateLogger $logger * @param int $maxHeaderSize */ public function __construct( - \Magento\PageCache\Model\Cache\Server $cacheServer, - \Magento\CacheInvalidate\Model\SocketFactory $socketAdapterFactory, + Server $cacheServer, + SocketFactory $socketAdapterFactory, InvalidateLogger $logger, int $maxHeaderSize = 7680 ) { $this->cacheServer = $cacheServer; $this->socketAdapterFactory = $socketAdapterFactory; $this->logger = $logger; - $this->requestSize = $maxHeaderSize; + $this->maxHeaderSize = $maxHeaderSize; } /** @@ -94,13 +97,13 @@ public function sendPurgeRequest($tags) * @param array $tags * @return \Generator */ - private function chunkTags($tags) + private function chunkTags(array $tags): \Generator { $currentBatchSize = 0; $formattedTagsChunk = []; foreach ($tags as $formattedTag) { // Check if (currentBatchSize + length of next tag + number of pipe delimiters) would exceed header size. - if ($currentBatchSize + strlen($formattedTag) + count($formattedTagsChunk) > $this->requestSize) { + if ($currentBatchSize + strlen($formattedTag) + count($formattedTagsChunk) > $this->maxHeaderSize) { yield implode('|', $formattedTagsChunk); $formattedTagsChunk = []; $currentBatchSize = 0; @@ -117,12 +120,12 @@ private function chunkTags($tags) /** * Send curl purge request to servers to invalidate cache by tags pattern * - * @param \Laminas\Http\Client\Adapter\Socket $socketAdapter - * @param \Laminas\Uri\Uri[] $servers + * @param Socket $socketAdapter + * @param Uri[] $servers * @param string $formattedTagsChunk * @return bool Return true if successful; otherwise return false */ - private function sendPurgeRequestToServers($socketAdapter, $servers, $formattedTagsChunk) + private function sendPurgeRequestToServers(Socket $socketAdapter, array $servers, string $formattedTagsChunk): bool { $headers = [self::HEADER_X_MAGENTO_TAGS_PATTERN => $formattedTagsChunk]; $unresponsiveServerError = []; From 0926f5c008d0c272fc7828fbe2cfed60d93ac8cc Mon Sep 17 00:00:00 2001 From: Ihor Sviziev Date: Fri, 24 Apr 2020 14:25:20 +0300 Subject: [PATCH 13/99] GH-26255: Refactor CacheInvalidate sendPurgeRequest to fix incorrect tag splitting Fix static tests --- .../CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php index 0d2831553bd09..b26f7b43c12b2 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Model/PurgeCacheTest.php @@ -6,19 +6,20 @@ namespace Magento\CacheInvalidate\Test\Unit\Model; use Laminas\Uri\UriFactory; +use PHPUnit\Framework\MockObject\MockObject; class PurgeCacheTest extends \PHPUnit\Framework\TestCase { /** @var \Magento\CacheInvalidate\Model\PurgeCache */ protected $model; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Laminas\Http\Client\Adapter\Socket */ + /** @var MockObject|\Laminas\Http\Client\Adapter\Socket */ protected $socketAdapterMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Cache\InvalidateLogger */ + /** @var MockObject|\Magento\Framework\Cache\InvalidateLogger */ protected $loggerMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\PageCache\Model\Cache\Server */ + /** @var MockObject|\Magento\PageCache\Model\Cache\Server */ protected $cacheServer; protected function setUp() From ffb1174bfcd19b9f3de04a59ad1ec10c0b4913d2 Mon Sep 17 00:00:00 2001 From: Ihor Sviziev Date: Fri, 24 Apr 2020 14:26:35 +0300 Subject: [PATCH 14/99] GH-26255: Refactor CacheInvalidate sendPurgeRequest to fix incorrect tag splitting Fix static tests --- .../Test/Unit/Observer/FlushAllCacheObserverTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php index c37a3ecc9edc0..f2bee12dc87fa 100644 --- a/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php +++ b/app/code/Magento/CacheInvalidate/Test/Unit/Observer/FlushAllCacheObserverTest.php @@ -5,18 +5,20 @@ */ namespace Magento\CacheInvalidate\Test\Unit\Observer; +use PHPUnit\Framework\MockObject\MockObject; + class FlushAllCacheObserverTest extends \PHPUnit\Framework\TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\CacheInvalidate\Observer\FlushAllCacheObserver */ + /** @var MockObject|\Magento\CacheInvalidate\Observer\FlushAllCacheObserver */ protected $model; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Event\Observer */ + /** @var MockObject|\Magento\Framework\Event\Observer */ protected $observerMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\PageCache\Model\Config */ + /** @var MockObject|\Magento\PageCache\Model\Config */ protected $configMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\CacheInvalidate\Model\PurgeCache */ + /** @var MockObject|\Magento\CacheInvalidate\Model\PurgeCache */ protected $purgeCache; /** From 7aa9a9c35990d4f7115661a03a1cce39733a21c9 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Fri, 15 May 2020 11:05:02 +0300 Subject: [PATCH 15/99] fix --- app/code/Magento/Customer/Model/Options.php | 6 +- .../Magento/Customer/Model/OptionsTest.php | 165 ++++++++++++++++++ 2 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php diff --git a/app/code/Magento/Customer/Model/Options.php b/app/code/Magento/Customer/Model/Options.php index 71e70f8e14208..bc093502fb4fc 100644 --- a/app/code/Magento/Customer/Model/Options.php +++ b/app/code/Magento/Customer/Model/Options.php @@ -97,12 +97,14 @@ private function prepareNamePrefixSuffixOptions($options, $isOptional = false) if (empty($options)) { return false; } + $result = []; - $options = array_filter(explode(';', $options)); + $options = explode(';', $options); foreach ($options as $value) { - $value = $this->escaper->escapeHtml(trim($value)); + $value = $this->escaper->escapeHtml(trim($value)) ?: ' '; $result[$value] = $value; } + if ($isOptional && trim(current($options))) { $result = array_merge([' ' => ' '], $result); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php new file mode 100644 index 0000000000000..f77852f230b65 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php @@ -0,0 +1,165 @@ + ' ', 'v1' => 'v1', 'v2' => 'v2']; + private const STUB_EXPECTED_VALUES = ['v1' => 'v1', 'v2' => 'v2']; + + /** + * @var Options + */ + private $model; + + /** + * @var ObjectManagerInterface + */ + private $objectManager; + + /** + * @inheritdoc + */ + protected function setUp(): void + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->model = $this->objectManager->create(Options::class); + } + + /** + * Test suffix and prefix options + * + * @dataProvider optionsDataProvider + * + * @param string $optionType + * @param array $showOptionConfig + * @param array $optionValuesConfig + * @param array $expectedOptions + * @param int $expectedCount + * @return void + */ + public function testOptions( + string $optionType, + array $showOptionConfig, + array $optionValuesConfig, + array $expectedOptions, + int $expectedCount + ): void { + $this->setConfig($showOptionConfig); + $this->setConfig($optionValuesConfig); + + /** @var array $options */ + $options = $optionType === self::STUB_OPTION_PREFIX_NAME + ? $this->model->getNamePrefixOptions() + : $this->model->getNameSuffixOptions(); + + $this->assertCount($expectedCount, $options); + $this->assertEquals($expectedOptions, $options); + } + + /** + * Set config param + * + * @param array $data + * @param string|null $scopeType + * @param string|null $scopeCode + * @return void + */ + private function setConfig( + array $data, + ?string $scopeType = ScopeInterface::SCOPE_STORE, + ?string $scopeCode = 'default' + ): void { + $path = array_key_first($data); + $this->objectManager->get(MutableScopeConfigInterface::class) + ->setValue($path, $data[$path], $scopeType, $scopeCode); + } + + /** + * DataProvider for testOptions() + * + * @return array + */ + public function optionsDataProvider(): array + { + return [ + 'prefix_required_with_blank_option' => [ + self::STUB_OPTION_PREFIX_NAME, + [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_REQUIRED], + [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], + self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, + 3, + ], + 'prefix_required' => [ + self::STUB_OPTION_PREFIX_NAME, + [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_REQUIRED], + [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES], + self::STUB_EXPECTED_VALUES, + 2, + ], + 'prefix_optional' => [ + self::STUB_OPTION_PREFIX_NAME, + [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_OPTIONAL], + [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES], + self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, + 3, + ], + 'suffix_optional' => [ + self::STUB_OPTION_SUFFIX_NAME, + [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], + [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES], + self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, + 3, + ], + 'suffix_optional_with_blank_option' => [ + self::STUB_OPTION_SUFFIX_NAME, + [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], + [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], + self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, + 3, + ], + 'suffix_required_with_blank_option' => [ + self::STUB_OPTION_SUFFIX_NAME, + [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], + [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], + self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, + 3, + ], + ]; + } + + /** + * @inheritdoc + */ + protected function tearDown(): void + { + $this->objectManager->removeSharedInstance(Address::class); + } +} From daecbb410a7481d8ea0e80e8c57479e02beb93b4 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Mon, 18 May 2020 17:06:28 +0300 Subject: [PATCH 16/99] improve test --- .../Magento/Customer/Model/OptionsTest.php | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php index f77852f230b65..5deda0803fff0 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php @@ -27,13 +27,6 @@ class OptionsTest extends TestCase private const XML_PATH_PREFIX_SHOW = 'customer/address/prefix_show'; private const XML_PATH_PREFIX_OPTIONS = 'customer/address/prefix_options'; - private const STUB_OPTION_PREFIX_NAME = 'prefix'; - private const STUB_OPTION_SUFFIX_NAME = 'suffix'; - private const STUB_CONFIG_VALUES = 'v1;v2'; - private const STUB_CONFIG_VALUES_WITH_BLANK_OPTION = ';v1;v2'; - private const STUB_EXPECTED_VALUES_WITH_BLANK_OPTION = [' ' => ' ', 'v1' => 'v1', 'v2' => 'v2']; - private const STUB_EXPECTED_VALUES = ['v1' => 'v1', 'v2' => 'v2']; - /** * @var Options */ @@ -62,25 +55,22 @@ protected function setUp(): void * @param array $showOptionConfig * @param array $optionValuesConfig * @param array $expectedOptions - * @param int $expectedCount * @return void */ public function testOptions( string $optionType, array $showOptionConfig, array $optionValuesConfig, - array $expectedOptions, - int $expectedCount + array $expectedOptions ): void { $this->setConfig($showOptionConfig); $this->setConfig($optionValuesConfig); /** @var array $options */ - $options = $optionType === self::STUB_OPTION_PREFIX_NAME + $options = $optionType === 'prefix' ? $this->model->getNamePrefixOptions() : $this->model->getNameSuffixOptions(); - $this->assertCount($expectedCount, $options); $this->assertEquals($expectedOptions, $options); } @@ -109,48 +99,49 @@ private function setConfig( */ public function optionsDataProvider(): array { + $optionPrefixName = 'prefix'; + $optionSuffixName = 'suffix'; + $optionValues = 'v1;v2'; + $optionValuesWithBlank = ';v1;v2'; + $expectedValuesWithBlank = [' ' => ' ', 'v1' => 'v1', 'v2' => 'v2']; + $expectedValues = ['v1' => 'v1', 'v2' => 'v2']; + return [ 'prefix_required_with_blank_option' => [ - self::STUB_OPTION_PREFIX_NAME, + $optionPrefixName, [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_REQUIRED], - [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], - self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, - 3, + [self::XML_PATH_PREFIX_OPTIONS => $optionValuesWithBlank], + $expectedValuesWithBlank, ], 'prefix_required' => [ - self::STUB_OPTION_PREFIX_NAME, + $optionPrefixName, [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_REQUIRED], - [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES], - self::STUB_EXPECTED_VALUES, - 2, + [self::XML_PATH_PREFIX_OPTIONS => $optionValues], + $expectedValues, ], 'prefix_optional' => [ - self::STUB_OPTION_PREFIX_NAME, + $optionPrefixName, [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_OPTIONAL], - [self::XML_PATH_PREFIX_OPTIONS => self::STUB_CONFIG_VALUES], - self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, - 3, + [self::XML_PATH_PREFIX_OPTIONS => $optionValues], + $expectedValuesWithBlank, ], 'suffix_optional' => [ - self::STUB_OPTION_SUFFIX_NAME, + $optionSuffixName, [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], - [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES], - self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, - 3, + [self::XML_PATH_SUFFIX_OPTIONS => $optionValues], + $expectedValuesWithBlank, ], 'suffix_optional_with_blank_option' => [ - self::STUB_OPTION_SUFFIX_NAME, + $optionSuffixName, [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], - [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], - self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, - 3, + [self::XML_PATH_SUFFIX_OPTIONS => $optionValuesWithBlank], + $expectedValuesWithBlank, ], 'suffix_required_with_blank_option' => [ - self::STUB_OPTION_SUFFIX_NAME, + $optionSuffixName, [self::XML_PATH_SUFFIX_SHOW => Nooptreq::VALUE_OPTIONAL], - [self::XML_PATH_SUFFIX_OPTIONS => self::STUB_CONFIG_VALUES_WITH_BLANK_OPTION], - self::STUB_EXPECTED_VALUES_WITH_BLANK_OPTION, - 3, + [self::XML_PATH_SUFFIX_OPTIONS => $optionValuesWithBlank], + $expectedValuesWithBlank, ], ]; } From 415291bab1401e0154a4bc20337f38affc004542 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sun, 7 Jun 2020 17:08:36 +0200 Subject: [PATCH 17/99] Upgrade PHPUnit and fix failing / warnings in tests --- .../Test/Unit/Model/Export/ProductTest.php | 15 +- .../Command/XmlCatalogGenerateCommandTest.php | 4 +- .../Media/ExternalVideoEntryConverterTest.php | 86 ++- .../Quote/Address/Total/SubtotalTest.php | 63 ++- .../Model/Order/CreditmemoFactoryTest.php | 19 +- composer.lock | 509 +++++++++++++----- 6 files changed, 457 insertions(+), 239 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Export/ProductTest.php b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Export/ProductTest.php index bf1d3772b92a0..1ad82497119ba 100644 --- a/app/code/Magento/CatalogImportExport/Test/Unit/Model/Export/ProductTest.php +++ b/app/code/Magento/CatalogImportExport/Test/Unit/Model/Export/ProductTest.php @@ -8,12 +8,14 @@ namespace Magento\CatalogImportExport\Test\Unit\Model\Export; use Magento\Catalog\Model\Product\LinkTypeProvider; +use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory; use Magento\CatalogImportExport\Model\Export\Product; use Magento\CatalogImportExport\Model\Export\Product\Type\Factory; use Magento\CatalogImportExport\Model\Export\RowCustomizer\Composite; use Magento\Eav\Model\Config; use Magento\Eav\Model\Entity\Collection\AbstractCollection; use Magento\Eav\Model\Entity\Type; +use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory as AttributeSetCollectionFactory; use Magento\Framework\App\ResourceConnection; use Magento\Framework\EntityManager\MetadataPool; use Magento\Framework\Logger\Monolog; @@ -83,7 +85,7 @@ class ProductTest extends TestCase protected $attrSetColFactory; /** - * @var \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory|MockObject + * @var CategoryCollectionFactory|MockObject */ protected $categoryColFactory; @@ -174,15 +176,14 @@ protected function setUp(): void ->onlyMethods(['create']) ->getMock(); - $this->attrSetColFactory = $this->getMockBuilder( - \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class - )->addMethods(['setEntityTypeFilter']) + $this->attrSetColFactory = $this->getMockBuilder(AttributeSetCollectionFactory::class) + ->disableOriginalConstructor() + ->addMethods(['setEntityTypeFilter']) ->onlyMethods(['create']) ->getMock(); - $this->categoryColFactory = $this->getMockBuilder( - \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory::class - )->addMethods(['addNameToResult']) + $this->categoryColFactory = $this->getMockBuilder(CategoryCollectionFactory::class) + ->disableOriginalConstructor()->addMethods(['addNameToResult']) ->onlyMethods(['create']) ->getMock(); diff --git a/app/code/Magento/Developer/Test/Unit/Console/Command/XmlCatalogGenerateCommandTest.php b/app/code/Magento/Developer/Test/Unit/Console/Command/XmlCatalogGenerateCommandTest.php index 919ee0e060468..152bdfef376fb 100644 --- a/app/code/Magento/Developer/Test/Unit/Console/Command/XmlCatalogGenerateCommandTest.php +++ b/app/code/Magento/Developer/Test/Unit/Console/Command/XmlCatalogGenerateCommandTest.php @@ -46,7 +46,7 @@ public function testExecuteBadType() ->with( $this->equalTo(['urn:magento:framework:Module/etc/module.xsd' => $fixtureXmlFile]), $this->equalTo('test') - )->willReturn(null); + ); $formats = ['phpstorm' => $phpstormFormatMock]; $readFactory = $this->createMock(ReadFactory::class); @@ -97,7 +97,7 @@ public function testExecuteVsCodeFormat() ->with( $this->equalTo(['urn:magento:framework:Module/etc/module.xsd' => $fixtureXmlFile]), $this->equalTo('test') - )->willReturn(null); + ); $formats = ['vscode' => $vscodeFormatMock]; $readFactory = $this->createMock(ReadFactory::class); diff --git a/app/code/Magento/ProductVideo/Test/Unit/Model/Product/Attribute/Media/ExternalVideoEntryConverterTest.php b/app/code/Magento/ProductVideo/Test/Unit/Model/Product/Attribute/Media/ExternalVideoEntryConverterTest.php index 3ca043e205e87..a921bff76c8d6 100644 --- a/app/code/Magento/ProductVideo/Test/Unit/Model/Product/Attribute/Media/ExternalVideoEntryConverterTest.php +++ b/app/code/Magento/ProductVideo/Test/Unit/Model/Product/Attribute/Media/ExternalVideoEntryConverterTest.php @@ -1,4 +1,5 @@ mediaGalleryEntryFactoryMock = - $this->createPartialMock( - ProductAttributeMediaGalleryEntryInterfaceFactory::class, - ['create'] - ); + $this->mediaGalleryEntryFactoryMock = $this->createPartialMock( + ProductAttributeMediaGalleryEntryInterfaceFactory::class, + ['create'] + ); $this->mediaGalleryEntryMock = - $this->createPartialMock(ProductAttributeMediaGalleryEntryInterface::class, [ - 'getId', - 'setId', - 'getMediaType', - 'setMediaType', - 'getLabel', - 'setLabel', - 'getPosition', - 'setPosition', - 'isDisabled', - 'setDisabled', - 'getTypes', - 'setTypes', - 'getFile', - 'setFile', - 'getContent', - 'setContent', - 'getExtensionAttributes', - 'setExtensionAttributes' - ]); + $this->createPartialMock( + ProductAttributeMediaGalleryEntryInterface::class, + [ + 'getId', + 'setId', + 'getMediaType', + 'setMediaType', + 'getLabel', + 'setLabel', + 'getPosition', + 'setPosition', + 'isDisabled', + 'setDisabled', + 'getTypes', + 'setTypes', + 'getFile', + 'setFile', + 'getContent', + 'setContent', + 'getExtensionAttributes', + 'setExtensionAttributes' + ] + ); $this->mediaGalleryEntryFactoryMock->expects($this->any())->method('create')->willReturn( $this->mediaGalleryEntryMock @@ -110,7 +105,8 @@ protected function setUp(): void ); $this->mediaGalleryEntryExtensionMock = $this->getMockBuilder(ProductAttributeMediaGalleryEntryExtension::class) - ->addMethods(['getVideoProvider', 'setVideoContent', 'getVideoContent']) + ->addMethods(['getVideoProvider']) + ->onlyMethods(['setVideoContent', 'getVideoContent']) ->disableOriginalConstructor() ->getMock(); diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php index 2f8a5a344503c..17444c4bcda71 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Address/Total/SubtotalTest.php @@ -32,22 +32,16 @@ */ class SubtotalTest extends TestCase { - /** - * @var ObjectManager - */ + /** @var ObjectManager */ protected $objectManager; - /** - * @var Subtotal - */ + /** @var Subtotal */ protected $subtotalModel; /** @var MockObject */ protected $stockItemMock; - /** - * @var MockObject - */ + /** @var MockObject */ protected $stockRegistry; protected function setUp(): void @@ -57,14 +51,15 @@ protected function setUp(): void Subtotal::class ); - $this->stockRegistry = $this->createPartialMock( - StockRegistry::class, - ['getStockItem', '__wakeup'] - ); - $this->stockItemMock = $this->createPartialMock( - \Magento\CatalogInventory\Model\Stock\Item::class, - ['getIsInStock', '__wakeup'] - ); + $this->stockRegistry = $this->getMockBuilder(StockRegistry::class) + ->disableOriginalConstructor() + ->addMethods(['__wakeup']) + ->onlyMethods(['getStockItem']) + ->getMock(); + $this->stockItemMock = $this->getMockBuilder(\Magento\CatalogInventory\Model\Stock\Item::class) + ->disableOriginalConstructor() + ->onlyMethods(['getIsInStock', '__wakeup']) + ->getMock(); } /** @@ -110,10 +105,11 @@ public function testCollect($price, $originalPrice, $itemHasParent, $expectedPri ] ); /** @var Address|MockObject $address */ - $address = $this->createPartialMock( - Address::class, - ['setTotalQty', 'getTotalQty', 'removeItem', 'getQuote'] - ); + $address = $this->getMockBuilder(Address::class) + ->addMethods(['setTotalQty', 'getTotalQty']) + ->onlyMethods(['removeItem', 'getQuote']) + ->disableOriginalConstructor() + ->getMock(); /** @var Product|MockObject $product */ $product = $this->createMock(Product::class); @@ -161,10 +157,10 @@ public function testCollect($price, $originalPrice, $itemHasParent, $expectedPri $shippingAssignmentMock->expects($this->exactly(2))->method('getShipping')->willReturn($shipping); $shippingAssignmentMock->expects($this->once())->method('getItems')->willReturn([$quoteItem]); - $total = $this->createPartialMock( - Total::class, - ['setBaseVirtualAmount', 'setVirtualAmount'] - ); + $total = $this->getMockBuilder(Total::class) + ->addMethods(['setBaseVirtualAmount', 'setVirtualAmount']) + ->getMock(); + $total->expects($this->once())->method('setBaseVirtualAmount')->willReturnSelf(); $total->expects($this->once())->method('setVirtualAmount')->willReturnSelf(); @@ -185,7 +181,10 @@ public function testFetch() ]; $quoteMock = $this->createMock(Quote::class); - $totalMock = $this->createPartialMock(Total::class, ['getSubtotal']); + $totalMock = $this->getMockBuilder(Total::class) + ->addMethods(['getSubtotal']) + ->disableOriginalConstructor() + ->getMock(); $totalMock->expects($this->once())->method('getSubtotal')->willReturn(100); $this->assertEquals($expectedResult, $this->subtotalModel->fetch($quoteMock, $totalMock)); @@ -229,13 +228,11 @@ public function testCollectWithInvalidItems() $address->expects($this->once()) ->method('removeItem') ->with($addressItemId); - $addressItem = $this->createPartialMock( - AddressItem::class, - [ - 'getId', - 'getQuoteItemId' - ] - ); + $addressItem = $this->getMockBuilder(AddressItem::class) + ->onlyMethods(['getId']) + ->addMethods(['getQuoteItemId']) + ->disableOriginalConstructor() + ->getMock(); $addressItem->setAddress($address); $addressItem->method('getId') ->willReturn($addressItemId); diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoFactoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoFactoryTest.php index 4cf571d3b6108..47e14b91b106e 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoFactoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoFactoryTest.php @@ -49,18 +49,13 @@ class CreditmemoFactoryTest extends TestCase */ protected function setUp(): void { - $this->orderItemMock = $this->createPartialMock( - Item::class, - ['getChildrenItems', 'isDummy', 'getHasChildren', 'getId', 'getParentItemId'] - ); - $this->orderChildItemOneMock = $this->createPartialMock( - Item::class, - ['getQtyToRefund', 'getId'] - ); - $this->orderChildItemTwoMock = $this->createPartialMock( - Item::class, - ['getQtyToRefund', 'getId'] - ); + $this->orderItemMock = $this->getMockBuilder(Item::class) + ->onlyMethods(['getChildrenItems', 'isDummy', 'getId', 'getParentItemId']) + ->addMethods(['getHasChildren']) + ->disableOriginalConstructor() + ->getMock(); + $this->orderChildItemOneMock = $this->createPartialMock(Item::class, ['getQtyToRefund', 'getId']); + $this->orderChildItemTwoMock = $this->createPartialMock(Item::class, ['getQtyToRefund', 'getId']); $this->testMethod = new ReflectionMethod(CreditmemoFactory::class, 'canRefundItem'); $objectManagerHelper = new ObjectManagerHelper($this); diff --git a/composer.lock b/composer.lock index 6a47e7e44ab69..dc95c8fa4fdf9 100644 --- a/composer.lock +++ b/composer.lock @@ -432,16 +432,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" + "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", + "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", "shasum": "" }, "require": { @@ -476,9 +476,17 @@ { "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": "2020-03-01T12:26:26+00:00" + "time": "2020-06-04T11:16:35+00:00" }, { "name": "container-interop/container-interop", @@ -4487,25 +4495,25 @@ }, { "name": "symfony/css-selector", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "5f8d5271303dad260692ba73dfa21777d38e124e" + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/5f8d5271303dad260692ba73dfa21777d38e124e", - "reference": "5f8d5271303dad260692ba73dfa21777d38e124e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4550,7 +4558,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/event-dispatcher", @@ -4696,26 +4704,26 @@ }, { "name": "symfony/filesystem", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91" + "reference": "6e4320f06d5f2cce0d96530162491f4465179157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91", - "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/6e4320f06d5f2cce0d96530162491f4465179157", + "reference": "6e4320f06d5f2cce0d96530162491f4465179157", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4756,29 +4764,29 @@ "type": "tidelift" } ], - "time": "2020-04-12T14:40:17+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/finder", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d" + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d", - "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d", + "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4819,7 +4827,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5248,20 +5256,20 @@ }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -5270,7 +5278,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5302,7 +5310,21 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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-20T17:43:50+00:00" }, { "name": "tedivm/jshrink", @@ -5720,16 +5742,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.138.7", + "version": "3.140.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7" + "reference": "7e37960c1103ee211932be51b2282b41c948a5f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6b9f3fcea4dfa6092c628c790ca6d369a75453b7", - "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7e37960c1103ee211932be51b2282b41c948a5f0", + "reference": "7e37960c1103ee211932be51b2282b41c948a5f0", "shasum": "" }, "require": { @@ -5800,7 +5822,7 @@ "s3", "sdk" ], - "time": "2020-05-22T18:11:09+00:00" + "time": "2020-06-05T18:12:25+00:00" }, { "name": "beberlei/assert", @@ -6018,16 +6040,16 @@ }, { "name": "codeception/codeception", - "version": "4.1.4", + "version": "4.1.5", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7" + "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/55d8d1d882fa0777e47de17b04c29b3c50fe29e7", - "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/24f2345329b1059f1208f65581fc632a4a6e5a55", + "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55", "shasum": "" }, "require": { @@ -6105,7 +6127,7 @@ "type": "open_collective" } ], - "time": "2020-03-23T17:07:20+00:00" + "time": "2020-05-24T13:58:47+00:00" }, { "name": "codeception/lib-asserts", @@ -6249,16 +6271,16 @@ }, { "name": "codeception/module-webdriver", - "version": "1.0.8", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "da55466876d9e73c09917f495b923395b1cdf92a" + "reference": "09c167817393090ce3dbce96027d94656b1963ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/da55466876d9e73c09917f495b923395b1cdf92a", - "reference": "da55466876d9e73c09917f495b923395b1cdf92a", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/09c167817393090ce3dbce96027d94656b1963ce", + "reference": "09c167817393090ce3dbce96027d94656b1963ce", "shasum": "" }, "require": { @@ -6300,7 +6322,7 @@ "browser-testing", "codeception" ], - "time": "2020-04-29T13:45:52+00:00" + "time": "2020-05-31T08:47:24+00:00" }, { "name": "codeception/phpunit-wrapper", @@ -6530,22 +6552,22 @@ }, { "name": "doctrine/annotations", - "version": "1.10.2", + "version": "1.10.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "b9d758e831c70751155c698c2f7df4665314a1cb" + "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb", - "reference": "b9d758e831c70751155c698c2f7df4665314a1cb", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d", + "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d", "shasum": "" }, "require": { "doctrine/lexer": "1.*", "ext-tokenizer": "*", - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/cache": "1.*", @@ -6595,24 +6617,24 @@ "docblock", "parser" ], - "time": "2020-04-20T09:18:32+00:00" + "time": "2020-05-25T17:24:27+00:00" }, { "name": "doctrine/cache", - "version": "1.10.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62" + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62", - "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62", + "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3", + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3", "shasum": "" }, "require": { - "php": "~7.1" + "php": "~7.1 || ^8.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" @@ -6677,7 +6699,21 @@ "redis", "xcache" ], - "time": "2019-11-29T15:36:20+00:00" + "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%2Fcache", + "type": "tidelift" + } + ], + "time": "2020-05-27T16:24:54+00:00" }, { "name": "doctrine/inflector", @@ -6748,20 +6784,20 @@ }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -6800,24 +6836,38 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -6862,7 +6912,21 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "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": "2020-05-25T17:44:05+00:00" }, { "name": "friendsofphp/php-cs-fixer", @@ -8443,16 +8507,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "8.0.1", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a" + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", "shasum": "" }, "require": { @@ -8503,7 +8567,13 @@ "testing", "xunit" ], - "time": "2020-02-19T13:41:19+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-23T08:02:54+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9654,28 +9724,28 @@ }, { "name": "sebastian/type", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1" + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", "shasum": "" }, "require": { "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -9696,7 +9766,13 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-02-07T06:13:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-01T12:21:09+00:00" }, { "name": "sebastian/version", @@ -9865,22 +9941,24 @@ }, { "name": "symfony/config", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "db1674e1a261148429f123871f30d211992294e7" + "reference": "b8623ef3d99fe62a34baf7a111b576216965f880" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/db1674e1a261148429f123871f30d211992294e7", - "reference": "db1674e1a261148429f123871f30d211992294e7", + "url": "https://api.github.com/repos/symfony/config/zipball/b8623ef3d99fe62a34baf7a111b576216965f880", + "reference": "b8623ef3d99fe62a34baf7a111b576216965f880", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/filesystem": "^4.4|^5.0", - "symfony/polyfill-ctype": "~1.8" + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/finder": "<4.4" @@ -9898,7 +9976,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -9939,29 +10017,31 @@ "type": "tidelift" } ], - "time": "2020-04-15T15:59:10+00:00" + "time": "2020-05-23T13:08:13+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba" + "reference": "6a6791e9584273b32eeb01790da4c7446d87a621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", - "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621", + "reference": "6a6791e9584273b32eeb01790da4c7446d87a621", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<5.0", + "symfony/config": "<5.1", "symfony/finder": "<4.4", "symfony/proxy-manager-bridge": "<4.4", "symfony/yaml": "<4.4" @@ -9971,7 +10051,7 @@ "symfony/service-implementation": "1.0" }, "require-dev": { - "symfony/config": "^5.0", + "symfony/config": "^5.1", "symfony/expression-language": "^4.4|^5.0", "symfony/yaml": "^4.4|^5.0" }, @@ -9985,7 +10065,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10026,35 +10106,101 @@ "type": "tidelift" } ], - "time": "2020-04-28T17:58:55+00:00" + "time": "2020-05-30T20:35:19+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", + "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-27T08:34:37+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d" + "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d", - "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", + "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", "shasum": "" }, "require": { - "php": "^7.2.5", - "symfony/mime": "^4.4|^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": "^4.4|^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": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10095,26 +10241,27 @@ "type": "tidelift" } ], - "time": "2020-04-18T20:50:06+00:00" + "time": "2020-05-24T12:18:07+00:00" }, { "name": "symfony/mime", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" + "reference": "56261f89385f9d13cf843a5101ac72131190bc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/mailer": "<4.4" @@ -10126,7 +10273,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10171,29 +10318,31 @@ "type": "tidelift" } ], - "time": "2020-04-17T03:29:44+00:00" + "time": "2020-05-25T12:33:44+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1" + "reference": "663f5dd5e14057d1954fe721f9709d35837f2447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", - "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447", + "reference": "663f5dd5e14057d1954fe721f9709d35837f2447", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10239,7 +10388,7 @@ "type": "tidelift" } ], - "time": "2020-04-06T10:40:56+00:00" + "time": "2020-05-23T13:08:13+00:00" }, { "name": "symfony/polyfill-php70", @@ -10314,28 +10463,104 @@ ], "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" + ], + "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-12T16:47:27+00:00" + }, { "name": "symfony/stopwatch", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323", + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/service-contracts": "^1.0|^2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10376,24 +10601,25 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/yaml", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f" + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f", - "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -10405,10 +10631,13 @@ "suggest": { "symfony/console": "For validating YAML files using the lint command" }, + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10449,7 +10678,7 @@ "type": "tidelift" } ], - "time": "2020-04-28T17:58:55+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "thecodingmachine/safe", From 3337da2decf2549ac96e9cc524c37c42d3adf2f9 Mon Sep 17 00:00:00 2001 From: Tu Nguyen Date: Tue, 9 Jun 2020 22:05:57 +0700 Subject: [PATCH 18/99] Improve html markup thumbnail image --- .../Ui/view/base/web/templates/grid/cells/thumbnail.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html index 705becce75a0a..25f26813d6eaa 100644 --- a/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html +++ b/app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html @@ -4,4 +4,8 @@ * See COPYING.txt for license details. */ --> - + + + + + From 246dd8c2ad1345916762d2fa748a9f14610f607b Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Thu, 11 Jun 2020 11:59:06 +0200 Subject: [PATCH 19/99] Perform upgrade of `-dev` dependencies again --- composer.lock | 659 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 598 insertions(+), 61 deletions(-) diff --git a/composer.lock b/composer.lock index 39282cb149dc6..269e01f659b20 100644 --- a/composer.lock +++ b/composer.lock @@ -206,6 +206,16 @@ "ssl", "tls" ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2020-04-08T08:27:21+00:00" }, { @@ -287,6 +297,16 @@ "dependency", "package" ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2020-05-06T08:28:10+00:00" }, { @@ -412,16 +432,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7" + "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7", - "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", + "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", "shasum": "" }, "require": { @@ -452,7 +472,21 @@ "Xdebug", "performance" ], - "time": "2020-03-01T12:26:26+00:00" + "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": "2020-06-04T11:16:35+00:00" }, { "name": "container-interop/container-interop", @@ -1305,6 +1339,12 @@ "BSD-3-Clause" ], "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.", + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-05-20T13:45:39+00:00" }, { @@ -2262,6 +2302,12 @@ "laminas", "mail" ], + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-04-21T16:42:19+00:00" }, { @@ -3254,6 +3300,12 @@ "laminas", "zf" ], + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-05-20T16:45:56+00:00" }, { @@ -3493,6 +3545,16 @@ "logging", "psr-3" ], + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], "time": "2020-05-22T07:31:27+00:00" }, { @@ -3908,6 +3970,20 @@ "x.509", "x509" ], + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], "time": "2020-04-04T23:17:33+00:00" }, { @@ -4271,6 +4347,16 @@ "parser", "validator" ], + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], "time": "2020-04-30T19:05:18+00:00" }, { @@ -4391,6 +4477,20 @@ ], "description": "Symfony Console 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-03-30T11:41:10+00:00" }, { @@ -4444,6 +4544,20 @@ ], "description": "Symfony CssSelector 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-20T17:43:50+00:00" }, { @@ -4514,6 +4628,20 @@ ], "description": "Symfony EventDispatcher 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-03-27T16:54:36+00:00" }, { @@ -4622,6 +4750,20 @@ ], "description": "Symfony Filesystem 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-30T20:35:19+00:00" }, { @@ -4671,6 +4813,20 @@ ], "description": "Symfony Finder 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-20T17:43:50+00:00" }, { @@ -4729,6 +4885,20 @@ "polyfill", "portable" ], + "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-12T16:14:59+00:00" }, { @@ -4791,6 +4961,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -4850,6 +5034,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -4905,6 +5103,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -4963,6 +5175,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -5012,24 +5238,38 @@ ], "description": "Symfony Process 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-04-15T15:56:18+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -5038,7 +5278,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5070,7 +5310,21 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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-20T17:43:50+00:00" }, { "name": "tedivm/jshrink", @@ -6439,6 +6693,20 @@ "redis", "xcache" ], + "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%2Fcache", + "type": "tidelift" + } + ], "time": "2020-05-27T16:24:54+00:00" }, { @@ -6562,6 +6830,20 @@ "constructor", "instantiate" ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], "time": "2020-05-29T17:27:14+00:00" }, { @@ -6624,6 +6906,20 @@ "parser", "php" ], + "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": "2020-05-25T17:44:05+00:00" }, { @@ -6715,6 +7011,12 @@ } ], "description": "A tool to automatically fix PHP code style", + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], "time": "2020-04-15T18:51:10+00:00" }, { @@ -6973,6 +7275,12 @@ "sftp", "storage" ], + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], "time": "2020-05-18T15:13:39+00:00" }, { @@ -8020,16 +8328,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.7.3", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", "shasum": "" }, "require": { @@ -8071,7 +8379,17 @@ "php", "type" ], - "time": "2020-03-21T18:07:53+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2020-06-07T10:40:07+00:00" }, { "name": "phpspec/prophecy", @@ -8176,20 +8494,34 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], "time": "2020-05-05T12:55:44+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "8.0.1", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a" + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", "shasum": "" }, "require": { @@ -8240,7 +8572,13 @@ "testing", "xunit" ], - "time": "2020-02-19T13:41:19+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-23T08:02:54+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8290,6 +8628,12 @@ "filesystem", "iterator" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-04-18T05:02:12+00:00" }, { @@ -8438,6 +8782,12 @@ "keywords": [ "timer" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-04-20T06:00:37+00:00" }, { @@ -8487,6 +8837,12 @@ "keywords": [ "tokenizer" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-05-06T09:56:31+00:00" }, { @@ -8575,6 +8931,16 @@ "testing", "xunit" ], + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-05-22T13:54:05+00:00" }, { @@ -8715,6 +9081,12 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-04-30T05:58:10+00:00" }, { @@ -8880,6 +9252,12 @@ "unidiff", "unified diff" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-05-08T05:01:12+00:00" }, { @@ -8933,6 +9311,12 @@ "environment", "hhvm" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-04-14T13:36:52+00:00" }, { @@ -9345,28 +9729,28 @@ }, { "name": "sebastian/type", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1" + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", "shasum": "" }, "require": { "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -9387,7 +9771,13 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-02-07T06:13:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-01T12:21:09+00:00" }, { "name": "sebastian/version", @@ -9556,22 +9946,24 @@ }, { "name": "symfony/config", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "db1674e1a261148429f123871f30d211992294e7" + "reference": "b8623ef3d99fe62a34baf7a111b576216965f880" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/db1674e1a261148429f123871f30d211992294e7", - "reference": "db1674e1a261148429f123871f30d211992294e7", + "url": "https://api.github.com/repos/symfony/config/zipball/b8623ef3d99fe62a34baf7a111b576216965f880", + "reference": "b8623ef3d99fe62a34baf7a111b576216965f880", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/filesystem": "^4.4|^5.0", - "symfony/polyfill-ctype": "~1.8" + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/finder": "<4.4" @@ -9589,7 +9981,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -9616,29 +10008,45 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2020-04-15T15:59:10+00:00" + "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-23T13:08:13+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba" + "reference": "6a6791e9584273b32eeb01790da4c7446d87a621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", - "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621", + "reference": "6a6791e9584273b32eeb01790da4c7446d87a621", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1.6|^2" }, "conflict": { - "symfony/config": "<5.0", + "symfony/config": "<5.1", "symfony/finder": "<4.4", "symfony/proxy-manager-bridge": "<4.4", "symfony/yaml": "<4.4" @@ -9648,7 +10056,7 @@ "symfony/service-implementation": "1.0" }, "require-dev": { - "symfony/config": "^5.0", + "symfony/config": "^5.1", "symfony/expression-language": "^4.4|^5.0", "symfony/yaml": "^4.4|^5.0" }, @@ -9662,7 +10070,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -9689,7 +10097,21 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2020-04-28T17:58:55+00:00" + "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-30T20:35:19+00:00" }, { "name": "symfony/deprecation-contracts", @@ -9735,6 +10157,20 @@ ], "description": "A generic function and convention to trigger deprecation notices", "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-27T08:34:37+00:00" }, { @@ -9796,6 +10232,20 @@ ], "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-24T12:18:07+00:00" }, { @@ -9859,29 +10309,45 @@ "mime", "mime-type" ], + "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-25T12:33:44+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1" + "reference": "663f5dd5e14057d1954fe721f9709d35837f2447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", - "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447", + "reference": "663f5dd5e14057d1954fe721f9709d35837f2447", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -9913,7 +10379,21 @@ "configuration", "options" ], - "time": "2020-04-06T10:40:56+00:00" + "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-23T13:08:13+00:00" }, { "name": "symfony/polyfill-php70", @@ -9972,6 +10452,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -10034,30 +10528,44 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73" + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73", - "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323", + "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/service-contracts": "^1.0|^2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -10084,7 +10592,21 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2020-03-27T16:56:45+00:00" + "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-20T17:43:50+00:00" }, { "name": "symfony/yaml", @@ -10147,6 +10669,20 @@ ], "description": "Symfony Yaml 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-20T17:43:50+00:00" }, { @@ -10537,5 +11073,6 @@ "ext-zip": "*", "lib-libxml": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From 7a108aa646f8b7f2f117513ea18946d84c256dd9 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Mon, 22 Jun 2020 10:52:33 +0200 Subject: [PATCH 20/99] Upgrade to PHPUnit 9.2.5 --- composer.json | 4 +- composer.lock | 630 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 510 insertions(+), 124 deletions(-) diff --git a/composer.json b/composer.json index 1b260cc122865..fec1654f276f2 100644 --- a/composer.json +++ b/composer.json @@ -93,8 +93,8 @@ "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.8.0", "phpstan/phpstan": ">=0.12.3 <=0.12.23", - "phpunit/phpunit": "^9", - "sebastian/phpcpd": "~5.0.0", + "phpunit/phpunit": "^9.2", + "sebastian/phpcpd": "@stable", "squizlabs/php_codesniffer": "~3.5.4" }, "suggest": { diff --git a/composer.lock b/composer.lock index e5614cfd0ac99..834c5d9961672 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": "f3674961f96b48fdd025a6c94610c8eb", + "content-hash": "ae8dac1805260cc117a4e9a9b752b566", "packages": [ { "name": "colinmollenhour/cache-backend-file", @@ -297,6 +297,16 @@ "dependency", "package" ], + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], "time": "2020-05-06T08:28:10+00:00" }, { @@ -1321,6 +1331,12 @@ "BSD-3-Clause" ], "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.", + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-05-20T13:45:39+00:00" }, { @@ -2278,6 +2294,12 @@ "laminas", "mail" ], + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-04-21T16:42:19+00:00" }, { @@ -3270,6 +3292,12 @@ "laminas", "zf" ], + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], "time": "2020-05-20T16:45:56+00:00" }, { @@ -3509,6 +3537,16 @@ "logging", "psr-3" ], + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], "time": "2020-05-22T07:31:27+00:00" }, { @@ -4301,6 +4339,16 @@ "parser", "validator" ], + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], "time": "2020-04-30T19:05:18+00:00" }, { @@ -4421,6 +4469,20 @@ ], "description": "Symfony Console 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-03-30T11:41:10+00:00" }, { @@ -4558,6 +4620,20 @@ ], "description": "Symfony EventDispatcher 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-03-27T16:54:36+00:00" }, { @@ -4684,7 +4760,7 @@ }, { "name": "symfony/finder", - "version": "v5.1.0", + "version": "v5.1.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -4747,16 +4823,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -4769,6 +4845,10 @@ "extra": { "branch-alias": { "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -4801,7 +4881,21 @@ "polyfill", "portable" ], - "time": "2020-05-12T16:14:59+00:00" + "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-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-intl-idn", @@ -4863,6 +4957,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -4922,6 +5030,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -4977,6 +5099,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -5035,6 +5171,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -5084,6 +5234,20 @@ ], "description": "Symfony Process 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-04-15T15:56:18+00:00" }, { @@ -6835,6 +6999,12 @@ } ], "description": "A tool to automatically fix PHP code style", + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], "time": "2020-04-15T18:51:10+00:00" }, { @@ -7093,6 +7263,12 @@ "sftp", "storage" ], + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], "time": "2020-05-18T15:13:39+00:00" }, { @@ -8024,16 +8200,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95" + "reference": "30441f2752e493c639526b215ed81d54f369d693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95", - "reference": "7462d5f123dfc080dfdf26897032a6513644fc95", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693", + "reference": "30441f2752e493c639526b215ed81d54f369d693", "shasum": "" }, "require": { @@ -8047,7 +8223,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -8066,7 +8242,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-02-18T18:59:58+00:00" + "time": "2020-06-19T20:22:09+00:00" }, { "name": "phpmd/phpmd", @@ -8296,20 +8472,34 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], "time": "2020-05-05T12:55:44+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "8.0.1", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a" + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a", - "reference": "31e94ccc084025d6abee0585df533eb3a792b96a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", "shasum": "" }, "require": { @@ -8360,20 +8550,26 @@ "testing", "xunit" ], - "time": "2020-02-19T13:41:19+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-23T08:02:54+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4" + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", - "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", "shasum": "" }, "require": { @@ -8410,20 +8606,26 @@ "filesystem", "iterator" ], - "time": "2020-04-18T05:02:12+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:54:35+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a" + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a", - "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/62f696ad0d140e0e513e69eaafdebb674d622b4c", + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c", "shasum": "" }, "require": { @@ -8463,25 +8665,34 @@ "keywords": [ "process" ], - "time": "2020-02-07T06:06:11+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:10:07+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346" + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346", - "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c69cbf965d5317ba33f24a352539f354a25db09", + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09", "shasum": "" }, "require": { "php": "^7.3" }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, "type": "library", "extra": { "branch-alias": { @@ -8509,32 +8720,38 @@ "keywords": [ "template" ], - "time": "2020-02-01T07:43:44+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:52:43+00:00" }, { "name": "phpunit/php-timer", - "version": "3.1.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258" + "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/dc9368fae6ef2ffa57eba80a7410bcef81df6258", - "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/b0d089de001ba60ffa3be36b23e1b8150d072238", + "reference": "b0d089de001ba60ffa3be36b23e1b8150d072238", "shasum": "" }, "require": { "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -8558,20 +8775,26 @@ "keywords": [ "timer" ], - "time": "2020-04-20T06:00:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-07T12:05:53+00:00" }, { "name": "phpunit/php-token-stream", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c" + "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c", - "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e61c593e9734b47ef462340c24fca8d6a57da14e", + "reference": "e61c593e9734b47ef462340c24fca8d6a57da14e", "shasum": "" }, "require": { @@ -8607,20 +8830,26 @@ "keywords": [ "tokenizer" ], - "time": "2020-05-06T09:56:31+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-16T07:00:44+00:00" }, { "name": "phpunit/phpunit", - "version": "9.1.5", + "version": "9.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1b570cd7edbe136055bf5f651857dc8af6b829d2" + "reference": "ad7cc5ec3ab2597b329880e30442d9054526023b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b570cd7edbe136055bf5f651857dc8af6b829d2", - "reference": "1b570cd7edbe136055bf5f651857dc8af6b829d2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ad7cc5ec3ab2597b329880e30442d9054526023b", + "reference": "ad7cc5ec3ab2597b329880e30442d9054526023b", "shasum": "" }, "require": { @@ -8640,7 +8869,7 @@ "phpunit/php-file-iterator": "^3.0", "phpunit/php-invoker": "^3.0", "phpunit/php-text-template": "^2.0", - "phpunit/php-timer": "^3.1.4", + "phpunit/php-timer": "^5.0", "sebastian/code-unit": "^1.0.2", "sebastian/comparator": "^4.0", "sebastian/diff": "^4.0", @@ -8649,7 +8878,7 @@ "sebastian/global-state": "^4.0", "sebastian/object-enumerator": "^4.0", "sebastian/resource-operations": "^3.0", - "sebastian/type": "^2.0", + "sebastian/type": "^2.1", "sebastian/version": "^3.0" }, "require-dev": { @@ -8666,7 +8895,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.1-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -8695,7 +8924,17 @@ "testing", "xunit" ], - "time": "2020-05-22T13:54:05+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-22T07:10:55+00:00" }, { "name": "psr/cache", @@ -8793,16 +9032,16 @@ }, { "name": "sebastian/code-unit", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5" + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", - "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", "shasum": "" }, "require": { @@ -8835,20 +9074,26 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", - "time": "2020-04-30T05:58:10+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:11:26+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e" + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e", - "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c771130f0e8669104a4320b7101a81c2cc2963ef", + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef", "shasum": "" }, "require": { @@ -8880,20 +9125,26 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2020-02-07T06:20:13+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T12:56:39+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.0", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8" + "reference": "266d85ef789da8c41f06af4093c43e9798af2784" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8", - "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/266d85ef789da8c41f06af4093c43e9798af2784", + "reference": "266d85ef789da8c41f06af4093c43e9798af2784", "shasum": "" }, "require": { @@ -8944,7 +9195,13 @@ "compare", "equality" ], - "time": "2020-02-07T06:08:51+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T15:04:48+00:00" }, { "name": "sebastian/diff", @@ -9000,20 +9257,26 @@ "unidiff", "unified diff" ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "time": "2020-05-08T05:01:12+00:00" }, { "name": "sebastian/environment", - "version": "5.1.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c" + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c", - "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", "shasum": "" }, "require": { @@ -9053,20 +9316,26 @@ "environment", "hhvm" ], - "time": "2020-04-14T13:36:52+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:00:01+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "80c26562e964016538f832f305b2286e1ec29566" + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566", - "reference": "80c26562e964016538f832f305b2286e1ec29566", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d12fbca85da932d01d941b59e4b71a0d559db091", + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091", "shasum": "" }, "require": { @@ -9120,7 +9389,13 @@ "export", "exporter" ], - "time": "2020-02-07T06:10:52+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:12:44+00:00" }, { "name": "sebastian/finder-facade", @@ -9224,16 +9499,16 @@ }, { "name": "sebastian/object-enumerator", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67516b175550abad905dc952f43285957ef4363" + "reference": "15f319d67c49fc55ebcdbffb3377433125588455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363", - "reference": "e67516b175550abad905dc952f43285957ef4363", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/15f319d67c49fc55ebcdbffb3377433125588455", + "reference": "15f319d67c49fc55ebcdbffb3377433125588455", "shasum": "" }, "require": { @@ -9267,20 +9542,26 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2020-02-07T06:12:23+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:15:25+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7" + "reference": "14e04b3c25b821cc0702d4837803fe497680b062" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", - "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/14e04b3c25b821cc0702d4837803fe497680b062", + "reference": "14e04b3c25b821cc0702d4837803fe497680b062", "shasum": "" }, "require": { @@ -9312,29 +9593,35 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2020-02-07T06:19:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:08:02+00:00" }, { "name": "sebastian/phpcpd", - "version": "5.0.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "8724382966b1861df4e12db915eaed2165e10bf3" + "reference": "a9462153f2dd90466a010179901d31fbff598365" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/8724382966b1861df4e12db915eaed2165e10bf3", - "reference": "8724382966b1861df4e12db915eaed2165e10bf3", + "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/a9462153f2dd90466a010179901d31fbff598365", + "reference": "a9462153f2dd90466a010179901d31fbff598365", "shasum": "" }, "require": { - "ext-dom": "*", - "php": "^7.3", - "phpunit/php-timer": "^3.0", - "sebastian/finder-facade": "^2.0", - "sebastian/version": "^3.0", - "symfony/console": "^4.0|^5.0" + "php": ">=5.3.3", + "phpunit/php-timer": ">=1.0.4", + "sebastian/finder-facade": ">=1.1.0", + "sebastian/version": ">=1.0.3", + "symfony/console": ">=2.2.0", + "theseer/fdomdocument": "~1.4" }, "bin": [ "phpcpd" @@ -9342,7 +9629,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -9363,20 +9650,20 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2020-02-22T06:03:17+00:00" + "time": "2014-03-31T09:25:30+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cdd86616411fc3062368b720b0425de10bd3d579" + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579", - "reference": "cdd86616411fc3062368b720b0425de10bd3d579", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a32789e5f0157c10cf216ce6c5136db12a12b847", + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847", "shasum": "" }, "require": { @@ -9416,20 +9703,26 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2020-02-07T06:18:20+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:06:44+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98" + "reference": "71421c1745788de4facae1b79af923650bd3ec15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", - "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/71421c1745788de4facae1b79af923650bd3ec15", + "reference": "71421c1745788de4facae1b79af923650bd3ec15", "shasum": "" }, "require": { @@ -9461,32 +9754,38 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-02-07T06:13:02+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-15T13:17:14+00:00" }, { "name": "sebastian/type", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1" + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1", - "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", + "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8", "shasum": "" }, "require": { "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -9507,7 +9806,13 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-02-07T06:13:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-06-01T12:21:09+00:00" }, { "name": "sebastian/version", @@ -9736,6 +10041,20 @@ ], "description": "Symfony Config 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-04-15T15:59:10+00:00" }, { @@ -9809,6 +10128,20 @@ ], "description": "Symfony DependencyInjection 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-04-28T17:58:55+00:00" }, { @@ -10075,6 +10408,20 @@ "configuration", "options" ], + "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-04-06T10:40:56+00:00" }, { @@ -10134,6 +10481,20 @@ "portable", "shim" ], + "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-12T16:47:27+00:00" }, { @@ -10260,6 +10621,20 @@ ], "description": "Symfony Stopwatch 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-03-27T16:56:45+00:00" }, { @@ -10612,20 +10987,30 @@ "env", "environment" ], + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], "time": "2020-05-02T13:38:00+00:00" }, { "name": "webmozart/assert", - "version": "1.8.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" + "reference": "9dc4f203e36f2b486149058bade43c851dd97451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", - "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451", + "reference": "9dc4f203e36f2b486149058bade43c851dd97451", "shasum": "" }, "require": { @@ -10633,6 +11018,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { + "phpstan/phpstan": "<0.12.20", "vimeo/psalm": "<3.9.1" }, "require-dev": { @@ -10660,7 +11046,7 @@ "check", "validate" ], - "time": "2020-04-18T12:12:48+00:00" + "time": "2020-06-16T10:16:42+00:00" }, { "name": "weew/helpers-array", From edfaf7c0a0f3e0905736a840bc6983fc07a464f8 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Fri, 26 Jun 2020 15:00:38 +0300 Subject: [PATCH 21/99] Static properties serialization fix - update. --- .../TestFramework/Workaround/Cleanup/StaticProperties.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php index b3461340aa7c0..f094cb9c1ca62 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php @@ -185,7 +185,8 @@ public static function backupStaticVariables() | Files::INCLUDE_TESTS ), function ($classFile) { - return StaticProperties::_isClassInCleanableFolders($classFile) + return strpos($classFile, 'TestFramework') === -1 + && StaticProperties::_isClassInCleanableFolders($classFile) // phpcs:ignore Magento2.Functions.DiscouragedFunction && strpos(file_get_contents($classFile), ' static ') > 0; } From d87d307baeb67ca38c6caa3aa5a63e6931686560 Mon Sep 17 00:00:00 2001 From: Vitaliy Ryaboy Date: Mon, 29 Jun 2020 18:43:26 +0200 Subject: [PATCH 22/99] improve and make more strict autoload.php --- app/autoload.php | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/app/autoload.php b/app/autoload.php index d6407083dc0b3..6a0a95347a681 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -5,36 +5,48 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + use Magento\Framework\Autoload\AutoloaderRegistry; use Magento\Framework\Autoload\ClassLoaderWrapper; /** * Shortcut constant for the root directory */ -define('BP', dirname(__DIR__)); +\define('BP', \dirname(__DIR__)); -define('VENDOR_PATH', BP . '/app/etc/vendor_path.php'); +\define('VENDOR_PATH', BP . '/app/etc/vendor_path.php'); -if (!file_exists(VENDOR_PATH)) { +if (!\is_readable(VENDOR_PATH)) { throw new \Exception( 'We can\'t read some files that are required to run the Magento application. ' . 'This usually means file permissions are set incorrectly.' ); } -$vendorDir = require VENDOR_PATH; -$vendorAutoload = BP . "/{$vendorDir}/autoload.php"; +$vendorAutoload = ( + static function (): ?string { + $vendorDir = require VENDOR_PATH; + + $vendorAutoload = BP . "/{$vendorDir}/autoload.php"; + if (\is_readable($vendorAutoload)) { + return $vendorAutoload; + } + + $vendorAutoload = "{$vendorDir}/autoload.php"; + if (\is_readable($vendorAutoload)) { + return $vendorAutoload; + } + + return null; + } +)(); -/* 'composer install' validation */ -if (file_exists($vendorAutoload)) { - $composerAutoloader = include $vendorAutoload; -} else if (file_exists("{$vendorDir}/autoload.php")) { - $vendorAutoload = "{$vendorDir}/autoload.php"; - $composerAutoloader = include $vendorAutoload; -} else { +if ($vendorAutoload === null) { throw new \Exception( 'Vendor autoload is not found. Please run \'composer install\' under application root directory.' ); } +$composerAutoloader = include $vendorAutoload; AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader)); From 30caed7f38f900904753d7248a1d79a4220232fc Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sun, 19 Jul 2020 18:55:59 +0200 Subject: [PATCH 23/99] Reduce class complexity by quick refactor --- .../Model/Product/TierPriceManagement.php | 72 ++++++++++++++----- 1 file changed, 55 insertions(+), 17 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php index 16bdec2533fe6..1af1c3042fbcd 100644 --- a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php @@ -12,11 +12,12 @@ use Magento\Customer\Api\GroupRepositoryInterface; use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\TemporaryStateExceptionInterface; +use Magento\Store\Api\Data\WebsiteInterface; +use Magento\Store\Model\ScopeInterface; /** - * Product tier price management - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class TierPriceManagement implements \Magento\Catalog\Api\ProductTierPriceManagementInterface @@ -100,7 +101,7 @@ public function add($sku, $customerGroupId, $price, $qty) $product = $this->productRepository->get($sku, ['edit_mode' => true]); $tierPrices = $product->getData('tier_price'); $websiteIdentifier = 0; - $value = $this->config->getValue('catalog/price/scope', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE); + $value = $this->config->getValue('catalog/price/scope', ScopeInterface::SCOPE_WEBSITE); if ($value != 0) { $websiteIdentifier = $this->storeManager->getWebsite()->getId(); } @@ -160,9 +161,8 @@ public function remove($sku, $customerGroupId, $qty) { $product = $this->productRepository->get($sku, ['edit_mode' => true]); $websiteIdentifier = 0; - $value = $this->config->getValue('catalog/price/scope', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE); - if ($value != 0) { - $websiteIdentifier = $this->storeManager->getWebsite()->getId(); + if ($this->getPriceScopeConfig() !== 0) { + $websiteIdentifier = $this->getCurrentWebsite()->getId(); } $this->priceModifier->removeTierPrice($product, $customerGroupId, $qty, $websiteIdentifier); return true; @@ -175,23 +175,17 @@ public function getList($sku, $customerGroupId) { $product = $this->productRepository->get($sku, ['edit_mode' => true]); - $priceKey = 'website_price'; - $value = $this->config->getValue('catalog/price/scope', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE); - if ($value == 0) { - $priceKey = 'price'; - } - - $cgi = ($customerGroupId === 'all' + $cgi = $customerGroupId === 'all' ? $this->groupManagement->getAllCustomersGroup()->getId() - : $customerGroupId); + : $customerGroupId; $prices = []; $tierPrices = $product->getData('tier_price'); if ($tierPrices !== null) { + $priceKey = $this->getPriceKey(); + foreach ($tierPrices as $price) { - if ((is_numeric($customerGroupId) && (int) $price['cust_group'] === (int) $customerGroupId) - || ($customerGroupId === 'all' && $price['all_groups']) - ) { + if ($this->isCustomerGroupApplicable($customerGroupId, $price)) { /** @var \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice */ $tierPrice = $this->priceFactory->create(); $tierPrice->setValue($price[$priceKey]) @@ -203,4 +197,48 @@ public function getList($sku, $customerGroupId) } return $prices; } + + /** + * Returns attribute code (key) that contains price + * + * @return string + */ + private function getPriceKey(): string + { + return $this->getPriceScopeConfig() === 0 ? 'price' : 'website_price'; + } + + /** + * Returns whether Price is applicable for provided Customer Group + * + * @param string $customerGroupId + * @param array $priceArray + * @return bool + */ + private function isCustomerGroupApplicable(string $customerGroupId, array $priceArray): bool + { + return ($customerGroupId === 'all' && $priceArray['all_groups']) + || (is_numeric($customerGroupId) && (int)$priceArray['cust_group'] === (int)$customerGroupId); + } + + /** + * Returns current Price Scope configuration value + * + * @return string + */ + private function getPriceScopeConfig(): string + { + return (int)$this->config->getValue('catalog/price/scope', ScopeInterface::SCOPE_WEBSITE); + } + + /** + * Returns current Website object + * + * @return WebsiteInterface + * @throws LocalizedException + */ + private function getCurrentWebsite(): WebsiteInterface + { + return $this->storeManager->getWebsite(); + } } From 2af87179617897d39c97dcddbfa89576cf95578d Mon Sep 17 00:00:00 2001 From: Nikita Sarychev Date: Mon, 20 Jul 2020 20:32:32 +0300 Subject: [PATCH 24/99] Update Price.php --- .../Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php index c6e271c3ec304..b8c12b434652d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php @@ -194,11 +194,11 @@ public function getCondition() $rate = $this->_getRate($displayCurrency, $this->_getColumnCurrencyCode()); if (isset($value['from'])) { - $value['from'] *= $rate; + $value['from'] = (float) $value['from'] * $rate; } if (isset($value['to'])) { - $value['to'] *= $rate; + $value['to'] = (float) $value['to'] * $rate; } $this->prepareRates($displayCurrency); From e5be53f628f6170324572132bf66742b6fb63115 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Tue, 21 Jul 2020 15:19:41 +0300 Subject: [PATCH 25/99] remove filtering by unique value --- app/code/Magento/Customer/Model/Options.php | 5 ++--- .../testsuite/Magento/Customer/Model/OptionsTest.php | 12 ++++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Customer/Model/Options.php b/app/code/Magento/Customer/Model/Options.php index bc093502fb4fc..7496c2c0bc0bf 100644 --- a/app/code/Magento/Customer/Model/Options.php +++ b/app/code/Magento/Customer/Model/Options.php @@ -101,12 +101,11 @@ private function prepareNamePrefixSuffixOptions($options, $isOptional = false) $result = []; $options = explode(';', $options); foreach ($options as $value) { - $value = $this->escaper->escapeHtml(trim($value)) ?: ' '; - $result[$value] = $value; + $result[] = $this->escaper->escapeHtml(trim($value)) ?: ' '; } if ($isOptional && trim(current($options))) { - $result = array_merge([' ' => ' '], $result); + $result = array_merge([' '], $result); } return $result; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php index 5deda0803fff0..879707edd9224 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/OptionsTest.php @@ -102,9 +102,11 @@ public function optionsDataProvider(): array $optionPrefixName = 'prefix'; $optionSuffixName = 'suffix'; $optionValues = 'v1;v2'; + $expectedValues = ['v1', 'v2']; $optionValuesWithBlank = ';v1;v2'; - $expectedValuesWithBlank = [' ' => ' ', 'v1' => 'v1', 'v2' => 'v2']; - $expectedValues = ['v1' => 'v1', 'v2' => 'v2']; + $expectedValuesWithBlank = [' ', 'v1', 'v2']; + $optionValuesWithTwoBlank = ';v1;v2;'; + $expectedValuesTwoBlank = [' ', 'v1', 'v2', ' ']; return [ 'prefix_required_with_blank_option' => [ @@ -119,6 +121,12 @@ public function optionsDataProvider(): array [self::XML_PATH_PREFIX_OPTIONS => $optionValues], $expectedValues, ], + 'prefix_required_with_two_blank_option' => [ + $optionPrefixName, + [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_REQUIRED], + [self::XML_PATH_PREFIX_OPTIONS => $optionValuesWithTwoBlank], + $expectedValuesTwoBlank, + ], 'prefix_optional' => [ $optionPrefixName, [self::XML_PATH_PREFIX_SHOW => Nooptreq::VALUE_OPTIONAL], From 03198de345527a1e981011c469be57c20391f86f Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sun, 26 Jul 2020 00:42:07 +0200 Subject: [PATCH 26/99] Unit Test / Deprecate / ObjectManager Helper --- .../Framework/TestFramework/Unit/Helper/ObjectManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php index 26457f23c6c78..527b5b292ca1f 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php @@ -8,6 +8,7 @@ /** * Helper class for basic object retrieving, such as blocks, models etc... * + * @deprecated Class under test should be instantiated with `new` keyword with explicit dependencies declaration * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ObjectManager From d0218e19ae5dd5c519ca960db28fac46edca84a0 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sun, 26 Jul 2020 00:59:34 +0200 Subject: [PATCH 27/99] Replace PHPUnit 6 MockObject reference with PHPPUnit 9 ones. --- .../TestFramework/Unit/Helper/ObjectManager.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php index 527b5b292ca1f..b313e556335a0 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\TestFramework\Unit\Helper; +use PHPUnit\Framework\MockObject\MockObject; + /** * Helper class for basic object retrieving, such as blocks, models etc... * @@ -45,7 +47,7 @@ public function __construct(\PHPUnit\Framework\TestCase $testObject) * * @param string $argClassName * @param array $originalArguments - * @return null|object|\PHPUnit_Framework_MockObject_MockObject + * @return null|object|MockObject */ protected function _createArgumentMock($argClassName, array $originalArguments) { @@ -83,7 +85,7 @@ protected function _processSpecialCases($className, $arguments) /** * Retrieve specific mock of core resource model * - * @return \Magento\Framework\Module\ResourceInterface|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Module\ResourceInterface|MockObject */ protected function _getResourceModelMock() { @@ -109,7 +111,7 @@ protected function _getResourceModelMock() * Retrieve mock of core translator model * * @param string $className - * @return \Magento\Framework\TranslateInterface|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\TranslateInterface|MockObject */ protected function _getTranslatorMock($className) { @@ -131,7 +133,7 @@ protected function _getTranslatorMock($className) * Get mock without call of original constructor * * @param string $className - * @return \PHPUnit_Framework_MockObject_MockObject + * @return MockObject */ protected function _getMockWithoutConstructorCall($className) { @@ -293,7 +295,7 @@ public function getConstructArguments($className, array $arguments = []) * * @param string $className * @param array $data - * @return \PHPUnit_Framework_MockObject_MockObject + * @return MockObject * @throws \InvalidArgumentException */ public function getCollectionMock($className, array $data) @@ -327,7 +329,7 @@ public function getCollectionMock($className, array $data) * * @param string $argClassName * @param array $arguments - * @return null|object|\PHPUnit_Framework_MockObject_MockObject + * @return null|object|MockObject */ private function _getMockObject($argClassName, array $arguments) { From 019646ca1ab9937a3f49cc9efa4daa051ac1fad1 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Sun, 26 Jul 2020 09:28:11 +0200 Subject: [PATCH 28/99] Fix Static Tests failure, related to non-existing class reference --- .../TestFramework/Unit/Helper/ObjectManager.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php index b313e556335a0..0f828c6b7cb82 100644 --- a/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php +++ b/lib/internal/Magento/Framework/TestFramework/Unit/Helper/ObjectManager.php @@ -155,6 +155,7 @@ protected function _getMockWithoutConstructorCall($className) */ public function getObject($className, array $arguments = []) { + // phpstan:ignore if (is_subclass_of($className, \Magento\Framework\Api\AbstractSimpleObjectBuilder::class) || is_subclass_of($className, \Magento\Framework\Api\Builder::class) ) { @@ -333,13 +334,12 @@ public function getCollectionMock($className, array $data) */ private function _getMockObject($argClassName, array $arguments) { + // phpstan:ignore if (is_subclass_of($argClassName, \Magento\Framework\Api\ExtensibleObjectBuilder::class)) { - $object = $this->getBuilder($argClassName, $arguments); - return $object; - } else { - $object = $this->_createArgumentMock($argClassName, $arguments); - return $object; + return $this->getBuilder($argClassName, $arguments); } + + return $this->_createArgumentMock($argClassName, $arguments); } /** From 08671ba3d1a80c805742219a01d2134787ac144b Mon Sep 17 00:00:00 2001 From: Ivan Gerchak Date: Mon, 27 Jul 2020 12:46:17 +0300 Subject: [PATCH 29/99] Add back extension point for adding some html to the category page #29286 --- .../frontend/templates/product/list.phtml | 4 +- .../templates/product/listing/renderer.phtml | 65 ++++++++++--------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index 554caf6026001..7803293e0d4b4 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -74,9 +74,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class); getReviewsSummaryHtml($_product, $templateType) ?> getProductPrice($_product) ?> - isAvailable()) :?> - getProductDetailsHtml($_product) ?> - + getProductDetailsHtml($_product) ?>
escapeHtmlAttr($position) : '' ?>> diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml index 5838ba9625c6a..3829f830c435e 100644 --- a/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml +++ b/app/code/Magento/Swatches/view/frontend/templates/product/listing/renderer.phtml @@ -4,42 +4,43 @@ * See COPYING.txt for license details. */ ?> -getProduct()->getId(); -/** @var \Magento\Swatches\ViewModel\Product\Renderer\Configurable $configurableViewModel */ -$configurableViewModel = $block->getConfigurableViewModel() -?> -
+ +getProduct() ?> +isAvailable()) : ?> + getId() ?> + + getConfigurableViewModel() ?> +
- + - + + From f8f53e4396d034c25f0e6d2fbb3b3a40e4b25204 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Mon, 27 Jul 2020 12:20:21 +0200 Subject: [PATCH 30/99] Revert `composer.json` to the state of `2.4-develop` --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index eeded8a3d3fe9..3428a7dff23cc 100644 --- a/composer.json +++ b/composer.json @@ -93,8 +93,8 @@ "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.8.0", "phpstan/phpstan": ">=0.12.3 <=0.12.23", - "phpunit/phpunit": "^9.2", - "sebastian/phpcpd": "@stable", + "phpunit/phpunit": "^9", + "sebastian/phpcpd": "~5.0.0", "squizlabs/php_codesniffer": "~3.5.4" }, "suggest": { From 3ec0f57754c4b0096d17a2c26ef9a838aa65f5d9 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Mon, 27 Jul 2020 13:02:53 +0200 Subject: [PATCH 31/99] Fix invalid return type provided for private method --- .../Magento/Catalog/Model/Product/TierPriceManagement.php | 4 ++-- .../Test/Unit/Model/Product/TierPriceManagementTest.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php index 1af1c3042fbcd..d14984d3d3478 100644 --- a/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php +++ b/app/code/Magento/Catalog/Model/Product/TierPriceManagement.php @@ -224,9 +224,9 @@ private function isCustomerGroupApplicable(string $customerGroupId, array $price /** * Returns current Price Scope configuration value * - * @return string + * @return int */ - private function getPriceScopeConfig(): string + private function getPriceScopeConfig(): int { return (int)$this->config->getValue('catalog/price/scope', ScopeInterface::SCOPE_WEBSITE); } diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php index d326f5fb19520..412855c929331 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/TierPriceManagementTest.php @@ -203,7 +203,9 @@ public function testSuccessDeleteTierPrice() ->method('getValue') ->with('catalog/price/scope', ScopeInterface::SCOPE_WEBSITE) ->willReturn(0); - $this->priceModifierMock->expects($this->once())->method('removeTierPrice')->with($this->productMock, 4, 5, 0); + $this->priceModifierMock->expects($this->once()) + ->method('removeTierPrice') + ->with($this->productMock, 4, 5, 0); $this->assertTrue($this->service->remove('product_sku', 4, 5, 0)); } From 1be7e8ceeee68ee04f595055b2280195fd613eac Mon Sep 17 00:00:00 2001 From: Nikita Sarychev Date: Mon, 27 Jul 2020 14:55:41 +0300 Subject: [PATCH 32/99] add unit test for price filter --- .../Widget/Grid/Column/Filter/PriceTest.php | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Filter/PriceTest.php diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Filter/PriceTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Filter/PriceTest.php new file mode 100644 index 0000000000000..32eebbb2e7670 --- /dev/null +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/Column/Filter/PriceTest.php @@ -0,0 +1,102 @@ +_requestMock = $this->getMockForAbstractClass(RequestInterface::class); + + $this->context = $this->createMock(Context::class); + $this->context->expects($this->any())->method('getRequest')->willReturn($this->_requestMock); + + $this->helper = $this->createMock(Helper::class); + + $this->currency = $this->getMockBuilder(Currency::class) + ->disableOriginalConstructor() + ->setMethods(['getAnyRate']) + ->getMock(); + + $this->currencyLocator = $this->createMock(DefaultLocator::class); + + $this->columnMock = $this->getMockBuilder(Column::class) + ->disableOriginalConstructor() + ->setMethods(['getCurrencyCode']) + ->getMock(); + + $helper = new ObjectManager($this); + + $this->blockPrice = $helper->getObject(Price::class, [ + 'context' => $this->context, + 'resourceHelper' => $this->helper, + 'currencyModel' => $this->currency, + 'currencyLocator' => $this->currencyLocator + ]); + $this->blockPrice->setColumn($this->columnMock); + } + + public function testGetCondition() + { + $this->currencyLocator->expects( + $this->any() + )->method( + 'getDefaultCurrency' + )->with( + $this->_requestMock + )->willReturn( + 'defaultCurrency' + ); + + $this->currency->expects($this->at(0)) + ->method('getAnyRate') + ->with('defaultCurrency') + ->willReturn(1.0); + + $testValue = [ + 'value' => [ + 'from' => '1234a', + ] + ]; + + $this->blockPrice->addData($testValue); + $this->assertEquals(['from' => 1234], $this->blockPrice->getCondition()); + } +} From aeccbe5ec1d4c5cee1ab7ee291efd9b25253ea8a Mon Sep 17 00:00:00 2001 From: Ivan Gerchak Date: Mon, 27 Jul 2020 12:57:45 +0300 Subject: [PATCH 33/99] Add back extension point for adding some html to the category page #29286 --- .../frontend/templates/product/list.phtml | 55 ++++++++++++------- .../templates/product/listing/renderer.phtml | 14 +++-- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index 7803293e0d4b4..f4cd50b45d246 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -8,6 +8,8 @@ use Magento\Framework\App\Action\Action; ?> getLoadedProductCollection(); /** @var \Magento\Catalog\Helper\Output $_helper */ $_helper = $this->helper(Magento\Catalog\Helper\Output::class); ?> -count()) :?> -
escapeHtml(__('We can\'t find products matching the selection.')) ?>
- +count()): ?> +
+
escapeHtml(__('We can\'t find products matching the selection.')) ?>
+
+ getToolbarHtml() ?> getAdditionalHtml() ?> getMode() == 'grid') { + if ($block->getMode() === 'grid') { $viewMode = 'grid'; $imageDisplayArea = 'category_page_grid'; $showDescription = false; @@ -46,7 +50,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
    - +
  1. helper(Magento\Catalog\Helper\Output::class); toHtml() ?>
    - stripTags($_product->getName(), null, true); - ?> + stripTags($_product->getName(), null, true); ?> - productAttribute($_product, $_product->getName(), 'name') ?> + productAttribute( + $_product, + $_product->getName(), + 'name' + ) ?> getReviewsSummaryHtml($_product, $templateType) ?> @@ -79,7 +85,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
    escapeHtmlAttr($position) : '' ?>>
    escapeHtmlAttr($position) : '' ?>> - isSaleable()) :?> + isSaleable()): ?> getAddToCartPostParams($_product); ?>
    helper(Magento\Catalog\Helper\Output::class); - getBlockHtml('formkey') ?>
    - - isAvailable()) :?> -
    escapeHtml(__('In stock')) ?>
    - -
    escapeHtml(__('Out of stock')) ?>
    + + isAvailable()): ?> +
    + escapeHtml(__('In stock')) ?> +
    + +
    + escapeHtml(__('Out of stock')) ?> +
    escapeHtmlAttr($position) : '' ?>> - getChildBlock('addto')) :?> + getChildBlock('addto')): ?> setProduct($_product)->getChildHtml() ?>
    - +
    - productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> + productAttribute( + $_product, + $_product->getShortDescription(), + 'short_description' + ) ?> escapeHtml(__('Learn More')) ?> @@ -127,7 +142,7 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
getToolbarHtml() ?> - isRedirectToCartEnabled()) :?> + isRedirectToCartEnabled()): ?>