lemax10/ocstan
Composer 安装命令:
composer require --dev lemax10/ocstan
包简介
OCStan - Discover bugs in your code without running it. A nunomaduro/larastan wrapper for OctoberCMS
关键字:
README 文档
README
⚗️ About OcStan
- Adds static typing to Laravel to improve developer productivity and code quality
- Supports most of Laravel's beautiful magic
- Supports most of OctoberCMS's beautiful magic
- Discovers bugs in your code without running it
✨ Getting Started In 3 Steps
Requires:
1: First, you may use Composer to install Larastan as a development dependency into your Laravel project:
composer require --dev lemax10/ocstan
Using Larastan for analysing Laravel packages? You may need to install
orchestra/testbench.
2: Then, create a phpstan.neon or phpstan.neon.dist file in the root of your application. It might look like this:
includes:
- ./vendor/lemax10/ocstan/extension.neon
parameters:
paths:
- app
# The level 8 is the highest level
level: 4
ignoreErrors:
- '#Unsafe usage of new static#'
excludePaths:
- ./*/*/FileToBeExcluded.php
checkMissingIterableValueType: false
For all available options, please take a look at the PHPStan documentation: https://phpstan.org/config-reference
3: Finally, you may start analyzing your code using the phpstan console command:
./vendor/bin/phpstan analyse
If you are getting the error Allowed memory size exhausted, then you can use the --memory-limit option fix the problem:
./vendor/bin/phpstan analyse --memory-limit=2G
Rules
A list of configurable rules specific to Laravel can be found here.
Custom PHPDoc types
A list of PHPDoc types specific to Larastan can be found here.
Custom PHPStan config parameters
A list of custom config parameters that you can use in your PHPStan config file can be found here.
Errors To Ignore
Some parts of Laravel are currently too magical for Larastan/PHPStan to understand. We listed common errors to ignore, add them as needed.
👊🏻 Contributing
Thank you for considering contributing to Larastan. All the contribution guidelines are mentioned here.
You can have a look at the CHANGELOG for constant updates & detailed information about the changes. You can also follow the Twitter account for the latest announcements or just come say hi!: @enunomaduro, @can__vural.
❤️ Support The Development
Do you like this project? Support it by donating
📖 License
OCStan is an open-sourced software licensed under the MIT license. Larastan is an open-sourced software licensed under the MIT license.
lemax10/ocstan 适用场景与选型建议
lemax10/ocstan 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 95 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「php」 「laravel」 「static analysis」 「octobercms」 「code analysis」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lemax10/ocstan 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lemax10/ocstan 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lemax10/ocstan 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Simple ASCII output of array data
Alfabank REST API integration
Package for view storage in laravel
User Approval Laravel Package
PHPUnit Pretty Result Printer
统计信息
- 总下载量: 95
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-07