Skip to content

Unify service options#8

Merged
niden merged 37 commits into
developmentfrom
unify-service-options
Jul 1, 2026
Merged

Unify service options#8
niden merged 37 commits into
developmentfrom
unify-service-options

Conversation

@niden

@niden niden commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

niden added 30 commits June 29, 2026 08:12
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
…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.
niden added 7 commits July 1, 2026 15:44
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 new feature request Planned Feature or New Feature Request label Jul 1, 2026
@niden niden changed the base branch from master to development July 1, 2026 21:58
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

@niden niden merged commit 6ba48ec into development Jul 1, 2026
22 checks passed
@niden niden deleted the unify-service-options branch July 1, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature request Planned Feature or New Feature Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant