composer

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package composer implements a SystemDecomposer that reads the Composer packages installed on a filesystem: the installed.json each vendor directory carries, wherever it lives. This is how a container image says what PHP software it holds, with the dependency graph and every license read offline from the installed metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decomposer

type Decomposer struct{}

Decomposer reads installed Composer packages from a system filesystem.

func New

func New() *Decomposer

New returns a ready-to-use Composer system decomposer.

func (*Decomposer) DefaultOptions

func (d *Decomposer) DefaultOptions() any

DefaultOptions returns the driver-level options used when none are set.

func (*Decomposer) Extract

func (d *Decomposer) Extract(opts *api.DecomposerOptions) (*sbom.NodeList, error)

Extract opens opts.WorkDir as the system root and runs the FS-aware extractor against it, mirroring the other system decomposers.

func (*Decomposer) ExtractFromFS

func (d *Decomposer) ExtractFromFS(source fs.FS, opts *api.DecomposerOptions) (*sbom.NodeList, error)

ExtractFromFS reads every installed Composer environment on the filesystem and returns their graph. Returns (nil, nil) when the filesystem holds no Composer at all, which is not an error.

func (*Decomposer) Requirements

func (d *Decomposer) Requirements(_ *api.DecomposerOptions) []api.Requirement

Requirements returns nothing: reading installed.json is pure Go.

type Options

type Options struct{}

Options configures the decomposer. There are none yet: discovery walks the filesystem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL