phpactor: Cannot install via. Composer

❯ composer global require phpactor/phpactor:dev-master -W
Changed current directory to /Users/xxx/.composer
./composer.json has been updated
Running composer update phpactor/phpactor --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires phpactor/phpactor dev-master -> satisfiable by phpactor/phpactor[dev-master].
    - phpactor/phpactor dev-master requires microsoft/tolerant-php-parser dev-encapsed-as-string-literal -> found microsoft/tolerant-php-parser[dev-roblourens-readme-fix, dev-roblou/fixTemplateStringParse, dev-main, dev-nullableTypes, dev-lexicalGrammarTestSetup, dev-newStaticError, dev-searchExclude, dev-iteratorPerfTest, dev-parseIncludeRequire, v0.0.1, ..., v0.1.2] but it does not match the constraint.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

i have tried with https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation but i cant run the bin file

❯ phpactor -h
zsh: permission denied: phpactor

i tried with sudo chown -R "$USER":admin ~/phpactor/bin but nothing changed.

UPDATE chmod +x /usr/local/bin/phpactor fixed it

hm, we’re using a forked version (via. repositories) of tolerant parser currently, which means that composer require will not work, but this isn’t really a supported installation method. You should install it as follows:

https://phpactor.readthedocs.io/en/master/usage/standalone.html

nonetheless I’ll see if I can fix it.

oh, I wonder if it’s relative paths and installing via. composer … that might explain it.

maybe try the normal git clone installation method, or if using VS code, it should actually install Phpactor automatically.

I’ve added our fork of tolerant-php-parser to packagist now, so composer require should work again.