php

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(dir string) capability.CapabilitySet

Detect scans PHP source files in dir and returns the combined capability set.

Types

type Adapter

type Adapter struct{}

Adapter implements the Analyzer interface for PHP projects.

func (*Adapter) Load

func (a *Adapter) Load(dir string) (*graph.DependencyGraph, error)

Load parses the project's composer.lock, detects capabilities for each Composer package found in vendor/, and returns a *graph.DependencyGraph.

func (*Adapter) Name

func (a *Adapter) Name() string

type ComposerPackage

type ComposerPackage struct {
	Name         string
	Version      string
	Dir          string // path to vendor/<vendor>/<package>
	Dependencies []string
	Direct       bool
}

ComposerPackage represents a PHP package extracted from composer.lock.

func Load

func Load(dir string) (pkgs []ComposerPackage, retErr error)

Load parses composer.lock in dir and returns the resolved packages. Packages are looked up in vendor/ for source scanning. Load never panics; it returns a structured error on failure. A missing "packages" key returns an empty slice, not an error.

Jump to

Keyboard shortcuts

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