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

require_once includes twice #7722

Closed
nicolas-grekas opened this issue Mar 8, 2017 · 2 comments
Closed

require_once includes twice #7722

nicolas-grekas opened this issue Mar 8, 2017 · 2 comments

Comments

@nicolas-grekas
Copy link

HHVM Version

HipHop VM 3.18.1 (rel)
Compiler: tags/HHVM-3.18.1-0-g4f792a827d9b6fcc4bcd7940a1b92280f3fdedc3
Repo schema: b9aebb86bbda024eeeed6f608c9a49076563f9c7

Standalone code, or other way to reproduce the problem

create file foo.php:

<?php class foo {}

create file bug.php:

<?php

require_once 'foo.php';
touch('foo.php');
require_once 'foo.php';

then hhvm bug.php

Expected result

no output, status zero

Actual result

Fatal error: Class already declared: foo in foo.php on line 1

@QuestionPython
Copy link

QuestionPython commented Mar 8, 2017

i have a Question : touch(<path_file>) what do?

@nicolas-grekas
Copy link
Author

http://php.net/touch

fabpot added a commit to symfony/symfony that referenced this issue Mar 8, 2017
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Test with hhvm 3.18

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21900
| License       | MIT
| Doc PR        | -

Needs #21922 on master to be green also.
Works around  facebook/hhvm#7722.

Commits
-------

7f1f0cb [travis] Test with hhvm 3.18
fabpot added a commit to symfony/symfony that referenced this issue Mar 8, 2017
…olas-grekas)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix autoloader in insulated clients

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

Related to the deprecation of the class loader component:
the `Client` already uses this code in `HttpKernel`, but `FrameworkBundle` is missing the same update.
Spotted while debugging the hhvm 3.18 issue (the chain is: `ComposerResource` sees different vendors, thus says the kernel cache is not fresh, thus it is rebuild, thus we hit facebook/hhvm#7722).

Commits
-------

414ac5d [FrameworkBundle] Fix autoloader in insulated clients
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants