定制 rockero-cz/starter-kit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

rockero-cz/starter-kit

最新稳定版本:1.3.3

Composer 安装命令:

composer require rockero-cz/starter-kit

包简介

Speed up the kickoff of your Laravel projects.

README 文档

README

Laravel Starter Kit

Rockero Latest Version on Packagist Total Downloads Software License

Installation

Our starter-kit requires Laravel with version 10 or higher.

Install the package via composer:

composer require rockero-cz/laravel-starter-kit --with-all-dependencies

You can customize the installation command by publishing the config file with:

php artisan vendor:publish --tag="starter-kit-config"

Then run the installation command:

php artisan starter-kit:install

Features

All functionally of rockero-cz/laravel-starter-kit are described bellow in a simple list with examples. They are designed to speed up the kickoff of your projects. It can be installed on any kind of Laravel application.

Pest setup

The starter kit includes the initial setup of Pest by publishing a pre-configured TestCase, example tests and also .env.testing file.

Additionally, it generates an ArchitectureTest.php to maintain the codebase clean and sustainable.

test('globals')
    ->expect(['dd', 'dump', 'ray', 'env'])
    ->not->toBeUsed();

test('controllers')
    ->expect('App\Http\Controllers')
    ->not->toUse('Illuminate\Http\Request');

test('value objects')
    ->expect('App\ValueObjects')
    ->toUseNothing();

PHPStan setup

Besides tests, it also prepares static analysis using the PHPStan tool with custom configuration on level 7.

includes:
    - ./vendor/larastan/larastan/extension.neon

parameters:
    level: 7

    checkMissingIterableValueType: false
    checkGenericClassInNonGenericObjectType: false

    paths:
        - app/

Duster setup

For linting and formatting we use Duster by Tighten. Duster unifies multiple tools together (Pint, TLint, PHP_CodeSniffer and PHP CS Fixer) inside one powerful command. It also helps us to follow some coding standards.

We also have added PHPStan inside config to have everything unified in one single command.

{
    "scripts": {
        "lint": {
            "phpstan": ["./vendor/bin/phpstan", "analyse"]
        },
        "fix": {
            "phpstan": ["./vendor/bin/phpstan", "analyse"]
        }
    }
}

GitHub Workflows CI

During the installation of the starter-kit, you will be prompted to add CI for GitHub Workflows.

If you choose to proceed, a ci.yml file containing tests and Duster will be automatically generated.

To allow github action to commit changes from duster and prettier you have to set permissions for that.

Set Read and write permissions in github.com -> (Your project) -> Settings -> Actions -> General -> Workflow permissions

Prettier

During the installation of the starter-kit, you will be prompted to add Prettier to CI and project.

Installation prepare .prettierrc where is configuration and command php artisan prettier to fix your code on local environment.

You can use the .prettierignore file to ignore any files or directories that you want. This can be useful for keeping Prettier from formatting files that you don't want it to format, or for keeping Prettier from formatting files that are not code files.

Stubs

Publish Laravel's default stubs so we have unified source code across projects.

They are also slightly modified to make the programming process more productive.

Commands

Since we follow the Action programming concept, the starter kit provides two commands which will make you more productive.

Make action command: php artisan make:action VerifyUserAction

class VerifyUserAction
{
    /**
     * Run the action.
     */
    public function run(): void
    {
        //
    }
}

Make class command: php artisan make:class ShoppingCart

class ShoppingCart
{
    //
}

Both commands have an option --test to also create matching tests.

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

rockero-cz/starter-kit 适用场景与选型建议

rockero-cz/starter-kit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.28k 次下载、GitHub Stars 达 33, 最近一次更新时间为 2022 年 10 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 rockero-cz/starter-kit 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 33
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-08