During its unit test the PHP Backend prepareItem method is called without any parameters. The PHP docs indicate the first argument is required. Either code or docs need updating.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aki Tendo’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, failing-test.diff, failed testing.

catch’s picture

It's getting explicitly passed FALSE - which is the result of @include when there is no file.

getByHash() should probably check for !empty() instead of isset() - but looks like PHP is forgiving the isset($cache->data) check in prepareItem().

Aki Tendo’s picture

Which course of action should be taken? Fix getByHash()? Revise prepareItem() 's documentation so that FALSE is a legal argument, maybe even the default? My inclination is the former - a call to prepareItem() implies an expectation that you have an item to prepare.

Aki Tendo’s picture

Issue tags: +Assertion Failure
FileSize
1.24 KB
1.29 KB
937 bytes

Now that the assert tools are core this failing test has been re-rolled.

I would like to begin tagging this issue and all others like it with "Assertion Failure" for a quicker lookup of these issues collectively.

Note that the number of failures have lowered since the last test from 41 to 26, which indicates the real source of this bugbear might not be the caller but a failure to write the cache in the first place.

Nevertheless, I've attached a solution following up on catch's comments at #3 and this removes all the failures so far detected.

IMPORTANT NOTE: Until the testbots are fixed the test case must change the .htaccess file to turn assertions on. Provided it passes tests and is RTBC the .htaccess setting change must be reverted before final commit.

Aki Tendo’s picture

Status: Needs work » Needs review

The last submitted patch, 5: failing-test.diff, failed testing.

Aki Tendo’s picture

The solution diff passed so ready for RBTC

Aki Tendo’s picture

Issue tags: -Assertion Failure +Runtime assertion

Changed issue tag to the one Alex Pott recommends be used for these.

Aki Tendo’s picture

Bump. Still needing a code review - should be simple enough.

Aki Tendo queued 5: 2514712-5.diff for re-testing.

Aki Tendo’s picture

This has slid through the cracks. When last left off this was ready for final review.

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.

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

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

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

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

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

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

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

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

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

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

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

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

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

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Issue tags: +Bug Smash Initiative

Moving back to the front of the list.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)

Sending to PNMI after 7 years. Can you please verify if this issue is still relevant in 9.5? I see it was originally written for D7 and tons of things have changed since.

Please reopen if still relevant with an updated issue summary. (possible reroll)

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Since this moved to PNMI over 3 months ago, which is the threshold going to close as outdated.

If still a valid issue please reopen with an updated issue summary

Thanks