Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not delete module #18

Closed

Conversation

keywan-ghadami-oxid
Copy link

use case: a developer installs modules from /source/modules/abbr/modulename by configuring composer to use that path as source for package installation. For example

"repositories": [
    {
      "type": "path",
      "url": "source/modules/oxps/*"
    }
  ]

This is used to develop project specific modules or to get started with the initial module development.

As composer will create symlinks to the vendor folder also debugging and adapting the php source files is straight forward.

In this case overwriting source with target by the composer plugin will destroy the module - so without this developers have to be carefully saying "no" when composer plugin asks to overwrite. with this change there are some less stupid questions when running composer update

use case: a developer installs modules from /source/modules/abbr/modulename by configuring composer to use that path as source for package installation. For example 
```
"repositories": [
    {
      "type": "path",
      "url": "source/modules/oxps/*"
    }
  ]
```
This is used to develop project specific modules or to get started with the initial module development. 

As composer will create symlinks to the vendor folder also debugging and adapting the php source files is straight forward. 

In this case overwriting source with target by the composer plugin will destroy the module - so without this developers have to be carefully saying "no" when composer plugin asks to overwrite. with this change there are some less stupid questions when running composer update
@keywan-ghadami-oxid keywan-ghadami-oxid changed the title Update ModulePackageInstaller.php do not delete module Dec 13, 2019
@Sieg
Copy link
Member

Sieg commented Apr 24, 2020

Hello @keywan-ghadami-oxid, this question should be already resolved on 5.0.0 release / b-6.x branch of composer plugin.

Composer will not ask any questions about overwriting packages if there are no updates fetched, and it will never be if you use the way of module development described in the PR description.

This change will be released with composer plugin v5.0 soon, but you can try out this commit already by checking out b-6.x branch of composer plugin.

@Sieg
Copy link
Member

Sieg commented Dec 11, 2020

There were unexpected problems with the solution described in the last comment of mine, and it was reverted at the end. In the master of the shop, another solution is prepared - module files are no longer copied to the modules directory, so there will be no more problems described in the PR.

@Sieg Sieg closed this Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants