Problem/Motivation

While working on #3361747: Add test trait to create randomly named, non-conflicting default target modules I realized that the machine name and directory of the default target module is hard coded and so can't be specified ahead of time for a test. This is a problem because TargetModuleCollection::ensureDefaultTargetModuleIsSet() is an all or nothing situation, where it won't do anything if a default target module is already installed, and if one is not installed, it will create it all and install it with the hard coded name, without giving us a chance to provide a different module name or path.

Steps to reproduce

Am tired. Please see #3361747: Add test trait to create randomly named, non-conflicting default target modules for details.

Proposed resolution

Add optional parameters to TargetModuleCollection::ensureDefaultTargetModuleIsSet()

Remaining tasks

See above.

User interface changes

None.

API changes

None other than optional parameters TargetModuleCollection::ensureDefaultTargetModuleIsSet()

Data model changes

None I think?

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

Ambient.Impact created an issue. See original summary.

ambient.impact’s picture

Title: Make it possible to set default target module machine name and path before creating » 3362011-set-default-target-module-name-and-path

Opened a draft merge request. I think it probably should have a basic test added before it's marked as ready.

ambient.impact’s picture

Title: 3362011-set-default-target-module-name-and-path » Make it possible to set default target module machine name and path before creating

Whoops.

star-szr’s picture

Version: 1.0.x-dev » 2.0.x-dev
Status: Needs review » Fixed

Merged to 2.0.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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