From 92e5345a37d21b6088ecd5b76ead1869d884b415 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 8 Oct 2023 13:54:12 +0300 Subject: [PATCH] Add command that shows merge plan path --- src/Command/ConfigCommand.php | 38 +++++++++++++++++++++++++++ src/Command/ConfigCommandProvider.php | 1 + 2 files changed, 39 insertions(+) create mode 100644 src/Command/ConfigCommand.php diff --git a/src/Command/ConfigCommand.php b/src/Command/ConfigCommand.php new file mode 100644 index 0000000..8ef710e --- /dev/null +++ b/src/Command/ConfigCommand.php @@ -0,0 +1,38 @@ +setName('yii-config-merge-plan'); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + /** + * @psalm-suppress PossiblyNullArgument + * @psalm-suppress DeprecatedMethod + */ + $helper = new ProcessHelper($this->getComposer()); + $output->write( + $helper->getPaths()->absolute( + $helper->getMergePlanFile() + ) + ); + + return 0; + } +} diff --git a/src/Command/ConfigCommandProvider.php b/src/Command/ConfigCommandProvider.php index 425541f..017d910 100644 --- a/src/Command/ConfigCommandProvider.php +++ b/src/Command/ConfigCommandProvider.php @@ -16,6 +16,7 @@ public function getCommands(): array return [ new CopyCommand(), new RebuildCommand(), + new ConfigCommand(), ]; } }