Neos\Flow\Core\Migrations\Tools::writeComposerManifest PHP Метод

writeComposerManifest() публичный статический Метод

Write the manifest to the given file.
public static writeComposerManifest ( array $manifest, string $pathAndFilename ) : void
$manifest array
$pathAndFilename string
Результат void
    public static function writeComposerManifest(array $manifest, $pathAndFilename)
    {
        file_put_contents($pathAndFilename, json_encode($manifest, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
    }

Usage Example

Пример #1
0
 /**
  * Whether or not the given migration has been applied in the given path
  *
  * @param AbstractMigration $migration
  * @return boolean
  */
 protected function markMigrationApplied(AbstractMigration $migration)
 {
     if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
         $this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'] = [];
     }
     $this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'][] = $migration->getIdentifier();
     $composerFilePathAndName = Files::concatenatePaths([$this->currentPackageData['path'], 'composer.json']);
     Tools::writeComposerManifest($this->currentPackageData['composerManifest'], $composerFilePathAndName);
 }