[BUG][PHP] Replace `File.separator` in PHP generators with `/` (Windows)
Created by: jfastnacht
Description
In the PHP Codegen files (e.g. AbstractPhpCodegen.java and PhpSymfonyServerCodegen.java) there is a lot of usage of the File.seperator
placeholder. While it doesn't make a difference for Linux and Mac users, it does for Windows users of the codegen, especially if the placeholder, which will become a backslash, is mixed with hardcoded forward slashes. In PHP there is no reason to make Windows specific excuses, so everything should be replaced with forward slashes.
Anyways, since it is dangerous to just replace everything due to possible side effects and I don't wanted to replace huge chunks of code used in several generators by myself without telling anyone, I've decided to put this into an issue, discuss it and get feedback from the PHP Technical Comittee on it.
I've already changed some files in #1892 , but I think it's better to make proper bug PRs for fixing the slash issue and the main issue of the #1892 seperately.
openapi-generator version
master-branch
Command line used for generation
Any PHP generator under Windows.
Steps to reproduce
- Generate PHP code (Windows)
- Check changes with
git status
Related issues/PRs
- #1892 already changed some of the
File.seperator
placeholders to slashes
Suggest a fix
Replace File.seperator
with slashes in PHP code generators.