Skip to content

0.5.0 - #9

Merged
niden merged 21 commits into
masterfrom
development
Jul 1, 2026
Merged

niden merged 21 commits into
masterfrom
development

Conversation

@niden

@niden niden commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

niden added 21 commits June 30, 2026 22:42
…ts with real test expectations around mbstring's default '?' substitution
…::boot()'s directory creation on CI/non-dev environments
Runner::initEnvironment() sets LC_ALL to en_US.utf-8, but neither the docker
image nor the CI runners had that locale generated, so setlocale() silently
fell back to C. Mirrors phalcon's resources/linux-setup-locales.sh pattern,
scoped to just the one locale talon actually uses.
FunctionalTrait::di() could return null from InjectionAwareInterface::getDI()
despite declaring DiInterface; now throws ResponseNotDispatched like the rest
of the method. ResultSetTrait::mockResultSet()'s return type now specifies
Resultset's and ModelInterface's generic type parameters.
…e methods

FunctionalTrait::di() gains resolveDi(), Runner gains isExtensionLoaded() -
both extracted so a test can fake the hard-to-reach branch directly, since
neither can be reliably triggered for real (ext-phalcon's InjectionAwareInterface
isn't nullable like phalcon/phalcon's, and the coverage driver doesn't load
xdebug). All anonymous test-double classes in the suite are converted to
named Fakes under tests/Fakes/ for consistency.
…rowser\Client::extractSetCookies()'s defensive branches

Settings.php and Browser/Client.php are now fully covered (99.82% overall,
566/567 - the one remaining line is FunctionalTrait's real resolveDi() throw,
unreachable under ext-phalcon per the earlier commit's note).

Client::extractSetCookies()'s malformed-cookie branches needed a fake app that
populates a real Cookies service directly rather than going through a real
dispatch: Phalcon\Mvc\Application::handle() eagerly calls Response::sendCookies(),
so a non-scalar cookie value set via a real controller action crashes on PHP's
native setcookie() before extractSetCookies() ever runs.
…ll Response::sendCookies()

The previous comment claimed the in-process dispatch never sends headers,
which isn't quite true - sendCookies() runs regardless, it just never
produces anything BrowserKit can observe since there's no real HTTP
transport. Discovered while covering the malformed-cookie branches
(a real controller action setting a non-scalar cookie value crashes
during handle(), before extractSetCookies() ever runs).
…halcon (v5)

The v5 C extension's InjectionAwareInterface::getDI() isn't nullable (a Zephir
limitation), which made FunctionalTrait::resolveDi()'s real null-DI throw
unreachable under the coverage job's previous provider. v6 is a faithful
mirror of v5, so this doesn't change what's meaningfully tested - only which
provider generates the coverage numbers. Talon now measures at a true 100%
(567/567); octocov's floor raised from 95.0% to 100.0% to match.

New FunctionalRealNullDiTest exercises the real branch (skipped under v5,
where it can't even be declared); the existing FunctionalNullDiTest (fake
override) stays as-is, verifying the override extension point itself.
@niden niden self-assigned this Jul 1, 2026
@niden niden added the release New Release label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Code Metrics Report

Coverage Test Execution Time
100.0% 1s

Code coverage of files in pull request scope (100.0%)

Files Coverage
src/Bootstrap/Runner.php 100.0%
src/Browser/Client.php 100.0%
src/Contracts/Settings.php 0.0%
src/Database/Connection.php 100.0%
src/ServiceOptions.php 100.0%
src/Settings.php 100.0%
src/Traits/DatabaseTrait.php 100.0%
src/Traits/FunctionalTrait.php 100.0%
src/Traits/ResultSetTrait.php 100.0%
src/Traits/ServicesTrait.php 100.0%

Reported by octocov

@niden
niden merged commit df20b55 into master Jul 1, 2026
22 checks passed
@niden
niden deleted the development branch July 1, 2026 22:12
@niden
niden restored the development branch July 1, 2026 22:12
@niden
niden deleted the development branch July 1, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release New Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant