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

Hack support for auto_prepend_file/auto_append_file #2990

Closed
gabelevi opened this issue Jun 19, 2014 · 3 comments
Closed

Hack support for auto_prepend_file/auto_append_file #2990

gabelevi opened this issue Jun 19, 2014 · 3 comments

Comments

@gabelevi
Copy link
Contributor

#2171 added support for a feature that automatically prepends or appends a file to every PHP file. Tony Wuersch from Wayfair mentioned that there may be some strange interactions of this hhvm feature with Hack.

At the moment, Hack doesn't really consider how files are loaded. Hack assumes everything is in scope. Therefore as long as the file you're autoprepending is in the same repository, it should be seen by Hack. So this should basically just work. I'll reach out to Tony to get an example of what might be going wrong.

@gabelevi gabelevi added the hack label Jun 19, 2014
@awuersch
Copy link

Hi. Thanks for opening this. The issue is with hhvm, not hack.

hhvm works with the php.ini auto_prepend_file directive.
hhvm –hphp –t analyze doesn't.

To show it, set up the following files in some directory $PWD.

$PWD/prepend.inc:

@fredemmott
Copy link
Contributor

-t analyze is unsupported/removed, and was separate to hack - I don't think there's still an issue here. If you think there is, please could you clarify?

@awuersch
Copy link

no, I don't think there is anymore.

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

4 participants