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

[zend-loader] refactor broken resolvePharParentPath static method #111

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

falkenhawk
Copy link
Member

Refactor broken resolvePharParentPath static method (which never worked properly anyway because of that if ($value !== '...') return condition) into an inline foreach loop which discards '..' values from path parts array, in a way that also previous part is discarded when '..' is found.

This also fixes Zend_Loader_ClassMapAutoloader::resolvePharParentPath(): Argument #3 ($parts) must be passed by reference, value given error on php8.

+ disallow test failures on php 8.0 as this was the last failing case.

(which never worked properly anyway because of that `if ($value !== '...') return` condition)
into an inline foreach loop which discards '..' values from path parts array, in a way that also previous part is discarded when '..' is found.

This also fixes `Zend_Loader_ClassMapAutoloader::resolvePharParentPath(): Argument #3 ($parts) must be passed by reference, value given` error on php8.
@falkenhawk falkenhawk merged commit e769567 into master Oct 1, 2021
@falkenhawk falkenhawk deleted the fix-zend-loader-phar-php8 branch October 1, 2021 11:34
@falkenhawk falkenhawk mentioned this pull request Oct 1, 2021
32 tasks
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.

None yet

2 participants