Skip to content

Commit 41ed893

Browse files
committed
feat: Adiciona notas de lançamento e resumo para a versão 1.0.1, destacando melhorias de desempenho e compatibilidade
1 parent bc85637 commit 41ed893

File tree

3 files changed

+411
-0
lines changed

3 files changed

+411
-0
lines changed

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,67 @@ All notable changes to PivotPHP Cycle ORM will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.1] - 2025-07-09
9+
10+
### 🚀 **Performance & Compatibility Update**
11+
12+
This release focuses on performance optimizations, cross-platform compatibility, and code quality improvements following the PivotPHP Core v1.1.0 upgrade.
13+
14+
#### 🔄 **Updated**
15+
- **PivotPHP Core**: Updated to v1.1.0 with performance improvements for auto stress scenarios
16+
- **Environment Detection**: Centralized environment detection using `EnvironmentHelper` to reduce code duplication
17+
- **Caching System**: Implemented static caching for environment methods with 7x performance improvement
18+
- **Testing Infrastructure**: Clean PHPUnit exit codes (0) for better CI/CD integration
19+
20+
#### 🌐 **Added**
21+
- **Cross-Platform Support**: Added platform-specific scripts for test coverage
22+
- `scripts/test-coverage.sh` for Unix/Linux/macOS
23+
- `scripts/test-coverage.bat` for Windows CMD
24+
- `scripts/test-coverage.ps1` for PowerShell
25+
- `scripts/test-coverage.php` for universal PHP-based execution
26+
- **Cache Management**: Added `EnvironmentHelper::clearCache()` method for testing scenarios
27+
- **Performance Benchmarks**: Added benchmark scripts to demonstrate caching benefits
28+
29+
#### 🔧 **Fixed**
30+
- **CI/CD Compatibility**: Fixed PHPUnit exit codes that were causing CI failures
31+
- **Log Pollution**: Suppressed test-specific error logs in testing environment
32+
- **PSR-12 Compliance**: Fixed all code style violations
33+
- **Cross-Platform Issues**: Resolved Windows compatibility issues with inline environment variables
34+
35+
#### 🏗️ **Refactored**
36+
- **Environment Helper**: Centralized cache system using single static array
37+
- **Metrics Collector**: Simplified environment detection using `EnvironmentHelper::isTesting()`
38+
- **Test Configuration**: Optimized PHPUnit configuration for better performance and compatibility
39+
- **Code Organization**: Removed duplicate composer files and obsolete scripts
40+
41+
#### 📊 **Performance Improvements**
42+
- **Environment Detection**: 7x faster performance on subsequent calls with static caching
43+
- **Test Execution**: Reduced test execution time by eliminating unnecessary coverage overhead
44+
- **Memory Usage**: Optimized memory usage by reducing redundant environment checks
45+
46+
#### 🧪 **Testing Enhancements**
47+
- **Clean Exit Codes**: PHPUnit now returns proper exit code 0 for successful test runs
48+
- **CI-Friendly**: Removed confusing error logs from test output
49+
- **Coverage Separation**: Coverage generation is now optional and platform-independent
50+
51+
#### 📚 **Documentation**
52+
- **Cross-Platform Guide**: Updated documentation with platform-specific instructions
53+
- **Performance Notes**: Added performance improvement documentation
54+
- **CLI Usage**: Enhanced CLAUDE.md with better development workflow guidance
55+
56+
#### 🔍 **Technical Details**
57+
- **Compatibility**: Maintains full backward compatibility with existing APIs
58+
- **Dependencies**: Updated to PivotPHP Core v1.1.0 from Packagist
59+
- **Testing**: 67 tests passing with 242 assertions
60+
- **Static Analysis**: PHPStan Level 8 compliance maintained
61+
- **Code Style**: 100% PSR-12 compliant
62+
63+
#### 🎯 **Benefits**
64+
- **Faster Development**: Improved environment detection performance
65+
- **Better CI/CD**: Clean test outputs and exit codes
66+
- **Cross-Platform**: Works seamlessly on Windows, macOS, and Linux
67+
- **Production Ready**: Optimized for high-performance production environments
68+
869
## [1.0.0] - 2025-07-07
970

1071
### 🎉 **Initial Stable Release**

