kistn/laravel-client 问题修复 & 功能扩展

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

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

kistn/laravel-client

Composer 安装命令:

composer require kistn/laravel-client

包简介

Laravel plugin for the Kistn PHP client

README 文档

README

Laravel package wrapping kistn/php-client. Provides auto-discovery service provider and an Artisan command.

Installation

composer require kistn/laravel

Auto-discovered via extra.laravel.providers — no manual registration needed.

Configuration

Publish the config file:

php artisan vendor:publish --tag=kistn-config

Set credentials in .env:

KISTN_BASE_URL=https://your-server.example
KISTN_PROJECT_ID=your-project-uuid-here
KISTN_TOKEN=your-api-token-here

work_dir defaults to base_path() (project root). cache_path defaults to storage_path('app/private/kistn/.inventory.hash').

File transmission

By default the package uploads your lock and manifest files to the Kistn server along with the inventory (composer.lock, composer.json, vendor/composer/installed.json, package-lock.json, package.json). Control this per ecosystem:

KISTN_TRANSMIT_COMPOSER_FILES=true   # true | false | on-demand
KISTN_TRANSMIT_NPM_FILES=true        # true | false | on-demand
  • true — always upload.
  • false — never upload (inventory metadata only).
  • on-demand — upload only when the package manager CLI is unavailable server-side.

Any unrecognized value falls back to false (never upload). Set these to false if you do not want manifest contents leaving your environment.

Usage

php artisan inventory:push

Runs all configured collectors (Composer + npm) and pushes changed inventory to the server. Safe to run on every deploy — skips push when nothing changed.

How It Works

The ServiceProvider binds InventoryPusher as a singleton, wiring up:

  • InventoryClient backed by Guzzle
  • ComposerCollector pointing at work_dir, with installed.json preferred over composer.lock when present
  • NpmCollector pointing at work_dir
  • LocalHashCache at cache_path

See kistn/php-client for the full push flow.

Testing

composer run pest
composer run ci:check   # phpstan + rector:check + pest

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固