Last passing PHP7 + Mysql / postgres that passed is https://dispatcher.drupalci.org/job/php7_mysql5.5/778/consoleFull
First fail is https://dispatcher.drupalci.org/job/php7_mysql5.5/779/consoleFull

Fatal error: Declaration of PDOStatement::fetch($how = NULL, $orientation = NULL, $offset = NULL) must be compatible with Drupal\Core\Database\StatementInterface::fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL) in /var/www/html/core/lib/Drupal/Core/Database/Statement.php on line 21

This code has not changed since 2015

The one difference I could spot in the output that might cause this is:
PHP 7.0.6-dev (cli) (built: Mar 28 2016 22:54:02) ( NTS ) - The failing tests
PHP 7.0.6-dev (cli) (built: Mar 27 2016 22:53:45) ( NTS ) - The passing tests

Maybe something has changed on PHP7 - looked at the recent git log of php and couldn't find anything.

Comments

alexpott created an issue. See original summary.

alexpott’s picture

alexpott’s picture

Project: DrupalCI: Test Runner » Drupal core
Version: » 8.0.x-dev
Component: Code » database system
alexpott’s picture

Status: Active » Needs review
StatusFileSize
new695 bytes
alexpott’s picture

StatusFileSize
new1.98 KB

Missed a bit.

catch’s picture

To save people looking, here's the new fail:

Fatal error: Declaration of PDOStatement::fetch($how = NULL, $orientation = NULL, $offset = NULL) must be compatible with Drupal\Core\Database\StatementInterface::fetch($mode = NULL, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0) in /var/www/html/core/lib/Drupal/Core/Database/Statement.php on line 21
catch’s picture

StatusFileSize
new3.42 KB

I think this is probably a bad PHP7 commit, left a comment on https://github.com/php/php-src/commit/ee9a78a033696ff9546fb1dbfecd28f204...

However agreed with @alexpott it's potentially fixable.

Here's a patch (after a few iterations that didn't work) that stops the PDO error. I had to implement the method in Statement so that this gets compared to the interface instead of the one from PDO.

After that, there are lots of new fun fails, but it's not every test.

catch’s picture

StatusFileSize
new1.25 KB

Minus some cruft.

The last submitted patch, 7: 2695785.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 8: 2695785.patch, failed testing.

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new1.27 KB

OK that explains the PHP7 error, now just to fix obvious breakage in my actual patch.

This isn't committable yet, just want to get a green run.

The reason sqlite didn't fail is because StatementPrefetch already overrides PDOStatement::fetch() and sqlite extends from that.

catch’s picture

StatusFileSize
new1.31 KB

Minimal change now. We could rename the function params on StatementPrefetch to match in a follow-up.

alexpott’s picture

Hmmm fun....

	/**
	 * (PHP 5 &gt;= 5.1.0, PECL pdo &gt;= 0.1.0)<br/>
	 * Fetches the next row from a result set
	 * @link http://php.net/manual/en/pdostatement.fetch.php
	 * @param int $fetch_style [optional] <p>
	 * Controls how the next row will be returned to the caller. This value
	 * must be one of the PDO::FETCH_* constants,
	 * defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE
	 * (which defaults to PDO::FETCH_BOTH).
	 * <p>
	 * PDO::FETCH_ASSOC: returns an array indexed by column
	 * name as returned in your result set
	 * </p>
	 * @param int $cursor_orientation [optional] <p>
	 * For a PDOStatement object representing a scrollable cursor, this
	 * value determines which row will be returned to the caller. This value
	 * must be one of the PDO::FETCH_ORI_* constants,
	 * defaulting to PDO::FETCH_ORI_NEXT. To request a
	 * scrollable cursor for your PDOStatement object, you must set the
	 * PDO::ATTR_CURSOR attribute to
	 * PDO::CURSOR_SCROLL when you prepare the SQL
	 * statement with <b>PDO::prepare</b>.
	 * </p>
	 * @param int $cursor_offset [optional]
	 * @return mixed The return value of this function on success depends on the fetch type. In
	 * all cases, <b>FALSE</b> is returned on failure.
	 */
	public function fetch ($fetch_style = null, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0) {}

Is how this is documented...

Apparently PHP7 has been fixed so maybe this is not a problem anymore... I guess we'll see in tonights builds.

wim leers’s picture

Indeed, they reported 2 hours ago that they pushed fixes.

catch’s picture

Priority: Critical » Normal
Status: Needs review » Postponed

Moving to 'postponed' so it's clear we just need a new test run.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

daffie’s picture

Status: Postponed » Closed (outdated)

Those bugs are long gone.