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

Changed "/" to DIRECTORY_SEPARATOR #8916

Merged
merged 1 commit into from
May 28, 2015
Merged

Changed "/" to DIRECTORY_SEPARATOR #8916

merged 1 commit into from
May 28, 2015

Conversation

Garbee
Copy link
Contributor

@Garbee Garbee commented May 28, 2015

Makes path helpers usable in Windows servers. Fixes issue #8913.

Makes laravel path Helpers usable in widows
@GrahamCampbell
Copy link
Member

👎 from me.

@GrahamCampbell
Copy link
Member

Makes path helpers usable in Windows servers.

If you're doing this, all you're doing is breaking your code that used to work on linux.

@GrahamCampbell
Copy link
Member

If you're doing the things that were described in that other issue.

@Garbee
Copy link
Contributor Author

Garbee commented May 28, 2015

If you're doing this, all you're doing is breaking your code that used to work on linux.

Please support with some examples/facts.

You can thumb-down it all you want, it doesn't create any problems on Linux and Taylor has already acknowledged the issue is an actual issue. So let's focus on getting the issue fixed, not outright rejecting everything you don't see as fit.

@nicholasruunu
Copy link
Contributor

DIRECTORY_SEPARATOR in linux env will evaluate to / so I don't see how this would change anything on linux.

@Garbee
Copy link
Contributor Author

Garbee commented May 28, 2015

Also, let's be clear with what can happen now. On Windows environments you can easily explode() the output returned by the helpers, before you would need to explode, then do it again to the parts for the other separator.

This change allows for far better coding to be done. Any challenges to it should be met with facts/test cases. That way they can be addressed and solved. Plenty of facts exist as to why this constant should be used, none as to why "/" should be other than "it works in most situations most of the time so it isn't a problem." Which is nothing but complete horse shit.

@Garbee
Copy link
Contributor Author

Garbee commented May 28, 2015

On the note of storing paths being an edge-case, it really depends on how people have built their systems. A lot of the time, things like image/file attachment to models will store some path in the DB. If they store the path pulled from one of these helpers as a starting point and are under Windows, then there would be a problem.

That is the most likely point of concern (other than temp caching of paths in redis or something.) But, once again, all Windows focused which is already a small subset of users, especially in production.

taylorotwell added a commit that referenced this pull request May 28, 2015
Changed "/" to DIRECTORY_SEPARATOR
@taylorotwell taylorotwell merged commit d4905f8 into laravel:master May 28, 2015
@daftspunk
Copy link
Contributor

👎 from me, because @Garbee. Just kidding mate :-)

@Garbee
Copy link
Contributor Author

Garbee commented Jul 15, 2015

Dude stop sounding like Flyn. It will only bring pain and anguish.
On Jul 15, 2015 5:38 PM, "Samuel Georges" notifications@github.com wrote:

[image: 👎] from me, because @Garbee https://github.com/Garbee. Just
kidding mate :-)


Reply to this email directly or view it on GitHub
#8916 (comment).

@Flynsarmy
Copy link
Contributor

👎

@GrahamCampbell
Copy link
Member

This stuff isn't changing again, while I don't really like it either, that's what we have now.

@Garbee
Copy link
Contributor Author

Garbee commented Jul 16, 2015

@GrahamCampbell Why don't you like it exactly? It seems odd a framework that prides itself on consistency and ease of use has a collaborator who evangelizes things that make it inconsistent and harder to use.

You also never supported your claims on it breaking code that worked on Linux boxes. So if you could revisit that as well it would be great. I'd love to know how it would break things, yet has been released to stable and we haven't heard a word of it.

@GrahamCampbell
Copy link
Member

It seems odd a framework that prides itself on consistency and ease of use has a collaborator who evangelizes things that make it inconsistent and harder to use.

I think it's more consistent to always use linux style separators.

@robclancy
Copy link
Contributor

I think it is more consistent to always use the constants PHP provides for a reason.

/imbackbitches

@GrahamCampbell
Copy link
Member

Hi Rob. :)

@Garbee Garbee deleted the path-directory branch July 24, 2016 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants