承接 vangelis/todoordie 相关项目开发

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

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

vangelis/todoordie

最新稳定版本:v0.0.2

Composer 安装命令:

composer require vangelis/todoordie

包简介

Write TODOs in code that ensure you actually do them

README 文档

README

Latest Version on Packagist Tests Total Downloads

Keep your projects clean

To understand why you would ever call a function to write a comment, read on.

If you have some code you know you'll need to change later, don't just leave a comment for later that you'll never read, ever again.

For all the following cases, forgetting a TODO is NOT GOOD:

  • remove some code when the dependency support expires,
  • remove a feature flag,
  • update some code related to another project,
  • update a dependency when another refactoring is done,
  • ...

This can lead to nasty issues so make your TODOs speak up when they need to with this module ;)

You can now replace your simple comment with this function that will raise and error when the time or the condition are met and remind you to do something about it.

Caution

This can cause some production apps to break ! This code is named todoordie, not todo_and_kittens so be careful.

Pull-Requests are welcome to make this more production-ready !

Note this module has no warranty, see the LICENSE !

Installation

You can install the package via composer:

composer require vangelis/todoordie

Usage

This will raise an error if the date is reached or passed:

use Vangelis\TodoOrDie\TodoOrDie;

TodoOrDie::check('Test task', '2023-01-01');

This will not raise an error until the condition is met (in about 75 years):

use Vangelis\TodoOrDie\TodoOrDie;

TodoOrDie::check('Test task', '2099-01-01');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-20