Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Debug] Replaced logic for detecting filesystem case sensitivity#18130

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
blowski wants to merge4 commits intosymfony:2.7fromblowski:2.7

Conversation

@blowski
Copy link

QA
Branch2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsnone
LicenseMIT
Doc PRnone

When I cloned the master branch onto a Virtualbox Vagrant OSX El Capitan host, Ubuntu Wily guest, theSymfony\Component\Debug\Tests\DebugClassLoaderTest::testFileCaseMismatch failed because 'Failed asserting that exception of type "\RuntimeException" is thrown'.

@wouterj confirmed he got the same problem, and it's because Virtualbox shared folders aren't case sensitive, even when the guest is using a case sensitive filesystem. So I've replaced the logic that looked at the name of the operating system.

I ran the tests in the following environments:

  • Virtualbox/Vagrant - OSX Host, Ubuntu guest
  • Virtualbox/Vagrant - OSX Host, Windows guest
  • OSX native
  • Ubuntu native

NB - Ididn't run it on native Windows (because I don't have easy access to one).

wouterj reacted with thumbs up emoji
When I cloned the master branch onto a Virtualbox Vagrant OSX El Capitan host, Ubuntu Wily guest, the `Symfony\Component\Debug\Tests\DebugClassLoaderTest::testFileCaseMismatch` failed because 'Failed asserting that exception of type "\RuntimeException" is thrown'.@wouterj confirmed he got the same problem, and it's because Virtualbox shared folders aren't case sensitive, even when the guest is using a case sensitive filesystem. So I've replaced the logic that looked at the name of the operating system.I ran the tests in the following environments:* Virtualbox/Vagrant - OSX Host, Ubuntu guest* Virtualbox/Vagrant - OSX Host, Windows guest* OSX native* Ubuntu nativeNB - I _didn't_ run it on native Windows (because I don't have easy access to one).
When I cloned the master branch onto a Virtualbox Vagrant OSX El Capitan host, Ubuntu Wily guest, the `Symfony\Component\Debug\Tests\DebugClassLoaderTest::testFileCaseMismatch` failed because 'Failed asserting that exception of type "\RuntimeException" is thrown'.@wouterj confirmed he got the same problem, and it's because Virtualbox shared folders aren't case sensitive, even when the guest is using a case sensitive filesystem. So I've replaced the logic that looked at the name of the operating system.I ran the tests in the following environments:* Virtualbox/Vagrant - OSX Host, Ubuntu guest* Virtualbox/Vagrant - OSX Host, Windows guest* OSX native* Ubuntu nativeNB - I _didn't_ run it on native Windows (because I don't have easy access to one).
When I cloned the master branch onto a Virtualbox Vagrant OSX El Capitan host, Ubuntu Wily guest, the `Symfony\Component\Debug\Tests\DebugClassLoaderTest::testFileCaseMismatch` failed because 'Failed asserting that exception of type "\RuntimeException" is thrown'.@wouterj confirmed he got the same problem, and it's because Virtualbox shared folders aren't case sensitive, even when the guest is using a case sensitive filesystem. So I've replaced the logic that looked at the name of the operating system.I ran the tests in the following environments:* Virtualbox/Vagrant - OSX Host, Ubuntu guest* Virtualbox/Vagrant - OSX Host, Windows guest* OSX native* Ubuntu nativeNB - I _didn't_ run it on native Windows (because I don't have easy access to one).
@javiereguiluz
Copy link
Member

@blowski thanks for this contribution! I'm afraid that there is a problem with your code: you use the short array syntax. This is obviously right for modern PHP code, but we decided to not use it on Symfony.

The reason is that our existing code uses the old array syntax and updating it would require a lot of work. If we don't update the old code but use the new syntax in the new code, the result will be a mess. so let's use the old syntax everywhere. Thanks!

@blowski
Copy link
Author

@javiereguiluz I'm blaming that one on PHPStorm. Third time lucky!

if(!file_exists(strtolower(__FILE__))) {
// filesystem is case sensitive
self::$caseCheck =0;
}elseif(realpath(strtolower(__FILE__)) ===realpath(__FILE__)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No need for the second realpath,__FILE__ already has it

@nicolas-grekas
Copy link
Member

👍 with one minor comment

@nicolas-grekas
Copy link
Member

Thank you@blowski.

nicolas-grekas added a commit that referenced this pull requestMar 13, 2016
…tivity (Dan Blows)This PR was squashed before being merged into the 2.7 branch (closes#18130).Discussion----------[Debug] Replaced logic for detecting filesystem case sensitivity| Q             | A| ------------- | ---| Branch        | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | none| License       | MIT| Doc PR        | noneWhen I cloned the master branch onto a Virtualbox Vagrant OSX El Capitan host, Ubuntu Wily guest, the `Symfony\Component\Debug\Tests\DebugClassLoaderTest::testFileCaseMismatch` failed because 'Failed asserting that exception of type "\RuntimeException" is thrown'.@wouterj confirmed he got the same problem, and it's because Virtualbox shared folders aren't case sensitive, even when the guest is using a case sensitive filesystem. So I've replaced the logic that looked at the name of the operating system.I ran the tests in the following environments:* Virtualbox/Vagrant - OSX Host, Ubuntu guest* Virtualbox/Vagrant - OSX Host, Windows guest* OSX native* Ubuntu nativeNB - I _didn't_ run it on native Windows (because I don't have easy access to one).Commits-------2e81b0a [Debug] Replaced logic for detecting filesystem case sensitivity
@wouterj
Copy link
Member

Congratz@blowski with your first contribution to Symfony!

@javiereguiluz
Copy link
Member

Congrats@blowski! This was definitely not a simple change for being the first contribution! Thanks.

This was referencedMar 25, 2016
@alexchip64
Copy link

I think this resolution has created a problem in Windows, see
[DebugClassLoader] Version 2.8.4 loops endlessly at line 292 of DebugClassLoader.php in Windows 7#18344

if(!file_exists(strtolower(__FILE__))) {
// filesystem is case sensitive
self::$caseCheck =0;
}elseif(realpath(strtolower(__FILE__)) ===__FILE__) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this logic would also break when the Debug component is installed inside a phar

@fabpotfabpot mentioned this pull requestMar 30, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@blowski@javiereguiluz@nicolas-grekas@wouterj@alexchip64@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp