public function createCommand(string $packageKey, string $packageType = PackageInterface::DEFAULT_COMPOSER_TYPE)
    {
        if (!$this->packageManager->isPackageKeyValid($packageKey)) {
            $this->outputLine('The package key "%s" is not valid.', [$packageKey]);
            $this->quit(1);
        }
        if ($this->packageManager->isPackageAvailable($packageKey)) {
            $this->outputLine('The package "%s" already exists.', [$packageKey]);
            $this->quit(1);
        }

        if (!ComposerUtility::isFlowPackageType($packageType)) {
            $this->outputLine('The package must be a Flow package, but "%s" is not a valid Flow package type.', [$packageType]);
            $this->quit(1);
        }
        $package = $this->packageManager->createPackage($packageKey, ['type' => $packageType], null);
        $this->outputLine('Created new package "' . $packageKey . '" at "' . $package->getPackagePath() . '".');
    }
public function createCommand(string $packageKey, string $packageType = PackageInterface::DEFAULT_COMPOSER_TYPE)
    {
        if (!$this->packageManager->isPackageKeyValid($packageKey)) {
            $this->outputLine('The package key "%s" is not valid.', [$packageKey]);
            $this->quit(1);
        }
        if ($this->packageManager->isPackageAvailable($packageKey)) {
            $this->outputLine('The package "%s" already exists.', [$packageKey]);
            $this->quit(1);
        }

        if (!ComposerUtility::isFlowPackageType($packageType)) {
            $this->outputLine('The package must be a Flow package, but "%s" is not a valid Flow package type.', [$packageType]);
            $this->quit(1);
        }
        $package = $this->packageManager->createPackage($packageKey, ['type' => $packageType], null);
        $this->outputLine('Created new package "' . $packageKey . '" at "' . $package->getPackagePath() . '".');
    }
public function createCommand ( string $ packageKey , string $ packageType = PackageInterface :: DEFAULT_COMPOSER_TYPE ) { if ( ! $ this -> packageManager -> isPackageKeyValid ( $ packageKey ) ) { $ this -> outputLine ( 'The package key "%s" is not valid.' , [ $ packageKey ] ) ; $ this -> quit ( 1 ) ; } if ( $ this -> packageManager -> isPackageAvailable ( $ packageKey ) ) { $ this -> outputLine ( 'The package "%s" already exists.' , [ $ packageKey ] ) ; $ this -> quit ( 1 ) ; } if ( ! ComposerUtility :: isFlowPackageType ( $ packageType ) ) { $ this -> outputLine ( 'The package must be a Flow package, but "%s" is not a valid Flow package type.' , [ $ packageType ] ) ; $ this -> quit ( 1 ) ; } $ package = $ this -> packageManager -> createPackage ( $ packageKey , [ 'type' => $ packageType ] , null ) ; $ this -> outputLine ( 'Created new package "' . $ packageKey . '" at "' . $ package -> getPackagePath ( ) . '".' ) ; }
Create a new package

This command creates a new package which contains only the mandatory
directories and files.

@Flow\FlushesCaches
@param string $packageKey The package key of the package to create
@param string $packageType The package type of the package to create
@return void
@see neos.kickstarter:kickstart:package
Create a new package