evilstudio/composer-parser

Simple app for parse composer.json file from multiple repositories to one Excel spreadsheet

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

pkg:composer/evilstudio/composer-parser

v2.13.4 2026-01-26 17:38 UTC

README

✨ Introduction

Composer Parser is a CLI tool for comparing dependencies across multiple repositories. It pulls composer.json (optionally composer.lock), groups packages by configurable rules, and generates a single XLSX report for easy comparison.

βœ… Key Features

  • Aggregates data from multiple repositories into one report.
  • Supports three parser modes: composerJson, composerJsonAndLock, composerFull.
  • Multiple data sources: local Git, GitLab API (files/zip archive).
  • Configurable package groups and cell styling rules.
  • XLSX output with comments for installed and latest versions.

🧩 Requirements

  • PHP >= 8.3
  • PHP extensions: ext-json, ext-zip
  • Git (only for providerType: gitRepository)
  • composer in PATH (required for parserType: composerFull)
  • GitLab Personal Access Token with read_repository (for GitLab providers)
  • Ansible Vault password (optional, only for gitlabApiArchive + auth.json.encrypted)

πŸ› οΈ Installation

  1. Clone the repository (recommended for easy updates):
    git clone https://github.com/evilstudio/composer-parser.git
    cd composer-parser
    composer install
  2. Install dependencies:
    composer install
  3. Copy the configuration template:
    cp config/parameters.yaml.template config/parameters.yaml
  4. Edit config/parameters.yaml to configure the application.
  5. Run the CLI commands (see the Commands section).

πŸ”„ Updating

git pull
composer install

βš™οΈ Configuration (config/parameters.yaml)

All fields are documented in config/parameters.yaml.template. Copy it and fill in values.

πŸ’» Commands

Command Description
app:run Fetches data from repositories and generates the XLSX report.
app:cleanup Removes downloaded repositories from the working directory.

πŸ“„ Output

  • The XLSX file is written to writer.config.local.fileDirectory.
  • {date} in the filename is replaced with the current date (Y-m-d).
  • The sheet header includes a "Last update" timestamp.
  • With includeInstalledVersion=true, comments include versions from composer.lock.
  • In composerFull, a comment includes the latest version from composer outdated.

πŸ“ Project Structure

bin/          # CLI entry script
config/       # Configuration (parameters, services)
docker/       # Docker settings (xdebug)
src/          # Application source code
β”œβ”€β”€ Api/      # Interfaces
β”œβ”€β”€ Command/  # CLI commands
β”œβ”€β”€ Exception/  # Exceptions
β”œβ”€β”€ Model/      # Data models
└── Service/    # Parsers, providers, writer
var/          # Working data (repositories, results)
vendor/       # Composer dependencies

πŸ“š Documentation

πŸ“ Notes

  • parserType: composerJson does not use composer.lock.
  • parserType: composerJsonAndLock and composerFull expect a valid composer.lock.
  • composerFull runs composer outdated --format=json in each repository directory.
  • The Dockerfile uses php:8.3-cli; if you rely on Docker, keep it aligned with project requirements.