Skip to content

v0.6.0

Latest

Choose a tag to compare

@niden niden released this 02 Jul 20:39
9301813

Changed

  • The repo dogfoods its own runner: composer test/test-coverage/test-coverage-html and the CI database step now route through bin/talon (php bin/talon run mysql pgsql replaces the two explicit PHPUnit invocations). Infection still drives PHPUnit directly by design; the raw vendor/bin/phpunit -c ... invocations keep working as a fallback. #5

Added

  • talon CLI runner: vendor/bin/talon run [suites...] [-- passthrough] fronts PHPUnit per mapped suite, talon suites lists the map. Suites come from a root talon.php (per-suite config/php/env/args, global php/env merged in) or, with zero config, from discovered phpunit*.xml files (phpunit.mysql.xml -> mysql; phpunit.xml.dist -> unit, the default). Options forward to PHPUnit starting at the first option talon does not recognize (everything after -- always forwards verbatim); the reserved name all runs every suite sequentially with a max() exit code; subprocess re-exec keeps per-suite ini flags (e.g. extension=phalcon.so) and env vars possible. Adds phalcon/cli-options-parser (^2.0) as a runtime dependency. #5
  • Infection mutation testing: infection/infection (^0.29) as a dev dependency, configured via resources/infection.json5 (source src/, @default mutators, logs and temp files under tests/_output/infection/), with a composer test-mutation script and a report-only step in the CI coverage job. The suite was hardened until the mutation score plateaued at 99% MSI / 99% covered MSI under the ext-phalcon (v5) test image - the five surviving mutants are provider-specific and are killed under the phalcon/phalcon (v6) provider the CI step runs on. Every config-level mutator ignore is individually justified in resources/infection.json5. #7

Fixed

  • AbstractUnitTestCase::mockWithConstructor()'s $ctorArgs docblock type widened from array<int, mixed> to array<array-key, mixed> - the implementation always normalized string-keyed arguments via array_values(); the annotation now matches. No behavior change - static-analysis-only fix. #7
  • ServicesTrait::setMemcachedKey(), setRedisKey(), and clearMemcached() now assert the backing operation succeeded (a failed Memcached::set()/flush() or a non-OK Redis SET reply reports as a test failure with the key in the message) instead of silently discarding the result - a failed seed write could previously let a test pass without exercising its intent. #10
  • ServicesTrait::hasMemcachedKey() (and doesNotHaveMemcachedKey()) now checks Memcached::getResultCode() against RES_NOTFOUND, so a stored literal false is correctly reported as present - previously indistinguishable from a missing key. #10
  • FileSystemTrait::safeDeleteFile() and safeDeleteDirectory() still tolerate a missing target, but when it exists every unlink()/rmdir() is now asserted - a failed delete reports as a clean test failure with the path (instead of a PHP warning) rather than silently leaking state into subsequent tests. #10

Removed