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