PHPStan on next minor results in a fatal error due to upstream changes in core
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3571268. -->
Reported by: [phenaproxima](https://www.drupal.org/user/205645)
Related to !533
>>>
<h3 id="overview">Overview</h3>
<p>My next-minor PHPStan jobs in Haven Theme are failing: <a href="https://git.drupalcode.org/project/haven_theme/-/jobs/8340507#L51">https://git.drupalcode.org/project/haven_theme/-/jobs/8340507#L51</a></p>
<p>Quote:</p>
<pre>$ php $COMPOSER_BIN_DIR/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA_NO_DEBUG --no-progress --error-format=junit > $CI_PROJECT_DIR/junit.xml || true<br>Note: Using configuration file /builds/project/haven_theme/web/themes/custom/haven_theme/phpstan.neon.<br>PHP Fatal error: Declaration of Drupal\canvas\Render\MainContent\CanvasPreviewRenderer::buildPageTopAndBottom(array &$html): void must be compatible with Drupal\Core\Render\MainContent\HtmlRenderer::buildPageTopAndBottom(array &$html, array $page_top = [], array $page_bottom = []) in /builds/project/haven_theme/web/modules/contrib/canvas/src/Render/MainContent/CanvasPreviewRenderer.php on line 118<br>Fatal error: Declaration of Drupal\canvas\Render\MainContent\CanvasPreviewRenderer::buildPageTopAndBottom(array &$html): void must be compatible with Drupal\Core\Render\MainContent\HtmlRenderer::buildPageTopAndBottom(array &$html, array $page_top = [], array $page_bottom = []) in /builds/project/haven_theme/web/modules/contrib/canvas/src/Render/MainContent/CanvasPreviewRenderer.php on line 118</pre><p>Seems problematic, but not sure how to fix it. I guess I can't actually work around this because it's a <em>fatal error</em> while PHPStan tries to analyze the code base.</p>
<p>A quick <code>git blame</code> on core reveals that this broke <em>today</em> due to <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/3339905" title="Status: Closed (fixed)">#3339905: Add page_top and page_bottom to #attached to get rid of NodeThemeHooks::pageTop()</a></span> having changed that method signature.</p>
issue