diff --git a/lib/internal/Magento/Framework/Setup/Patch/UpToDateThemes.php b/lib/internal/Magento/Framework/Setup/Patch/UpToDateThemes.php new file mode 100644 index 0000000000000..b73dfd9dbf533 --- /dev/null +++ b/lib/internal/Magento/Framework/Setup/Patch/UpToDateThemes.php @@ -0,0 +1,54 @@ +themeImporter = $themeImporter; + $this->deploymentConfig = $deploymentConfig; + } + + /** + * @return string + */ + public function getNotUpToDateMessage() : string + { + return 'Themes are not up to date'; + } + + /** + * @return bool + * @throws FileSystemException + * @throws RuntimeException + */ + public function isUpToDate() : bool + { + return !count($this->themeImporter->getWarningMessages($this->deploymentConfig->getConfigData('themes'))); + } +} diff --git a/setup/src/Magento/Setup/Console/Command/DbStatusCommand.php b/setup/src/Magento/Setup/Console/Command/DbStatusCommand.php index be18bd58037ea..861d0f4f8f272 100644 --- a/setup/src/Magento/Setup/Console/Command/DbStatusCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DbStatusCommand.php @@ -11,6 +11,7 @@ use Magento\Framework\Setup\OldDbValidator; use Magento\Framework\Setup\Patch\UpToDateData; use Magento\Framework\Setup\Patch\UpToDateSchema; +use Magento\Framework\Setup\Patch\UpToDateThemes; use Magento\Framework\Setup\UpToDateValidatorInterface; use Magento\Setup\Model\ObjectManagerProvider; use Symfony\Component\Console\Input\InputInterface; @@ -64,6 +65,7 @@ public function __construct(ObjectManagerProvider $objectManagerProvider, Deploy $this->objectManagerProvider->get()->get(UpToDateSchema::class), $this->objectManagerProvider->get()->get(UpToDateData::class), $this->objectManagerProvider->get()->get(OldDbValidator::class), + $this->objectManagerProvider->get()->get(UpToDateThemes::class), ]; parent::__construct(); }