marek-d-lis/phpstan-symfony-rules
最新稳定版本:1.0.2
Composer 安装命令:
composer require marek-d-lis/phpstan-symfony-rules
包简介
My PHPStan rules for Symfony i like to include in my projects
README 文档
README
Description
This package provides custom PHPStan rules for Symfony projects to enforce better coding practices by preventing the use of debugging and execution-halting functions such as:
var_dump()dump()dd()die()exit()
Installation
Require the package via Composer:
composer require --dev marek-d-lis/phpstan-symfony-rules
Configuration
Include the package's rules in your phpstan.neon configuration file:
includes: - vendor/marek-d-lis/phpstan-symfony-rules/extension.neon
Rules
1. NoDumpRule
- Prevents the use of
var_dump()anddump(). - Example violation:
var_dump($data); // ❌ Not allowed dump($data); // ❌ Not allowed
2. NoDieRule
- Prevents the use of
die(),exit(), anddd(). - Example violation:
die("Fatal error"); // ❌ Not allowed exit(1); // ❌ Not allowed dd($data); // ❌ Not allowed
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
Marek D. Lis - Website
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-29