定制 nilportugues/php_forbidden 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nilportugues/php_forbidden

最新稳定版本:1.0.5

Composer 安装命令:

composer require nilportugues/php_forbidden

包简介

Looks into the code using a user-defined list of forbidden function in a given path.

README 文档

README

Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads License Donate

Why? Because someone should look for forbidden functions that should be avoided in production.

Typical examples are print_r, var_dump, exit and die function calls.

Installation

Use Composer to install the package:

$ composer require --dev nilportugues/php_forbidden

Usage

It is really this simple:

$ php bin/php_forbidden check <path/to/directory>
$ php bin/php_forbidden check <path/to/file>

You can also pipe STDIN in, if you want to use this tool with Gulp for instance:

$ cat <path/to/file> | php bin/php_forbidden check

which means that this also works writing code directly from the shell (if you have some reason to do it):

$ php bin/php_forbidden check
<?php
// Insert your code
// and press CTRL+D to send EOF

Configuration file

When run the first time, if no php_forbidden_function.yml file is found, it will be generated.

A configuration for instance, should formatted as follows:

forbidden:
  - file_get_contents
  - fopen
  - die
  - var_dump
  - print_r

You can specify an alternate location for the configuration file by passing in the -c parameter. Example:

$  php bin/php_forbidden check -c configs/php_forbidden_function.yml src/

Contribute

Contributions to the package are always welcome!

Support

Get in touch with me using one of the following means:

Authors

License

The code base is licensed under the MIT license.

统计信息

  • 总下载量: 8.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固