Are you getting errors? My understanding is Windows can translate the / fine from PHP.
The plugin was causing a 500 error on the server until i modified the code with the above. It appears that in this case windows was not transliterating the slashes correctly.
That’s not the correct path to the autoloader; does this work?
$path = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR .'autoload.php';
Oh! That’s the path in the autoloader itself. That’s generated by Composer on deployment to the .org repository. I’m surprised that fixed anything for you, because everything I’ve read suggests this shouldn’t be an issue for PHP on Windows. What version of PHP are you running?
it’s odd, i tracked the fatal “couldn’t find required file”, changed that to the snippet i shared, and it worked. The php version was 5.2 then i upped it to 5.4 or 5.5 i can’t remember which and it didn’t fix it until i edited your plugin. It may legitimately have been a misconfiguration on the godaddy windows shared host. I was having lots of other dumb issues. Once I forcibly moved the client to linux everything worked beautifully.
It’s likely that the issue was PHP 5.2. We got an issue on GitHub the other day about the composer autoloader being incompatible with PHP 5.2. The problem isn’t the directory slashes, it’s the use of the __DIR__ constant, which wasn’t introduced until PHP 5.3.
The next version will use a different autoloader which will be compatible with PHP 5.2.
Definitely forcing the client to upgrade/switch off Windows was a good choice :).
Marking as resolved, let me know if you experience this issue on the latest version.