Skip to content

Commit ed39cf0

Browse files
authored
Merge pull request #16 from magento-commerce/develop
MCLOUD-8486: Release Cloud Tools
2 parents 3c51ea9 + 18d762f commit ed39cf0

File tree

9 files changed

+99
-25
lines changed

9 files changed

+99
-25
lines changed

.github/.metadata.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"templateVersion": "0.1",
3+
"product": {
4+
"name": "Magento Cloud Components",
5+
"description": "The Magento Cloud Components module extends Magento Commerce core functionality for sites deployed on the Cloud platform. This module contains cloud-specific functionality for use with the ece-tools package."
6+
},
7+
"contacts": {
8+
"team": {
9+
"name": "Magic Mountain",
10+
"DL": "Grp-magento-cloud-all",
11+
"slackChannel": "magic_mountain"
12+
}
13+
},
14+
"ticketTracker": {
15+
"functionalJiraQueue": {
16+
"projectKey": "MCLOUD"
17+
},
18+
"securityJiraQueue": {
19+
"projectKey": "MAGREQ",
20+
"component": "Magento Cloud Engineering"
21+
}
22+
},
23+
"staticScan": {
24+
"enable": false
25+
}
26+
}

Console/Command/CacheEvict.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function configure()
4343
/**
4444
* @inheritDoc
4545
*/
46-
public function execute(InputInterface $input, OutputInterface $output)
46+
public function execute(InputInterface $input, OutputInterface $output): void
4747
{
4848
$output->writeln('Begin scanning of cache keys');
4949

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\CloudComponents\Test\Functional\Acceptance;
9+
10+
/**
11+
* @group php74
12+
*/
13+
class Acceptance74Cest extends AcceptanceCest
14+
{
15+
/**
16+
* @return array
17+
*/
18+
protected function patchesDataProvider(): array
19+
{
20+
return [
21+
['magentoVersion' => '2.4.0'],
22+
['magentoVersion' => '2.4.3'],
23+
];
24+
}
25+
}

Test/Functional/Acceptance/AcceptanceCest.php

+21-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\CloudComponents\Test\Functional\Acceptance;
99

1010
/**
11-
* @group php74
11+
* @group php81
1212
*/
1313
class AcceptanceCest
1414
{
@@ -31,12 +31,27 @@ protected function prepareTemplate(\CliTester $I, string $magentoVersion): void
3131
$I->createArtifactsDir();
3232
$I->createArtifactCurrentTestedCode('components', '1.0.99');
3333
$I->addArtifactsRepoToComposer();
34-
$I->addEceDockerGitRepoToComposer();
3534
$I->addDependencyToComposer('magento/magento-cloud-components', '1.0.99');
36-
$I->addDependencyToComposer(
35+
36+
$I->addEceToolsGitRepoToComposer();
37+
$I->addEceDockerGitRepoToComposer();
38+
$I->addCloudPatchesGitRepoToComposer();
39+
$I->addQualityPatchesGitRepoToComposer();
40+
41+
$dependencies = [
42+
'magento/ece-tools',
3743
'magento/magento-cloud-docker',
38-
$I->getDependencyVersion('magento/magento-cloud-docker')
39-
);
44+
'magento/magento-cloud-patches',
45+
'magento/quality-patches'
46+
];
47+
48+
foreach ($dependencies as $dependency) {
49+
$I->assertTrue(
50+
$I->addDependencyToComposer($dependency, $I->getDependencyVersion($dependency)),
51+
'Can not add dependency ' . $dependency
52+
);
53+
}
54+
4055
$I->composerUpdate();
4156
}
4257

@@ -86,8 +101,7 @@ protected function removeESIfExists(\CliTester $I, string $magentoVersion): void
86101
protected function patchesDataProvider(): array
87102
{
88103
return [
89-
['magentoVersion' => '2.4.0'],
90-
['magentoVersion' => 'master'],
104+
['magentoVersion' => '2.4.4'],
91105
];
92106
}
93107

Test/Unit/Model/UrlFinder/EntityTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class EntityTest extends TestCase
4040
/**
4141
* @inheritDoc
4242
*/
43-
protected function setUp()
43+
protected function setUp(): void
4444
{
4545
$this->urlFactoryMock = $this->createMock(UrlFactory::class);
4646
$this->urlFinderMock = $this->getMockForAbstractClass(UrlFinderInterface::class);

Test/Unit/Model/UrlFinderFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class UrlFinderFactoryTest extends TestCase
3434
/**
3535
* @inheritDoc
3636
*/
37-
protected function setUp()
37+
protected function setUp(): void
3838
{
3939
$this->objectManagerMock = $this->getMockForAbstractClass(ObjectManagerInterface::class);
4040

Test/Unit/Model/UrlFixerTest.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ class UrlFixerTest extends TestCase
3030
/**
3131
* @inheritDoc
3232
*/
33-
protected function setUp()
33+
protected function setUp(): void
3434
{
35-
$this->storeMock = $this->createPartialMock(Store::class, ['getForceDisableRewrites', 'getConfig']);
35+
$this->storeMock = $this->getMockBuilder(Store::class)
36+
->disableOriginalConstructor()
37+
->onlyMethods(['getConfig'])
38+
->addMethods(['getForceDisableRewrites'])
39+
->getMock();
3640
$this->urlFixer = new UrlFixer();
3741
}
3842

composer.json

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "magento/magento-cloud-components",
33
"description": "Cloud Components Module for Magento 2.x",
44
"type": "magento2-module",
5-
"version": "1.0.9",
5+
"version": "1.0.10",
66
"require": {
7-
"php": "^7.1",
7+
"php": "^7.2 || ^8.0",
88
"ext-json": "*",
99
"colinmollenhour/cache-backend-redis": "^1.9",
1010
"colinmollenhour/credis": "^1.6"
@@ -15,11 +15,15 @@
1515
"magento/module-url-rewrite": "*"
1616
},
1717
"require-dev": {
18-
"codeception/codeception": "^2.5.3",
18+
"codeception/codeception": "^4.1",
19+
"codeception/module-asserts": "^1.2",
20+
"codeception/module-db": "^1.0",
21+
"codeception/module-phpbrowser": "^1.0",
22+
"codeception/module-rest": "^1.2",
1923
"consolidation/robo": "^1.2",
2024
"phpmd/phpmd": "@stable",
21-
"phpstan/phpstan": "^0.11",
22-
"phpunit/phpunit": "^7.2",
25+
"phpstan/phpstan": "^0.12",
26+
"phpunit/phpunit": "^8.5 || ^9.5",
2327
"squizlabs/php_codesniffer": "^3.0"
2428
},
2529
"config": {
@@ -32,9 +36,9 @@
3236
"@phpmd",
3337
"@phpunit"
3438
],
35-
"phpstan": "phpstan analyse -c test/static/phpstan.neon",
36-
"phpcs": "phpcs ./ --standard=test/static/phpcs-ruleset.xml -p -n",
37-
"phpmd": "phpmd Console xml test/static/phpmd-ruleset.xml",
39+
"phpstan": "phpstan analyse -c tests/static/phpstan.neon",
40+
"phpcs": "phpcs ./ --standard=tests/static/phpcs-ruleset.xml -p -n",
41+
"phpmd": "phpmd Console xml tests/static/phpmd-ruleset.xml",
3842
"phpunit": "phpunit --configuration Test/Unit",
3943
"pre-install-cmd": "@install_suggested",
4044
"pre-update-cmd": "@install_suggested",

tests/static/phpstan.neon

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
parameters:
22
level: 1
33
paths:
4-
- Console
5-
- Model
4+
- %currentWorkingDirectory%/Console
5+
- %currentWorkingDirectory%/Model
6+
- %currentWorkingDirectory%/Cron
67
excludes_analyse:
78
- %currentWorkingDirectory%/Test/*
9+
reportUnmatchedIgnoredErrors: false
810
ignoreErrors:
9-
-
10-
message: '#has invalid typehint type#'
11-
path: Model/UrlFinder/Product.php
11+
- message: '#has invalid typehint type#'
12+
path: %currentWorkingDirectory%/Model/UrlFinder/Product.php

0 commit comments

Comments
 (0)