AspectMock icon indicating copy to clipboard operation
AspectMock copied to clipboard

Does not install with Composer w/o warnings/errors (PHP 8)

Open jimbonator opened this issue 2 years ago • 4 comments

AspectMock 4.1.1 won't install cleanly under PHP 8 with Composer:

$ composer update 
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 codeception/aspect-mock 4.1.1 -> satisfiable by codeception/aspect-mock[4.1.1].
    - codeception/aspect-mock 4.1.1 requires php ^7.4 -> your php version (8.1.2) does not satisfy that requirement.

The only way I can get it to install without errors is to use Composer's --ignore-platform-reqs option.

Although there are problems with goaop/parser-reflection under PHP 8 (see https://github.com/goaop/framework/issues/466), I believe AM itself will work without issue under the newer PHP versions (other than the problem I reported in #201).

I believe changing this composer.json line would be sufficient:

-        "php": "^7.4",
+        "php": ">=7.4",

jimbonator avatar Jun 14 '22 20:06 jimbonator

There is no point to claim that AspectMock support PHP 8, if underlying library doesn't support it.

Naktibalda avatar Jun 17 '22 20:06 Naktibalda

I've submitted a patch to goaop/parser-reflection: https://github.com/goaop/parser-reflection/pull/121

jimbonator avatar Jun 17 '22 21:06 jimbonator

But it is still in open status

votetake avatar Nov 14 '23 15:11 votetake

The parser-reflection ticket is closed now.

jimbonator avatar May 02 '24 20:05 jimbonator