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

Custom report paths don't work on case-sensitive filesystems #1996

Closed
micheledurante opened this issue Apr 18, 2018 · 6 comments
Closed

Custom report paths don't work on case-sensitive filesystems #1996

micheledurante opened this issue Apr 18, 2018 · 6 comments
Milestone

Comments

@micheledurante
Copy link

micheledurante commented Apr 18, 2018

Hi, I have noticed that the constructor method for src/Reporter.php capitalises strings supplied by the --report= command line argument.

This breaks on case-sensitive filesystems.

@gsherwood gsherwood changed the title Reporter class capitalises paths to custom export classes Custom report paths don't work on case-sensitive filesystems Apr 18, 2018
@gsherwood
Copy link
Member

I couldn't find any good reason for that ucfirst, so it probably came from old code to make things look nicer. I've removed it now. Thanks for letting me know.

@gsherwood gsherwood added this to the 3.3.0 milestone Apr 18, 2018
@gsherwood gsherwood reopened this Apr 18, 2018
@gsherwood
Copy link
Member

Maybe those travis failures tell me why. Can't replicate locally so need to go digging again.

@gsherwood
Copy link
Member

Forgot about autoloading. Needed that ucfirst just for the internal classes.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 19, 2018

@gsherwood Just out of curiousity: why isn't the autoloader set up to be case-insensitive ? In PHP itself, classnames, namespace names (and keywords and function names) are treated case-insensitively.

@gsherwood
Copy link
Member

Just out of curiousity: why isn't the autoloader set up to be case-insensitive ?

It wasn't the autoloader itself, it's the fact that the file system on the test systems is case-sensitive. I didn't catch the error because the file system on my Mac is case insensitive. So it was really just that it was looking for the file Reports/file.php or Reports/summary.php instead of Reports/Full.php and Reports/Summary.php and just not finding it on the test systems.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 19, 2018

👍 Ah, snap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants