承接 cspray/phinal 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

cspray/phinal

最新稳定版本:2.1.1

Composer 安装命令:

composer require cspray/phinal

包简介

Enforce final on your classes!

README 文档

README

Do you like final? Really like it? Then enforce it on all your classes! When you have to fallback to inheritance you can do so by explicitly marking your class with an Attribute and explaining why it should be inherited.

Installation

Running Psalm 6

composer require --dev cspray/phinal vendor/bin/psalm-plugin enable cspray/phinal 

Running Psalm 5

composer require --dev cspray/phinal:2.1 vendor/bin/psalm-plugin enable cspray/phinal 

Running Psalm 4

composer require --dev cspray/phinal:1.0.0 vendor/bin/psalm-plugin enable cspray/phinal 

Code Examples

Good! ????

<?php declare(strict_types=1); use Cspray\Phinal\AllowInheritance; final class ProperlyMarkedFinal {} #[AllowInheritance('Explain why you would need to inherit this.')] class YouCanInheritThis {}

Bad! ????

<?php declare(strict_types=1); class NotMarkedFinal {}

Why do you need to inherit this? You probably don't need to and should mark it final!

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固