github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/pkg/php.go (about)

     1  package pkg
     2  
     3  // PhpComposerInstalledEntry represents a single package entry from a composer v1/v2 "installed.json" files (very similar to composer.lock files).
     4  type PhpComposerInstalledEntry PhpComposerLockEntry
     5  
     6  // PhpComposerLockEntry represents a single package entry found from a composer.lock file.
     7  type PhpComposerLockEntry struct {
     8  	Name            string                       `json:"name"`
     9  	Version         string                       `json:"version"`
    10  	Source          PhpComposerExternalReference `json:"source"`
    11  	Dist            PhpComposerExternalReference `json:"dist"`
    12  	Require         map[string]string            `json:"require,omitempty"`
    13  	Provide         map[string]string            `json:"provide,omitempty"`
    14  	RequireDev      map[string]string            `json:"require-dev,omitempty"`
    15  	Suggest         map[string]string            `json:"suggest,omitempty"`
    16  	License         []string                     `json:"license,omitempty"`
    17  	Type            string                       `json:"type,omitempty"`
    18  	NotificationURL string                       `json:"notification-url,omitempty"`
    19  	Bin             []string                     `json:"bin,omitempty"`
    20  	Authors         []PhpComposerAuthors         `json:"authors,omitempty"`
    21  	Description     string                       `json:"description,omitempty"`
    22  	Homepage        string                       `json:"homepage,omitempty"`
    23  	Keywords        []string                     `json:"keywords,omitempty"`
    24  	Time            string                       `json:"time,omitempty"`
    25  }
    26  
    27  type PhpComposerExternalReference struct {
    28  	Type      string `json:"type"`
    29  	URL       string `json:"url"`
    30  	Reference string `json:"reference"`
    31  	Shasum    string `json:"shasum,omitempty"`
    32  }
    33  
    34  type PhpComposerAuthors struct {
    35  	Name     string `json:"name"`
    36  	Email    string `json:"email,omitempty"`
    37  	Homepage string `json:"homepage,omitempty"`
    38  }
    39  
    40  type PhpPeclEntry struct {
    41  	Name    string   `json:"name"`
    42  	Version string   `json:"version"`
    43  	License []string `json:"license,omitempty"`
    44  }