awcodes/hydro 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

awcodes/hydro

Composer 安装命令:

composer create-project awcodes/hydro

包简介

This is a command-line tool that replaces the need to use Filament's Plugin Skeleton through GitHub by allowing local setup of your plugin from the start.

README 文档

README

A Hydro CLI Tool.

This is a command-line tool that replaces the need to use Filament's Plugin Skeleton through GitHub by allowing local setup of your plugin from the start.

Requirements

  • PHP 8.0+

Installation

composer global require awcodes/hydro

Upgrading

composer global update awcodes/hydro

Usage

Make sure ~/.composer/vendor/bin is in your terminal's path.

cd ~/<working-directory>
hydro new AwesomePlugin

Customizing Hydro

While the default actions Hydro provides are great, most users will want to customize at least a few of the steps. Thankfully, Hydro is built to be customized!

There are three ways to customize your usage of Hydro: command-line arguments or a config file.

Most users will want to set their preferred configuration options once and then never think about it again. That's best solved by creating a config file.

But if you find yourself needing to change the way you interact with Hydro on a project-by-project basis, you may also want to use the command-line parameters to customize Hydro when you're using it.

Creating a config file

You can create a config file at ~/.hydro/config rather than pass the same arguments each time you create a new project.

The following command creates the file, if it doesn't exist, and edits it:

hydro edit-config

The config file contains the configuration parameters you can customize, and will be read on every usage of Hydro.

Using command-line parameters

Any command-line parameters passed in will override Hydro's defaults and your config settings. See a full list of the parameters you can pass in.

Hydro Commands

  • help or help-screen show the help screen

  • edit-config edits your config file (and creates one if it doesn't exist)

    hydro edit-config

Configurable parameters

You can optionally pass one or more of these parameters every time you use Hydro. If you find yourself wanting to configure any of these settings every time you run Hydro, that's a perfect use for the config files.

  • -e or --editor to define your editor command. Whatever is passed here will be run as $EDITOR . after creating the project.

    # runs "code ." in the project directory after creating the project
    hydro new AwesomePlugin --editor=code
  • -p or --path to specify where to install the application.

    hydro new AwesomePlugin --path=~/Sites
  • -m or --message to set the first Git commit message.

    hydro new AwesomePlugin --message="This filament plugin runs fast!"
  • -f or --force to force install even if the directory already exists

    # Creates a new scaffolding after deleting ~/Sites/awesome-plugin  
    hydro new AwesomePlugin --force

GitHub Repository Creation

Important: To create new repositories Hydro requires one of the following tools to be installed:

Hydro will give you the option to continue without GitHub repository creation if neither tool is installed.

  • -g or --github to Initialize a new private GitHub repository and push your new project to it.
# Repository created at https://github.com/<your_github_username>/awesome-plugin
hydro new AwesomePlugin --github
  • Use --gh-public with --github to make the new GitHub repository public.
hydro new AwesomePlugin --github --gh-public
  • Use --gh-description with --github to initialize the new GitHub repository with a description.
hydro new AwesomePlugin --github --gh-description='My awesome Filament plugin'
  • Use --gh-homepage with --github to initialize the new GitHub repository with a homepage url.
hydro new AwesomePlugin --github --gh-homepage=https://example.com
  • Use --gh-org with --github to initialize the new GitHub repository with a specified organization.
# Repository created at https://github.com/acme/awesome-plugin
hydro new AwesomePlugin --github --gh-org=acme

awcodes/hydro 适用场景与选型建议

awcodes/hydro 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 13, 最近一次更新时间为 2023 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 awcodes/hydro 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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