Skip to content

Commit 40c4956

Browse files
committed
Release v1.2.4: restore 100% coverage for CI.
1 parent ba7040d commit 40c4956

4 files changed

Lines changed: 94 additions & 1 deletion

File tree

docs/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
88
## Table of contents
99

1010
- [[Unreleased]](#unreleased)
11+
- [[1.2.4] - 2026-08-07](#124-2026-08-07)
1112
- [[1.2.3] - 2026-08-04](#123-2026-08-04)
1213
- [[1.2.2] - 2026-07-29](#122-2026-07-29)
1314
- [[1.2.1] - 2026-07-22](#121-2026-07-22)
@@ -18,6 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
1819

1920
## [Unreleased]
2021

22+
## [1.2.4] - 2026-08-07
23+
24+
### Fixed
25+
- **CI:** restore **100%** line coverage for `LibreOfficeBinaryLocator` (empty candidate skip + empty-path guard).
26+
27+
[1.2.4]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.4
28+
2129
## [1.2.3] - 2026-08-04
2230

2331
### Fixed
@@ -129,7 +137,9 @@ First stable release.
129137
- System: **LibreOffice Writer** (`libreoffice-writer` / `soffice`) on the host or container
130138
- Demo image: FrankenPHP **PHP 8.4** (Symfony 8.1)
131139

132-
[Unreleased]: https://github.com/nowo-tech/WordToPdfBundle/compare/v1.2.2...HEAD
140+
[Unreleased]: https://github.com/nowo-tech/WordToPdfBundle/compare/v1.2.4...HEAD
141+
[1.2.4]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.4
142+
[1.2.3]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.3
133143
[1.2.2]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.2
134144
[1.2.1]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.1
135145
[1.2.0]: https://github.com/nowo-tech/WordToPdfBundle/releases/tag/v1.2.0

docs/RELEASE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ After creating the release commit and tag, run `make check-no-cursor-coauthor` a
1111

1212
## Table of contents
1313

14+
- [Example for v1.2.4](#example-for-v124)
15+
- [Example for v1.2.3](#example-for-v123)
1416
- [Example for v1.2.2](#example-for-v122)
1517
- [Example for v1.2.1](#example-for-v121)
1618
- [Example for v1.2.0](#example-for-v120)
@@ -19,6 +21,40 @@ After creating the release commit and tag, run `make check-no-cursor-coauthor` a
1921
- [Example for v1.0.0](#example-for-v100)
2022
- [Sync missing releases](#sync-missing-releases)
2123

24+
## Example for v1.2.4
25+
26+
```bash
27+
git add -A
28+
git status # review
29+
make release-check
30+
git -c core.hooksPath=.githooks commit -m "$(cat <<'EOF'
31+
Release v1.2.4: restore 100% coverage for CI.
32+
33+
EOF
34+
)"
35+
git tag -a v1.2.4 -m "Release v1.2.4"
36+
make check-no-cursor-coauthor
37+
git push origin main
38+
git push origin v1.2.4
39+
```
40+
41+
## Example for v1.2.3
42+
43+
```bash
44+
git add -A
45+
git status # review
46+
make release-check
47+
git -c core.hooksPath=.githooks commit -m "$(cat <<'EOF'
48+
Release v1.2.3: php-cs-fixer alignment in LibreOfficeBinaryLocator.
49+
50+
EOF
51+
)"
52+
git tag -a v1.2.3 -m "Release v1.2.3"
53+
make check-no-cursor-coauthor
54+
git push origin main
55+
git push origin v1.2.3
56+
```
57+
2258
## Example for v1.2.2
2359

2460
```bash

docs/UPGRADING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Table of contents
44

55
- [Unreleased](#unreleased)
6+
- [To 1.2.4](#to-124)
7+
- [To 1.2.3](#to-123)
68
- [To 1.2.2](#to-122)
79
- [To 1.2.1](#to-121)
810
- [To 1.2.0](#to-120)
@@ -15,6 +17,26 @@
1517

1618
_Placeholder for the next release._
1719

20+
## To 1.2.4
21+
22+
No breaking public API changes. Safe to upgrade with:
23+
24+
```bash
25+
composer update nowo-tech/word-to-pdf-bundle
26+
```
27+
28+
### Behavioral notes (non-breaking)
29+
30+
- **CI / tests:** additional unit coverage for empty LibreOffice candidate paths and the empty-path guard in `LibreOfficeBinaryLocator` (restores the 100% line coverage gate).
31+
32+
### Breaking changes
33+
34+
None.
35+
36+
## To 1.2.3
37+
38+
No breaking public API changes. Patch release for php-cs-fixer alignment only.
39+
1840
## To 1.2.2
1941

2042
No breaking public API changes. Safe to upgrade with:

tests/Unit/Runtime/LibreOfficeBinaryLocatorTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Nowo\WordToPdfBundle\Runtime\LibreOfficeBinaryLocator;
88
use PHPUnit\Framework\TestCase;
9+
use ReflectionMethod;
910

1011
use const PATH_SEPARATOR;
1112

@@ -66,4 +67,28 @@ public function testEmptyPathEnv(): void
6667
$locator = new LibreOfficeBinaryLocator([], '');
6768
self::assertNull($locator->locate());
6869
}
70+
71+
public function testLocateSkipsEmptyCandidatePaths(): void
72+
{
73+
$dir = sys_get_temp_dir() . '/wtp_cand_empty_' . uniqid('', true);
74+
mkdir($dir);
75+
$script = $dir . '/soffice';
76+
file_put_contents($script, "#!/bin/sh\necho ok\n");
77+
chmod($script, 0755);
78+
79+
try {
80+
$locator = new LibreOfficeBinaryLocator(['', $script]);
81+
self::assertSame($script, $locator->locate());
82+
} finally {
83+
@unlink($script);
84+
@rmdir($dir);
85+
}
86+
}
87+
88+
public function testUsableNonEmptyPathRejectsEmptyString(): void
89+
{
90+
$locator = new LibreOfficeBinaryLocator([]);
91+
$method = new ReflectionMethod(LibreOfficeBinaryLocator::class, 'usableNonEmptyPath');
92+
self::assertNull($method->invoke($locator, ''));
93+
}
6994
}

0 commit comments

Comments
 (0)