- Issue created by @bbrala
- π³π±Netherlands bbrala Netherlands
Might be as simple as "filtering out" all error elements which remove from deprecated majorr +2 here:
UpdateStatusXmlChecker: public function isInfoUpdatable(): bool { } public function isComposerUpdatable(): bool { }
if we filter them out here it before checking counts it should ebe fine.
if (count($this->xml->file) > 2)
Is also wrong i think, we need to match the error regarding the info.yaml so we have a real count. Or have a count of all errors that are not composer of info.yml related?
- ππΊHungary GΓ‘bor Hojtsy Hungary
Should we add a drush filter argument to Upgrade Status that project analysis can use? Upgrade Status already deemphasizes future deprecations. This code https://git.drupalcode.org/project/upgrade_status/-/blob/4.x/src/Depreca...
// If the deprecation is already for after the next Drupal major, put it in the // ignore category. This overwrites any categorization before intentionally. if (preg_match('!(will be|is) removed (before|from) [Dd]rupal[ :](\d+)\.!', $error, $version_removed)) { if ($version_removed[3] > ProjectCollector::getDrupalCoreMajorVersion() + 1) { $category = 'ignore'; } }
We could add a filter option to the drush command to filter the ignore category.
- π³π±Netherlands bbrala Netherlands
That would be great, since the infra is already available there we should use that.
- π³π±Netherlands bbrala Netherlands
Hmm, it is already communicated in severity so the info is already available. Think i just need to refactor the logic.
$errorCount = x $infoErrorCount = array_filter((array) $xml->file, function($file) { return $file['severity'] === 'info'; }); $infoYamlErrorCount = $this->errorsContainInfoYml() // refactor this method to return a count. $composerJsonErrorCount = $this->errorsContainComposerJson() // refactor this method to return a count.
Then:
- info.yml is updatable if: errorCount == sum of above && $infoYamlErrorcount > 0
- composer.json is updateable if errorCount == sum of above && $composerJsonErrorCount > 0
- run rector if => same logic as before, any php files.
Think that would be fine, and seems to be not that much extra complexity.
- Status changed to Needs review
10 months ago 1:48pm 29 May 2024 - π³π±Netherlands bbrala Netherlands
Pushed to a branch in the project itself. Oops.
Anyways, mr is here:
https://git.drupalcode.org/project/project_analysis/-/merge_requests/30/pipelines - π³π±Netherlands bbrala Netherlands
Tests and tesrun prove this allows for patches when d12 is in the deprecations. Also multiple instances of info.yml and composer.json are now handled correctly. Ex0ect a surge in patches.
-
bbrala β
committed 01f5ac82 on master-d11
Issue #3450581: Add checks for error counts. Multiple info.yml is fine,...
-
bbrala β
committed 01f5ac82 on master-d11
- Status changed to Fixed
10 months ago 9:53am 30 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.