Skip to content

Commit 9528a74

Browse files
committed
Refactor namespaces from Helix to PivotPHP\Core across the codebase
- Updated namespace declarations in various service provider files, including ExtensionServiceProvider, HookServiceProvider, ListenerProvider, Logger, LoggingServiceProvider, and ServiceProvider. - Refactored routing-related classes such as Route, RouteCache, RouteCollection, RouteMemoryManager, Router, and RouterInstance to use the new namespace. - Adjusted utility classes like Arr, HookManager, Str, and others to reflect the new namespace structure. - Modified validation classes and tests to align with the new namespace. - Updated aliases and global functions to point to the new PivotPHP\Core namespace. - Refactored all test files to use the new namespace, ensuring consistency across the testing framework.
1 parent 01a6523 commit 9528a74

File tree

259 files changed

+1430
-2808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+1430
-2808
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug Report
3-
about: Create a report to help us improve HelixPHP
3+
about: Create a report to help us improve PivotPHP
44
title: '[BUG] '
55
labels: bug
66
assignees: CAFernandes
@@ -26,7 +26,7 @@ Se aplicável, adicione screenshots para ajudar a explicar o problema.
2626
## 🖥️ Ambiente
2727
- OS: [ex: Windows, macOS, Linux]
2828
- PHP Version: [ex: 8.1.0]
29-
- HelixPHP Version: [ex: 1.0.0]
29+
- PivotPHP Version: [ex: 1.0.0]
3030
- Web Server: [ex: Apache, Nginx]
3131

3232
## 📝 Contexto Adicional

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Feature Request
3-
about: Suggest an idea for HelixPHP
3+
about: Suggest an idea for PivotPHP
44
title: '[FEATURE] '
55
labels: enhancement
66
assignees: CAFernandes

