Problem/Motivation

#3124762: Add 'lifecycle' key to .info.yml files introduced the lifecycle info file key. We should check for usage of deprecated and obsolete projects and warn people about them as part of the deprecation results.

Steps to reproduce

Proposed resolution

Add deprecation errors for obsolete and deprecated projects.

Remaining tasks

Do it. Add tests. Commit.

User interface changes

API changes

Data model changes

Comments

Gábor Hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new2.02 KB

What should the exact messaging be?

Status: Needs review » Needs work

The last submitted patch, 2: 3223453.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gábor hojtsy’s picture

Status: Needs work » Needs review
StatusFileSize
new2.03 KB

So Drupal 9.2 and before will of course not have the ExtensionLifecycle object, so we need to hardcode the values. Drupal 8 projects will not have this key, so I don't think we need to try to limit this feature to Drupal 9 only. If Drupal 8 contribs decide to adopt the key even though no core support, they would have this added reporting which I don't think is a problem.

gábor hojtsy’s picture

Issue tags: -Needs tests
StatusFileSize
new5.75 KB

Adding tests.

Also realized while working on tests that installed but obsolete or deprecated core modules will not be detected by the general detector, since we ignore core for the sake of upgrade status. So we'll need to add that to the environment checks. Added a todo for that.

Status: Needs review » Needs work

The last submitted patch, 5: 3223453-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gábor hojtsy’s picture

Status: Needs work » Needs review
StatusFileSize
new7.32 KB

It helps if the test modules are in the patch :D

gábor hojtsy’s picture

StatusFileSize
new6.82 KB

Included some residue.

Status: Needs review » Needs work

The last submitted patch, 8: 3223453-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gábor hojtsy’s picture

Status: Needs work » Needs review
StatusFileSize
new6.85 KB

Also it helps to name them info.yml 🤦

gábor hojtsy’s picture

So we have proof that detecting contrib deprecated and obsolete modules works. The core part still needs to be covered as per the @todo, and I don't think we have a core module we can test against, so that part is probably not testable automatically. (Unless we change the info data at runtime, hm).

gábor hojtsy’s picture

StatusFileSize
new8.4 KB
new3.18 KB

Adding core project check to the environment checks, extension collection to the project collector.

gábor hojtsy’s picture

Issue tags: +Needs text review

Other than the text this is technically ready I think.

gábor hojtsy’s picture

StatusFileSize
new7.65 KB

Updated based on #3225812: Add lifecycle_link key to info.yml files and following discussion about what to say about obsolete modules. Most of the time they don't need user action. This should be good if green.

Status: Needs review » Needs work

The last submitted patch, 14: 3223453-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gábor hojtsy’s picture

Status: Needs work » Needs review
Issue tags: -Needs text review
StatusFileSize
new8.87 KB

Missed some files.

  • 5eb37a7 committed on 8.x-3.x
    Issue #3223453 by Gábor Hojtsy: Check for uses of deprecated and...
gábor hojtsy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

gábor hojtsy’s picture

Obsolete module detection cannot be tested because now Drupal blocks enabling obsolete modules. Recently noticed in module fails. Opened #3260292: Fix tests: obsolete module detection cannot be tested because now Drupal blocks enabling obsolete modules; Drupal 9.3.0's release necessitated mock deprecation changes for categorization accuracy.