contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
85 stars 33 forks source link

Always update all packages if composer.lock is not present #649

Closed fritzmg closed 3 years ago

fritzmg commented 3 years ago

If you try to do an "expert installation", the following error will occur if the cloud resolver is used:

Cannot update only a partial set of packages without a lock file present. Run `composer update` to generate a lock file.

Reproduction:

  1. Set up a new domain and download the Contao Manager.
  2. Open and configure the Contao Manager accordingly.
  3. Click Setup.
  4. Enable Skip Installation.
  5. Click Finish.
  6. Go to Packages.
  7. Change Contao Open Source CMS to 4.4.* for example.
  8. Click Apply Changes.

https://user-images.githubusercontent.com/4970961/116553854-7a292180-a8f2-11eb-8f5c-3629a270c287.mp4

mlwebworker commented 3 years ago

Wenn Du danach noch einmal den Manager startest, lief es bei mir fehlerfrei durch. Nicht unbedingt schön, aber wenn ich noch 4.4 brauchen würde, würde ich ohnehin direkt über den Eintrag in der composer.json gehen und eigentlich soll man das neu ja nicht mehr installieren.

fritzmg commented 3 years ago

You still need to do it if you transfer an existing Contao 4.4 installation using the official and unofficial guides. Using the Expert mode was the recommended way of doing so, however there is this pitfall.

mlwebworker commented 3 years ago

Bei einem Umzug hast Du ja eine composer.json und nutzt diese für die Installation, dann dürfte das Problem ja gar nicht auftreten. Ich habe heute wegen der Tickets im Forum mehrere 4.4 testweise mit einer vorhandenen composer.json und dem Contao Manager problemlos installiert. Der Fehler wie von Dir beschrieben, ist bei mir nur über den Expertenmodus aufgetreten, aber nicht wenn eine composer.json vorhanden war.

aschempp commented 3 years ago

Und es würde funktionieren wenn du das neue "Full Update" wählst, richtig?

mlwebworker commented 3 years ago

Ja mit der neuen Option unten "Update all Packages" läuft die Installation von Contao 4.4 auch im Expertenmodus fehlerfrei durch.

fritzmg commented 3 years ago

@aschempp You mean "Update all packages"? Yes, that works:

https://user-images.githubusercontent.com/4970961/116571543-1529f780-a903-11eb-85fb-99d0cc26024f.mp4

So I guess the "Apply Changes" button should be changed, so that it also runs "Update all packages", if no composer.lock is present.