diff --git a/app/code/Magento/PageCache/etc/varnish3.vcl b/app/code/Magento/PageCache/etc/varnish3.vcl
index 7fa9a30ec9ac5..0b6651fbc0cd4 100644
--- a/app/code/Magento/PageCache/etc/varnish3.vcl
+++ b/app/code/Magento/PageCache/etc/varnish3.vcl
@@ -54,7 +54,7 @@ sub vcl_recv {
std.collect(req.http.Cookie);
# static files are always cacheable. remove SSL flag and cookie
- if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") {
+ if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
unset req.http.Https;
unset req.http.Cookie;
}
@@ -96,7 +96,7 @@ sub vcl_fetch {
# images, css and js are cacheable by default so we have to remove cookie also
if (beresp.ttl > 0s && (req.request == "GET" || req.request == "HEAD")) {
unset beresp.http.set-cookie;
- if (req.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") {
+ if (req.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") {
set beresp.http.Pragma = "no-cache";
set beresp.http.Expires = "-1";
set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
diff --git a/app/code/Magento/PageCache/etc/varnish4.vcl b/app/code/Magento/PageCache/etc/varnish4.vcl
index 5936fcd69255d..0f3dddb893d95 100644
--- a/app/code/Magento/PageCache/etc/varnish4.vcl
+++ b/app/code/Magento/PageCache/etc/varnish4.vcl
@@ -47,7 +47,7 @@ sub vcl_recv {
std.collect(req.http.Cookie);
# static files are always cacheable. remove SSL flag and cookie
- if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") {
+ if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
unset req.http.Https;
unset req.http.Cookie;
}
@@ -90,7 +90,7 @@ sub vcl_backend_response {
# images, css and js are cacheable by default so we have to remove cookie also
if (beresp.ttl > 0s && (bereq.method == "GET" || bereq.method == "HEAD")) {
unset beresp.http.set-cookie;
- if (bereq.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") {
+ if (bereq.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") {
set beresp.http.Pragma = "no-cache";
set beresp.http.Expires = "-1";
set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php
index c3a9fe9933ee4..b7c342c1fd4ec 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/HhvmCompatibilityTest.php
@@ -36,6 +36,7 @@ class HhvmCompatibilityTest extends \PHPUnit_Framework_TestCase
'mime_magic.magicfile',
'display_errors',
'default_socket_timeout',
+ 'pcre.recursion_limit',
];
public function testAllowedIniGetSetDirectives()
diff --git a/dev/tools/performance-toolkit/benchmark.jmx b/dev/tools/performance-toolkit/benchmark.jmx
index 1fe4919a59eb4..7d3d7aef7fa0a 100644
--- a/dev/tools/performance-toolkit/benchmark.jmx
+++ b/dev/tools/performance-toolkit/benchmark.jmx
@@ -316,7 +316,7 @@ props.put("category_name", vars.get("category_name"));
UTF-8
- ${base_path}catalogsearch/result/?limit=30&q=Simple
+ ${base_path}catalogsearch/result/index/?limit=30&q=Simple
GET
true
false
@@ -340,7 +340,7 @@ props.put("category_name", vars.get("category_name"));
false
simple_products_url_keys
- ${base_path}(index.php/)?(simple.*)${url_suffix}" title="[Ss]imple.*"
+ <a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Simple
$2$
-1
@@ -386,7 +386,7 @@ props.put("category_name", vars.get("category_name"));
simple_product_title
- .//*[@data-ui-id='page-title']/text()
+ .//*[@data-ui-id='page-title-wrapper']/text()
false
true
false
@@ -471,7 +471,7 @@ productList.add(productMap);
UTF-8
- ${base_path}catalogsearch/result/?limit=30&q=Configurable
+ ${base_path}catalogsearch/result/index/?limit=30&q=Configurable
GET
true
false
@@ -495,7 +495,7 @@ productList.add(productMap);
false
configurable_products_url_keys
- ${base_path}(index.php/)?(configurable.*)${url_suffix}" title="[Cc]onfigurable.*"
+ <a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Configurable
$2$
-1
@@ -541,7 +541,7 @@ productList.add(productMap);
configurable_product_title
- .//*[@data-ui-id='page-title']/text()
+ .//*[@data-ui-id='page-title-wrapper']/text()
false
true
false
@@ -550,7 +550,7 @@ productList.add(productMap);
false
configurable_product_attribute_id
- "spConfig":\{"attributes":\{"(\d+)"
+ "attributes":\{"(\d+)"
$1$
1
@@ -1401,6 +1401,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ simple_product_1_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_1_form_action
+
+
${think_time_delay_offset}
@@ -1431,6 +1451,20 @@ vars.put("category_name", props.get("category_name"));true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -1439,7 +1473,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${simple_product_1_form_action}
POST
true
false
@@ -1468,17 +1502,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=1
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -1516,6 +1539,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ simple_product_2_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_2_form_action
+
+
${think_time_delay_offset}
@@ -1546,6 +1589,20 @@ vars.put("category_name", props.get("category_name"));true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -1554,7 +1611,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${simple_product_2_form_action}
POST
true
false
@@ -1583,17 +1640,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=2
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -1631,6 +1677,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ configurable_product_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ configurable_product_form_action
+
+
${think_time_delay_offset}
@@ -1668,6 +1734,20 @@ vars.put("category_name", props.get("category_name"));true
super_attribute[${configurable_attribute_id}]
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -1676,7 +1756,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${configurable_product_form_action}
POST
true
false
@@ -1705,17 +1785,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=3
- false
- false
- true
- false
- true
- true
-
-
@@ -1882,6 +1951,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ simple_product_1_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_1_form_action
+
+
${think_time_delay_offset}
@@ -1912,6 +2001,20 @@ vars.put("category_name", props.get("category_name"));true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -1920,7 +2023,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${simple_product_1_form_action}
POST
true
false
@@ -1949,17 +2052,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=1
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -1997,6 +2089,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ simple_product_2_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_2_form_action
+
+
${think_time_delay_offset}
@@ -2027,6 +2139,20 @@ vars.put("category_name", props.get("category_name"));true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -2035,7 +2161,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${simple_product_2_form_action}
POST
true
false
@@ -2064,17 +2190,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=2
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -2112,6 +2227,26 @@ vars.put("category_name", props.get("category_name"));2
+
+ false
+ configurable_product_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ configurable_product_form_action
+
+
${think_time_delay_offset}
@@ -2149,6 +2284,20 @@ vars.put("category_name", props.get("category_name"));true
super_attribute[${configurable_attribute_id}]
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -2157,7 +2306,7 @@ vars.put("category_name", props.get("category_name"));
http
- ${base_path}checkout/cart/add
+ ${configurable_product_form_action}
POST
true
false
@@ -2186,17 +2335,6 @@ vars.put("category_name", props.get("category_name"));6
-
- false
- count(//*[@class='cart item'])=3
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -2932,6 +3070,26 @@ if (emailsCount < 1) {
2
+
+ false
+ simple_product_1_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_1_form_action
+
+
${think_time_delay_offset}
@@ -2962,6 +3120,20 @@ if (emailsCount < 1) {
true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -2970,7 +3142,7 @@ if (emailsCount < 1) {
http
- ${base_path}checkout/cart/add
+ ${simple_product_1_form_action}
POST
true
false
@@ -2999,17 +3171,6 @@ if (emailsCount < 1) {
6
-
- false
- count(//*[@class='cart item'])=1
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -3047,6 +3208,26 @@ if (emailsCount < 1) {
2
+
+ false
+ simple_product_2_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ simple_product_2_form_action
+
+
${think_time_delay_offset}
@@ -3077,6 +3258,20 @@ if (emailsCount < 1) {
true
qty
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -3085,7 +3280,7 @@ if (emailsCount < 1) {
http
- ${base_path}checkout/cart/add
+ ${simple_product_2_form_action}
POST
true
false
@@ -3114,17 +3309,6 @@ if (emailsCount < 1) {
6
-
- false
- count(//*[@class='cart item'])=2
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
@@ -3162,6 +3346,26 @@ if (emailsCount < 1) {
2
+
+ false
+ configurable_product_form_action
+ <form action="([^'"]+)" method="post" id="product_addtocart_form">
+ $1$
+
+ 1
+
+
+
+
+ ^.+$
+
+ Assertion.response_data
+ false
+ 1
+ variable
+ configurable_product_form_action
+
+
${think_time_delay_offset}
@@ -3199,6 +3403,20 @@ if (emailsCount < 1) {
true
super_attribute[${configurable_attribute_id}]
+
+ false
+ true
+ =
+ true
+ isAjax
+
+
+ false
+ true
+ =
+ true
+ ajax
+
@@ -3207,7 +3425,7 @@ if (emailsCount < 1) {
http
- ${base_path}checkout/cart/add
+ ${configurable_product_form_action}
POST
true
false
@@ -3236,17 +3454,6 @@ if (emailsCount < 1) {
6
-
- false
- count(//*[@class='cart item'])=3
- false
- false
- true
- false
- true
- true
-
-
${think_time_delay_offset}
diff --git a/dev/tools/performance-toolkit/generate.php b/dev/tools/performance-toolkit/generate.php
index 43a4d61cc0962..861abee07ef81 100644
--- a/dev/tools/performance-toolkit/generate.php
+++ b/dev/tools/performance-toolkit/generate.php
@@ -41,6 +41,18 @@
echo ' |- ' . $label . ': ' . $config->getValue($configKey) . PHP_EOL;
}
+ /** @var $config \Magento\Indexer\Model\Config */
+ $config = $application->getObjectManager()->get('Magento\Indexer\Model\Config');
+ $indexerListIds = $config->getIndexers();
+ /** @var $indexerRegistry \Magento\Indexer\Model\IndexerRegistry */
+ $indexerRegistry = $application->getObjectManager()->create('Magento\Indexer\Model\IndexerRegistry');
+ $indexersState = [];
+ foreach ($indexerListIds as $key => $indexerId) {
+ $indexer = $indexerRegistry->get($indexerId['indexer_id']);
+ $indexersState[$indexerId['indexer_id']] = $indexer->isScheduled();
+ $indexer->setScheduled(true);
+ }
+
foreach ($application->getFixtures() as $fixture) {
echo $fixture->getActionTitle() . '... ';
$startTime = microtime(true);
@@ -50,6 +62,12 @@
echo ' done in ' . gmdate('H:i:s', $resultTime) . PHP_EOL;
}
+ foreach ($indexerListIds as $indexerId) {
+ /** @var $indexer \Magento\Indexer\Model\Indexer */
+ $indexer = $indexerRegistry->get($indexerId['indexer_id']);
+ $indexer->setScheduled($indexersState[$indexerId['indexer_id']]);
+ }
+
$application->reindex();
$totalEndTime = microtime(true);
$totalResultTime = $totalEndTime - $totalStartTime;
diff --git a/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php b/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php
index dddf0a6e4c006..e1d4d01942333 100644
--- a/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php
+++ b/lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CssMinifier.php
@@ -11,6 +11,11 @@
class CssMinifier implements AdapterInterface
{
+ /**
+ * 'pcre.recursion_limit' value for CSSMin minification
+ */
+ const PCRE_RECURSION_LIMIT = 1000;
+
/**
* @var CSSmin
*/
@@ -32,6 +37,10 @@ public function __construct(CSSmin $cssMinifier)
*/
public function minify($content)
{
- return $this->cssMinifier->run($content);
+ $pcreRecursionLimit = ini_get('pcre.recursion_limit');
+ ini_set('pcre.recursion_limit', self::PCRE_RECURSION_LIMIT);
+ $result = $this->cssMinifier->run($content);
+ ini_set('pcre.recursion_limit', $pcreRecursionLimit);
+ return $result;
}
}