Nette & HHVM, how is the HHVM support status?

Notice: This thread is very old.
vojtech.kurka
Member | 11
+
0
-

Hi,

is anyone running Nette using HHVM? What hacks are needed to make it run?
It seems to me that “official” support from HHVM team is not any close, so I'm looking for some Nette code changes/quirks to make it compatible.

To start a discussion:"
Yesterday I compiled the latest HHVM. Currently, I'm getting something like

Fatal error: Cannot override final method ReflectionClass::__get() in .../Nette/Reflection/ClassType.php on line 47

I don't want to reinvent the wheel, so I'm asking.

Vojta

Jan Tvrdík
Nette guru | 2595
+
0
-

Ask @Majkl578. The issue you got was unfortunately marked as won't fix.

Majkl578
Moderator | 1364
+
+1
-

Actually, few weeks ago, I tested some nette repos (utils, …) and they worked well or with some minor issues.
Honestly, I repeatedly postponed any further investigations, since HHVM was not mature enough (at least before 3.x versions). We're now fixing Tester, so then we could move on to Nette more easily.
The most problematic part was the reflection. And intentional compatibility breaks (as @JanTvrdík linked) with no possible workarounds do not help much either…

enumag
Member | 2118
+
+2
-

@JanTvrdík, @Majkl578 Is the Nette\Object behaviour really necessary for Nette\Reflection\* classes? It could be removed in my opinion.

Last edited by enumag (2014-09-22 15:26)

Jan Tvrdík
Nette guru | 2595
+
+5
-

@enumag IMHO we can remove entire nette\reflection layer. AFAIK it has only the following functions:

  • parsing annotations – can be moved to utils or nette/annotation
  • improved __toString() to return human-friendly name, can be moved to Nette\Utils\Reflections::getName()
  • fixes few PHP issues, such as missing getClosure in PHP 5.3 or isDefaultValueAvailable broken in 5.3.16
vojtech.kurka
Member | 11
+
+1
-

Thank you guys!

Nette Tester is ready: https://github.com/…ter/pull/165

Last edited by vojtech.kurka (2014-09-23 14:02)

vojtech.kurka
Member | 11
+
0
-

Jan Tvrdík wrote:

@enumag IMHO we can remove entire nette\reflection layer. AFAIK it has only the following functions:

  • parsing annotations – can be moved to utils or nette/annotation
  • improved __toString() to return human-friendly name, can be moved to Nette\Utils\Reflections::getName()
  • fixes few PHP issues, such as missing getClosure in PHP 5.3 or isDefaultValueAvailable broken in 5.3.16

@DavidGrudl, what do you think about that idea?

David Grudl
Nette Core | 8129
+
+2
-

nette\reflection must remain for compatibility, but I agree that rest of the framework can be rewritten to not use most of nette\reflection classes.

Majkl578
Moderator | 1364
+
+6
-

Current status is as follows (ref to GitHub comment):
All components master + Tester 1.3.0@RC + HHVM 3.4.0-dev@gd54eed7 (including merged fix for facebook/hhvm#2684).
https://gist.github.com/…e9bd5b827fff

application/              FAILED 2x (FileResponse.contentDisposition.phpt, Presenter.paramChecking.phpt)
caching/                  FAILED 2x (FileStorage.call.phpt, FileStorage.wrap.phpt)
database/                 FAILED 1x [mysql, sqlite] (ResultSet.normalizeRow.mysql.phpt[mysql])
finder/                   PASSED
forms/                    PASSED
latte/                    PASSED
neon/                     PASSED
reflection/               FAILED 5x (Extension.phpt, GlobalFunction.phpt, ClassType.phpt, Parameter.defaultValues.phpt, Parameter.php53.phpt)
routing/                  FAILED 1x (Route.utf8Param.phpt)
security/                 PASSED
tokenizer/                PASSED
tracy/                    FAILED 15x (Debugger.E_ERROR.production.console.phpt, Debugger.E_COMPILE_ERROR.console.phpt, Debugger.E_ERROR.console.phpt, Debugger.E_RECOVERABLE_ERROR.console.phpt, Debugger.exception.production.console.phpt, Debugger.exception.nonhtml.phpt, Debugger.exceptionHandler.development.console.phpt, Debugger.exceptionHandler.production.console.phpt, Debugger.shut-up.error.phpt, Debugger.scream.phpt, Debugger.strict.console.phpt, Debugger.warnings.console.phpt, Dumper.toHtml().live.phpt, Dumper.toHtml().phpt)
bootstrap/                FAILED 2x (Configurator.developmentContainer.phpt, Configurator.minimalContainer.phpt)
component-model/          PASSED
di/                       FAILED 1x (IniAdapter.errors.phpt)
http/                     FAILED 5x (Session.handler.phpt, Session.start.error.phpt, Session.storage.phpt, SessionSection.remove.phpt, SessionSection.setExpiration().phpt)
mail/                     PASSED
php-generator/            FAILED 2x (Method.variadics.phpt, ClassType.from.trait.phpt)
robot-loader/             PASSED
safe-stream/              PASSED
tester/                   PASSED
utils/                    FAILED 5x (Arrays.grep().errors.phpt, Callback.invokeSafe.phpt, Image.factories.phpt, Strings.Regexp.errors.backtrack.phpt, Strings.Regexp.errors.compilation.phpt)
ZZromanZZ
Member | 87
+
0
-

Are there any news on Nette and HHVM support ? Can you put here output from your script on newest HHVM version ?

Filip Klimeš
Nette Blogger | 156
+
0
-

ZZromanZZ wrote:

Are there any news on Nette and HHVM support ? Can you put here output from your script on newest HHVM version ?

You can actually look for yourself.
In every repository in Nette on GitHub, there is link to the latest Travis build (badge with Build on it).