zf1s / zf1

Monorepo of a fork of Zend Framework 1, with all components split into individual composer packages. PHP 5.3-8.3 compatible.
BSD 3-Clause "New" or "Revised" License
59 stars 22 forks source link

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

Closed falkenhawk closed 3 years ago

falkenhawk commented 3 years ago

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.