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] Fix case sensitivity checks#18352

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

Merged
fabpot merged 1 commit intosymfony:2.7fromnicolas-grekas:debug-case
Mar 30, 2016

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?yes
Deprecations?no
Tests pass?yes
Fixed tickets#18344
LicenseMIT
Doc PR-

@stof
Copy link
Member

Looks like deps=high needs some fixing.

regarding this PR, this looks good to me. 👍

@alexchip64
Copy link

With this fix, in Windows system, $caseCheck is set to "0", whereas it should be set to "1" (filesystem is NOT case sensitive) as in previous versions.

@nicolas-grekas
Copy link
MemberAuthor

@alexchip64 can you detail why it ends up being set to zero in your case?

@alexchip64
Copy link

Because, in my case, the situation of the checking is as follow:

$file = C:\Users\cipriano\Documents\NetBeansProjects\zoe\vendor\symfony\symfony\src\Symfony\Component\Debug\DebugClassLoader.php

$fileTest = C:\USERS\CIPRIANO\DOCUMENTS\NETBEANSPROJECTS\ZOE\VENDOR\SYMFONY\SYMFONY\SRC\SYMFONY\COMPONENT\DEBUG\DEBUGCLASSLOADER.PHP

but

realpath($fileTest) = C:\Users\cipriano\DOCUMENTS\NETBEANSPROJECTS\zoe\vendor\symfony\symfony\src\Symfony\Component\Debug\DebugClassLoader.php

so the checkrealpath($fileTest) === $file fails.

@nicolas-grekas
Copy link
MemberAuthor

does it work better if you use strtolower instead of strtoupper?

@alexchip64
Copy link

I've done it, it but final result does not change:

$fileTest = 'c:\users\cipriano\documents\netbeansprojects\zoe\vendor\symfony\symfony\src\symfony\component\debug\debugclassloader.php'

but

realpath($fileTest) = 'C:\Users\cipriano\documents\netbeansprojects\zoe\vendor\symfony\symfony\src\Symfony\Component\Debug\DebugClassLoader.php'

@nicolas-grekas
Copy link
MemberAuthor

strange... this means it couldn't work previously and caseCheck ended up being 2, not 1, isn't it?

@alexchip64
Copy link

Version 2.8.4 does not work in Windows as I indicated in my#18344, because final value is 2 and Symfony hangs.
Previous versions used different way for checking:

self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0;

@nicolas-grekas
Copy link
MemberAuthor

@alexchip64 PR updated, can you please check the new patch?

@alexchip64
Copy link

Nothing changes.

$test = 'C:\Users\cipriano\Documents\NetBeansProjects\zoe\vendor\symfony\symfony\src\Symfony\Component\Debug\DebugClassLoader.php'

and

$file = 'DebugClassLoader.php'

so the checking:
elseif (substr($test, -strlen($file)) !== $file)

returns false

@nicolas-grekas
Copy link
MemberAuthor

My bad, it should be=== instead of!==. Fixed.

@alexchip64
Copy link

Now it is ok. At least it appears ok for Windows systems.
I've understood what you have done: you ignore the path and focus on the filename only.

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit7336177 intosymfony:2.7Mar 30, 2016
fabpot added a commit that referenced this pull requestMar 30, 2016
This PR was merged into the 2.7 branch.Discussion----------[Debug] Fix case sensitivity checks| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | yes| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18344| License       | MIT| Doc PR        | -Commits-------7336177 [Debug] Fix case sensitivity checks
@fabpotfabpot mentioned this pull requestMar 30, 2016
@nicolas-grekasnicolas-grekas deleted the debug-case branchApril 3, 2016 15:40
This was referencedApr 29, 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.

6 participants

@nicolas-grekas@stof@alexchip64@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp