Skip to content

Commit 5630c95

Browse files
authored
Merge pull request #269 from magento-obsessive-owls/MC-18051
MC-18051: PHP 7.3 upgrade for Page Builder
2 parents d3a2d42 + c466f38 commit 5630c95

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

app/code/Magento/CatalogPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-catalog": "*",
1010
"magento/framework": "*",
11-
"php": "~7.1.3||~7.2.0"
11+
"php": "~7.1.3||~7.2.0||~7.3.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/CmsPageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"magento/module-page-builder-analytics": "*",
99
"magento/module-cms": "*",
1010
"magento/framework": "*",
11-
"php": "~7.1.3||~7.2.0"
11+
"php": "~7.1.3||~7.2.0||~7.3.0"
1212
},
1313
"type": "magento2-module",
1414
"license": [

app/code/Magento/PageBuilder/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"magento/module-directory": "*",
1818
"magento/module-email": "*",
1919
"magento/module-require-js": "*",
20-
"php": "~7.1.3||~7.2.0"
20+
"php": "~7.1.3||~7.2.0||~7.3.0"
2121
},
2222
"conflict": {
2323
"gene/bluefoot": "*"

app/code/Magento/PageBuilderAnalytics/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"magento/module-analytics": "*",
66
"magento/module-page-builder": "*",
77
"magento/framework": "*",
8-
"php": "~7.1.3||~7.2.0"
8+
"php": "~7.1.3||~7.2.0||~7.3.0"
99
},
1010
"type": "magento2-module",
1111
"license": [

dev/tests/integration/testsuite/Magento/PageBuilder/Plugin/Filter/TemplatePluginTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ protected function setUp()
4747
public function testFiltering(string $preFiltered, string $postFiltered, string $preFilteredBasename)
4848
{
4949
$this->assertEquals(
50-
$postFiltered,
51-
$this->templateFilter->filter($preFiltered),
50+
$this->formatHtml($postFiltered),
51+
$this->formatHtml($this->templateFilter->filter($preFiltered)),
5252
"Failed asserting that two strings are equal after filtering $preFilteredBasename"
5353
);
5454
}
@@ -79,4 +79,15 @@ public function filterDataProvider(): array
7979

8080
return $dataProviderArgs;
8181
}
82+
83+
/**
84+
* Strip whitespace from the HTML to conduct a fairer comparison
85+
*
86+
* @param string $html
87+
* @return string|string[]|null
88+
*/
89+
private function formatHtml(string $html): string
90+
{
91+
return preg_replace('/(?<=>)\s+|\s+(?=<)/m', '', $html);
92+
}
8293
}

0 commit comments

Comments
 (0)