Problem/Motivation

\Drupal\package_manager\ComposerInspector::getInstalledPackagesList checks that metapackage packages path should equal the working directory but does not account for path aliases

this passes on Drupalci but not locally for many of us. Probably because the temp directory on macs uses an alias

Steps to reproduce

Proposed resolution

use realpath()

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.

tedbow’s picture

Issue summary: View changes

tedbow’s picture

Issue tags: +Needs tests

I think to test this we need to update \Drupal\Tests\package_manager\Kernel\ComposerInspectorTest::testMetapackagePath and in the anonymous class we have instead the property $packagePath being the working directory we create an alias the working directory and use that. It should fail without the fix. So we need test only branch or patch

yash.rode’s picture

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

In ComposerInspector.php I removed realpath() for $package['path'], because it is returning false for the cases when the directory did not exists and with that build tests are still passing.

yash.rode’s picture

Assigned: yash.rode » Unassigned
Status: Active » Needs review
phenaproxima’s picture

Assigned: Unassigned » yash.rode
Status: Needs review » Needs work
Issue tags: -Needs tests

The general change makes sense but I think we could do this a touch more cleanly.

yash.rode’s picture

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

kunal.sachdev’s picture

Status: Needs review » Reviewed & tested by the community

Looks good 🎉

phenaproxima’s picture

Assigned: phenaproxima » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks for the reviews! Glad my thing ultimately made sense; sorry I wasn't able to explain it more clearly.

Status: Fixed » Closed (fixed)

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