Codeception / module-db

DB module for Codeception

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve composer codeception require

simonberger opened this issue · comments

I tested a composer dev-2.0 version and noted a decreased performance caused by

"require": {
    "codeception/codeception": "*@dev"
}

I don't know where the benefit of this is when it is still paired with a <4.0 conflict but can't this be replaced by "4.*@dev" with the same result but better performance?

The problem is that many packages earlier codeception versions require (including symfony) are included in the process to find the correct version of each package. The conflict attribute seems to have effect just very late.

There are existing different variation of configurations in the codeception sub-packages:

  • module-doctrine2 uses: "4.0.x-dev | ^4.0" (which should work better too)
  • module-asserts same as this "*@dev"
  • many others just "^4". Some (of those I had a look at) just dropped one of those above in the latest versions.

We have circular dependency with https://github.com/Codeception/Codeception/blob/4.1/composer.json#L41
stricter constraints break builds of codeception/codeception branches.

I see. But isn't that a codeception-module development problem only which should be solved in another way? For example using a second composerx.json.

@Naktibalda As this problem (if I may call it that way) is caused by the codeception package does it make sense to create an issue there to hopefully find a better solution?
The performance decrease should also not only affect composer 2 but also the currently maintained version.

Actually, composer.json was updated to require codeception ^4.0 even before this ticket was raised, and it looks like it doesn't cause any issues.

This issue was fixed by 1.0.3 release.

I will have to revert this change because it makes builds of codeception/codeception impossible on PHP 8.0
https://github.com/Codeception/Codeception/runs/1504318795?check_suite_focus=true

  Problem 1
    - codeception/module-cli[dev-master, 1.0.4, ..., 1.1.0] require codeception/codeception ^4.0 -> satisfiable by codeception/codeception[4.0.0, ..., 4.1.x-dev] from composer repo (https://repo.packagist.org) but codeception/codeception[dev-github-actions] from root package repo has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
    - codeception/module-cli[1.0.0, ..., 1.0.3] require php >=5.6.0 <8.0 -> your php version (8.0.0) does not satisfy that requirement.
    - Root composer.json requires codeception/module-cli *@dev -> satisfiable by codeception/module-cli[dev-master, 1.0.0, ..., 1.1.0].