6 diferenças de tipos request response#9
Merged
Hidden character warning
The head ref may contain hidden characters: "6-diferen\u00e7as-de-tipos-requestresponse"
Conversation
…style methods - Added PSR-7 ResponseInterface implementation for better HTTP response handling. - Introduced methods for redirecting, setting cookies, and sending error/success responses. - Enhanced existing methods to maintain compatibility with Express.js style. - Improved body handling with PSR-7 StreamInterface. - Added utility methods for streaming and sending various data types. - Refactored existing methods to utilize the new PSR-7 response structure.
…andling - Added Psr7Pool class for managing pools of PSR-7 objects (ServerRequest, Response, Uri, Stream). - Integrated Psr7Pool into Request and Response classes for lazy loading and object reuse. - Enhanced Request class to cache php://input and manage PSR-7 attributes more efficiently. - Created basic authentication tests for JWT generation, validation, and middleware functionality.
- Implement V11ComponentsTest for testing high-performance mode, dynamic pool, middleware integration, performance monitoring, memory management, and factory pooling. - Create HighPerformanceStressTest to evaluate concurrent request handling, pool overflow behavior, circuit breaker functionality, load shedding effectiveness, memory management under pressure, and graceful degradation under resource exhaustion. - Ensure tests cover various scenarios and edge cases to validate system performance and reliability under stress.
- Remover adição automática de trailing slash em Request::pathCallable - Adicionar método Request::getIp() para suporte ao RateLimiter - Corrigir Router::clear() para limpar todos os caches - Atualizar testes para refletir novos comportamentos - Marcar testes de stress como skipped (dependentes do ambiente)
…Redis integration - Added support for distributed object pooling in PivotPHP v1.1.0. - Implemented NoOpCoordinator for single-instance operation when no external coordination is available. - Redis coordination moved to an optional extension, with a fallback to NoOpCoordinator if Redis is not available. - Updated DistributedPoolManager to create coordinators based on configuration. - Added documentation for distributed pooling extensions and usage examples. - Enhanced error handling and logging for coordinator initialization failures. - Updated various classes to ensure compatibility with new pooling strategies and methods.
…ow e coordenador NoOp
…no CircuitBreaker e LoadShedder refactor: Ajustar inicialização de localPool e simplificar acesso a estatísticas no DistributedPoolManager
…testes de desempenho e iterações
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates existing route constraint tests, adjusts request pathCallable normalization tests, adds a standalone authentication test script, and introduces a comprehensive suite of stress and integration tests for v1.1.0 performance features.
- Clarified comments and assertions in
RouterGroupConstraintTest.phpto emphasize constraint application - Standardized
pathCallablebehavior inRequestTest.phpby removing trailing slashes - Introduced
test/auth_test.phpas a manual authentication smoke test (echo-based) - Added a new
HighPerformanceStressTest.phpperformance stress suite andV11ComponentsTest.phpintegration tests - Ensured
Router::clear()also resetspreCompiledRoutes
Reviewed Changes
Copilot reviewed 53 out of 54 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Unit/Routing/RouterGroupConstraintTest.php | Enhanced test comments to explicitly note applied constraints |
| tests/Services/RequestTest.php | Updated expected pathCallable values to drop trailing slash |
| test/auth_test.php | Added manual authentication tests (non-PHPUnit) |
| src/Routing/Router.php | Reset preCompiledRoutes in clear() for consistency |
Comments suppressed due to low confidence (1)
test/auth_test.php:1
- This script uses manual echo-based assertions instead of PHPUnit and won’t be picked up by the automated test suite. Consider converting it into a PHPUnit test case for consistent execution and reporting.
<?php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
📋 Descrição
Descreva resumidamente as mudanças feitas neste PR.
🎯 Tipo de Mudança
🧪 Como foi testado?
Descreva os testes que você executou para verificar suas mudanças.
📝 Checklist
🔗 Issues Relacionadas
Fixes #6