Problem/Motivation

When we moved to PHPStan level 1 the baseline in 10.0.x and 10.1.x became different. Let's make them the same to make our lives simpler.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
2.63 KB
9.39 KB

Note that this fixes a bug in the way the deprecate dance was done in #1014086: Stampedes and cold cache performance issues with css/js aggregation

alexpott’s picture

The 10.0.x patch is necessary because PHPStan ignores deprecations inside deprecated classes - so the easiest thing to do here is fix the deprecation in 10.0.x.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/lib/Drupal/Core/Entity/Form/RevisionRevertForm.php
@@ -165,7 +165,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
-    if ($this->revision instanceof RevisionLogInterface) {
+    if (isset($originalRevisionTimestamp)) {

I thought this was a bit strange but the code is equivalent given the variable is set under the same circumstances a few lines above. This code could perhaps be refactored to be more concise but it's out of scope here.

Otherwise this has caught a minor bug and cleaned up some test code that we missed, so big +1 to PHPStan.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and 10.0.x respectively, thanks!

mondrake’s picture

Issue tags: +PHPStan-1

  • catch committed f1eaa02 on 10.0.x
    Issue #3320025 by alexpott, longwave: Make PHPStan baseline the same in...
  • catch committed 8e71d46 on 10.1.x
    Issue #3320025 by alexpott, longwave: Make PHPStan baseline the same in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.