deployer icon indicating copy to clipboard operation
deployer copied to clipboard

ci/release: Do not omit the autoload section from composer.json

Open tdgroot opened this issue 3 years ago • 6 comments

Ever since https://github.com/deployphp/deployer/pull/3051, many keys in the composer.json file are omitted when releasing a new Deployer version in order to have no version constraints for the package. This is all fine when just using deployer as-is, but becomes problematic when building on top of Deployer and depend on the namespaces and classes to be available.

With this change, external applications can make use of the internal Deployer classes, while the requirements are not being propagated through Composer.

tdgroot avatar Aug 08 '22 10:08 tdgroot

I’m thinking about creating a separate tag on release which will be holding all needed dependencies and autoload.

antonmedv avatar Aug 08 '22 12:08 antonmedv

Yes that would be even better! Please let me know if there's anything I can help you with :).

tdgroot avatar Aug 08 '22 13:08 tdgroot

Let’s research the idea.

  • what tag name? -dev?
  • Is composer allow to use something like composer-dev.json

antonmedv avatar Aug 08 '22 16:08 antonmedv

Hello, yes, composer is allowed to use a custom composer.json, I actually created a pull request to add this functionality to the vendors recipe: https://github.com/deployphp/deployer/pull/3259

dcanaud avatar Aug 14 '22 06:08 dcanaud

Let’s research the idea.

* what tag name? -dev?

* Is composer allow to use something like composer-dev.json

phpstan and rector have a similar problem and I don't know yet what makes it work correctly for these tools. maybe we can get some inspiration there.

composer itself has some special semantics for versions ending in -dev, so I would suggest not using such thing.

Hello, yes, composer is allowed to use a custom composer.json, I actually created a pull request to add this functionality to the vendors recipe

thats a different thing and is unrelated to the problem mentioned initially

staabm avatar Sep 02 '22 09:09 staabm

One possible solution is to bundle all Symfony deps into Deployer namespce.

antonmedv avatar Sep 02 '22 09:09 antonmedv

Let’s just release with a special tag.

antonmedv avatar Jan 09 '23 16:01 antonmedv