Skip to main content

A modern, async PHP app library classifier.

Project description

PHP App Library Classifier

Analyze and classify PHP libraries used in any project directory with a modern, containerized tool. Outputs structured JSON for easy integration and analysis.

Features

  • Automatic library detection for PHP projects
  • Structured JSON output
  • Dockerized for easy use
  • No dependencies on host system
  • Fast and efficient analysis

Usage

CLI

php-app-lib-classifier /path/to/php/app [--json] [--verbose]
php-app-lib-classifier version
  • /path/to/php/app: Path to the PHP application to analyze.
  • --json: Output results in JSON format.
  • --verbose: Enable verbose logging.

Docker

docker run --rm -it -v /path/to/your/php/app:/var/www/html ghcr.io/wangyihang/php-app-lib-classifier:main /var/www/html --json
  • /path/to/your/php/app: Local path to your PHP application.
  • The output will be in JSON format.

Python API

from php_app_lib_classifier import LibraryClassifier

result = LibraryClassifier.classify("/path/to/php/app", output_json=True)
print(result)
  • LibraryClassifier.classify(path, output_json=True): Analyze the specified PHP application and return the results (optionally as JSON).

Requirements

  • Docker

Architecture

  • LibraryClassifier: Core logic for detecting and classifying PHP libraries
  • CLI Interface: Simple command-line usage via Docker
  • JSON Output: Structured results for downstream processing
  • Detection Strategies:
    • Composer dependency analysis
    • File and directory pattern matching
    • Content-based heuristics

Contributing

  • Fork & branch
  • Add features or tests
  • Ensure all tests pass (if applicable)
  • Submit a pull request

License

MIT License. See LICENSE.

Changelog

v0.2.0

  • Improved detection logic, structured output, and Docker usability

v0.1.0

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

php_app_lib_classifier-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

php_app_lib_classifier-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file php_app_lib_classifier-0.1.0.tar.gz.

File metadata

File hashes

Hashes for php_app_lib_classifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9289da8e50b33b837b9a4ebd6132f57cedcb6e154232b6fcd9a1f24b1442de65
MD5 e267497668403993b771da003bb09a43
BLAKE2b-256 a5a44c00f8b7d611a7ddbab8ca4eb5c11faf7369e909057359ae2ae6117b1413

See more details on using hashes here.

File details

Details for the file php_app_lib_classifier-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for php_app_lib_classifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7a719950d5f881df715f1be0651109a5651e21c077c32e69a6f7ba2acc7200
MD5 c4322d04123cfc6977e57468f9f3c754
BLAKE2b-256 779a7def4dd3ec7925a9e6ab4894e4b2060d74f6b00f8ab2a9d78fc9f9dfce1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page