Repository navigation
Update dependency texthtml/doctest to v1 - #33
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 5 5
===========================================
Files 1 1
Lines 15 15
===========================================
Hits 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
text-html-renovate
Bot
force-pushed
the
renovate/texthtml-doctest-1.x
branch
from
November 15, 2026 22:24
bb794a5 to
0e19dfe
Compare
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.
This PR contains the following updates:
^0.3→^1.0Release Notes
texthtml/doctest (texthtml/doctest)
v1.2.1Compare Source
v1.2.1
Fixed
--static-scannow applies the enclosing class's#[ExamplesSetup(...)]attributes to method examples, like the reflection backend does: the class
setups are merged first, the method's own second (#73, #75).
--static-scanno longer fatals withCannot redeclare functionwhen twosibling methods' examples each declare a same-named helper function: method
examples now evaluate in a per-method runtime namespace
(
TH\Doctest\Runtime\{Class}\{method}\Example{N}), matching the reflectionbackend (#74, #76).
v1.2.0Compare Source
v1.2.0
Added
--static-scanoption: discovers code examples by parsing files(nikic/php-parser) instead of including them. Because the reflection
backend executes every matched file just to find their doc comments:
connections, environment requirements);
exit()silently killed discovery;With
--static-scannothing is executed at discovery time: a parse errorskips one file instead of failing the run, and each file is included lazily,
just before its first example runs (so side effects are only paid when an
example actually references the code — also making
--filterruns cheap).Setups declared via
#[ExamplesSetup(...)]are captured from the AST,name-resolved and instantiated at test time.
The reflection backend is unchanged and remains the default; expect to flip
the default in a future release.
TestSuite::fromPaths()accepts astaticScanparameter so libraryconsumers can opt into the static backend as well.
Fixed
Filesyielded every file twice (doubleFinder->in()call), running everyexample twice.
Internal
dropped by php-parser though reflection still sees them: they are recovered
from the raw token stream, keeping static output byte-identical to the
reflection backend's.
bin/doctest --static-scan examplesproduces byte-identicalresults to the reflection backend (same names, line ranges and ordering).
nikic/php-parser ^5.0added to the requirements.v1.1.0Compare Source
v1.1.0
Added
--coverage-clover <path>option: collects code coverage of what theexamples actually execute, via a php-code-coverage driver bracketed around
the suite run and filtered to the analyzed paths. Feed the report to Codecov
or any Clover-aware tool to see how much of your code your documentation
covers.
pcov.directoryexcluding the analyzed paths) are refused up front with a-d pcov.directory=…hint instead of publishing misleading numbers.("install & enable pcov (recommended) or xdebug").
Internal
report from a single doctest invocation (console + JUnit + Clover snapshots),
and both the unit-test and examples coverage reports are uploaded to Codecov
on the PHP 8.5 leg.
composer.lockis committed (export-ignored, so dist archives stay lean) andconfig.platform.phpis pinned to 8.2: every CI leg resolves the samedependency set instead of drifting per PHP version.
v1.0.0Compare Source
v1.0.0
First stable release. doctest executes the PHP examples found in your
doc-comments as part of your test suite, so documentation examples fail CI
instead of quietly rotting.
Breaking changes
#[ExamplesSetup]now takes a setup instance, not a class-string:#[ExamplesSetup(new MySetup())]instead of#[ExamplesSetup(MySetup::class)].The attribute is repeatable, so multiple setups are expressed by stacking it.
Setups are no longer constrained by any interface — any object works; it is
instantiated fresh before each example it applies to and released right after.
TH\DocTest\SetUpinterface was removed (it is implied by passing an object).--no-bailwas removed from the CLI — it could only ever restate the default.--bail/-bis unchanged.(symfony 6 support dropped).
Added
--junitoption: write test results to a file in JUnit XML format.psr/log): iterator warnings (e.g. unreadable files) go to alogger instead of being swallowed; the CLI wires a console logger.
output is stable across filesystems and machines.
Internal
baselines at zero.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.