Conversation
- Add 'make build' target (docker-compose build + composer install) - Create infection.json for mutation testing (MSI threshold 80%) - Enable strict PHPUnit mode (failOnRisky, failOnWarning, strict output/coverage) - Raise Rector levels to 10/10/10 (type coverage, dead code, code quality) - Add #[CoversClass] attributes to all 54 test files - Fix ErrorHandler namespace in test tearDown methods - Add error handler suppression for socket warning tests - Add infection artifacts to .gitignore
- Add SocketWrapperInterface + SocketWrapper (15 methods) - Add SocketMsgWrapperInterface + SocketMsgWrapper (3 methods) - Add ForkWrapperInterface + ForkWrapper (3 methods) - Add comprehensive tests for all wrappers (41 new tests) - Suppress E_WARNING in non-blocking socket tests
- Replace all direct socket_*/pcntl_*/posix_* calls with wrapper methods - Inject SocketWrapperInterface, ForkWrapperInterface, SocketMsgWrapperInterface - Update SharedSocketMaster, CentralizedMaster, SocketManager, WorkerManager - Update ConnectionQueue, ConnectionRouter, FdPasser, UnixSocketChannel - Update HttpWorkerAdapter, ProcessInfo, MasterFactory - Update all 34 test files for new constructor signatures - Fix $status initialization for waitpid calls - Fix IPCException import in UnixSocketChannel - Fix variable typo receivedEd -> receivedFd in FdPasser - Update example to use MasterFactory instead of direct construction
- Delegate worker management to WorkerManager from AbstractMaster - Extract createReusePortSocket() in SharedSocketMaster - Move workerCallback/eventDrivenWorker validation to AbstractMaster - WorkerManager::check() returns array of dead worker IDs - Remove duplicate WorkerManager instances from subclasses
- Add #[Test] attribute to all test methods - Convert all test methods to snake_case naming - Rename 30 camelCase methods in 7 test files - Update Makefile to use --no-progress for reliability
- Remove class-level PHPDoc from SharedSocketMaster and CentralizedMaster - Remove PHPDoc from private/protected methods across all src/ files - Remove all @psalm-suppress and @PHPStan-Ignore annotations - Replace shell_exec with proc_open in SystemInfo.php - Remove all inline // comments from src/ - Keep @var/@return/@PARAM only where Psalm requires generic array types - Add assert() for type narrowing where PHPDoc was removed - Collapse multi-line @var to single-line annotations - Remove test checking for removed PHPDoc (phpdoc_contains_evio_limitation_note)
…tdown - Replace blocking sleep() with timestamp-based pending restart scheduling - Add SIGCHLD handler for immediate zombie process reaping - Add detectDeadWorkers() combining waitpid + isAlive for SIGCHLD compatibility - Add graceful shutdown in callback workers with signal dispatch - Replace exit(1) with WorkerPoolException in SharedSocketMaster - Worker loops check shouldStop flag and dispatch signals each iteration - Add processPendingRestarts() for non-blocking worker respawn - Add unit and integration tests for all reliability improvements
…xSize - Replace array/array_shift with SplQueue for O(1) dequeue operations - Fix hardcoded maxSize: 1000 in CentralizedMaster to use config->maxQueueSize - Update ConnectionQueueTest for SplQueue implementation - Add test verifying maxSize comes from configuration - Apply Rector automatic fixes
- Replace SignalHandler with SignalManager in AbstractMaster - Replace $shouldStop with signalManager->isShutdownRequested() - Remove all static counter variables (CentralizedMaster, SocketManager, FdPasser) - Use instance variables instead of static counters for logging - Preserve enableStickySession, enableGracefulReload, BalancerType::Weighted - Update all tests for SignalManager integration
…ky tests - Add #[UsesClass] attributes to all test files for PHPUnit coverage metadata compliance - Fix stderr noise: replace nonexistent_command_xyz with echo notanumber - Add Windows-only platform check for detectCpuCoresWindows() tests - Replace createMock with createStub where no expectations needed - Change #[CoversClass] to #[CoversNothing] for interface-only test - Fix SignalHandlerTest assertion after unregister - Remove platform-specific early return in SocketMsgWrapperTest - Add WorkerPoolConfig::single() tests 733 tests, 0 failures, 0 errors, 0 risky, 0 notices, 0 warnings, 34 skipped (platform-dependent) Coverage: 91.40% lines (1148/1256) Psalm level 1: 0 errors CS-Fixer: 0 files, Rector: 0 changes
Performance tests (tests/Performance/): - ThroughputBaselineTest: requests/sec baseline, p50/p95/p99 latency - MemoryConsumptionTest: memory leak detection after N iterations - QueuePerformanceTest: enqueue/dequeue timing at various sizes - BalancerPerformanceTest: LeastConnections/RoundRobin distribution Security tests (tests/Security/): - MalformedHttpRequestTest: binary garbage, null-byte injection, XSS, duplicate headers - SlowlorisProtectionTest: SO_RCVTIMEO/SO_SNDTIMEO, partial requests - OversizedRequestTest: 20MB body, oversized headers - IpcMessageValidationTest: corrupt JSON, invalid types, XSS payloads - ConnectionLimitTest: maxQueueSize enforcement, FIFO order 791 tests, 0 failures, 0 errors, 0 risky, 0 notices, 37 skipped Psalm level 1: 0 errors, CS-Fixer: 0 files, Rector: 0 changes
- Quick Start examples use MasterFactory::createRecommended() instead of direct constructors - API Reference updated with SocketWrapperInterface, ForkWrapperInterface, SocketMsgWrapperInterface params - New DI Wrappers section documenting all three wrapper interfaces - New Test Groups section with Unit, Integration, Functional, Performance, Security - enableStickySession/enableGracefulReload labeled as (planned) - BalancerType::Weighted labeled as planned for future implementation - SystemInfo namespace corrected to Duyler\WorkerPool\Util - HttpWorkerAdapter, UnixSocketChannel, FdPasser examples updated with DI params - Psalm: 0 errors, CS-Fixer: 0 files changed
…ionTest Eliminates 1 risky test reported by CI (PHPUnit strict coverage metadata).
|
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.



No description provided.