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 we still need cgr? #66

Open
mariacha opened this issue Sep 18, 2023 · 3 comments
Open

Do we still need cgr? #66

mariacha opened this issue Sep 18, 2023 · 3 comments

Comments

@mariacha
Copy link
Contributor

mariacha commented Sep 18, 2023

Coming out of the thread here:
https://thinkshout.slack.com/archives/G011UPB5CHH/p1695045776090849

Do we still need to install cgr on our local machines? Other than terminus all the packages in the the file are usually added via the individual sites' composer.json files.

composer global require consolidation/cgr

However, terminus itself is very handy to be able to upgrade using cgr

@wxactly
Copy link
Member

wxactly commented Sep 18, 2023

We have a bunch of composer packages installed with cgr - it's not just terminus. See here: https://github.com/thinkshout/ts_environment/blob/main/scripts/cgr.sh

IMO we should keep cgr for global composer packages because it give us a huge convenience compared to composer global. With composer global, every package you install shares the same composer.json and composer.lock file so all of the packages you install are required to be compatible with each other. With cgr, each package you install has its own composer.json file and its own set of php dependencies, so you can upgrade each package separately without worrying about incompatibilities.

@wxactly
Copy link
Member

wxactly commented Sep 18, 2023

Sorry, I replied first without reading the whole thread. If we need to migrate away from cgr because it's not compatible with php 8, I can totally understand that. We could update our approach to rely on local composer packages for probably most of this stuff going forward. If we can, let's filter that list from cgr.sh down to the bare minimum of global composer packages so we can minimize any future pain of incompatible package updates in the future!

@mariacha
Copy link
Contributor Author

I think terminus is the big outlier here. Everything else is probably fine to be site-specific. (I think, but I don't know the wordpress stuff as well. Maybe the code sniffer for wp works best if installed globally?)

There's also the silly but effective workaround of switching to php 7.4 to update cgr if it comes to that, then switching off to 8.1 to update the other packages.

Maybe we should just delay this decision since consolidation/cgr#43 is in progress (of a sort).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants