Problem/Motivation

It would be good to deprecate the .profile file extension, but currently hook_install_tasks and hook_install_tasks_alter still only support procedural implementations.

Steps to reproduce

N/A

Proposed resolution

Create TasksInterface and require it to be in a consistent namespace Drupal\PROFILE_NAME\Install\Tasks
This will implement two methods, one for getTasks and one for alter.

We will only check for the procedural version if there is no OOP version.

Remaining tasks

Decide if Extension namespace is correct or if it should be in the install namespace.

User interface changes

N/A

Introduced terminology

TasksInterface

API changes

New TasksInterface

  • getTasks
  • alter

Data model changes

N/A

Release notes snippet

Issue fork drupal-3623380

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Title: Create OOP version of hook_install_tasks and _alter » Create OOP replacement for hook_install_tasks and hook_install_tasks_alter
nicxvan’s picture

Status: Active » Needs review

Failure is the random: ManageDisplayTest

This is ready for review.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

This straightforward change makes a lot of sense to me, and support for ContainerInjectionInterface is nice. RTBC if everything passes tests.

nicxvan’s picture

Issue summary: View changes
needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new1.01 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nicxvan’s picture

Status: Needs work » Reviewed & tested by the community

Failure was just cspell, resetting status.

nicxvan’s picture

I added some suggestions to update the deprecation to 11.5 just in case we do sneak this in.

nicxvan’s picture

Issue summary: View changes

catch made their first commit to this issue’s fork.

catch’s picture

I think this either needs to be 12.1-only or go back to 11.5, I've updated the deprecation messages to say 11.5, if we don't backport, we can have a follow-up MR to update them to 12.1

Posted some suggestions for docs as well, and applied those, one or two minor questions/comments on the MR.

nicxvan’s picture

The changes you made all look good!

I created #3630429: [pp-1] Update TaskInterface documentation to mention key value expirable instead of state to discuss the state change.

  • catch committed 4f9558d8 on main
    task: #3623380 Create OOP replacement for hook_install_tasks and...
catch’s picture

Version: main » 11.5.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to main, thanks!

Moving to 'to be ported' for discussion whether to backport this to 12.0 and 11.5 during beta. If we don't, we should update the deprecation version to 12.1 prior to marking fixed.