Search by

adachsoft / project-validator-composer-json

Arkadiusz Adach

Project validator for Composer library manifest release rules

Package info

gitlab.com/a.adach/project-validator-composer-json

Issues

pkg:composer/adachsoft/project-validator-composer-json

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-12 20:40 UTC

This package is auto-updated.

Last update: 2026-11-12 19:40:40 UTC


README

adachsoft/project-validator-composer-json adds release-risk checks for Composer library manifests to applications built on adachsoft/project-validator.

Features

  • Reports invalid JSON and explicit root version fields.
  • Detects wildcard (*) and development dependency constraints.
  • Optionally checks require-dev and supports an allow-list of packages.
  • Ignores platform requirements such as php, ext-*, and lib-*.

Only manifests with type: library or no type field are checked.

Requirements

  • PHP 8.3 or later
  • adachsoft/project-validator ^0.3

Installation

composer require adachsoft/project-validator-composer-json

Usage

Register AdachSoft\ProjectValidatorComposerJson\ComposerJsonValidator as a ProjectValidatorInterface implementation in the host application's validator registry. Its default validator code is composer_json. The host application supplies a ValidationContextInterface when checking support and running validation.

The include_require_dev option enables checks for require-dev and defaults to false. The allowed_packages option accepts a list of dependency names exempt from dependency checks and defaults to an empty list. See the usage example for registration and options.