承接 ingenioz-it/php-skeleton 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ingenioz-it/php-skeleton

最新稳定版本:v2.1.0

Composer 安装命令:

composer create-project ingenioz-it/php-skeleton

包简介

A clean new PHP project

README 文档

README

Bored of manually setting up your PHP projects ?
This is the solution !

Table of contents

Description

This is a skeleton for PHP projects that focus on code quality.
It contains pretty much everything you need to start a new project :

  • Code quality
    • A working unit test (using PHPUnit) to bootstrap your coding experience
    • A mutation testing framework (Infection) to enforce the quality of your tests
    • A linter (phpcs) to make sure your code respects the PSR standards
    • Static analysis (phpstan) to check for errors
    • Code smell check (phpmd) to check if your code needs improvement
    • An automated refactoring tool (Rector) to help you keep your code up to date
    • Composer scripts to easily use all the above
  • Infrastructure
    • Docker support
      • A Makefile to manage docker commands with ease
    • GitHub Actions to automatically run the tests and quality tools on every push and pull request
      • It also uploads a code coverage report to CodeCov

Installation

To create a new project based on this skeleton, run the following command:

composer create-project ingenioz-it/php-skeleton {PROJECT_NAME}

Requirements

PHP 8.5+ or Docker.

Getting started

1. Install the dependencies

If you are using docker:

make install

If you are using your local environment:

composer install

2. Run the tests

If you are using docker:

make test

If you are using your local environment:

composer fulltest

3. Time to code

The previous steps went well ?

You are now ready to start coding !

Scripts

The project comes with a few useful scripts to help you manage docker and run the various quality tools.

You can list them by running

make help

Important scripts

For a complete list of the available commands:

make help

The main scripts are:

  • composer testdox: run the tests
  • composer fulltest: run all the quality tools
  • composer doc: generate the documentation from the tests (including mutation testing and code coverage), and puts it inside the doc folder

And if you are using docker:

  • make start/stop/restart: start/stop/restart the Docker container
  • make bash: open a terminal inside the Docker container (run exit to close it)
  • make exec -- {command}: execute a command inside the Docker container

Environments

This project supports multiple environments.

Two environments are available from the start:

  • cli-dev: a cli project
  • web-dev: a web project

You can switch between environments by changing the ENVIRONMENT variable inside the infra/.env file.

You can create new environments by creating a new folder inside the infra/ folder, with a docker-compose.yml file inside it.

Customize your app

Make the project truly yours by doing the following:

  • Update the composer.json with your project's information
  • Update the README.md file to describe your project
  • Update the LICENSE file with your favorite license

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 0
  • 开发语言: Makefile

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-08