From 4e1fd5a1cfd05b15de95302ba81d5bcccc534be3 Mon Sep 17 00:00:00 2001 From: Akos Date: Tue, 30 Apr 2024 09:05:31 +0200 Subject: [PATCH 1/2] add a command option to filter on file extension --- Console/Command/CheckOverrideCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Console/Command/CheckOverrideCommand.php b/Console/Command/CheckOverrideCommand.php index abc981a..e524c43 100644 --- a/Console/Command/CheckOverrideCommand.php +++ b/Console/Command/CheckOverrideCommand.php @@ -51,6 +51,7 @@ protected function configure() { $this->setName('yireo:theme-overrides:check') ->setDescription('Check the overrides of a specified theme') + ->addOption('extension', '-e', InputOption::VALUE_OPTIONAL, 'Filter the checked files by extension (for example xml, phtml, ...)') ->addArgument('theme', InputOption::VALUE_REQUIRED, 'Theme name'); } @@ -100,6 +101,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int ]); $themeFiles = $this->finder->in($themePath)->files(); + + if($input->getOption('extension')) { + $themeFiles->name('*.' . $input->getOption('extension')); + } + foreach ($themeFiles as $themeFile) { $parentThemeFile = null; $lineDiff = 0; From 417c907c04ec0c622ae6acbe6e6965b9be4a6039 Mon Sep 17 00:00:00 2001 From: Jisse Reitsma Date: Wed, 8 May 2024 19:55:42 +0200 Subject: [PATCH 2/2] Release --- CHANGELOG.md | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c48c85..ed7f18d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.4] - 8 May 2024 +### Fixed +- Add a command option to filter on file extension #3 @akosglue + ## [0.0.3] - 28 August 2023 ### Fixed - Remove old imports and unused `$finder` diff --git a/composer.json b/composer.json index c1d5ca4..8b8afab 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "yireo/magento2-theme-override-checker", - "version": "0.0.3", + "version": "0.0.4", "description": "N/A", "type": "magento2-module", "require": {