belugas-php

所属分类:collect
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2017-09-29 15:49:44
上 传 者sh-1993
说明:  PHP分析器功能检测器,
(A PHP analyzer feature detector,)

文件列表:
.hound.yml (34, 2017-09-29)
.reek (38, 2017-09-29)
.rspec (31, 2017-09-29)
.rubocop.yml (1244, 2017-09-29)
.travis.yml (66, 2017-09-29)
CODE_OF_CONDUCT.md (3234, 2017-09-29)
Dockerfile (1095, 2017-09-29)
Gemfile (197, 2017-09-29)
LICENSE (1068, 2017-09-29)
Rakefile (48, 2017-09-29)
belugas-php.gemspec (884, 2017-09-29)
belugas-php.png (62073, 2017-09-29)
bin/ (0, 2017-09-29)
bin/belugas-php (186, 2017-09-29)
bin/console (346, 2017-09-29)
bin/setup (131, 2017-09-29)
dev.Dockerfile (864, 2017-09-29)
lib/ (0, 2017-09-29)
lib/belugas/ (0, 2017-09-29)
lib/belugas/php.rb (968, 2017-09-29)
lib/belugas/php/ (0, 2017-09-29)
lib/belugas/php/dependency_constructor.rb (844, 2017-09-29)
lib/belugas/php/dispatcher.rb (713, 2017-09-29)
lib/belugas/php/fallback_versions/ (0, 2017-09-29)
lib/belugas/php/fallback_versions/base.rb (470, 2017-09-29)
lib/belugas/php/feature/ (0, 2017-09-29)
lib/belugas/php/feature/builder.rb (630, 2017-09-29)
lib/belugas/php/localizer.rb (655, 2017-09-29)
lib/belugas/php/parser/ (0, 2017-09-29)
lib/belugas/php/parser/base.rb (474, 2017-09-29)
lib/belugas/php/parser/composer.rb (974, 2017-09-29)
lib/belugas/php/parser/database.rb (1000, 2017-09-29)
lib/belugas/php/parser/framework.rb (952, 2017-09-29)
lib/belugas/php/parser/framework_data.rb (1305, 2017-09-29)
lib/belugas/php/standard_names/ (0, 2017-09-29)
lib/belugas/php/standard_names/base.rb (454, 2017-09-29)
lib/belugas/php/version.rb (67, 2017-09-29)
lib/rescuer.rb (388, 2017-09-29)
... ...

![Made with Love by Icalia Labs](https://img.shields.io/badge/With%20love%20by-Icalia%20Labs-ff3434.svg) ## Overview `belugas-php` is an engine for detecting application [features](#what-is-a-feature) for PHP projects based on static analysis, in other words `belugas-php` engine can detect the language, framework and database your PHP application is using. This engine works as command line interface on your local machine of a Docker container:

## Table of contents - [Why?](#why) - [What is a feature?](#what-is-a-feature) - [Installation](#installation) - [Usage](#usage) - [Contributing](#contributing) - [Credits](#credits) ## Why? `belugas-php` is part of the [Whales](https://github.com/gueils/whales) ecosystem: A set of tools to automatically dockerize your applications. ## What is a feature? A feature is an application attribute detected during the static analysis. This analysis is the act of derivating data from code such as programming language, frameworks, service dependencies and so on. See [here](#supported-features) for a list of attributes this engine currently supports. A feature has the following format: ``` { "type":"feature", "name":"PHP", "version":"5.6.30", "description":"The application uses PHP", "content":"", "categories":["Language"], "cue_locations":[""], "engines":["belugasd","belugas-php"] } ``` Where: - **type**: Will always be a _feature_. - **name**: This is the name of the language, framework or database that is being used in the application. - **version**: The detected version of the feature. This one is optional - **description**: A string explaining the feature that was detected. - **content**: A markdown snippet describing the feature, including deeper explanations and links to other resources. This one is optional - **categories**: Features are associated with one or more categories, for now we're only handling three diferent categories: Framework, Language & Database - **cue_locations**: An array of Location objects representing the places in the source code that provide evidence of the detected feature. This one is optional - **engines**: An array of engine names that detected the feature, or refined the data detected by the previous engines. ### Supported Features Currently `belugas-php` can detect the following PHP frameworks: - CodeIgniter - CakePHP - Laravel - Yii - Zend And the following databases: - MySQL - PostgreSQL - SQLite We detect this features following [Composer](https://getcomposer.org) guideliness, so make sure it's included in your project. ## Installation ### Prerequisites The Belugas PHP CLI is distributed and run as a [Docker](https://hub.docker.com/r/gueils/belugas-php/) image, so you only need to have Docker [installed](https://docs.docker.com/engine/installation/) and running on your machine. ### Setup Fire up your terminal and run: ```console docker pull gueils/belugas-php:development ``` And that's it! ## Usage Here's where the magic begins, first of all in your terminal go to the project directory you want to analyze: ```console cd code/path_to_project/ ``` And then just execute the following command: ```console docker run \ --interactive --tty --rm \ --volume "$PWD":/code \ gueils/belugas-php:development ``` And voilá! The terminal will stream a json output for each of the features detected in the following format: ``` { "type":"feature", "name":"posgresql", "version":"9.5", "description":"The application uses PGSQL", "categories":["Database"], "content": "", "cue_locations":[""], "engines":["belugas","belugas-php"] } { "type":"feature", "name":"PHP", "version":"5.6.30", "description":"The application uses PHP", "content":"", "categories":["Language"], "cue_locations":[""], "engines":["belugasd","belugas-php"] } { "type":"feature", "name":"laravel", "version":"5.1", "description":"The application uses LARAVEL", "content":"", "categories":["Framework"], "cue_locations":[""], "engines":["belugas","belugas-php"] } ``` ## Contributing Everyone is freely to collaborate, just make sure you follow our [code of conduct](https://github.com/gueils/belugas-php/blob/master/CODE_OF_CONDUCT.md). Thank you [contributors](https://github.com/gueils/belugas-php/graphs/contributors)! ### Create an Issue Find a bug and don't know how to fix it? Have trouble following the documentation or have a question about the project? Then by all means, please [create an issue](https://github.com/gueils/belugas-php/issues/new). Just please make sure you check [existing issues](https://github.com/gueils/belugas-php/issues) to see if what you're running into has been addressed already. ### Submit a Pull Request That's great! Just follow this steps: 1. Create a separate branch for your edits 2. Make sure your changes doesn't break the project by running your changes against current specs. **We love tests!** so it'll be even better if you create new ones when needed 3. Open your pull request against `master` Once you've created a pull request, mainteners will chime in to review your proposed changes and to merged it if everything is right :tada: ### I want to contribute but don't know where to start That's great also! We already have some [open issues](https://github.com/gueils/belugas-php/issues) for you to dive in. ## Credits See [LICENSE](LICENSE) ![Icalia Labs](https://raw.githubusercontent.com/IcaliaLabs/kaishi/master/logo.png) Belugas-PHP is maintained by [Icalia Labs](http://www.icalialabs.com/team)

近期下载者

相关文件


收藏者