Core merge request conversion now incorrectly fails on phpstan

Created on 28 March 2023, about 1 year ago
Updated 29 March 2023, about 1 year ago

Problem/Motivation

The core merge request conversion script, composer core-convert now fails for weird reasons

Running PHPStan on changed files.
------ ---------------------------------------------------------------------
Line core/modules/package_manager/package_manager.install
------ ---------------------------------------------------------------------
29 Constant REQUIREMENT_ERROR not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------

------ ---------------------------------------------------------------------------
Line core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php
------ ---------------------------------------------------------------------------
39 Function update_storage_clear not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------------

------ ---------------------------------------------------------------------
Line core/modules/package_manager/src/ProjectInfo.php
------ ---------------------------------------------------------------------
74 Function update_calculate_project_data not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
187 Function update_get_available not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------

------ ---------------------------------------------------------------------
Line core/modules/package_manager/src/Stage.php
------ ---------------------------------------------------------------------
508 Function drupal_flush_all_caches not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------

------ ------------------------------------------------------------------------
Line core/modules/package_manager/src/Validator/PendingUpdatesValidator.php
------ ------------------------------------------------------------------------
62 Function drupal_load_updates not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
63 Function update_get_update_list not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ------------------------------------------------------------------------

------ ---------------------------------------------------------------------
Line core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php
------ ---------------------------------------------------------------------
141 Function update_get_available not found.
πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------

[ERROR] Found 8 errors

update_get_available is still in core so not sure what is going on.

I got the same errors before and committed the change to the change https://www.drupal.org/project/drupal/issues/3346707#mr3608-note161129 ✨ Add Alpha level Experimental Package Manager module Needs review and it did not fail phpstan there.

So I am not sure what is going on.

Proposed resolution

If there is quick fix to this then it might be worth fixing otherwise since now only @wim leers are running the script I think we just spot check phpstan failures to see if it something we can ignore.

I might push up an MR that would make \Drupal\automatic_updates\Development\Converter::makeCommit public so we can just commit and anyways and have the nice commit message

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024