Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 847 forks source link

Webgrind install fails with composer v2 #2524

Closed ssnepenthe closed 2 years ago

ssnepenthe commented 3 years ago

I think I manually upgraded composer to v2 (2.1.6 currently) but it looks like the develop branch installs composer v2 as well so this should be relevant going forward.

What was The Command Used To Provision

vagrant provision --provision-with="utility-core-webgrind"

What Kind of VVV Provision Was This

This was a reprovision of an already working VVV

Logs/What Broke

==> default: Running provisioner: utility-core-webgrind (shell)...
    default: Running: /var/folders/8t/0wr196_d7kx1rgth39mbykjm0000gn/T/vagrant-shell20210909-66461-16gl1t0.sh
    default:  ▷ Running the 'utility-core-webgrind' provisioner...
    default: Loading composer repositories with package information
    default: Updating dependencies
    default: Your requirements could not be resolved to an installable set of packages.
    default: 
    default:   Problem 1
    default:     - oomphinc/composer-installers-extender[v1.1, ..., v1.1.2] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
    default:     - Root composer.json requires oomphinc/composer-installers-extender ^1.1 -> satisfiable by oomphinc/composer-installers-extender[v1.1, v1.1.1, v1.1.2].
    default: 
    default:  ✔ The 'utility-core-webgrind' provisioner completed in 2 seconds.

Possible Solution

v2 of the composer installers extender package supports composer v2. Manually bumping the version constraint for oomphinc/composer-installers-extender to ^2.0 worked just fine for me. I didn't make a PR on the vvv-utilities repo because I'm not sure if it needs to still support ^1.1 for any sort of BC reason.

Steps to Reproduce (for bugs)

  1. Either checkout develop branch or manually upgrade composer to v2
  2. Update config/config.yml to enable webgrind
  3. Provision
welcome[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

VVV
VVV Slack Workspace
Join the VVV Slack Workspace
tomjn commented 3 years ago

I didn't make a PR on the vvv-utilities repo because I'm not sure if it needs to still support ^1.1 for any sort of BC reason.

Feel free to go ahead and make the change, you can do something like ^1.0 || ^2.0 if remember right to keep composer 1 support ( utilities aren't just for the latest VVV version, they run on the old versions that haven't updated yet too )

tomjn commented 3 years ago

Also webgrind may not be that useful with xdebug 3 changes and turning off output ( the files were excessive and filling up lots of peoples VMs, and webgrind wouldn't read them anyway, no idea why )

ssnepenthe commented 3 years ago

I noticed webgrind was looking for profile files in the wrong directory right after submitting this issue.

Looks like you submitted a pr to fix it back in january. No releases since then though, so for my own use I also changed the webgrind version constraint to dev-master - Probably not ideal for VVV.

Otherwise it seems to be working alright (albeit with only a few minutes of use) with the exception of https://github.com/jokkedk/webgrind/issues/132.

tomjn commented 2 years ago

@ssnepenthe Is this still an issue? The composer.json has the 2.0 version at:

https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/blob/master/webgrind/composer.json#L5

I believe i fixed this in:

https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/commit/105a9aedd10aea85e4ff29a608a557b61ed1794a

Can you confirm all is good now?

GitHub
vvv-utilities/composer.json at master · Varying-Vagrant-Vagrants/vvv-utilities
Official VVV extensions. Contribute to Varying-Vagrant-Vagrants/vvv-utilities development by creating an account on GitHub.
Mte90 commented 2 years ago

Ping to @ssnepenthe

ssnepenthe commented 2 years ago

Sorry about the delay... It seems like this is fixed, thanks!