Problem/Motivation

While working on #3318625: Remove active composer fixture files in UpdaterFormTest @kunal.sachdev

1) Drupal\Tests\automatic_updates_extensions\Functional\UpdaterFormTest::testSuccessfulUpdate with data set "maintenance mode on, semver module" (true, 'semver_test', 'Semver Test', '8.1.0', '8.1.1')
Exception: Warning: Undefined array key "type"
Drupal\package_manager\ComposerUtility->getProjectForPackage()() (Line: 240)

This was because it was trying to read the `drupal/core` package from the files in package_manager/tests/fixtures/fake_site/vendor/composer

These do not have a type property.

Steps to reproduce

Proposed resolution

Ensure the packages in package_manager/tests/fixtures/fake_site/vendor/composer are valid.

Maybe by adding a test here \Drupal\Tests\package_manager\Kernel\FakeSiteFixtureTest

To basically call \Drupal\package_manager\ComposerUtility::getProjectForPackage and \Drupal\package_manager\ComposerUtility::getPackageForProject

we can use name we know will return null because there are no packages that can be returned. but we should assert it returns null.

I think now it would have an exception because of the problem above.

Remaining tasks

User interface changes

API changes

Data model changes

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

tedbow created an issue. See original summary.

wim leers’s picture

Issue tags: +blocker
tedbow’s picture

Issue tags: +core-mvp

kunal.sachdev made their first commit to this issue’s fork.

kunal.sachdev’s picture

Assigned: Unassigned » kunal.sachdev
kunal.sachdev’s picture

The test failure proves that the packages are not valid in package_manager/tests/fixtures/fake_site/vendor/composer.

kunal.sachdev’s picture

Status: Active » Needs review
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

@kunal.sachdev thanks for this issue!

I made a few small changes and added a comment about we need this new test method.

RTBC! Will merge if green.

  • tedbow committed 25627ce on 8.x-2.x authored by kunal.sachdev
    Issue #3320487 by kunal.sachdev, tedbow: fake-site fixtures has invalid...
tedbow’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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