Global namespaces
Compiling PHP with the HHVM enabled does not parse global namespaces correctly, per example Silex::LazyUrlMatcher.
The matcher uses \Closure and uses 2 other local namespaces. The issue is resolved by explicitly defining local use \Closure.
There is an old Pull Request which seems (low C++ skills) to handle this case.
HipHop VM does not support namespaces currently.
Well it sort of does, as long as you define the by use, or it that just appearances? It does compile the hhbc then, but your saying it will brake down anyhow if you try to use the binary with hhvm?
There was some support for namespaces added to HPHPc (the PHP->C++ compiler) a while ago, but I think there were some bugs and corner cases that it got wrong.
HHVM probably inherited some of this from HPHPc (since they share a lot of code), but we haven't done any testing at all to make sure namespaces actually work on HHVM. I wouldn't be surprised if some PHP code using namespaces happens to work, but it wouldn't be hard to come up with PHP code using namespaces that doesn't work. For example, PHP code that relies on the "fallback" semantics for functions and constants (http://php.net/manual/en/language.namespaces.fallback.php) probably won't work correctly.
bump?
We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575
If this is still an issue, please re-open it, and in order of goodness:
- Give detailed repro steps
- Write a test case in hphp/tests/quick (run it with hphp/tests/run) and send the pull request
- Fix it in a pull request
Namespace support is still a big feature request. Can this issue be re-opened?
@dave1010 did u check current git?
I didn't, sorry. I had a look through the issues here and found nothing. A scan through the logs shows a fair bit of work on namespace support but I can't find a general status/feature support page or any related docs in the wiki. Next time I'll just build the source & try it ;-)
@dave1010 in general, everything works unless otherwise mentioned.
Can you create the doc you were expecting to find, so others won't have the same problem? It is a wiki after all.
Does this mean namespaces work now? I'm interested in using hiphop with a Silex application.
Yes. Please test it and open any issues you run into.
Sent from my iPhone
On Jun 4, 2013, at 10:40 AM, peachepe [email protected] wrote:
Does this mean namespaces work now? I'm interested in using hiphop with a Silex application.
— Reply to this email directly or view it on GitHub.