Task #57992

Make package HHVM compatible - failing getPackageReturnsTheSpecifiedPackage test

Added by Tymoteusz Motylewski about 7 years ago. Updated almost 7 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:


the PackageManagerTest::getPackageReturnsTheSpecifiedPackage is failing on hhvm, because it HHVM doesn't support calling key() on objects.
So it is failing now with "Fatal error: Cannot access empty property in..."
Responsible code is in Package->getNamespace()

$namespaces = $manifest->autoload->{'psr-0'};
if (count($namespaces) === 1) {
    $namespace = key($namespaces);

it can be solved by first cast object to an array

$namespaces = (array)$manifest->autoload->{'psr-0'};
if (count($namespaces) === 1) {
    $namespace = key($namespaces);

quote from
about this inconsistency:

(5) Object internal cursors

Under Zend PHP, objects have an internal cursor (similar to the array internal
cursor) that can be used to iterate over the object's properties. Under HipHop
VM, objects do not have internal cursors, and the next(), prev(), current(),
key(), reset(), end(), and each() builtin functions do not support objects.

Related issues

Related to TYPO3 Core - Task #57993: Make package HHVM compatible - failing getPackageReturnsTheSpecifiedPackage testClosedTymoteusz Motylewski2014-04-16


Updated by Gerrit Code Review about 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/29509


Updated by Stefan Neufeind about 7 years ago

Merged in Flow-package for TYPO3 CMS. https://review.typo3.org/#/c/29508/
Imho it would be great if you could please consider this adjustment as well.


Updated by Tymoteusz Motylewski almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
  • translation missing: en.field_remaining_hours set to 0.0

Also available in: Atom PDF