定制 phoneburner/pinch-template 二次开发

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

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

phoneburner/pinch-template

最新稳定版本:v0.0.36

Composer 安装命令:

composer create-project phoneburner/pinch-template

包简介

The Pinch Application Template

README 文档

README

Note: This repository is a read-only subtree split of the Pinch Framework monorepo. Please submit issues and pull requests to the main repository.

About

The Pinch Template package provides a complete application starter template for building REST APIs with the Pinch Framework. This opinionated template includes pre-configured Docker setup, database migrations, testing infrastructure, and example implementations following the framework's type-safe, API-first philosophy.

Quick Start

Create a New Project

composer create-project phoneburner/pinch-template my-api
cd my-api

Initial Setup

  1. Configure Environment

    cp .env.dist .env
    # Edit .env with your configuration
  2. Build Docker Images and Install Dependencies

    make
  3. Start Docker Services

    docker compose up -d
  4. Run Database Migrations

    docker compose run --rm php pinch migrations:migrate
  5. Verify Installation

    curl http://localhost:8080/

Project Overview

my-api/
├── bin/               # Console commands
├── config/            # Configuration files
├── database/          # Database migrations
├── public/            # Web root
├── src/               # Application source code
├── tests/             # Test suites
├── storage/           # Cache and logs
├── .env.dist          # Environment template
├── composer.json      # Project Composer dependencies
├── compose.yaml       # Docker Compose configuration
├── Makefile           # Development commands
└── openapi.yaml       # API specification

Development

Common Commands

# Run tests
make test

# Code quality checks
make lint
make phpstan

Documentation

Troubleshooting

Common Issues

Docker services not starting:

docker compose down -v
docker compose up -d

Permission issues:

docker compose exec php chown -R www-data:www-data var/

Database connection errors:

  • Verify .env database settings
  • Check Docker network: docker compose ps
  • Verify database service: docker compose logs db

Contributing

This is a read-only repository. To contribute:

  1. Visit the main repository
  2. Submit issues and pull requests there
  3. Follow the contribution guidelines in the main repository

License

The Pinch Framework is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-07