pixelated-au/streamline 问题修复 & 功能扩展

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

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

pixelated-au/streamline

Composer 安装命令:

composer require pixelated-au/streamline

包简介

Self-update your Laravel deployment

README 文档

README

GitHub Tests Action Status Total Downloads

This specialised tool is designed to help you self-update your Laravel deployment directly from GitHub.

This project assumes your package includes all built front-end JavaScript assets.

Using artisan, you can update the package via the CLI or a tool such as Laravel Envoy.

Installation

During beta, you can install the package via composer:

composer require pixelated-au/streamline:dev-main

You can publish the config file with:

php artisan vendor:publish --tag="streamline-config"

You will need to set the following environment variables in your .env file.

  • Replace [github] and [project-name] with your GitHub repository.
  • Version installed is the version of the package that is currently installed. It will be set automatically.
STREAMLINE_GITHUB_RELEASE_REPOSITORY=[github]/[project-name]
STREAMLINE_APPLICATION_VERSION_INSTALLED=v0.0.0

Events

This library emits two events for hooking into updates:

  • \Pixelated\Streamline\Events\AvailableVersionsUpdated Emits when it's pulled down the available versions from GitHub
  • \Pixelated\Streamline\Events\InstalledVersionSet Emits when the current, installed version has been set
  • \Pixelated\Streamline\Events\NextAvailableVersionUpdated Emits when the next available version has been set

Artisan Console

There are several Artisan commands that you can interact with:

  • streamline:check Check for an available update
  • streamline:clean-assets Tidy up the front-end build assets directory. Default values are configured in config/streamline.php. This can be set using a schedule
  • streamline:list Retrieves the available updates from GitHub and stores them in the cache
  • streamline:run-update CLI update of the software. Make sure to back up first!

Questions

What is the point of this project?

Unlike other updater projects available (which are excellent by the way), this runs an update by calling an external PHP script/class. For performance reasons, Laravel loads classes dynamically. If updating directly within Laravel, the application may fail to load classes that have been removed/deprecated causing the update to fail, leaving a broken site. This project runs an update by calling an external PHP script/class, ensuring that during the update, there is an extremely low chance of the update failing.

Why is does this project assume all front-end assets will be pre-compiled?

To bypass any potential compilation needs. Building a release of a project using something like CI or doing it locally ensures that when it's deployed, there are no post-processing requirements. For example, you don't need to have NPM or Node installed. You don't need to worry about the version of Node that's installed either. It simplifies updates

Does this need Composer installed? OR How do I run Composer to install dependencies?

Yes, Composer is required to install dependencies. It happens automatically as part of the update.

Who is this for?

It was built so that a project could be deployed on single-instance machines, not unlike upgrading a WordPress instance. It's designed to simplify deployment - moving the build/dependency mechanics into a centralised place such as CI. For example, this could be used inside a cPanel hosting environment.

Who's it not for?

If you have a project being deployed onto virtual machines inside dedicated environments, other 'updater' projects may suit your needs more than this project. That said, this project was designed with extensibility in mind. As such, if you're keen to extend it, you can either do a pull request or extend it locally in your project.

Extending/Customising

Streamline is built upon a pipeline architecture, so you can inject your own steps into the update process. For example, if you wish to make it build your front-end assets instead of using pre-built assets, you can create a new pipeline step.

Use the config file config/streamline.php to customise the update process to suit your needs.

You can also create your own implementation of Pixelated\Streamline\Interfaces\UpdateBuilderInterface which is the tool to progressively gather information about the update process before the final update is run.

Changelog

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

TODO

  • Detect if the GitHub token has expired. If so, output an error to the user

License

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

pixelated-au/streamline 适用场景与选型建议

pixelated-au/streamline 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 218 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 pixelated-au/streamline 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-17