ZF-8429: Inconsistent directory separator in include paths for Zend_Loader_PluginLoader cache file


After following the "Using the PluginLoader class file include cache" example, I've noticed that there is inconsistent directory separators used within the generated "include file" cache script, for example

// data/pluginLoaderCache.php
include_once 'Zend/Filter/Word\CamelCaseToDash.php';
include_once 'Zend/Filter/StringToLower.php';

I'm sure this is due to the fact that I'm developing on a Windows host however I can't see why only some entries are using the backslash. This will also cause issues if I deploy this file to a Linux host.


Certainly, this is very annoying when you are developing on a Windows machine but your production server is Linux. I hope this gets fixed in the next release.

Also check my SF question which concerns this exact bug:…

Best Regards,

Richard Knop

Patch with test attached. Since include/require on all platforms (including windows) accepts forward slashes, the patch simply normalizes all cached include paths to use forward slashes.