doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.65k stars 386 forks source link

Modernize codebase for PHP 8 #1351

Closed derrabus closed 11 months ago

derrabus commented 11 months ago
Q A
Type improvement
BC Break no
Fixed issues N/A

Summary

We require PHP 8.1 already, so let's use what PHP 8 has to offer for us.

derrabus commented 11 months ago

BC check failure:

[BC] CHANGED: The parameter $service of Doctrine\Migrations\DependencyFactory#setService() changed from no type to a non-contravariant object|callable [BC] CHANGED: The parameter $service of Doctrine\Migrations\DependencyFactory#setService() changed from no type to object|callable

I think those changes are safe. We've only ever accepted those types anyway and existing child classes that override this method without parameter types should continue to work.