定制 yohaw/pppr 二次开发

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

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

yohaw/pppr

最新稳定版本:v1.3.0

Composer 安装命令:

composer require yohaw/pppr

包简介

Prepare PHP Project Production Ready. This Extension about preparing PHP project production ready

README 文档

README

Latest Version License Total Downloads

Description

PPPR is a PHP package that helps you prepare your PHP project for production. It handles tasks such as setting up configuration files, copying .env files, and preparing your project structure, making it easier to deploy to a production environment.

PPPR - Prepare PHP Project Production Ready

PPPR is a PHP package that helps you prepare your PHP project for production. It handles tasks such as setting up configuration files, copying .env files, and preparing your project structure, making it easier to deploy to a production environment.

Features

  • Automatically prepares your PHP project for production.
  • Sets up necessary files like .env, .env.example, and other configurations.
  • Can be easily installed and integrated into any PHP project.

Installation

You can install PPPR via Composer, which is the preferred method of installation.

1. Install via Composer

To install the package, run the following command in the root directory of your PHP project:

composer require yohaw/pppr

This will add the PPPR package to your composer.json and install it into your project.

2. Manual Installation

If you prefer, you can also manually add the dependency in your composer.json file under the "require" section:

"require": {
    "yohaw/pppr": "^1.1"
}

Then run:

composer install

Usage

Once the package is installed, you can use it to prepare your PHP project for production.

Example: Using PPPR to Prepare Your Project

Create a PHP file where you want to trigger the preparation (for example, prepare.php):

<?php

require 'vendor/autoload.php';

use PPPR\App;

$project = new App();
$project->prepare();  // Calls the method to prepare your project for production

echo "Your project is now production-ready!";

How It Works

  • Configuration Files: PPPR can generate and copy configuration files, such as .env, .env.example, and others.
  • File Preparation: The package ensures that the project structure is set up for production with proper settings.

The example above demonstrates how to use the PrepareProject class from your package to execute the preparation process.

How to Update Your Package

If you update your PPPR package, follow these steps:

1. Increment the Version

In your composer.json, make sure to update the version number according to the changes made. For example:

"version": "1.1.0"

2. Commit and Tag the Version

Once you've made changes to your package, commit and tag the new version:

git add .
git commit -m "Update to version 1.1.0 - Added new features"
git tag v1.1.0
git push origin main
git push origin v1.1.0

3. Push Changes to Packagist

If you're distributing the package via Packagist, ensure that the version tag is detected. Packagist should automatically update, but you can manually check by going to your package page on Packagist.

4. Update Dependencies in Projects

Once the version is updated, other projects can use composer update to pull in the latest version.

composer update yohaw/pppr

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

This is a template you can adapt and update as needed. It provides clear installation, usage instructions, and versioning guidelines for your package.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-16