bear/devtools
最新稳定版本:1.2.2
Composer 安装命令:
composer require bear/devtools
包简介
无描述信息
README 文档
README
Development tools and utilities for BEAR.Sunday framework applications.
Installation
composer require --dev bear/devtools
Features
Halo Module - Resource Development Inspector
The Halo module provides a visual development interface that appears around HTML representations of resources, offering detailed information about the resource being rendered.
Note: The Halo concept is inspired by the Seaside Smalltalk web framework, which pioneered this approach to visual web development debugging.
Features:
- Resource status and metadata display
- Interceptor chain visualization
- Direct links to resource class and template editors
- Request/response analysis
- Performance profiling integration
use BEAR\Dev\Halo\HaloModule; use Ray\Di\AbstractModule; class DevModule extends AbstractModule { protected function configure(): void { $this->install(new HaloModule($this)); } }
HttpResource Client - HTTP Testing Utility
HttpResource starts a built-in PHP server and provides an HTTP client interface for testing your BEAR.Sunday applications.
Features:
- Automatic local server startup
- HTTP request logging to file
- Full HTTP method support (GET, POST, PUT, DELETE, etc.)
- Request/response capture for testing workflows
use BEAR\Dev\Http\HttpResource; // Start server and create HTTP client $resource = new HttpResource('127.0.0.1:8099', '/path/to/index.php', '/path/to/curl.log'); // Make HTTP requests $ro = $resource->get('/users'); assert($ro->code === 200); $ro = $resource->post('/users', ['name' => 'John', 'email' => 'john@example.com']); assert($ro->code === 201);
HTTP Access Log
All HTTP requests made through HttpResource are automatically logged with full curl command equivalents:
curl -s -i 'http://127.0.0.1:8099/users'
HTTP/1.1 200 OK
Content-Type: application/hal+json
...
Requirements
- PHP 8.0 or higher
- BEAR.Sunday framework
Development
This package includes comprehensive development tools:
- Code Quality: PHPStan, Psalm, PHP_CodeSniffer
- Testing: PHPUnit with coverage reporting
- Profiling: XHProf integration (optional)
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 231.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 未知