prestissimo icon indicating copy to clipboard operation
prestissimo copied to clipboard

RFC: composer 2 compatibility

Open c33s opened this issue 5 years ago • 6 comments

a quick hack to allow the plugin to exist in environments where composer1 and composer2 are used. if composer2 is detected is simply deactivate itself. i am quite sure there are better ways to archive that but i just want a quick solution for myself.

  • no additional test cases added.
  • manually tested with composer 1.10.16 and 2.0.3

to try it out add the following to your composer.json

{
    "repositories": {
        "prestissimo": {
            "type": "vcs",
            "url": "https://github.com/c33s/prestissimo.git"
        }
    },
    "require": {
        "hirak/prestissimo": "dev-feature/composer2-compat",
    }
}

c33s avatar Nov 01 '20 19:11 c33s

FWIW, this is the same approach that for example https://github.com/zaporylie/composer-drupal-optimizations/pull/17 chose as well, which has worked well there, so +1.

Berdir avatar Nov 02 '20 16:11 Berdir

Duplicate of #223 which has been declined

Tobion avatar Dec 08 '20 14:12 Tobion

Duplicate of #223 which has been declined

still required for an easy transition from composer1 to composer2

ci's break because of this

c33s avatar Dec 08 '20 16:12 c33s

ci's break because of this

Yes, but @hirak said he won't release a new version. composer self-update --2 is the best workaround I guess.

kubawerlos avatar Dec 08 '20 18:12 kubawerlos

Yes, but @hirak said he won't release a new version.

one more version is not that difficult or cumbersome.

composer self-update --2 is the best workaround I guess.

this is no workaround for multi environments (composer1 and composer2) see also the comment of @vworldat https://github.com/hirak/prestissimo/issues/233#issuecomment-720436440

c33s avatar Dec 08 '20 19:12 c33s

one more version is not that difficult or cumbersome.

You don't have to convince me, after all, I made https://github.com/hirak/prestissimo/pull/223

this is no workaround for multi environments

Well, I managed with the help of composer self-update --1/composer self-update --2 to handle such situation, not perfect, but woroking.

kubawerlos avatar Dec 08 '20 20:12 kubawerlos