Results 1 to 8 of 8

Thread: Vendor packages

  1. #1
    User
    Join Date
    05-21-18.
    Posts
    126

    Default Vendor packages

    I hope someone can help me.

    1. I did the composer install. After that I removed in .json require for that package. But next composer install delete that package. I want to have one version and modify it and disable composer to update that package.

    2. I removed require for other package in .json but that one is on the server and not deleted. But it don't recognize changes on git. (I use deploy on a server with a script for composer install). Maybe some other package require to have that specific version of that package so it always update?

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Sorry, I did not understand the question. What exactly are you trying to do?

  3. #3
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    I want after composer install. To remove package require from composer.json and to have that file in vendor. Composer update delete that folder after i detete require from composre.json.

  4. #4
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Why do you remove it, if you want to keep it?

  5. #5
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by Spooky View Post
    Why do you remove it, if you want to keep it?
    I want to download package, edit it and keep edited version, not composer one.
    If i composer update it will remove my edited version and replace from composer one

  6. #6
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    That is not how you do it. There are several options:

    1. You require the package, make your changes, and simply keep everything as it is. If the package would change with the next update, composer gives you the option to keep, discard or merge the changes (and some other options).
    2. You copy the package somewhere locally and add the package as a local repository ("type": "path").
    3. You fork the package and add the forked package as a repository ("type": "vcs").

  7. #7
    User
    Join Date
    05-21-18.
    Posts
    126

    Default

    Quote Originally Posted by Spooky View Post
    That is not how you do it. There are several options:

    1. You require the package, make your changes, and simply keep everything as it is. If the package would change with the next update, composer gives you the option to keep, discard or merge the changes (and some other options).
    2. You copy the package somewhere locally and add the package as a local repository ("type": "path").
    3. You fork the package and add the forked package as a repository ("type": "vcs").
    So. i just cant edit file, remove require from .json and push to git?(On every build there is contao update)

    Can i juse composer autoload?

  8. #8
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by rawelja View Post
    So. i just cant edit file, remove require from .json and push to git?
    No... you never remove it from your composer.json. If you remove it, it will be uninstalled.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •