php-prosvirin-dev/laravel-env-sync 问题修复 & 功能扩展

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

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

php-prosvirin-dev/laravel-env-sync

最新稳定版本:v1.0.0

Composer 安装命令:

composer require php-prosvirin-dev/laravel-env-sync

包简介

Sync .env.example with .env file in Laravel

README 文档

README

A Laravel package that synchronizes your .env.example with .env file.

Features

  • Auto-sync - Adds missing variables from .env.example to .env
  • No overwrites - Preserves existing values
  • Extra variables detection
  • Backup support before force sync
  • Interactive add new variables
  • Interactive remove variables
  • Force sync with backup

Requirements

  • PHP 8.1 or higher
  • Laravel 10.x or 11.x

Installation

composer require php-prosvirin-dev/laravel-env-sync --dev

Usage

Basic sync:

php artisan env:sync

Force sync with backup:

php artisan env:sync --force

Add new variable:

php artisan env:sync --add

Remove variable:

php artisan env:sync --remove

CI/CD Integration

Use this package in your CI/CD pipeline to ensure .env files are always in sync with .env.example:

name: Check Environment Consistency

on: [push, pull_request]

jobs:
  check-env:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
          
      - name: Install Dependencies
        run: composer install
        
      - name: Check .env Consistency
        run: |
          php artisan env:sync
          git diff --exit-code

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固