定制 inmanturbo/module-compiler 二次开发

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

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

inmanturbo/module-compiler

Composer 安装命令:

composer require inmanturbo/module-compiler

包简介

Build single file patche stubs for laravel projects

README 文档

README

Latest Version on Packagist Total Downloads

Installation

composer require --dev inmanturbo/module-compiler

Usage

First create a build module

Example build module: (Create at path modules/test-one-two.php)

<?php

// BEGIN_FILE: (app/Models/TestOne.php)

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class TestOne extends Model
{
    use HasFactory;
}

// END_FILE

// BEGIN_FILE: (app/Models/TestTwo.php)

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class TestTwo extends Model
{
    use HasFactory;
}

// END_FILE

Next run the build command

php artisan build test-one-two.php

example output:

Created directory: /path/to/your/project/app/Models
Built file: app/Models/TestOne.php
Built file: app/Models/TestTwo.php
All modules have been built successfully.
php artisan build --help  
Description:
  Compile modules into their respective files

Usage:
  build [options] [--] [<module>...]

Arguments:
  module                           File containing code that should be split out into one or more files

Options:
      --module-path[=MODULE-PATH]  Directory under which modules will be found [default: "modules"]
      --build-path[=BUILD-PATH]    Leave empty for `base_path()`
      --realpath                   Use realpath for module and build path(s)
  -h, --help                       Display help for the given command. When no command is given display help for the list command
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output
  -n, --no-interaction             Do not ask any interactive question
      --env[=ENV]                  The environment the command should run under
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
php artisan combine --help
Description:
  Combine one or more PHP files into a single module file

Usage:
  combine [options] [--] <files>...

Arguments:
  files                            Path to one or more PHP files to combine, relative to build-path

Options:
      --module-path[=MODULE-PATH]  The name of the build modules directory [default: "modules"]
      --build-path[=BUILD-PATH]    The base path to find the files under (leave empty for `base_path()`
      --realpath                   Indicates indicates provided paths will be absolute
      --module[=MODULE]            The name of the build module file [default: "app.php"]
  -h, --help                       Display help for the given command. When no command is given display help for the list command
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output
  -n, --no-interaction             Do not ask any interactive question
      --env[=ENV]                  The environment the command should run under
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Todo Roadmap

  • Minify built files.
  • Phar compression.
  • Adminer compression.
  • Frankenphp binaries.

inmanturbo/module-compiler 适用场景与选型建议

inmanturbo/module-compiler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 167 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 10 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 inmanturbo/module-compiler 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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