doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.86k stars 2.5k forks source link

Fix deprecation layer of Doctrine\ORM\ORMException #11430

Closed W0rma closed 2 months ago

W0rma commented 2 months ago

Fixes https://github.com/doctrine/orm/issues/11244

This PR starts using the new exception classes introduced by https://github.com/doctrine/orm/pull/8692 in Doctrine\ORM\ORMException.

This way it is ensured that the thrown exception is an instance of Doctrine\ORM\ORMException (= deprecated) and Doctrine\ORM\Exception\ORMException (= not deprecated).

W0rma commented 2 months ago

This PR also fixes PHP 7.1 compatibility of the test added in https://github.com/doctrine/orm/pull/11428 - this was necessary to make the CI green.

Please let me know if you prefer a dedicated PR for this change.

greg0ire commented 2 months ago

Thanks @W0rma ! Weird that there were no checks in #11428… as for #8692, I guess I must have missed these occurrences because of the new self syntax.