Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PSR4 auloload #127

Closed
wants to merge 2 commits into from
Closed

Fix PSR4 auloload #127

wants to merge 2 commits into from

Conversation

mejta
Copy link

@mejta mejta commented Mar 13, 2021

Please merge my pull requests. I have a package in my dependencies, that use an array in autoloaders. That is correct according to documentation (see https://getcomposer.org/doc/04-schema.md#psr-4), but not supported by Mozart. Thank you.

Screenshot 2021-03-13 at 18 41 24

mejta added 2 commits March 13, 2021 18:32
Composer allows also array as a autoload, not only strings. See https://getcomposer.org/doc/04-schema.md#psr-4
@BrianHenryIE
Copy link
Contributor

This is already addressed in #63 (unmerged). And as I say in the comment on #47, the best approach is probably to use Composer's own Factory::create() to parse composer.json.

I'm not sure why "Lint and test / PHP 7.3" is failing. I'll try look into it during the week.

Which package is failing? (to test)

@mejta
Copy link
Author

mejta commented Mar 13, 2021

@BrianHenryIE It's https://packagist.org/packages/heureka/overeno-zakazniky. Thank you for looking at it.

@BrianHenryIE
Copy link
Contributor

BrianHenryIE commented Mar 21, 2021

This is my fault. The library (my own) that is used in tests requires PHP 7.4.

I'm not sure why this came up just here for you. i.e. how was I able to commit it without my own commit failing its GitHub Actions/CI tests.

I had pinned the commit that should be used so we'd avoid issues like this (and I thought the pinned commit only needed 7.2, but I guess not).

Anyway, here's the error I got when running your PR locally on 7.3:

Problem 1
  - Root composer.json requires brianhenryie/wp-logger dev-master#dd2bb0665e01e11b282178e76a2334198d3860c5 -> satisfiable by brianhenryie/wp-logger[dev-master].
  - brianhenryie/wp-logger dev-master requires php >=7.4 -> your php version (7.3.27) does not satisfy that requirement.

The red check here on GitHub is certainly not anything introduced by this PR.

Adding the following phpversion check in the test case seems appropriate:

if (version_compare(phpversion(), '7.4', '<')) {
    $this->markTestSkipped("PHP version isn't high enough");
}

@mejta mejta closed this by deleting the head repository Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants