Skip to content

fix: StaticFileManager::registerDirectory() + PSR-12 (release blocker) - #30

Merged
code-cfernandes merged 1 commit into
mainfrom
fix/release-validation
Oct 9, 2026
Merged

code-cfernandes merged 1 commit into
mainfrom
fix/release-validation

Conversation

@code-cfernandes

Copy link
Copy Markdown
Member

Resumo

Corrige os 2 erros que estavam reprovando a validação de release:

  1. PHPStan (Level 9): Application::staticFiles() chamava
    StaticFileManager::registerDirectory($routePrefix, $physicalPath, $this, $options) — mas o
    método foi desacoplado do core (pivotphp/core-routing) e agora espera
    ($routePrefix, $physicalPath, $options). Remove o argumento $this obsoleto.
  2. PSR-12: 12 erros de "multi-line function call" em 4 arquivos de teste (auto-corrigidos).

Mudanças

  • src/Core/Application.php: staticFiles() corrigido.
  • tests/Core/ContainerTest.php, tests/Middleware/SimpleLoadShedderTest.php,
    tests/Middleware/Performance/RateLimitMiddlewareTest.php, tests/Support/StrTest.php:
    formatação PSR-12.

Como testar

composer phpstan          # 0 errors (117 arquivos)
composer cs:check         # 0 errors (8 warnings de linha longa, não-bloqueantes)
composer test:ci

Versionamento (SemVer)

PATCH → 2.2.1.

Instruções de merge

  • Squash and merge para main.

- Application::staticFiles() passed $this to StaticFileManager::registerDirectory(),
  but the method was decoupled from core (core-routing) and now expects
  (routePrefix, physicalPath, options). Removes the stale $this argument
  (fixes PHPStan level 9 errors).
- Auto-fix PSR-12 multi-line function call violations in 4 test files.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🚀 Release Readiness Report - PivotPHP Core v2.2.0

✅ All Checks Passed!

  • Version: 2.2.0
  • PHPStan: Level 9, 0 errors
  • Tests: All tests passing
  • Code Style: PSR-12 compliant
  • PHP Compatibility: 8.1 - 8.4
  • Dependencies: All valid
  • Scripts: Consolidated and optimized

📦 Ready for Publication

The project is ready to be tagged and released!

Next Steps:

  1. Create a new tag: git tag -a v2.2.0 -m 'Release v2.2.0'
  2. Push the tag: git push origin v2.2.0
  3. The release workflow will automatically create a GitHub release
  4. Packagist will be automatically updated

@code-cfernandes
code-cfernandes merged commit e6f561f into main Oct 9, 2026
6 checks passed
@code-cfernandes
code-cfernandes deleted the fix/release-validation branch October 9, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant