Problem/Motivation

While working on ComposerPluginsValidatorTest, I over time (in #3331168: Limit trusted Composer plugins to a known list, allow user to add more and #3344127: Run `composer validate` after FixtureManipulator commits its changes) accumulated two @todos:

  1. // @todo Uncomment this in https://www.drupal.org/project/automatic_updates/issues/3252299
    
  2. // @todo handle following type of case where the project is invalid in
    // https://www.drupal.org/node/3344595

… but #3252299: Reliably support cweagans/composer-patches in Package Manager & Automatic Updates: validate stage and #3344595: ComposerInspector::validate() should run `composer validate` have both landed since then. 😅

Proposed resolution

Do whatever work is necessary to get rid of these @todos.

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

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

Wim Leers created an issue. See original summary.

yash.rode made their first commit to this issue’s fork.

yash.rode’s picture

Assigned: wim leers » yash.rode
Status: Active » Needs work

yash.rode’s picture

Need help wtih \Drupal\Tests\package_manager\Kernel\ComposerPluginsValidatorTest::testValidationDuringPreApply with the dataprovider providerSimpleValidCases(). What should be the the value of extra for fake cweagans/composer-patches.

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

yash.rode’s picture

Assigned: yash.rode » tedbow
Status: Needs work » Needs review
Issue tags: +sprint

Should we create two separate data providers for \Drupal\Tests\package_manager\Kernel\ComposerPluginsValidatorTest::testValidationDuringPreCreate and testValidationDuringPreApply as providerSimpleValidCasesshouldn't have It cannot be installed by Package Manager. for the earlier one and should be there for the later one.

tedbow’s picture

Assigned: tedbow » yash.rode

@yash.rode I think we can just add this message in `testValidationDuringPreApply` directly to the validation result.

I have pushed up a fix

yash.rode’s picture

Status: Needs review » Needs work
yash.rode’s picture

Removed other todo.

yash.rode’s picture

Assigned: yash.rode » wim leers
Status: Needs work » Needs review
wim leers’s picture

Assigned: wim leers » Unassigned

Please just mark Needs review going forward — I will have reduced capacity for reviews. @tedbow or @phenaproxima can also review! 😊

wim leers’s picture

Status: Needs review » Needs work
yash.rode’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Status: Needs review » Needs work
yash.rode’s picture

Assigned: Unassigned » yash.rode
yash.rode’s picture

Assigned: yash.rode » phenaproxima
Status: Needs work » Needs review

I have 2 questions for the changes requested.

yash.rode’s picture

I have a doubt, what do we want to test in 'one supported composer plugin' dataset?

yash.rode’s picture

Assigned: phenaproxima » Unassigned
yash.rode’s picture

Assigned: Unassigned » wim leers
wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs review » Needs work

Agreed with @yash.rode and @phenaproxima in #18.

But that decision seems to have left some stale/obsolete things in the MR 🤓

yash.rode’s picture

Assigned: Unassigned » wim leers
Status: Needs work » Needs review

Removed obsolete lines of code.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs review » Reviewed & tested by the community
phenaproxima’s picture

Assigned: Unassigned » yash.rode
Status: Reviewed & tested by the community » Needs work

I think this looks really, really good -- such a nice, clear test! I think we could streamline a thing, comment another thing...and just explain something else in an MR comment thread.

But otherwise, I really like it.

yash.rode’s picture

Assigned: yash.rode » Unassigned
Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Reviewed & tested by the community
phenaproxima’s picture

Looks fantastic. Made a few very minor changes for strictness' sake, but I think this is excellent; it's clean, clear, and tightly scoped. A top-nottch patch. I will commit when tests pass.

phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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