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

Getting "array_shift() expects parameter 1 to be array, boolean given" error on composer require #9

Closed
jaydiablo opened this issue Jan 7, 2020 · 1 comment

Comments

@jaydiablo
Copy link
Contributor

Bug Report

Q A
Version(s) 1.0.1

Summary

Have a project with the dependency plugin installed, and when I try to run composer require laminas/laminas-db --dev I get an ErrorException:

[ErrorException]
array_shift() expects parameter 1 to be array, boolean given

Current behavior

Current behavior is above.

How to reproduce

Described above.

Expected behavior

Composer should install the laminas/laminas-db package.

Looking at the source, there appears to be a case where an assignment operator is used where a comparison operator should be used instead: https://github.com/laminas/laminas-dependency-plugin/blob/master/src/DependencyRewriterPlugin.php#L230

If I manually edit that file and change that assignment to a == comparison operator, the composer require command is successful.

@jaydiablo
Copy link
Contributor Author

Looks like this commit introduced the bug:

2249ce2

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

No branches or pull requests

1 participant