@@ -95,13 +95,13 @@ public function buildCommand(string $packageKey, string $crId = 'default'): void
9595 );
9696
9797 foreach ($ nodeTypes as $ nodeType ) {
98- $ interfaceSpecification = NodeInterfaceSpecification::createFromPackageAndNodeType ( $ package , $ nodeType );
99- Files::createDirectoryRecursively ($ interfaceSpecification ->directory );
98+ $ interfaceSpecification = NodeInterfaceSpecification::createFromNodeType ( $ nodeType );
99+ Files::createDirectoryRecursively ($ package -> getPackagePath () . DIRECTORY_SEPARATOR . $ interfaceSpecification ->directory );
100100 file_put_contents (
101- $ interfaceSpecification ->interfaceFilename ,
101+ $ package -> getPackagePath () . DIRECTORY_SEPARATOR . $ interfaceSpecification ->interfaceFilename ,
102102 $ interfaceSpecification ->toPhpString ()
103103 );
104- $ this ->outputLine (' - ' . $ interfaceSpecification ->interfaceName ->nodeTypeName . ' -> <info> ' . $ interfaceSpecification ->interfaceName -> getFullyQualifiedClassName () . '</info> ' );
104+ $ this ->outputLine (' - ' . $ interfaceSpecification ->interfaceName ->nodeTypeName . ' -> <info> ' . $ interfaceSpecification ->interfaceFilename . '</info> ' );
105105 }
106106
107107 // loop 2 build objects for all non abstract nodetypes in package
@@ -115,13 +115,13 @@ public function buildCommand(string $packageKey, string $crId = 'default'): void
115115 );
116116
117117 foreach ($ nonAbstractNodeTypes as $ nodeType ) {
118- $ objectSpecification = NodeObjectSpecification::createFromPackageAndNodeType ( $ package , $ nodeType );
119- Files::createDirectoryRecursively ($ objectSpecification ->directory );
118+ $ objectSpecification = NodeObjectSpecification::createFromNodeType ( $ nodeType );
119+ Files::createDirectoryRecursively ($ package -> getPackagePath () . DIRECTORY_SEPARATOR . $ objectSpecification ->directory );
120120 file_put_contents (
121- $ objectSpecification ->classFilename ,
121+ $ package -> getPackagePath () . DIRECTORY_SEPARATOR . $ objectSpecification ->classFilename ,
122122 $ objectSpecification ->toPhpString ()
123123 );
124- $ this ->outputLine (' - ' . $ objectSpecification ->objectName ->nodeTypeName . ' -> <info> ' . $ objectSpecification ->objectName -> getFullyQualifiedClassName () . '</info> ' );
124+ $ this ->outputLine (' - ' . $ objectSpecification ->objectName ->nodeTypeName . ' -> <info> ' . $ objectSpecification ->classFilename . '</info> ' );
125125 }
126126 }
127127
@@ -147,29 +147,29 @@ protected function getPackage(string $packageKey): FlowPackageInterface & Generi
147147 $ this ->quit (1 );
148148 }
149149
150- /**
151- * @var array<int, array{namespace:string, classPath:string, mappingType:string}> $autoloadConfigurations
152- */
153- $ autoloadConfigurations = $ package ->getFlattenedAutoloadConfiguration ();
154- $ namespace = null ;
155- foreach ($ autoloadConfigurations as $ autoloadConfiguration ) {
156- if (
157- $ autoloadConfiguration [ 'mappingType ' ] === 'psr-4 '
158- && str_ends_with ($ autoloadConfiguration [ 'namespace ' ], '\\NodeTypes \\' )
159- && (
160- $ autoloadConfiguration [ 'classPath ' ] === $ package ->getPackagePath () . 'NodeTypes '
161- || $ autoloadConfiguration [ 'classPath ' ] === $ package ->getPackagePath () . 'NodeTypes/ '
162- )
163- ) {
164- $ namespace = $ autoloadConfiguration [ 'namespace ' ];
165- break ;
166- }
167- }
168-
169- if ($ namespace === null ) {
170- $ this ->outputLine ('<error>No PSR4-NodeTypes namespace for the NodeTypes folder is registered via composer</error> ' );
171- $ this ->quit (1 );
172- }
150+ // /**
151+ // * @var array<int, array{namespace:string, classPath:string, mappingType:string}> $autoloadConfigurations
152+ // */
153+ // $autoloadConfigurations = $package->getFlattenedAutoloadConfiguration();
154+ // $namespace = null;
155+ // foreach ($autoloadConfigurations as $autoloadConfiguration) {
156+ // if (
157+ // $autoloadConfiguration[ 'mappingType' ] === 'psr-4'
158+ // && str_ends_with($autoloadConfiguration[ 'namespace' ], '\\NodeTypes\\')
159+ // && (
160+ // $autoloadConfiguration[ 'classPath' ] === $package->getPackagePath() . 'NodeTypes'
161+ // || $autoloadConfiguration[ 'classPath' ] === $package->getPackagePath() . 'NodeTypes/'
162+ // )
163+ // ) {
164+ // $namespace = $autoloadConfiguration[ 'namespace' ];
165+ // break;
166+ // }
167+ // }
168+ //
169+ // if ($namespace === null) {
170+ // $this->outputLine('<error>No PSR4-NodeTypes namespace for the NodeTypes folder is registered via composer</error>');
171+ // $this->quit(1);
172+ // }
173173 return $ package ;
174174 }
175175}
0 commit comments