Skip to content

Move to src/ layout, add strict_types, add PHPStan to CI#90

Merged
alganet merged 1 commit intoRespect:masterfrom
alganet:phpstan-level2
Mar 15, 2026
Merged

Move to src/ layout, add strict_types, add PHPStan to CI#90
alganet merged 1 commit intoRespect:masterfrom
alganet:phpstan-level2

Conversation

@alganet
Copy link
Member

@alganet alganet commented Mar 15, 2026

  • Move source from library/Respect/Relational/ to src/ and tests from tests/library/Respect/Relational/ to tests/. Update PSR-4 autoload to Respect\Relational\ -> src/ with autoload-dev for tests.
  • Add declare(strict_types=1) to all 12 PHP files. This surfaced two bugs: Mapper::getAllProperties() passing false to preg_match when getDocComment() returns false, and Sql::normalizeParts() passing a Sql object to stripos() instead of a string. Both fixed.
  • Raise PHPStan to level 2 with ignores for magic methods, properties, and Style test namespace resolution.
  • Modernize CI: split into tests and static-analysis jobs, update to actions/checkout@v6 and ramsey/composer-install@v3.

- Move source from library/Respect/Relational/ to src/ and tests
  from tests/library/Respect/Relational/ to tests/. Update PSR-4
  autoload to Respect\Relational\ -> src/ with autoload-dev for
  tests.
- Add declare(strict_types=1) to all 12 PHP files. This surfaced
  two bugs: Mapper::getAllProperties() passing false to preg_match
  when getDocComment() returns false, and Sql::normalizeParts()
  passing a Sql object to stripos() instead of a string. Both
  fixed.
- Raise PHPStan to level 2 with ignores for magic methods,
  properties, and Style test namespace resolution.
- Modernize CI: split into tests and static-analysis jobs,
  update to actions/checkout@v6 and ramsey/composer-install@v3.
@alganet alganet marked this pull request as ready for review March 15, 2026 01:08
@alganet alganet merged commit 754d378 into Respect:master Mar 15, 2026
2 checks passed
@alganet alganet deleted the phpstan-level2 branch March 15, 2026 01:08
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