Skip to content

Commit 9c31eac

Browse files
MAGECLOUD-5359: Patches 1.0.2 fail on magento version 2.1.4 with php 7.0 (#22)
1 parent 7adbf2f commit 9c31eac

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

Model/UrlFinder/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Product implements CloudUrlFinderInterface
2121
/**
2222
* Product limit per store
2323
*/
24-
public const PRODUCT_LIMIT = 100;
24+
const PRODUCT_LIMIT = 100;
2525

2626
/**
2727
* @var UrlFixer

Test/Unit/Model/UrlFinderFactoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function setUp()
4141
$this->urlFinderFactory = new UrlFinderFactory($this->objectManagerMock);
4242
}
4343

44-
public function testCreateCategoryOrCmsPageEntity(): void
44+
public function testCreateCategoryOrCmsPageEntity()
4545
{
4646
$this->objectManagerMock->expects($this->once())
4747
->method('create')
@@ -56,7 +56,7 @@ public function testCreateCategoryOrCmsPageEntity(): void
5656
]);
5757
}
5858

59-
public function testCreateProductEntity(): void
59+
public function testCreateProductEntity()
6060
{
6161
$this->objectManagerMock->expects($this->once())
6262
->method('create')
@@ -74,7 +74,7 @@ public function testCreateProductEntity(): void
7474
]);
7575
}
7676

77-
public function testCreateWrongType(): void
77+
public function testCreateWrongType()
7878
{
7979
$this->expectException(UnexpectedValueException::class);
8080
$this->expectExceptionMessage('Wrong entity type.');

Test/static/Sniffs/Directives/StrictTypesSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function process(File $phpcsFile, $stackPtr)
7979
* @param File $phpcsFile
8080
* @param int $position
8181
*/
82-
private function fix(File $phpcsFile, int $position) : void
82+
private function fix(File $phpcsFile, int $position)
8383
{
8484
// Get the fixer.
8585
$fixer = $phpcsFile->fixer;

Test/static/phpstan.neon

Lines changed: 0 additions & 11 deletions
This file was deleted.

Test/static/static-travis.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ function log() {
1010
printf "\nRunning %s tests:\n" "$1"
1111
}
1212

13-
log "phpstan"
14-
./vendor/bin/phpstan analyse -c Test/static/phpstan.neon
1513
log "phpcs"
1614
./vendor/bin/phpcs ./ --standard=Test/static/phpcs-ruleset.xml -p -n
1715
log "phpmd"

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento-cloud-components",
33
"description": "Cloud Components Module for Magento 2.x",
44
"type": "magento2-module",
5-
"version": "1.0.2",
5+
"version": "1.0.3",
66
"require": {
77
"php": "^7.0",
88
"ext-json": "*"
@@ -14,18 +14,15 @@
1414
},
1515
"require-dev": {
1616
"phpmd/phpmd": "@stable",
17-
"phpstan/phpstan": "^0.11",
1817
"phpunit/phpunit": "^6.2",
1918
"squizlabs/php_codesniffer": "^3.0"
2019
},
2120
"scripts": {
2221
"test": [
23-
"@phpstan",
2422
"@phpcs",
2523
"@phpmd",
2624
"@phpunit"
2725
],
28-
"phpstan": "phpstan analyse -c Test/static/phpstan.neon",
2926
"phpcs": "phpcs ./ --standard=Test/static/phpcs-ruleset.xml -p -n",
3027
"phpmd": "phpmd Console xml Test/static/phpmd-ruleset.xml",
3128
"phpunit": "phpunit --configuration Test/Unit",

0 commit comments

Comments
 (0)