Skip to main content

Module dirs

Module dirs 

Source
Expand description

config.vendor-dir and config.bin-dir, resolved like Config::get('vendor-dir' | 'bin-dir') (Composer 2.10.3):

  • the COMPOSER_VENDOR_DIR / COMPOSER_BIN_DIR environment first, else the project’s config, else the global config, else the defaults vendor and {$vendor-dir}/bin;
  • {$vendor-dir} / {$bin-dir} placeholders substituted (process), the result stripped of trailing / and \ (rtrim), then made absolute against the project directory without canonicalisation (Config::realpath).

Every consumer of the directory (LibraryInstaller, BinaryInstaller, AutoloadGenerator, FilesystemRepository) realpaths it before deriving a path written to disk, so the project-relative normalised form kept here (lib/vendor, vendor/bin) is what those outputs depend on.

The forms the differential harness does not cover are refused as scope issues rather than half-supported: absolute paths, ..-prefixed paths, the project root itself, ~/, $VAR / %VAR% prefixes (Platform::expandPath), other placeholders, non-string values.

Structs§

Dirs
The two directories, project-relative and normalised.