Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Ben Ramsey
@ramsey@phpc.social  ·  activity timestamp 3 months ago

When specifying a "path" repository with a wildcard, does Composer do a recursive scan of the subdirectories for packages (i.e., composer.json files)?

I'm asking about when you have configuration like this:

{
"repositories": {
"modules": {
"type": "path",
"url": "modules/*"
}
}
}

#PHP#Composer

  • Copy link
  • Flag this post
  • Block
Michael T
@mitelg@phpc.social replied  ·  activity timestamp 3 months ago
@ramsey yes, it does. we are using this in #shopwarehttps://github.com/shopware/shopware/blob/trunk/composer.json#L218
  • Copy link
  • Flag this comment
  • Block
Ben Ramsey
@ramsey@phpc.social replied  ·  activity timestamp 3 months ago

I'm asking because I'm running into multiple variations of this error when I try running `composer update` or `composer require any/package`:

found another/package[0.0.1] in the lock file but not in remote repositories

All the packages that show that error are in the "path" repository and also in the lock file, and I can't figure out how to resolve this error so that I can require additional (external) packages.

#PHP #Composer

  • Copy link
  • Flag this comment
  • Block
dpi
@dpi@phpc.social replied  ·  activity timestamp 3 months ago
@ramsey found that using this repo method, setting a `version` key in the composer.json files of the fake projects you’re including is a quick solve for resolution pain points. I know they there’s root version env var and maybe other things also…
  • Copy link
  • Flag this comment
  • Block
Ben Ramsey
@ramsey@phpc.social replied  ·  activity timestamp 3 months ago
@dpi Thanks for the pointer. Unfortunately, all our “fake” packages already have version specified in their composer.json files.
  • Copy link
  • Flag this comment
  • Block
Ben Ramsey
@ramsey@phpc.social replied  ·  activity timestamp 3 months ago
@dpi Another member of our team resolved it. I’m still not clear on what caused it, though. We have some global package I needed to install that has a plugin I needed to allow, so clearly we’re doing something magical and strange that isn’t how Composer normally works.
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.1 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login