Skip to content

Commit aa87f44

Browse files
authored
Merge branch 'gravitypdf' into feature/546-css-wide-keywords
2 parents 9fea0be + 0907abd commit aa87f44

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

‎CHANGELOG-GRAVITYPDF.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,13 @@ These changes do not change output.
421421
* **Glyph outline numbers.** A glyph outline's coordinates are written through `NumericString::decimal()`, as the colour glyphs and SVG paths write theirs. [#625]
422422
* **Snapshot tests.** Snapshot tests compare bytes first, then PDF objects, then pixels. Snapshot documents carry nothing of the machine that made them. [#72]
423423
* **Data scripts.** Composer scripts regenerate the Unicode, emoji, joining, language system, font cache, subset, shaping and grey profile data, and update snapshots.
424-
* **CI.** [#5] [#310] [#317] [#376] [#377] [#615]
424+
* **CI.** [#5] [#310] [#317] [#376] [#377] [#615] [#674]
425425
* CI runs on the `gravitypdf` branch, caches Composer downloads and uses current action versions.
426426
* It checks PDF/A and PDF/X-4 output with veraPDF, and tests e-invoices against the XML packages `composer.json` suggests.
427427
* The test suite runs under a 512M memory limit.
428428
* Pull requests run 6 of the 24 PHP and OS test jobs unless labelled `full-ci`. Pushes to `gravitypdf`, a nightly run and a manual run get all 24. A newer push to a pull request cancels the run it replaces.
429429
* Every workflow, code coverage included, also runs nightly on `gravitypdf` and can be run by hand.
430+
* The Windows test jobs no longer spend minutes on HTTP requests to localhost. A test left `$_SERVER['HTTP_HOST']` set, so every later test fetched each missing stylesheet or image from `http://localhost`, and on Windows each refused connection takes about two seconds. [#674]
430431
* The coding standard and PHPStan run as one Lint workflow. The e-invoice and PDF/X-4 checks run on a pull request only when it changes the code they cover.
431432
* **PHPStan.** Fixes for newer PHP versions and PHPStan 2.2.15. [#6] [#295] [#319] [#451]
432433
* **Branch alias.** The Composer branch alias maps `dev-gravitypdf` to `8.x-dev`. [#3]
@@ -909,3 +910,4 @@ These changes do not change output.
909910
[#648]: https://github.com/GravityPDF/mpdf/pull/648
910911
[#651]: https://github.com/GravityPDF/mpdf/pull/651
911912
[#652]: https://github.com/GravityPDF/mpdf/pull/652
913+
[#674]: https://github.com/GravityPDF/mpdf/pull/674

‎tests/Issues/Issue1700Test.php‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@
77
class Issue1700Test extends \Mpdf\BaseMpdfTest
88
{
99

10+
/**
11+
* @var string|null The HTTP_HOST the test found, put back afterwards so later documents do not take localhost as
12+
* their base path and try to fetch every missing asset from it
13+
*/
14+
private $httpHost;
15+
16+
/**
17+
* Remember the HTTP_HOST before the test changes it
18+
*/
19+
protected function set_up()
20+
{
21+
parent::set_up();
22+
23+
$this->httpHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null;
24+
}
25+
26+
/**
27+
* Put the HTTP_HOST back as the test found it
28+
*/
29+
protected function tear_down()
30+
{
31+
if ($this->httpHost === null) {
32+
unset($_SERVER['HTTP_HOST']);
33+
} else {
34+
$_SERVER['HTTP_HOST'] = $this->httpHost;
35+
}
36+
37+
parent::tear_down();
38+
}
39+
40+
/**
41+
* An absolute path with a space in its file name is read from disk when the base path is a browser session's
42+
*/
1043
public function testImageLoadingProblemForAbsolutePathsWithSpaceInTheFilename()
1144
{
1245
/* Mimic a browser-based session basepath */

0 commit comments

Comments
 (0)