xref: /plugin/totext/vendor/prinsfrank/pdfparser/UPGRADING.md (revision b4ecfc82b02c9a76205381a28b47006474ccf569)
1# Upgrading from 2.x to 3.x
2
3- Dropped support for PHP8.1. It already [hasn't got security updates since the start of the year](https://www.php.net/supported-versions.php), so please upgrade your PHP version if this affects you.
4- All internal classes with readonly properties have [now become readonly classes](https://github.com/PrinsFrank/pdfparser/pull/339). If you extend any of these in your own code, the extending class should also be marked as readonly.
5- `Dictionary::getValueForKey()` now has a new first argument: `Document $document`. This is needed to resolve any references and decrypt values in encrypted documents
6- `Dictionary::getType()` and `Dictionary::getSubType()` now have a new first argument: `Document $document`.
7- `ColorSpace::getComponents()` now requires an instance of `Document` as an argument
8- `RasterizedImage::toPNG()` now requires an instance of `Document` as an argument
9