Version 8.1.0 contains cleanups, fixes, a few code refactorings most importantly leading to a new experimental feature of internal services container.
Note: as this is an experimental feature, key names and interface names for container services can and will change in future versions.
Container
A new optional parameter has been added to the Mpdf class constructor. It expects an instance of \Mpdf\Container\ContainerInterface (which is compatible and in mPDF 10.0 will be replaced by proper PSR-11 ContainerInterface), which can now override two internal services: HTTP client, and local filesystem resource loader.
HTTP Client
The Mpdf\Http\ClientInterface, also compatible with and planned to be upgraded to PSR-7 HTTP Client, can be used by the httpClient key of the passed Container and used to restrict remote HTTP calls, implementing HTTP requests cache, altering incoming responses etc. With a simple bridge, it can be used to leverage already used HTTP client in an existing application, such as Guzzle or Symfony HTTP Client.
By default, a simple implementation based on curl (if available) or sockets (as a fallback) is used.
Local filesystem content loader
The simple Mpdf\File\LocalContentLoaderInterface is used to load local content. Custom implementation by the container key localContentLoader can implement restrictions for certain directories of the filesystem to prevent outside HTML code loading unwanted files. Default implementation uses a simple file_get_contents call.
Unwanted stream wrappers are handled for all local and remote content fetches in an encapsulating internal service.
Support our work
Thank you for any work you put into mPDF - refactorings, bug fixes, new feature requests.
We also welcome any donation.
Yaaay! 22 million (!) downloads 🎉!
Hope number of downloads will keep rising!
Version 8.0.0 released
Version 8.0.0 contains code cleanups, a few minor fixes and features, and most importantly bump of internal dependency of the FPDI library to version 2.
This introduces a few breaking changes.
Method SetImportUse has been removed and ImportPage changed case to importPage and has a new signature:
public function importPage($pageNumber, $box = PageBoundaries::CROP_BOX, $groupXObject = true)
Library generating QR codes has been split to a separate package mpdf/qrcode. This reduced package size by about 6 MB. The library will raise an exception hinting to install the package with composer when needed and not present.
Complete changeset can be found in changelog and commit history.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/joachimdieterich/curriculum/network/alerts).
Bumps mpdf/mpdf from 6.1.4 to 8.1.6.
Release notes
Sourced from mpdf/mpdf's releases.
... (truncated)
Changelog
Sourced from mpdf/mpdf's changelog.
... (truncated)
Commits
146c7c1
Release v8.1.6465e6a8
Added support for psr/log v3 without dropping v2.1feff2a
Remove php-http/message-factory from deps637ef4d
Bump version constantc264ce2
Release v8.1.5267bf15
Use actions/checkout@v3865bca6
Fix PageBox missing keys on page-break avoid (Closes #1844, #1847)53b600f
Move hyphenation hyphen to another line when the line ends with another hyphe...b3d038d
More concise PHP version support table in readmeef90b4c
Ignore css variables in ColorConverter (Closes #1795)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/joachimdieterich/curriculum/network/alerts).