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

[Debug] Fixed ClassNotFoundFatalErrorHandler on windows. #10715

Merged
merged 1 commit into from Apr 15, 2014

Conversation

Projects
None yet
4 participants
@lyrixx
Copy link
Member

commented Apr 15, 2014

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets no
License MIT

Because $path is realpath'ed. So we have to use DIRECTORY_SEPARATOR
instead of / because the default directory separator on windows is
\. And so the str_replace can not work and can lead to a fatal error
because class could already be loaded. For example, the Response class
in symfony full stack is in the bootstrap.php.cache.

ping @nicolas-grekas

[Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
Because $path is realpath'ed. So we have to use DIRECTORY_SEPARATOR
instead of / because the default directory separator on windows is
\. And so the str_replace can not work and can lead to a fatal error
because class could already be loaded. For example, the Response class
in symfony full stack is in the bootstrap.php.cache.
@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Apr 15, 2014

👍

1 similar comment
@romainneutron

This comment has been minimized.

Copy link
Member

commented Apr 15, 2014

👍

@fabpot fabpot merged commit 2ce8cd9 into symfony:2.4 Apr 15, 2014

0 of 2 checks passed

continuous-integration/travis-ci The Travis CI build failed
Details
default Success: fabbot — Failure: Travis
Details

fabpot added a commit that referenced this pull request Apr 15, 2014

bug #10715 [Debug] Fixed ClassNotFoundFatalErrorHandler on windows. (…
…lyrixx)

This PR was merged into the 2.4 branch.

Discussion
----------

[Debug] Fixed ClassNotFoundFatalErrorHandler on windows.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| License       | MIT

Because `$path` is `realpath`'ed. So we have to use `DIRECTORY_SEPARATOR`
instead of `/` because the default directory separator on windows is
`\`. And so the `str_replace` can not work and can lead to a fatal error
because class could already be loaded. For example, the `Response` class
in symfony full stack is in the `bootstrap.php.cache`.

ping @nicolas-grekas

Commits
-------

2ce8cd9 [Debug] Fixed ClassNotFoundFatalErrorHandler on windows.

@lyrixx lyrixx deleted the lyrixx:fix-debug-on-windows branch Apr 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.