Skip to content

Commit

Permalink
Merge pull request #1 from magento-pangolin/MQE-2195
Browse files Browse the repository at this point in the history
MQE-2314: Merge MFTF SVC to SVC Master
  • Loading branch information
soumyau authored Oct 19, 2020
2 parents 5663771 + b05b6af commit 042b82f
Show file tree
Hide file tree
Showing 299 changed files with 9,531 additions and 137 deletions.
6 changes: 5 additions & 1 deletion bin/svc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ if (PHP_SAPI !== 'cli') {
}

try {
$application = new Application();
$composerContents = json_decode(file_get_contents(__DIR__ . '/../composer.json'), true);
$application = new Symfony\Component\Console\Application(
$composerContents['description'],
$composerContents['version']
);
$application->add(new CompareSourceCommand());
$application->run();
} catch (\Exception $e) {
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"name": "magento/magento-semver",
"description": "Magento semantic version checker",
"version": "6.0.0",
"description": "Magento Semantic Version Checker",
"version": "7.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"bin": ["bin/svc"],
"require": {
"php": "~7.2.29||~7.3.0||~7.4.0",
"ext-json": "*",
"phpstan/phpdoc-parser": "^0.3.5",
"symfony/console": "~4.1.0||~4.4.0",
"tomzx/php-semver-checker": "^0.14.0",
"wikimedia/less.php": "~1.8.0",
"zendframework/zend-stdlib": "^3.2.1",
"nikic/php-parser": "^4.4"
"nikic/php-parser": "^4.4",
"sabre/xml": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^6.5.0",
Expand Down
191 changes: 119 additions & 72 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions src/Analyzer/Factory/MftfAnalyzerFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\SemanticVersionChecker\Analyzer\Factory;

use Magento\SemanticVersionChecker\Analyzer\Analyzer;
use Magento\SemanticVersionChecker\Analyzer\AnalyzerInterface;
use Magento\SemanticVersionChecker\Analyzer\Mftf\ActionGroupAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\DataAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\MetadataAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\PageAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\SectionAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\TestAnalyzer;
use Magento\SemanticVersionChecker\Analyzer\Mftf\SuiteAnalyzer;
use Magento\SemanticVersionChecker\ClassHierarchy\DependencyGraph;
use Magento\SemanticVersionChecker\MftfReport;

/**
* Mftf analyzers factory
*/
class MftfAnalyzerFactory implements AnalyzerFactoryInterface
{
/**
* @param DependencyGraph|null $dependencyGraph
* @return AnalyzerInterface
*/
public function create(DependencyGraph $dependencyGraph = null): AnalyzerInterface
{
$report = new MftfReport();
$analyzers = [
new DataAnalyzer($report),
new MetadataAnalyzer($report),
new PageAnalyzer($report),
new SectionAnalyzer($report),
new TestAnalyzer($report),
new ActionGroupAnalyzer($report),
new SuiteAnalyzer($report)
];

return new Analyzer($analyzers);
}
}
Loading

0 comments on commit 042b82f

Please sign in to comment.