承接 laravel-attributes/todo 相关项目开发

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

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

laravel-attributes/todo

最新稳定版本:1.1.0

Composer 安装命令:

composer require laravel-attributes/todo

包简介

A Laravel package to scan #[TODO] attributes.

README 文档

README

Laravel TODO Attribute Scanner

A small Laravel package that helps you track and manage technical debt by scanning your codebase for #[TODO] attributes.

Features ✨

  • Multi-level Scanning - Find TODOs in classes, methods, and functions
  • Customizable Sources - Scan specific directories or files
  • Clear Reporting - Beautiful console table output with counts
  • Custom Messages - Add detailed TODO descriptions
  • Laravel Integration - Native Artisan command integration
  • Modern PHP With Laravel - Built for Laravel with PHP 8.1+ with attributes

Installation 📦

  1. Install via Composer:
composer require laravel-attributes/todo
  1. The package will auto-register its service provider and command.

Usage 🚀

Adding TODOs 📝

Class-level TODO

use IMohamedSheta\Todo\Attributes\TODO;
use IMohamedSheta\Todo\Enums\Priority;

#[TODO('Need to create extractChunks.', Priority::Medium)]
class ExcelTextExtractor
{
    // Class implementation...
}

Basic Scan

Scan default directory (app):

php artisan todo

Sample Output

🔍 Scanning for TODOs...

+----------+------------------------------------------------------+----------+----------------------------------+
| Type     | Class/Method/Function                                | Priority | Message                          |
+----------+------------------------------------------------------+----------+----------------------------------+
| Class    | App\Extractors\FileTextExtractors\ExcelTextExtractor | Medium   | Need to create extractChunks.    |
| Method   | App\Actions\Auth\RegisterAction::createClinicAdmin() | High     | Generate a unique billing code   |
| Function | app\Helpers\helpers.php -> array_only()              | Medium   | Not finished yet                 |
+----------+------------------------------------------------------+----------+----------------------------------+

🎯 Total TODOs Found: 3

Method-level TODO

use IMohamedSheta\Todo\Attributes\TODO;
use IMohamedSheta\Todo\Enums\Priority;

class RegisterAction
{
    #[TODO('Generate a unique billing code for the clinic', Priority::High)]
    public function createClinicAdmin()
    {
        // Method implementation...
    }
}

Function-level TODO

use IMohamedSheta\Todo\Attributes\TODO;
use IMohamedSheta\Todo\Enums\Priority;

#[TODO('Not finished yet', Priority::Medium)]
function array_only()
{
    // Function logic...
}

Configuration ⚙️

Default Message

When no message is provided:

#[TODO] // Shows "Not finished yet" in output and priority medium as default
class PendingFeature
{
    // ...
}

Custom Source Directories

Scan specific directories:

php artisan todo --src=app/Http/Controllers

License 📄

This package is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-03