polylang-cli icon indicating copy to clipboard operation
polylang-cli copied to clipboard

Cannot be installed with wp-cli 2.2.0 out of the box

Open ratzrattillo opened this issue 5 years ago • 12 comments

Hey there,

i would like to try out your very promising package, as the developers of polylang obviously do not yet have any interest in providing a CLI interface.

However when trying to install the pakcage, i get the following errors:

wp package install [email protected]:diggy/polylang-cli.git

Installing package diggy/polylang-cli (dev-master)
Updating /home/www-data/.wp-cli/packages/composer.json to require the package...
Registering [email protected]:diggy/polylang-cli.git as a VCS repository...
Using Composer to install the package...
 
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT

Dependency resolution completed in 0.016 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
    - Conclusion: remove wp-cli/wp-cli 2.2.0
    - diggy/polylang-cli dev-master requires wp-cli/wp-cli ~1.5.0 -> satisfiable by wp-cli/wp-cli[v1.5.0, v1.5.1].
    - diggy/polylang-cli dev-master requires wp-cli/wp-cli ~1.5.0 -> satisfiable by wp-cli/wp-cli[v1.5.0, v1.5.1].
    - Can only install one of: wp-cli/wp-cli[v2.2.0, v1.5.0].
    - Can only install one of: wp-cli/wp-cli[v2.2.0, v1.5.1].
    - Installation request for wp-cli/wp-cli 2.2.0 -> satisfiable by wp-cli/wp-cli[2.2.0].
    - Installation request for diggy/polylang-cli dev-master -> satisfiable by diggy/polylang-cli[dev-master].
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements ablocking the update you have to resolve those problems.
 
Error: Package installation failed (Composer return code 2).
Reverted composer.json.

Do you know how to fix this, so the future users can enjoy your tool even with the newest version of wp-cli? Did you ever think about submitting your polylang-cli project to the official polylang project? I think this would be really useful and maybe they would take over the maintenance for you also .:)

Greetings!

ratzrattillo avatar Jul 05 '19 08:07 ratzrattillo

Of course, see https://github.com/diggy/polylang-cli/blob/master/composer.json#L21

This project may need to wake up.

@diggy What do you think?

szepeviktor avatar Jul 05 '19 08:07 szepeviktor

@ratzrattillo @szepeviktor I've been out of the WP ecosystem for a while, but it looks like I might be circling back over the course of the next few months. In the meantime, happy to accept pull requests!

diggy avatar Jul 05 '19 08:07 diggy

@szepeviktor @diggy Thanks for your great help. Its working now perfectly with wp-cli 2.2.0. I would love to see you return to WP and push your project further, as it is really useful!

ratzrattillo avatar Jul 06 '19 20:07 ratzrattillo

Hmm, I don't really understand @szepeviktor solution. In any case, I'm seeing the same error message when using 2.4.0. How can I fix this?

fredleeflang avatar Apr 18 '20 07:04 fredleeflang

@diggy could you perhaps elaborate on @szepeviktor solution?

fredleeflang avatar Apr 18 '20 15:04 fredleeflang

This project may need to wake up.

I've wrote only this, no solution.

Thanks for your great help. Its working now perfectly with wp-cli 2.2.0.

I totally don't understand it. AFAIK polylang-cli works only with WP-CLI v1

szepeviktor avatar Apr 18 '20 15:04 szepeviktor

gotcha @szepeviktor I guess @ratzrattillo had us both confused :) Listen, I don't see many commits in this package. As this is one of the first packages for WP CLI that I even look into, maybe I can volunteer to help a bit. I'll clone from git and try to resolve the issue. When I succeed I'll offer a fix.

fredleeflang avatar Apr 18 '20 15:04 fredleeflang

Just have @diggy merge it!

szepeviktor avatar Apr 18 '20 16:04 szepeviktor

https://packagist.org/packages/szepeviktor/phpstan-wordpress may help you find and fix hidden bugs

szepeviktor avatar Apr 18 '20 16:04 szepeviktor

Have you guys found a solution/workaround?

vicksbr avatar Jun 23 '20 03:06 vicksbr

So is it possible to install it and use with WP CLI in version 2.X.X ? Anyone succeeded with it?

dejwsz avatar Oct 26 '21 10:10 dejwsz

Ping @diggy

robertcurcio avatar May 22 '24 19:05 robertcurcio