Closed barryvdh closed 10 years ago
i agree with this.
:+1: Has been mentioned in the past and for some reason was turned down but I see no reason to refuse this.
Yes please. With PSR-4 I really cannot stand the default paths for my packages.
I think this would involve packages including some sort of config file in the package root path, indicating paths to migrations, views etc. as you cannot rely on the package's service provider being loaded.
Alternatively, require the package's service provider to be loaded for publish commands to be utilized.
If someone wants to look into it go for it.
Right now, all paths are hardcoded (src/views, src/config, src/migrations, public) in the Asset/Config/ViewPublisher or MigrationPublishCommand.
The paths for views, configuration and language, are already set with the Serviceprovider->package() method, but aren't used by the Publisher.
I propose we first try to look in the registered packages, if a config/view/etc directory is set, and then use that to publish the files. An additional option I would propose is setting multiple directories, but this is mainly for the AssetPublisher
Examples for usage:
A possible implementation would be additional options to set in the serviceprovider and register the paths in the Application container. This would also make it possible to publish based on the namespace name, instead of
vendor/package