承接 roniestein/package-macro-autocomplete 相关项目开发

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

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

roniestein/package-macro-autocomplete

Composer 安装命令:

composer require roniestein/package-macro-autocomplete

包简介

A helper package that allows barryvdh/laravel-ide-helper find and index macros stored in packages

README 文档

README

PackageMacroAutocomplete's only job is to pull your macro's into a file that PHPStorm and possibly other IDE's can read and place in your project so that you gain auto completion for package macros. This package is designed to be used as a helper for barryvdh/laravel-ide-helper

composer require roniestein/package-macro-autocomplete --dev

In your packages src directory simply add the file AutoCompletionHelper.php

Add the Macros you want to be imported into the ide as follows:

<?php
namespace Illuminate\Http;

/**
 * @method bool validate(array $rules, ...$params) Validate the given request with the given rules.
 * @method array validated() Get the validated data from the request.
 */
class Request
{
}


namespace Illuminate\Support;

use App\User;

/**
 * @method bool fiddler($roof) Check if he is on the roof.
 * @method array shaboom($shaboom) La la la la la la la
 * @method User user()
 */
class Collection
{
}

When you are ready to import all the organized macros in your package, simply run the command

php artisan autocomplete:generate

This will read AutoCompletionHelper.php files in each of the required packages and create a _package_macro_ide_helper.php file in your root directory with all the macros listed. PHPStorm will index that file and add the listed macro signatures to autocomplete.

autocomplete:generate takes one optional parameter that is the file name, however it will add on the php extension. If you want something other that the _package_macro_ide_helper.php, run

php artisan autocomplete:generate MyAwesomeFilename

and MyAwesomeFilename.php will be added to the root of your project for PHPStorm to consume.

To make this part of your build, add the command to your composer.json after barryvdh/laravel-ide-helper update scripts.

"scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi",
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:meta"
            "@php artisan autocomplete:generate"
        ],

``

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固