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

Issue Type: Bug Created: 2011-11-22T03:52:05.000+0000 Last Updated: 2012-06-13T12:39:48.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Adam Lundrigan (adamlundrigan) Assignee: Adam Lundrigan (adamlundrigan) Tags: - FixForZF1.12

  • zf-caretaker-adamlundrigan

Related issues: - ZF-12286



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]


Posted by Matthew Weier O'Phinney (matthew) on 2012-01-16T20:08:45.000+0000

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.

Posted by Adam Lundrigan (adamlundrigan) on 2012-02-23T21:58:21.000+0000

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

Posted by Adam Lundrigan (adamlundrigan) on 2012-03-10T01:40:39.000+0000

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

Have you found an issue?

See the Overview section for more details.


© 2006-2021 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.