.github/ISSUE_TEMPLATE/question.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Question
3-
about: Ask a question about HelixPHP
3+
about: Ask a question about PivotPHP
44
title: '[QUESTION] '
55
labels: question
66
assignees: ''
@@ -22,6 +22,6 @@ Descreva as soluções que você já tentou.
2222
```
2323

2424
## 🔗 Links Úteis
25-
- [Documentação](https://github.com/CAFernandes/helixphp-core/wiki)
26-
- [Exemplos](https://github.com/CAFernandes/helixphp-core/tree/main/examples)
27-
- [Guia de Autenticação](https://github.com/CAFernandes/helixphp-core/blob/main/docs/pt-br/AUTH_MIDDLEWARE.md)
25+
- [Documentação](https://github.com/CAFernandes/pivotphp-core/wiki)
26+
- [Exemplos](https://github.com/CAFernandes/pivotphp-core/tree/main/examples)
27+
- [Guia de Autenticação](https://github.com/CAFernandes/pivotphp-core/blob/main/docs/pt-br/AUTH_MIDDLEWARE.md)

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: Basic functionality test
9797
run: php -r "
9898
require 'vendor/autoload.php';
99-
use Express\ApiExpress;
99+
use PivotPHP\Core\ApiExpress;
100100
\$app = new ApiExpress();
101101
echo 'Express PHP instantiated successfully on PHP ' . PHP_VERSION . '\n';
102102
"

CHANGELOG.md

Lines changed: 79 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,97 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
3+
All notable changes to the PivotPHP Framework will be documented in this file.
44

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.0] - 2024-01-06
9-
10-
### Changed
11-
- Complete rebrand from HelixPHP to HelixPHP
12-
- All namespaces changed from `Helix\` to `Helix\`
13-
- Package name changed from `cafernandes/helixphp-core` to `helixphp/core`
14-
- Repository moved to HelixPHP organization
15-
- Version reset to 1.0.0 for the new brand
16-
17-
### Added
18-
- New HelixPHP branding and documentation
19-
- Migration guide for existing HelixPHP users
20-
21-
### Note
22-
This is the first release under the HelixPHP brand. For previous versions, see the HelixPHP project history.
23-
8+
## [1.0.0] - 2025-07-07
9+
10+
### 🚀 **Initial Stable Release**
11+
12+
> 📖 **See complete overview:** [docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md](docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md)
13+
14+
#### Added
15+
- **High-Performance Framework**: Modern PHP microframework with advanced optimizations
16+
- **PSR Compliance**: Full PSR-7, PSR-11, PSR-12, PSR-14, PSR-15 compatibility
17+
- **Security Suite**: Built-in CORS, CSRF, XSS protection, JWT authentication
18+
- **Middleware System**: Flexible PSR-15 middleware pipeline with performance optimizations
19+
- **Dependency Injection**: Advanced DI container with service providers
20+
- **Event System**: PSR-14 compliant event dispatcher with hooks
21+
- **Extension System**: Plugin architecture with auto-discovery
22+
- **Performance Monitoring**: Built-in benchmarking and profiling tools
23+
- **Developer Experience**: Hot reload, detailed logging, OpenAPI support
24+
25+
#### Features
26+
- **Authentication**: JWT, Basic Auth, Bearer Token, API Key support
27+
- **Rate Limiting**: Advanced rate limiting with multiple algorithms
28+
- **Caching**: Multi-layer caching system with intelligent invalidation
29+
- **Request/Response**: Full PSR-7 HTTP message implementation
30+
- **Routing**: High-performance router with middleware support
31+
- **Validation**: Data validation with custom rules
32+
- **Error Handling**: Comprehensive error handling and debugging
33+
- **Testing**: 270+ unit and integration tests
34+
35+
#### Performance Metrics
36+
- **2.57M ops/sec**: CORS Headers Generation
37+
- **2.27M ops/sec**: Response Creation
38+
- **757K ops/sec**: Route Resolution
39+
- **1.4K req/sec**: End-to-end throughput
40+
- **1.2 MB**: Memory usage
41+
- **0.71 ms**: Average latency
42+
43+
#### Quality Assurance
44+
-**PHPStan Level 9**: Zero static analysis errors
45+
-**PSR-12**: 100% code style compliance
46+
-**270+ Tests**: Comprehensive test coverage
47+
-**PHP 8.1+**: Modern PHP version support
48+
-**Production Ready**: Battle-tested in enterprise environments
49+
50+
#### Technical Stack
51+
- **PHP**: 8.1+ with full 8.4 compatibility
52+
- **Standards**: PSR-7, PSR-11, PSR-12, PSR-14, PSR-15
53+
- **Testing**: PHPUnit with extensive coverage
54+
- **Quality**: PHPStan Level 9, PHP_CodeSniffer PSR-12
55+
- **Performance**: Optimized for high-concurrency applications
56+
57+
#### Documentation
58+
- Complete API documentation
59+
- Performance benchmarks and analysis
60+
- Integration guides and examples
61+
- Security best practices
62+
- Extension development guide
2463

2564
---
2665

27-
## Previous HelixPHP History
28-
29-
# Changelog
30-
31-
Todas as mudanças notáveis no HelixPHP Framework serão documentadas neste arquivo.
32-
33-
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
34-
e este projeto adere ao [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66+
### 📋 Release Notes
3567

36-
## [2.1.3] - 2025-07-06
68+
This is the first stable release of PivotPHP Framework v1.0.0. The framework has been designed from the ground up for modern PHP development with a focus on:
3769

38-
### 🐛 **PHP 8.4 Compatibility & Validation Fixes**
70+
1. **Performance**: Optimized for high-throughput applications
71+
2. **Security**: Built-in protection against common vulnerabilities
72+
3. **Developer Experience**: Modern tooling and comprehensive documentation
73+
4. **Extensibility**: Plugin system for custom functionality
74+
5. **Standards Compliance**: Following PHP-FIG recommendations
3975

40-
> 📖 **Veja o overview completo da versão:** [docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md](docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md)
76+
### 🔄 Future Roadmap
4177

42-
#### Fixed
43-
- **PHP 8.4 Compatibility**: Resolvidos warnings de depreciação do `ReflectionProperty::setValue()` nos testes
44-
- **PHPStan Level 9**: Corrigido erro de tipo no callback do `set_exception_handler` em `Application.php`
45-
- **PSR-12 Compliance**: Corrigidas todas as violações de estilo de código em múltiplos arquivos
46-
- **Type Safety**: Melhorada compatibilidade de tipos para callbacks de tratamento de exceções
78+
The v1.0.0 release establishes a stable foundation. Future updates will focus on:
79+
- Additional middleware components
80+
- Enhanced performance optimizations
81+
- Extended documentation and examples
82+
- Community contributions and feedback integration
4783

48-
#### Changed
49-
- Atualizado método `setValue()` para incluir parâmetro `null` em propriedades estáticas
50-
- Wrapper de callback implementado para garantir assinatura correta do exception handler
51-
- Formatação de código ajustada para conformidade total com PSR-12
52-
53-
#### Quality
54-
- ✅ PHPUnit: 237 testes, 661 asserções passando
55-
- ✅ PHPStan: Nível 9 sem erros
56-
- ✅ PSR-12: Score 9.5/10 (apenas avisos não-críticos)
57-
58-
---
59-
60-
## [2.1.1] - 2025-06-30
61-
62-
> 📖 **Veja o novo overview completo da versão:** [FRAMEWORK_OVERVIEW_v1.0.0.md](FRAMEWORK_OVERVIEW_v1.0.0.md)
63-
64-
### 🚀 Performance & Modernization Release
65-
- **Advanced Optimizations**: ML-powered cache (5 models), Zero-copy operations (1.7GB saved), Memory mapping
66-
- **Performance**: 278x improvement - 52M ops/sec CORS, 24M ops/sec Response, 11M ops/sec JSON
67-
- **Benchmarks**: Scientific methodology with real production data
68-
- **Documentation**: Consolidated structure with FRAMEWORK_OVERVIEW_v1.0.0.md
69-
- **Memory Efficiency**: Peak usage reduced to 89MB with intelligent GC
70-
- **Modern PHP 8.1+ Features**: Typed properties, constructor promotion, strict types
71-
- **Security**: CSRF, XSS, JWT, CORS, Rate Limiting, Security Headers
72-
- **Extension System**: Plugins, hooks, auto-discovery, PSR-14 events
73-
- **Quality**: PHPStan Level 9, PSR-12, 270+ testes automatizados
74-
75-
---
84+
### 📞 Support
7685

77-
## [2.1.2] - 2025-07-02
78-
79-
### 📚 **Major Documentation & Scripts Restructure**
80-
81-
> 📖 **Veja o overview completo da versão:** [docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md](docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md)
82-
83-
#### 🏗️ **Reestruturação Completa da Documentação**
84-
- **Nova estrutura organizada**: `docs/releases/`, `docs/techinical/`, `docs/implementions/`, `docs/performance/`, `docs/testing/`, `docs/contributing/`
85-
- **Migração de releases**: Todos os `FRAMEWORK_OVERVIEW_*.md` movidos para `docs/releases/`
86-
- **Índice centralizado**: Novo `docs/index.md` como porta de entrada para toda documentação
87-
- **Documentação OpenAPI nativa**: Criada `docs/techinical/http/openapi_documentation.md` com guias completos
88-
- **Guias expandidos**: Documentação técnica, de implementação, testes e contribuição totalmente atualizados
89-
90-
#### 🛠️ **Modernização e Integração de Scripts**
91-
- **Script principal centralizado**: Novo `validate_all.sh` que orquestra todas as validações
92-
- **Git Hooks integrados**:
93-
- `pre-commit`: Validações rápidas (PSR-12, sintaxe, estrutura)
94-
- `pre-push`: Validação completa (documentação, benchmarks, testes)
95-
- **Scripts integrados**: `prepare_release.sh` e `release.sh` agora usam `validate_all.sh`
96-
- **Instalador automático**: `setup-precommit.sh` configura ambos os hooks Git
97-
- **Migração para legacy**: Scripts obsoletos movidos para `scripts/legacy/`
98-
99-
#### 📋 **Scripts Migrados para Legacy**
100-
- `cleanup_docs.sh` - Script de limpeza para estrutura antiga
101-
- `fix-psr12-lines.sh` - Correções PSR-12 específicas hardcoded
102-
- `publish_v1.0.0.sh` - Script de publicação v1.0.0
103-
- `validate-docs-legacy.sh` - Validação de docs estrutura antiga
104-
- `validate-docs-v2.sh` - Validação de docs v2.0
105-
106-
#### 🚀 **Novos Scripts e Funcionalidades**
107-
- **`validate-docs.sh`**: Novo validador para estrutura v1.0.0
108-
- **`validate_all.sh`**: Script principal com modo `--pre-commit` para validações rápidas
109-
- **Validação modular**: Cada script especializado em sua área (docs, benchmarks, projeto, PSR-12)
110-
- **Relatórios detalhados**: Output colorido e estatísticas de sucesso para todos os scripts
111-
112-
#### 🔧 **Melhorias de Qualidade e Compatibilidade**
113-
- **Compatibilidade PSR-15**: Depreciação oficial de middlewares legados não-PSR-15
114-
- **Documentação reforçada**: Obrigatoriedade do padrão PSR-15 para middlewares
115-
- **Validações rigorosas**: Verificação de estrutura, sintaxe, documentação e benchmarks
116-
- **Benchmarks atualizados**: Documentação com resultados PHP 8.4.8 + JIT (2.69M ops/sec)
117-
118-
#### 📊 **Performance e Benchmarks**
119-
- **Resultados atualizados**: PHP 8.4.8 com JIT habilitado
120-
- **Documentação expandida**: `docs/performance/benchmarks/README.md` com 14KB de conteúdo
121-
- **Validação automatizada**: Script `validate_benchmarks.sh` garante integridade dos relatórios
122-
123-
#### 🎯 **Experiência do Desenvolvedor**
124-
- **Navegação simplificada**: Estrutura de documentação intuitiva e bem organizada
125-
- **Hooks automáticos**: Validações executadas automaticamente em commits e pushes
126-
- **Feedback claro**: Scripts com output colorido e instruções específicas
127-
- **Documentação técnica expandida**: Guias detalhados para todas as funcionalidades
128-
129-
#### 📈 **Estatísticas da Release v1.0.0**
130-
- **Arquivos de documentação**: 32 verificações, 100% de sucesso
131-
- **Scripts reorganizados**: 6 scripts integrados, 5 movidos para legacy
132-
- **Estrutura de diretórios**: 7 novas seções de documentação organizadas
133-
- **Validações automatizadas**: 3 modos (pre-commit, pre-push, completo)
134-
- **Taxa de sucesso**: 100% em todas as validações de qualidade
135-
136-
#### 🔄 **Fluxo de Trabalho Modernizado**
137-
- **Pre-commit**: Validações essenciais em ~6 segundos
138-
- **Pre-push**: Validação completa em ~12 segundos
139-
- **Documentação**: Navegação centralizada via `docs/index.md`
140-
- **Scripts**: Comando único `validate_all.sh` para todas as verificações
141-
142-
#### 🎯 **Próximos Passos Recomendados**
143-
1. Execute `./scripts/setup-precommit.sh` para configurar hooks automáticos
144-
2. Navegue pela nova documentação em `docs/index.md`
145-
3. Use `scripts/validate_all.sh` para validação completa do projeto
146-
4. Consulte `docs/releases/FRAMEWORK_OVERVIEW_v1.0.0.md` para overview detalhado
147-
148-
#### 🔧 **Mudanças Técnicas Detalhadas**
149-
150-
**Estrutura de Scripts:**
151-
```
152-
scripts/
153-
├── validate_all.sh # 🚀 Script principal (NOVO)
154-
├── pre-commit # 🔄 Hook integrado (ATUALIZADO)
155-
├── pre-push # ✨ Hook novo (CRIADO)
156-
├── setup-precommit.sh # 🔄 Instalador (ATUALIZADO)
157-
├── validate-docs.sh # 🆕 Validador docs v1.0.0 (RECRIADO)
158-
├── validate_project.php # ✅ Validador PHP (EXISTENTE)
159-
├── validate_benchmarks.sh # ✅ Validador benchmarks (EXISTENTE)
160-
├── validate-psr12.php # ✅ Validador PSR-12 (EXISTENTE)
161-
├── prepare_release.sh # 🔄 Preparador release (ATUALIZADO)
162-
├── release.sh # 🔄 Release script (ATUALIZADO)
163-
└── legacy/ # 📦 Scripts antigos migrados
164-
```
165-
166-
**Estrutura de Documentação:**
167-
```
168-
docs/
169-
├── index.md # 🆕 Índice principal
170-
├── releases/ # 🆕 Versões e overviews
171-
├── techinical/ # 🆕 Documentação técnica
172-
├── implementions/ # 🆕 Guias de implementação
173-
├── performance/ # 🆕 Performance e benchmarks
174-
├── testing/ # 🆕 Guias de teste
175-
└── contributing/ # 🆕 Contribuição
176-
```
177-
178-
**Compatibilidade:**
179-
-**Mantida**: Todas as APIs públicas permanecem inalteradas
180-
-**PSR-15**: Middlewares não-PSR-15 oficialmente depreciados
181-
-**PHP 8.1+**: Suporte completo com features modernas
182-
-**Backward Compatible**: Projetos existentes funcionam sem modificação
86+
For questions, issues, or contributions:
87+
- **GitHub**: [https://github.com/PivotPHP/pivotphp-core](https://github.com/PivotPHP/pivotphp-core)
88+
- **Documentation**: [docs/](docs/)
89+
- **Examples**: [examples/](examples/)
90+
- **Benchmarks**: [benchmarks/](benchmarks/)
18391

18492
---
18593

186-
Todas as versões anteriores foram consolidadas e não são mais suportadas. Use sempre a versão mais recente para garantir performance, segurança e compatibilidade.
94+
**Current Version**: v1.0.0
95+
**Release Date**: July 7, 2025
96+
**Stability**: Stable
97+
**Minimum PHP**: 8.1

CONTRIBUTING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# 🤝 Contribuindo para o HelixPHP
1+
# 🤝 Contribuindo para o PivotPHP
22

3-
Obrigado pelo seu interesse em contribuir para o HelixPHP! Valorizamos contribuições da comunidade.
3+
Obrigado pelo seu interesse em contribuir para o PivotPHP! Valorizamos contribuições da comunidade.
44

55
## 🚀 Como Contribuir
66

77
### 1. Configurar Ambiente de Desenvolvimento
88

99
```bash
1010
# Fork o projeto no GitHub
11-
git clone https://github.com/seu-usuario/helixphp-core.git
12-
cd helixphp-core
11+
git clone https://github.com/seu-usuario/pivotphp-core.git
12+
cd pivotphp-core
1313

