Download the PHP package einenlum/php-stack-detector without Composer
On this page you can find all versions of the php package einenlum/php-stack-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download einenlum/php-stack-detector
More information about einenlum/php-stack-detector
Files in einenlum/php-stack-detector
Package php-stack-detector
Short Description A package to detect the PHP stack of a project
License MIT
Informations about the package php-stack-detector
PHP Stack Detector
This library allows to easily detect the PHP stack (Wordpress, Laravel, Symfony…) and the version used, when parsing a directory or ar Github remote repository.
Supported Stacks for now:
- Wordpress
- Laravel
- Symfony
- Statamic
- Craft CMS
Install
Usage
You can also use the CLI to test it.
It is advised to use an access token for github parsing, to either access private repositories or avoid reaching Github API limit.
Usage with Symfony
Declare the factory and the detector in your services.yaml
file.
For Github:
For local filesystem:
Tests
Contribute
Each stack has its own Detector implementing a StackDetectorInterface. If the stack uses composer you can use the PackageVersionProvider class. This will use a ComposerConfigProvider to get the lock or the json config.
All of them use an Adapter, that is for now either GithubAdapter
You can add your own StackDetector and then add it to the getStackDetectors
method of the HasStackDetectors trait.
Any Pull Request welcome!
All versions of php-stack-detector with dependencies
knplabs/github-api Version ^3.12
symfony/http-client Version ^6.3
nyholm/psr7 Version ^1.8