neos / flow-development-collection

The unified repository containing the Flow core packages, used for Flow development.
https://flow.neos.io/
MIT License
137 stars 189 forks source link

Apply file structure best practice to Flow Project #1680

Open Stefan-Kosker opened 5 years ago

Stefan-Kosker commented 5 years ago

Description

./flow kickstart and documentation needs an update to fit into best practice folder structure described here:

Neos.io Blogpost

Steps to Reproduce

  1. Read the Blog article written by Christian Müller
  2. Read the docs about creating a new package
  3. Be confused.

Expected behavior

./flow kickstart creates your package in DistributionPackages Documentation about creating a new package should make it clear that you create your packages in DistributionPackages

Actual behavior

./flow kickstart creates the new package in Packages.

Affected Versions

Neos: 4.3.3

Flow: 5.3.2

but this is standard afaik, so should be on all versions.

dlubitz commented 5 years ago

I would expect the kickstart package to ask for the target folder for the newly created package, because there are two different use cases:

albe commented 5 years ago

That would indeed be a nice new feature and shouldn't be too hard to implement.

ralfkuehnel commented 4 years ago

I created two PRs for this, see https://github.com/neos/flow-development-collection/pull/1823 and https://github.com/neos/flow-development-distribution/pull/42

If this is a possible solution i could also create a PR for the documentation?

sorenmalling commented 4 years ago

@albe Can we have this closed, as PR https://github.com/neos/flow-development-distribution/pull/42 was merged (and this ticket was not automatically closed)

albe commented 4 years ago

That PR only added the DistributionPackages folder to the installation, but one of the ideas was to make the kickstarter create packages in that folder.

mrimann commented 2 years ago

Letting the user choose from a list works and also the new package and it's files get created at the correct place.

But when choosing something different as Packages as the path, it looks like PackageManager's $this->rescanPackages(); does not recognize the newly created package and the next line throws the following exception:

Warning: Undefined array key "opsdev/foobar" in /var/www/html/Packages/Framework/Neos.Flow/Classes/Package/PackageManager.php line 418

@albe any idea on how to solve this?

albe commented 2 years ago

Hmm, not so sure about the PackageManager - @kitsunet knows much more about it. The line that throws the error is $this->registerPackageFromStateConfiguration($manifest['name'], $this->packageStatesConfiguration['packages'][$manifest['name']]); So it looks like the "packageStatesConfiguration" array doesn't contain the package entry after the scan. After a quick look the scan uses FLOW_PATH_PACKAGES as the root directory to scan, which defaults to define('FLOW_PATH_PACKAGES', FLOW_PATH_ROOT . 'Packages/'); in Bootstrap::defineConstants(). So I guess that needs to be adjusted as well?