ZF-11906: Update library and test suite to be compatible with PHP 5.4


Update library and test suite to be compatible with PHP 5.4, starting now with 5.4.0RC1.

Complete list of changes in PHP 5.4.0RC1:

+Issues / Progress+

  • Flood of notices from {{}} [fixed r24627 r24628]

PHP Notice:  Constant  already defined in tests/TestConfiguration.php.dist on line XXX
  • Remove all references to ini key 'y2k_compliance', which was removed in 5.4.0 [fixed r24805]

  • Fix "Array to string conversion" errors turned up by unit tests [r24807]


First: don't use -- we should likely remove that. Second, I ran into this issue in ZF2, mainly in tests that use the "runInSeparateProcess" annotation; the solution for that is to do a "defined(...) || define(...)" style declaration. This, however, is not related to 5.4 specifically.

When we ran tests on 5.4rc2, what we found was:

  • There were BC breaks in some ob*() functions -- but these were fixed in a subsequent RC.
  • Array to string conversion now raises warnings, which can break tests. These are cases where we will need to fix code for tests to run normally.
  • Classes extending an abstract class and redefining the constructor but with different arguments will now raise an E_FATAL. We only had one place we were doing this, and it shouldn't have occurred anyways -- but it will need to be corrected.

The biggest thing to focus on is the second point, above.

Fixed declaration of TESTS_* constants in TestConfiguration.php.dist (r24627 r24628)

Additional fix for definition of TESTS_ZEND_SERVICE_RACKSPACE_* constants, which belong to component not yet merged into release branch. (r24673)