krubio/perfect-autowire 问题修复 & 功能扩展

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

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

krubio/perfect-autowire

Composer 安装命令:

composer require krubio/perfect-autowire

包简介

Perfect-Autowire is a PHP-based project that focuses on autowiring and routing.

README 文档

README

Description

Perfect-Autowire is a PHP-based project that focuses on autowiring and routing. It is designed to offer a highly decoupled architecture, employing SOLID Principles and best practices for scalable and maintainable code. It uses native PHP features and incorporates a custom-built router and dependency injection container.

Installation

  1. Clone this repository.
  2. Navigate to the project folder and run composer install to install dependencies.
  3. Configure your web server to point to the public directory.
  4. Start your web server and navigate to the project URL.

Features

  • Autowiring: Automatic resolution of dependencies for controllers and services.
  • Routing: A simple yet powerful custom router, supporting multiple HTTP methods and dynamic parameters.
  • SOLID Compliant: The architecture is built on SOLID principles for maintainability and scalability.

Usage

After setting up the project, routes can be defined by annotating controller methods. The router will automatically register routes from controllers in the specified directory.

Example Route Definition

#[Route('/person/([1-9][0-9]*)', ['GET', 'POST'])]
public function show(string $id): void {
// Implementation
}

Route Handling

Routes are dispatched by the Router class, which can be extended to add custom behavior or middleware.

Testing

Run `phpunit` to execute the test suite, which aims for 100% coverage.
Check code quality metrics and adhere to coding standards.

Dependencies

PHP 8.0 or higher
PHPUnit for testing

Contributions

Pull requests are welcome, following the project's coding standards and passing all existing tests.

License

This project is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-25