Repository navigation
Modernize tooling: PSR-4, PHPUnit 12, GitHub Actions - #29
Merged
Merged
Conversation
added 5 commits
November 1, 2026 11:38
- Require PHP ^8.3 (8.2 reaches end of life on 2026-12-31)
- Autoload via PSR-4 (src/, tests/ as autoload-dev) instead of PSR-0
- Replace PHPUnit 4 + Mockery with PHPUnit 12; drop abandoned dev
dependencies (fabpot/php-cs-fixer, codeclimate/php-test-reporter)
and redundant PHP_CodeSniffer
- Convert docblock annotations to attributes, use static data providers,
expectException*() and current assertion names
- Clean up the URL map cache in RestServerTest::tearDown(); a cache
left behind by unit tests made the integration tests route against an
empty map, which is why they were excluded from CI ("no-travis")
- URL parameters are strings; fix expectations that only passed because
of PHPUnit 4's loose JSON comparison
- CI workflow testing PHP 8.3, 8.4 and 8.5 (plus lowest dependencies) and checking coding style with php-cs-fixer (PER-CS) - Remove the discontinued Sami documentation config - Dependabot: weekly updates, also for GitHub Actions - README: replace dead badges, drop AMF/Flash mention, add dev section
Automated run of php-cs-fixer, no functional changes.
Code metrics rules (method count, complexity, superglobal access) do not fit test classes. The former Scrutinizer and Code Climate configs excluded tests/ as well.
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.
Summary
First step of modernizing the repository: build, test and CI setup. No functional changes to the library code (apart from automated formatting).
^8.3as minimum (8.2 reaches end of life on 2026-12-31)src/JK/RestServer/tosrc/, tests totests/expectException*(), current assertion names.git-blame-ignore-revsNotable fixes in the test suite
no-travis) were never run in CI. Cause: in production mode,RestServerpersistsurlMap.cachein its destructor. Unit tests left an empty map behind, so the integration tests routed against it and got 404s.tearDown()now removes the cache; all integration tests run again.Known remaining issues (next step)
5 PHP deprecations from
src/, intentionally not addressed here:selfin callables (Utilities.php)ReflectionParameter::getClass()(Utilities.php)$obj->server(RestServer.php, becomes an error in PHP 9)Test plan
vendor/bin/phpunitgreen on PHP 8.3, 8.4, 8.5 (108 tests, 1 skipped – requires Xdebug)composer update --prefer-loweston PHP 8.3php-cs-fixer fix --dry-runclean