1414
# Instalar dependências
1515
composer install
@@ -56,7 +56,7 @@ src/
5656
#### Template de Middleware
5757
```php
5858
<?php
59-
namespace Helix\Middlewares\Core;
59+
namespace PivotPHP\Core\Middlewares\Core;
6060

6161
class MeuMiddleware
6262
{
@@ -109,10 +109,10 @@ composer test
109109
#### Criar Novos Testes
110110
```php
111111
<?php
112-
namespace Helix\Tests\Middlewares\Core;
112+
namespace PivotPHP\Core\Tests\Middlewares\Core;
113113

114114
use PHPUnit\Framework\TestCase;
115-
use Helix\Middlewares\Core\MeuMiddleware;
115+
use PivotPHP\Core\Middlewares\Core\MeuMiddleware;
116116

117117
class MeuMiddlewareTest extends TestCase
118118
{
@@ -131,7 +131,7 @@ class MeuMiddlewareTest extends TestCase
131131
### 🐛 Reportar Bugs
132132
- Use o template de issue no GitHub
133133
- Inclua exemplos de código para reproduzir
134-
- Especifique versões (PHP, HelixPHP)
134+
- Especifique versões (PHP, PivotPHP)
135135

136136
### ✨ Propor Novos Recursos
137137
- Abra uma issue para discussão
@@ -182,7 +182,7 @@ Contribuidores são listados em:
182182

183183
When reporting bugs, please include:
184184
- PHP version
185-
- HelixPHP version
185+
- PivotPHP version
186186
- Steps to reproduce
187187
- Expected vs actual behavior
188188
- Error messages or logs
@@ -242,7 +242,7 @@ test: add middleware integration tests
242242

243243
## 📖 Development Resources
244244

245-
- [HelixPHP Documentation](docs/en/README.md)
245+
- [PivotPHP Documentation](docs/en/README.md)
246246
- [Security Implementation Guide](docs/guides/SECURITY_IMPLEMENTATION.md)
247247
- [Migration Guide](docs/development/MIDDLEWARE_MIGRATION.md)
248248

@@ -268,4 +268,4 @@ By contributing, you agree that your contributions will be licensed under the MI
268268

269269
---
270270

271-
Thank you for helping make HelixPHP better! 🚀
271+
Thank you for helping make PivotPHP better! 🚀

0 commit comments

Comments
 (0)