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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file php_app_lib_classifier-0.1.1.tar.gz.
File metadata
- Download URL: php_app_lib_classifier-0.1.1.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdf6d8f2828045d681b8783b5510b2ea3e7183ab87cac8edb7371395bfd7edc4
|
|
| MD5 |
eb435ed6c991a9d6dfb57952de406334
|
|
| BLAKE2b-256 |
91c8fde06f18e4f620541d6849e76c49a5fd1c3ab56d1bec4aba1def4c44c315
|
File details
Details for the file php_app_lib_classifier-0.1.1-py3-none-any.whl.
File metadata
- Download URL: php_app_lib_classifier-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02c0b97e31484b0ada5ad2fa7a456ce9bdeda88dce5b6b62b460af9458b48a3a
|
|
| MD5 |
9a0038be1d8b185e4b0f1c61d9857772
|
|
| BLAKE2b-256 |
dcef94dfd49d6c97a60cbd021e6f7384d6cc634af881d096c272a45f1e738149
|