RELEASE_NOTES_1.0.1.md

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
# 🚀 PivotPHP Cycle ORM v1.0.1 - Release Notes
2+
3+
**Release Date:** July 9, 2025
4+
**Version:** 1.0.1
5+
**Type:** Performance & Compatibility Update
6+
7+
---
8+
9+
## 📋 Overview
10+
11+
This release focuses on **performance optimizations**, **cross-platform compatibility**, and **code quality improvements** following the PivotPHP Core v1.1.0 upgrade. This is a maintenance release that maintains 100% backward compatibility while delivering significant performance improvements and better developer experience.
12+
13+
## 🎯 Key Highlights
14+
15+
### 🚀 **Performance Boost**
16+
- **7x faster environment detection** with static caching
17+
- **Reduced memory usage** by eliminating redundant checks
18+
- **Optimized test execution** with clean PHPUnit configuration
19+
20+
### 🌐 **Cross-Platform Support**
21+
- **Universal compatibility** across Windows, macOS, and Linux
22+
- **Platform-specific scripts** for different environments
23+
- **Resolved Windows CMD issues** with environment variables
24+
25+
### 🔧 **CI/CD Improvements**
26+
- **Clean exit codes** for better CI/CD integration
27+
- **Suppressed test noise** for cleaner CI outputs
28+
- **PHPUnit optimization** for faster test execution
29+
30+
## 📊 Performance Improvements
31+
32+
### Environment Detection Optimization
33+
```php
34+
// Before: Multiple function calls, array recreations
35+
// After: Single static cache lookup
36+
37+
// Benchmark Results:
38+
// First call: 2.15 μs
39+
// Cached calls: 0.30 μs
40+
// Speed improvement: 7x faster
41+
```
42+
43+
### Memory Usage Optimization
44+
- **Reduced object allocations** in environment detection
45+
- **Centralized caching** eliminates duplicate data structures
46+
- **Optimized PHPUnit configuration** reduces memory overhead
47+
48+
## 🌐 Cross-Platform Compatibility
49+
50+
### New Scripts Added
51+
```bash
52+
# Universal (works everywhere)
53+
composer test-coverage
54+
55+
# Platform-specific alternatives
56+
./scripts/test-coverage.sh # Unix/Linux/macOS
57+
scripts\test-coverage.bat # Windows CMD
58+
scripts\test-coverage.ps1 # PowerShell
59+
php scripts/test-coverage.php # PHP-based (universal)
60+
```
61+
62+
### Resolved Issues
63+
-**Windows CMD compatibility** with environment variables
64+
-**PowerShell support** for modern Windows development
65+
-**Unix shell consistency** across different shells
66+
-**Cross-platform path handling** in scripts
67+
68+
## 🔄 Major Updates
69+
70+
### 1. **PivotPHP Core v1.1.0 Integration**
71+
- **Updated dependency** from `*@dev` to `^1.1.0`
72+
- **Auto stress performance** improvements inherited
73+
- **Production-ready** Packagist distribution
74+
- **Removed local development dependencies**
75+
76+
### 2. **Environment Detection Refactoring**
77+
```php
78+
// Before: Duplicated logic in multiple places
79+
$isTestingEnv = (
80+
(isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'testing') ||
81+
(isset($_SERVER['APP_ENV']) && $_SERVER['APP_ENV'] === 'testing') ||
82+
defined('PHPUNIT_RUNNING')
83+
);
84+
85+
// After: Centralized and cached
86+
if (!EnvironmentHelper::isTesting()) {
87+
error_log('Query failed: ' . $query);
88+
}
89+
```
90+
91+
### 3. **Caching System Implementation**
92+
```php
93+
// Centralized cache with type safety
94+
private static array $cache = [];
95+
96+
public static function clearCache(): void
97+
{
98+
self::$cache = [];
99+
}
100+
```
101+
102+
## 🧪 Testing Enhancements
103+
104+
### PHPUnit Configuration Optimization
105+
- **Removed unnecessary coverage** from default test runs
106+
- **Clean exit codes** (0) for successful test runs
107+
- **Suppressed test-specific logs** in testing environment
108+
- **Faster test execution** without coverage overhead
109+
110+
### Test Results
111+
```
112+
PHPUnit 10.5.47 by Sebastian Bergmann and contributors.
113+
Runtime: PHP 8.4.8
114+
Configuration: /home/.../phpunit.xml
115+
116+
................................................................. 65 / 67 ( 97%)
117+
.. 67 / 67 (100%)
118+
119+
Time: 00:00.210, Memory: 16.00 MB
120+
OK (67 tests, 242 assertions)
121+
Exit code: 0 ✅
122+
```
123+
124+
## 🔧 Bug Fixes
125+
126+
### Fixed Issues
127+
- **CI/CD Exit Codes**: PHPUnit now returns proper exit code 0
128+
- **Log Pollution**: Suppressed test error logs in testing environment
129+
- **PSR-12 Violations**: Fixed all code style violations
130+
- **Windows Compatibility**: Resolved inline environment variable issues
131+
- **PHPStan Compliance**: Fixed type issues with centralized cache
132+
133+
### Code Quality
134+
- **100% PSR-12 compliant** with automatic fixes
135+
- **PHPStan Level 8** with zero errors
136+
- **67 tests passing** with 242 assertions
137+
- **Clean codebase** with removed duplicates
138+
139+
## 📚 Documentation Updates
140+
141+
### Enhanced Documentation
142+
- **Cross-platform instructions** in README.md
143+
- **Performance benchmarks** documentation
144+
- **CLAUDE.md improvements** for better development workflow
145+
- **API documentation** consistency
146+
147+
### New Documentation Files
148+
- `RELEASE_NOTES_1.0.1.md` - This document
149+
- `scripts/benchmark-environment-helper.php` - Performance demonstration
150+
- `scripts/test-cache-clearing.php` - Cache functionality testing
151+
152+
## 🔍 Technical Details
153+
154+
### Compatibility
155+
- **PHP**: 8.1+ with full 8.4 compatibility
156+
- **PivotPHP Core**: v1.1.0+
157+
- **Cycle ORM**: v2.10+
158+
- **Platforms**: Windows, macOS, Linux
159+
- **CI/CD**: GitHub Actions, GitLab CI, Jenkins
160+
161+
### Dependencies
162+
```json
163+
{
164+
"require": {
165+
"php": "^8.1",
166+
"pivotphp/core": "^1.1.0",
167+
"cycle/orm": "^2.10"
168+
}
169+
}
170+
```
171+
172+
### Standards Compliance
173+
- **PSR-4**: Autoloading standard
174+
- **PSR-12**: Coding style standard
175+
- **Semantic Versioning**: Version numbering
176+
- **Keep a Changelog**: Changelog format
177+
178+
## 🎯 Migration Guide
179+
180+
### Upgrading from v1.0.0
181+
```bash
182+
# Update via Composer
183+
composer update pivotphp/cycle-orm
184+
185+
# No breaking changes - fully backward compatible
186+
# All existing APIs work exactly the same
187+
```
188+
189+
### New Features Available
190+
```php
191+
// New cache management (optional)
192+
EnvironmentHelper::clearCache();
193+
194+
// Performance benchmarking (development)
195+
php scripts/benchmark-environment-helper.php
196+
197+
// Cross-platform coverage
198+
composer test-coverage # Works everywhere
199+
```
200+
201+
## 🚀 What's Next
202+
203+
### Future Improvements
204+
- **Query builder enhancements**
205+
- **Advanced caching strategies**
206+
- **Additional database driver support**
207+
- **Enhanced monitoring capabilities**
208+
209+
### Community
210+
- **Discord**: https://discord.gg/DMtxsP7z
211+
- **GitHub**: https://github.com/PivotPHP/pivotphp-cycle-orm
212+
- **Packagist**: https://packagist.org/packages/pivotphp/cycle-orm
213+
214+
## 📈 Performance Metrics
215+
216+
### Before vs After
217+
| Metric | v1.0.0 | v1.0.1 | Improvement |
218+
|--------|--------|--------|-------------|
219+
| Environment Detection | 2.15 μs | 0.30 μs | **7x faster** |
220+
| Test Execution | Various | Clean 0 | **CI-friendly** |
221+
| Memory Usage | Higher | Optimized | **Reduced** |
222+
| Cross-Platform | Limited | Full | **100% compatible** |
223+
224+
## 🙏 Acknowledgments
225+
226+
This release was made possible by:
227+
- **Community feedback** on CI/CD integration
228+
- **Performance optimization** suggestions
229+
- **Cross-platform compatibility** requirements
230+
- **Code quality improvements** recommendations
231+
232+
---
233+
234+
## 📥 Download
235+
236+
**Composer Installation:**
237+
```bash
238+
composer require pivotphp/cycle-orm:^1.0.1
239+
```
240+
241+
**GitHub Release:**
242+
https://github.com/PivotPHP/pivotphp-cycle-orm/releases/tag/v1.0.1
243+
244+
**Packagist:**
245+
https://packagist.org/packages/pivotphp/cycle-orm
246+
247+
---
248+
249+
*Built with ❤️ by the PivotPHP Team*

0 commit comments

Comments
 (0)