Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

PHP 7 on Travis-CI (re-redux) #7366

Merged
merged 78 commits into from
Mar 25, 2015

Conversation

weierophinney
Copy link
Member

This is a version of #7270 (which was in turn a rebased version of #7263), rebased against master, to support PHP 7.

I have tested both against a nightly version from 2 weeks ago, as well as the Coercive STH patch. The latterwhich provided me with a number of issues in the ZF2 codebase with regard to passing invalid arguments to internal functions, and the bulk of the commits in this branch address those, keeping compatibility with PHP 5 versions as well as PHP 7 nightly.

There is one issue I've found in Zend\Stdlib\ArrayUtils::filter(): apparently, PHP 7 nightly has a regression in its array_filter implementation; the third argument, which indicates whether to pass values only, keys only, or both to the composed callback, is ignored, causing one test case to fail.

Otherwise, this version should be ready to merge anytime.

samsonasik and others added 30 commits March 24, 2015 14:57
We're ensuring at least one item is in $_ENV, but we are not resetting
its state. As such, the comparison should be that it has at least 1
item, not exactly 1.
- Prior to PHP 7, you could specify the same name for multiple arguments; PHP 7
  makes this a fatal error. The "feature" was used in several tests where 2 or
  more arguments from a data provider were not being used. Updated these to use
  discrete names for each argument.
Prior to PHP 7, an E_ERROR was returned when trying to instantiate a
class but omitting required arguments; with PHP 7, this is now an
E_RECOVERABLE_ERROR. As such, trapping such errors intentionally
requires an error handler.
Both calling an undefined instance method as well as undefined static method now
raise an E_ERROR (instead of an E_RECOVERABLE_ERROR), which means shutdown
functions cannot be called... nor can the tests be executed.
when used as parameters to various `image*()` functions
Ensure the data being written is a string before attempting to write it.

Also, `usleep()` requires an integer; change made to allow Filesystem storage
tests to pass.
Even though the ob_implicit_flush docs use the boolean constants, it actually
expects an integer, either 0 or 1. Because PHP.

dba_replace expects string data.
Oddly, there was a cast version of the value already; it just wasn't being used
in strtr().
Error that the test was trapping has been converted to an E_FATAL starting in
PHP 7.
@gianarb
Copy link
Contributor

gianarb commented Mar 25, 2015

👍 Thanks!!

weierophinney added a commit to weierophinney/zf2-documentation that referenced this pull request Mar 25, 2015
Per zendframework/zendframework#7366, this updates documentation for all classes that were
deprecated in 2.4 due to conflicts with PHP 7 keywords.
weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney added a commit to zendframework/zend-barcode that referenced this pull request May 14, 2015
weierophinney added a commit to zendframework/zend-uri that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-crypt that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-serializer that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-text that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-xmlrpc that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-di that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-server that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-console that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-ldap that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-json that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-session that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-log that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-i18n-resources that referenced this pull request May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants