Skip to content

Commit

Permalink
Merge pull request #16 from magento-commerce/develop
Browse files Browse the repository at this point in the history
MCLOUD-8486: Release Cloud Tools
  • Loading branch information
BaDos authored Mar 1, 2022
2 parents 3c51ea9 + 18d762f commit ed39cf0
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 25 deletions.
26 changes: 26 additions & 0 deletions .github/.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"templateVersion": "0.1",
"product": {
"name": "Magento Cloud Components",
"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."
},
"contacts": {
"team": {
"name": "Magic Mountain",
"DL": "Grp-magento-cloud-all",
"slackChannel": "magic_mountain"
}
},
"ticketTracker": {
"functionalJiraQueue": {
"projectKey": "MCLOUD"
},
"securityJiraQueue": {
"projectKey": "MAGREQ",
"component": "Magento Cloud Engineering"
}
},
"staticScan": {
"enable": false
}
}
2 changes: 1 addition & 1 deletion Console/Command/CacheEvict.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function configure()
/**
* @inheritDoc
*/
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): void
{
$output->writeln('Begin scanning of cache keys');

Expand Down
25 changes: 25 additions & 0 deletions Test/Functional/Acceptance/Acceptance74Cest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\CloudComponents\Test\Functional\Acceptance;

/**
* @group php74
*/
class Acceptance74Cest extends AcceptanceCest
{
/**
* @return array
*/
protected function patchesDataProvider(): array
{
return [
['magentoVersion' => '2.4.0'],
['magentoVersion' => '2.4.3'],
];
}
}
28 changes: 21 additions & 7 deletions Test/Functional/Acceptance/AcceptanceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Magento\CloudComponents\Test\Functional\Acceptance;

/**
* @group php74
* @group php81
*/
class AcceptanceCest
{
Expand All @@ -31,12 +31,27 @@ protected function prepareTemplate(\CliTester $I, string $magentoVersion): void
$I->createArtifactsDir();
$I->createArtifactCurrentTestedCode('components', '1.0.99');
$I->addArtifactsRepoToComposer();
$I->addEceDockerGitRepoToComposer();
$I->addDependencyToComposer('magento/magento-cloud-components', '1.0.99');
$I->addDependencyToComposer(

$I->addEceToolsGitRepoToComposer();
$I->addEceDockerGitRepoToComposer();
$I->addCloudPatchesGitRepoToComposer();
$I->addQualityPatchesGitRepoToComposer();

$dependencies = [
'magento/ece-tools',
'magento/magento-cloud-docker',
$I->getDependencyVersion('magento/magento-cloud-docker')
);
'magento/magento-cloud-patches',
'magento/quality-patches'
];

foreach ($dependencies as $dependency) {
$I->assertTrue(
$I->addDependencyToComposer($dependency, $I->getDependencyVersion($dependency)),
'Can not add dependency ' . $dependency
);
}

$I->composerUpdate();
}

Expand Down Expand Up @@ -86,8 +101,7 @@ protected function removeESIfExists(\CliTester $I, string $magentoVersion): void
protected function patchesDataProvider(): array
{
return [
['magentoVersion' => '2.4.0'],
['magentoVersion' => 'master'],
['magentoVersion' => '2.4.4'],
];
}

Expand Down
2 changes: 1 addition & 1 deletion Test/Unit/Model/UrlFinder/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class EntityTest extends TestCase
/**
* @inheritDoc
*/
protected function setUp()
protected function setUp(): void
{
$this->urlFactoryMock = $this->createMock(UrlFactory::class);
$this->urlFinderMock = $this->getMockForAbstractClass(UrlFinderInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion Test/Unit/Model/UrlFinderFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UrlFinderFactoryTest extends TestCase
/**
* @inheritDoc
*/
protected function setUp()
protected function setUp(): void
{
$this->objectManagerMock = $this->getMockForAbstractClass(ObjectManagerInterface::class);

Expand Down
8 changes: 6 additions & 2 deletions Test/Unit/Model/UrlFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ class UrlFixerTest extends TestCase
/**
* @inheritDoc
*/
protected function setUp()
protected function setUp(): void
{
$this->storeMock = $this->createPartialMock(Store::class, ['getForceDisableRewrites', 'getConfig']);
$this->storeMock = $this->getMockBuilder(Store::class)
->disableOriginalConstructor()
->onlyMethods(['getConfig'])
->addMethods(['getForceDisableRewrites'])
->getMock();
$this->urlFixer = new UrlFixer();
}

Expand Down
20 changes: 12 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "magento/magento-cloud-components",
"description": "Cloud Components Module for Magento 2.x",
"type": "magento2-module",
"version": "1.0.9",
"version": "1.0.10",
"require": {
"php": "^7.1",
"php": "^7.2 || ^8.0",
"ext-json": "*",
"colinmollenhour/cache-backend-redis": "^1.9",
"colinmollenhour/credis": "^1.6"
Expand All @@ -15,11 +15,15 @@
"magento/module-url-rewrite": "*"
},
"require-dev": {
"codeception/codeception": "^2.5.3",
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.2",
"codeception/module-db": "^1.0",
"codeception/module-phpbrowser": "^1.0",
"codeception/module-rest": "^1.2",
"consolidation/robo": "^1.2",
"phpmd/phpmd": "@stable",
"phpstan/phpstan": "^0.11",
"phpunit/phpunit": "^7.2",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.0"
},
"config": {
Expand All @@ -32,9 +36,9 @@
"@phpmd",
"@phpunit"
],
"phpstan": "phpstan analyse -c test/static/phpstan.neon",
"phpcs": "phpcs ./ --standard=test/static/phpcs-ruleset.xml -p -n",
"phpmd": "phpmd Console xml test/static/phpmd-ruleset.xml",
"phpstan": "phpstan analyse -c tests/static/phpstan.neon",
"phpcs": "phpcs ./ --standard=tests/static/phpcs-ruleset.xml -p -n",
"phpmd": "phpmd Console xml tests/static/phpmd-ruleset.xml",
"phpunit": "phpunit --configuration Test/Unit",
"pre-install-cmd": "@install_suggested",
"pre-update-cmd": "@install_suggested",
Expand Down
11 changes: 6 additions & 5 deletions tests/static/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
parameters:
level: 1
paths:
- Console
- Model
- %currentWorkingDirectory%/Console
- %currentWorkingDirectory%/Model
- %currentWorkingDirectory%/Cron
excludes_analyse:
- %currentWorkingDirectory%/Test/*
reportUnmatchedIgnoredErrors: false
ignoreErrors:
-
message: '#has invalid typehint type#'
path: Model/UrlFinder/Product.php
- message: '#has invalid typehint type#'
path: %currentWorkingDirectory%/Model/UrlFinder/Product.php

0 comments on commit ed39cf0

Please sign in to comment.