M
M
Michael2017-03-21 18:05:11
PHP
Michael, 2017-03-21 18:05:11

How to change a package in composer?

An extension was purchased for the system that contains installation instructions via composer. Everything would be fine, but the following approach is suggested there:
1. Put the .zip files of the extension in /vendor...
2. Run

composer config repositories.vendor artifact $(pwd)/vendor/vendor/packages
composer require vendor/email-attachments

I would like something more convenient so that you do not have to think about it when deploying a project. For example, put the module in your github and connect normally through dependencies.
"require": {
    "vendor/vendor-email-attachments": "dev-master"
},
"repositories": [
    {
        "type": "git",
        "url": "https://github.com/myvendor/vendor-email-attachments",
        "vendor-alias": "vendor"
    }
]

But then you have to fix composer.json in the module so that "myvendor" is there. Or use Package in composer.json.
What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Konyukhov, 2017-03-22
@springimport

1. "simple and stupid" put deployed either as a git submodule and deploy as a submodule from your turnip.
2. "tricky and buggy" - you will have to reproduce this script through a bash script, but I promise that sooner or later it will glitch when "something changes somewhere"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question