承接 kallbuloso/laravel-packager 相关项目开发

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

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

kallbuloso/laravel-packager

Composer 安装命令:

composer require kallbuloso/laravel-packager

包简介

A cli tool for creating Laravel packages.

README 文档

README

Latest Version on Packagist Total Downloads Software License

Informação muito importante!

kallbuloso/laravel-packager é um pacote do Laravel que foi criado para gerar e gerenciar pacotes (Packages) e reutilizálos em sua aplicação Laravel. O laravel-packager é um pacote suportado e testado no Laravel ^6.*.

O laravel-packager é na verdade uma versão ligeiramente modificada de Jeroen-G/laravel-packager. Eu criei a minha própria versão do laravel-packager porque queria ter controle total sobre como os comandos são gerenciados, e também tenho minhas próprias necessidades quanto ao que preciso que o pacote faça.

Se você achar que Jeroen-G/laravel-packager atende às suas necessidades melhor do que kallbuloso/laravel-packager, por qualquer motivo, use essa. Minha versão do pacote é destinada principalmente para as minhas próprias necessidades e não pretende ser um substituto ou concorrente para o outro pacote.

Segue daqui...

This package provides you with a simple tool to set up a new package and it will let you focus on the development of the package instead of the boilerplate.

Installation

Via Composer

$ composer require kallbuloso/laravel-packager --dev

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:

kallbuloso\Packager\PackagerServiceProvider::class,

If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider. Be aware that the auto-discovery also means that this package is loaded in your production environment. Therefore you may disable auto-discovery and instead put in your AppServiceProvider something like this:

if ($this->app->environment('local')) {
    $this->app->register('kallbuloso\Packager\PackagerServiceProvider');
}

Optional you can publish the configuration to provide a different service provider stub. The default is here.

$ php artisan vendor:publish --provider="kallbuloso\Packager\PackagerServiceProvider"

Available commands

New

Command:

$ php artisan packager:new MyVendor MyPackage

Result:

O comando irá lidar com praticamente tudo para você. Ele criará um diretório de pacotes, cria o fornecedor e o diretório de pacotes, puxa um pacote básico, configura o composer.json e cria um provedor de serviços.

Nota

  • após instalar, em composer.json/repositories acerte o caminho de onde está repositório em url,
  • abra o terminal no diretório do package criado e digite o seguinte comando;
$ composer dump
  • em seguida com o terminal aberto no diretório raíz do projeto digite;
$ composer require MyVendor/MyPackage

Options:

$ php artisan packager:new MyVendor MyPackage --i
$ php artisan packager:new --i

The package will be created interactively, allowing to configure everything in the package's composer.json, such as the license and package description.

Remarks: The new package will be based on this custom skeleton.

Get & Git

Command:

$ php artisan packager:get https://github.com/author/repository
$ php artisan packager:git https://github.com/author/repository

Result: This will register the package in the app's composer.json file. If the packager:git command is used, the entire Git repository is cloned. If packager:get is used, the package will be downloaded, without a repository. This also works with Bitbucket repositories, but you have to provide the flag --host=bitbucket for the packager:get command.

Options:

$ php artisan packager:get https://github.com/author/repository --branch=develop
$ php artisan packager:get https://github.com/author/repository MyVendor MyPackage
$ php artisan packager:git https://github.com/author/repository MyVendor MyPackage

It is possible to specify a branch with the --branch option. If you specify a vendor and name directly after the url, those will be used instead of the pieces of the url.

Tests

Command:

$ php artisan packager:tests

Result: Packager will go through all maintaining packages (in packages/) and publish their tests to tests/packages. Add the following to phpunit.xml (under the other testsuites) in order to run the tests from the packages:

<testsuite name="Packages">
    <directory suffix="Test.php">./tests/packages</directory>
</testsuite>

Options:

$ php artisan packager:tests MyVendor MyPackage

Remarks: If a tests folder exists, the files will be copied to a dedicated folder in the Laravel App tests folder. This allows you to use all of Laravel's own testing functions without any hassle.

List

Command:

$ php artisan packager:list

Result: An overview of all packages in the /packages directory.

Remove

Command:

$ php artisan packager:remove MyVendor MyPackage

Result: The MyVendor\MyPackage package is deleted, including its references in composer.json and config/app.php.

Publish

Command:

$ php artisan packager:publish MyVendor MyPackage https://github.com/myvendor/mypackage

Result: The MyVendor\MyPackage package will be published to Github using the provided url.

Check

Command:

$ php artisan packager:check MyVendor MyPackage

Result: The MyVendor\MyPackage package will be checked for security vulnerabilities using SensioLabs security checker.

Remarks You first need to run

$ composer require sensiolabs/security-checker

Issues with cURL SSL certificate

It turns out that, especially on Windows, there might arise some problems with the downloading of the skeleton, due to a file regarding SSL certificates missing on the OS. This can be solved by opening up your .env file and putting this in it:

CURL_VERIFY=false

Of course this means it will be less secure, but then again you are not supposed to run this package anywhere near a production environment.

Extensions

DelveFore started to work on a cool project to use various Artisan make: commands for the packages, check it out!

Changelog

Please see changelog.md for what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Credits

License

kallbuloso/laravel-packager 适用场景与选型建议

kallbuloso/laravel-packager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 11 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「package」 「laravel」 「Skeleton」 「packager」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 kallbuloso/laravel-packager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 kallbuloso/laravel-packager 我们能提供哪些服务?
定制开发 / 二次开发

基于 kallbuloso/laravel-packager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: EUPL-1.1
  • 更新时间: 2019-11-28