Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Mar 2013 at 03:32 UTC
Updated:
29 Jul 2014 at 21:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunComment #2
sunComment #3
sunAttached patch fixes this issue.
Comment #5
sunGlad to see that there are tests :)
Comment #6
jibran5: drupal8.phpstorage-directory-name.5.patch queued for re-testing.
Comment #8
sunThis one should come back green.
Comment #9
znerol commentedWe can safely leave out the reference to Windows, other OSes behave the same.
Instead of special-casing files with php extension, wouldn't it make sense to simply substitute the periods (we already do the same with slashes). E.g:
Comment #10
sunAdjusted the comment.
I'd prefer to keep the removal of the .php extension, because I think it's strange/awkward to have any kind of extension in a directory name to begin with (regardless of whether it's .php or #php).
Not sure about the concern of "special-casing" .php... — Technically PhpStorage only creates .php files, because that's it's only purpose. I only included the condition, because IIRC one of the unit tests writes/dumps a file without extension. If you feel strongly about that, then we could change the condition to use
strrpos($name, '.')instead, so as to cut off any possibly existing file extension from the directory name.Comment #11
znerol commentedOk, I'm fine with that. In fact the documentation on
PhpStorageInterfacesuggests that file names are expected to have a .php suffix.I've reproduced the failure condition and verified the fix. This is good to go.
Comment #12
alexpottCommitted 241356f and pushed to 8.x. Thanks!