All notable changes to KaririCode Devkit are documented here.
The format follows Keep a Changelog and this project adheres to Semantic Versioning.
bin/build-phar.php: Native PHP PHAR builder — compileskcode.pharwithouthumbug/box. Added as a workaround for a Box 4.x / PHP 8.4 incompatibility (chdir(): Not a directoryduringendBuffering()).- Test suite —
tests/Unit/Exception:DevkitExceptionTest,ConfigurationExceptionTest,ToolExceptionTest. - Test suite —
tests/Unit/ValueObject:ToolResultTest,QualityReportTest,MigrationReportTest. - Test suite —
tests/Unit/Core:ProjectContextTest,DevkitConfigTest. - Full unit test suite: 41 tests, 81 assertions — all passing on PHP 8.4 / PHPUnit 12.4.5.
composer.json:phpunit/phpunitconstraint updated from^11.0to^12.0. Composer scripts renamed tokcode:*prefix to avoid collision with built-in Composer commands.infection/extension-installer: falseadded toallow-pluginsto suppress spurious warnings. Thebuildscript now callsbin/build-phar.phpinstead ofbox compile.Makefile:buildtarget no longer requireshumbug/box— usesPHAR_BUILDER := bin/build-phar.php.VERSIONsimplified togit describe --tagsonly (nobox.jsonfallback).check-envshows PHAR builder status instead of Box version._require-boxguard replaced by_require-phar-builder.install/install-prodadd--no-scripts. Newsecuritytarget. New_require-kcodeguard on all quality targets.distcleanno longer removescomposer.lock.check-envcorrectly detectsvendor/bin/kcode..github/workflows/ci.yml: Addeddevelopbranch to push/PR triggers..github/workflows/code-quality.yml: Replaced 378-line legacy workflow (PHPMD + runtimecomposer require) with a lean 160-line workflow aligned to the kcode CLI. Jobs:dependencies → security → phpstan → cs-fixer → quality-summary..gitignore: Expanded from 8 to 42 patterns (legacy scaffold files, IDE artefacts, OS artefacts, environment files, tool caches).docs/BUILDING.md: Fully rewritten forbin/build-phar.php— removed allhumbug/boxreferences.phpunit.xml:memory_limitreduced from 1G to 256M. Attributes reformatted one-per-line.
bin/kcode: FatalTypeErrorwhen invoked via Composer scripts —$argvwas inaccessible inside the static IIFE. Fixed by passing it as an explicit parameter ($argv ?? []).src/Configuration/PhpStanConfigGenerator: RemovedcheckMissingIterableValueTypeandcheckGenericClassInNonGenericObjectType— both were removed from PHPStan 2.x core and causedInvalid configurationerrors.src/Configuration/CsFixerConfigGenerator: Added(string)cast onpreg_replace()return values inexportRules()to satisfy PHPStan level-9 type constraints.src/Core/Devkit: Addedfalseguard onfile_get_contents()inappendGitignore(). Added@var \SplFileInfoannotation inremoveRecursive().src/Core/DevkitConfig: Added@var array<string, mixed>before assigning loaded overrides.toolVersions()now correctly returnsarray<string, string>viaarray_filter.src/Core/MigrationDetector: Addedfalse !== $rawguard onfile_get_contents(). Added@varannotations onjson_decode()result.src/Core/ProjectDetector: Addedfalse !== $rawguard onfile_get_contents(). Extracted$psr4Source,$psr4Test,$projectNamewith properis_array()guards. FixeddetectNamespace()anddetectPhpVersion()with nestedis_array()/is_string()checks.src/Runner/*: Added#[\Override]attribute totoolName(),vendorBin(), anddefaultArguments()across all six runners.src/ValueObject/MigrationReport: Addedfalseguard afterfile_get_contents()andjson_encode(). Extracted$requireDevwith@varandis_array()guard. FixedremovePackagesFromComposer()to write back the updated$requireDevslice into$composerbeforejson_encode(). Added@var \SplFileInfoinremoveRecursive().- Security:
phpunit/phpunitupdated from 12.4.2 → 12.4.5 (fixes CVE-2026-24765, HIGH).
humbug/box: Removed as a build dependency.bin/build-phar.phpreplaces it.- Legacy scaffold files (42):
.config/,.docs/,.make/,devkit/,docker-compose.yml,.env.example,.env.xdebug, root-level tool configs,build/,coverage/. - Prototype test files (4): Targeting removed classes
UserProfile,Email,UserId,UserRole.
Net result: PHPStan level 9 — 0 errors (down from 35). PHPUnit — 41 tests, 81 assertions passing.
1.0.0 — 2025-12-01
- Core:
Devkitorchestrator,ProjectDetector,ProjectContext,DevkitConfig,ProcessExecutor. - Contracts:
ConfigGeneratorandToolRunnerinterfaces. - Configuration generators: PHPUnit, PHPStan, PHP-CS-Fixer, Rector, Psalm.
- Tool runners: PHPUnit, PHPStan, PHP-CS-Fixer, Rector, Psalm, Composer Audit.
- CLI commands:
init,migrate,test,analyse,cs:fix,rector,security,quality,format,clean. - Migration detector: Scans
composer.jsonrequire-dev and project root for redundant files and cache paths. Interactive cleanup with--dry-runand--no-interaction. - CLI framework: Zero-dependency
Applicationrouter with ANSI output, argument parsing, and passthrough support. - Value objects:
ToolResult,QualityReport,MigrationReport(immutable, readonly). - Exception hierarchy:
DevkitException,ConfigurationException,ToolException. - Build automation:
Makefilewith targets:install,build,verify,self-test,quality,security,clean,release. - CI/CD: GitHub Actions workflows for quality checks (
ci.yml) and automated PHAR releases (release.yml). - Binary resolution: Three-tier strategy — PHAR → vendor → global PATH.
- Override system:
devkit.phpat project root with type-safe merging. Scaffold withkcode init --config. - Documentation: README, 6 ADRs, 3 specifications, docs index.