patchHistory = $patchHistory; $this->patchReader = $dataPatchReader; $this->patchBackwardCompatability = $patchBackwardCompatability; $this->moduleList = $moduleList; } /** * @return string */ public function getNotUpToDateMessage() : string { return 'Data patches are not up to date'; } /** * @return bool */ public function isUpToDate() : bool { foreach ($this->moduleList->getNames() as $moduleName) { foreach ($this->patchReader->read($moduleName) as $patchName) { if (!$this->patchBackwardCompatability->isSkipableByDataSetupVersion($patchName, $moduleName) && !$this->patchHistory->isApplied($patchName)) { return false; } } } return true; } }