Deprecation notices from doctrine/inflector 1.4 #6465

Closed
opened 2026-01-22 15:33:39 +01:00 by admin · 7 comments
Owner

Originally created by @W0rma on GitHub (May 12, 2020).

Bug Report

Q A
BC Break no
Version 2.7/2.8.x

Summary

The old inflector API is deprecated since doctrine/inflector 1.4.

The new API is available in inflector 1.4. The new API should be used for 2.7/2.8 and master. See https://github.com/doctrine/common/issues/889

Current behavior

The following deprecation is triggered by https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/EntityRepository.php#L305

The "Doctrine\Common\Inflector\Inflector::classify" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector 

API.

How to reproduce

Just install this package together with doctrine/inflector 1.4.

Expected behavior

No deprecation should be triggered

Originally created by @W0rma on GitHub (May 12, 2020). ### Bug Report | Q | A |------------ | ------ | BC Break | no | Version | 2.7/2.8.x #### Summary The old inflector API is deprecated since `doctrine/inflector` 1.4. The new API is available in inflector 1.4. The new API should be used for 2.7/2.8 and master. See https://github.com/doctrine/common/issues/889 #### Current behavior The following deprecation is triggered by https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/EntityRepository.php#L305 The "Doctrine\Common\Inflector\Inflector::classify" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API. #### How to reproduce Just install this package together with `doctrine/inflector` 1.4. #### Expected behavior No deprecation should be triggered
admin closed this issue 2026-01-22 15:33:39 +01:00
Author
Owner

@dkmuir commented on GitHub (Jul 28, 2020):

Deprecations are still being thrown in 2.7.

@dkmuir commented on GitHub (Jul 28, 2020): Deprecations are still being thrown in 2.7.
Author
Owner

@BurningDog commented on GitHub (Aug 3, 2020):

I'm also seeing deprecations in 2.7. The PR which fixes this - https://github.com/doctrine/orm/pull/8147 - says

This cannot go into 2.7, because it would raise PHP dependency from 7.1 to 7.2.

So we have to upgrade to 2.8.

@BurningDog commented on GitHub (Aug 3, 2020): I'm also seeing deprecations in 2.7. The PR which fixes this - https://github.com/doctrine/orm/pull/8147 - says > This cannot go into 2.7, because it would raise PHP dependency from 7.1 to 7.2. So we have to upgrade to 2.8.
Author
Owner

@dkmuir commented on GitHub (Aug 4, 2020):

I'm also seeing deprecations in 2.7. The PR which fixes this - #8147 - says

This cannot go into 2.7, because it would raise PHP dependency from 7.1 to 7.2.

So we have to upgrade to 2.8.

Fair enough. However, I would have thought deprecation warnings should only come into place once 2.8 is stable? Otherwise we're just getting warnings about something we can't actually do anything about.

@dkmuir commented on GitHub (Aug 4, 2020): > I'm also seeing deprecations in 2.7. The PR which fixes this - #8147 - says > > > This cannot go into 2.7, because it would raise PHP dependency from 7.1 to 7.2. > > So we have to upgrade to 2.8. Fair enough. However, I would have thought deprecation warnings should only come into place once 2.8 is stable? Otherwise we're just getting warnings about something we can't actually do anything about.
Author
Owner

@BurningDog commented on GitHub (Aug 4, 2020):

Yes, one would think so! The Symfony 5 upgrade docs say to first fix all deprecation errors before upgrading, and this deprecation error is unfixable based on the currently used version of Doctrine. It seems quite messy to me, and I get annoying deprecation warnings every time I run unit tests - which I can do nothing about (and no, I'm not going to configure php to hide deprecation warnings; that's beside the point).

What I don't understand is, the 2.8 branch uses exactly the same Inflector API call! Compare:

2.7: https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/EntityRepository.php#L305
2.8 (master): https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/EntityRepository.php#L259

@BurningDog commented on GitHub (Aug 4, 2020): Yes, one would think so! The Symfony 5 upgrade docs say to first fix all deprecation errors before upgrading, and this deprecation error is unfixable based on the currently used version of Doctrine. It seems quite messy to me, and I get annoying deprecation warnings every time I run unit tests - which I can do nothing about (and no, I'm not going to configure php to hide deprecation warnings; that's beside the point). What I don't understand is, the 2.8 branch uses _exactly_ the same Inflector API call! Compare: 2.7: https://github.com/doctrine/orm/blob/2.7/lib/Doctrine/ORM/EntityRepository.php#L305 2.8 (master): https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/EntityRepository.php#L259
Author
Owner

@sbacelic commented on GitHub (Sep 30, 2020):

@BurningDog 2.8 is in another branch https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/EntityRepository.php#L317

@sbacelic commented on GitHub (Sep 30, 2020): @BurningDog 2.8 is in another branch https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/EntityRepository.php#L317
Author
Owner

@GPHemsley commented on GitHub (Oct 29, 2020):

Is there any word on when 2.8.0 will see a release to fix this? The milestone seems to still have a lot of open issues.

@GPHemsley commented on GitHub (Oct 29, 2020): Is there any word on when 2.8.0 will see a release to fix this? The milestone seems to still have a lot of open issues.
Author
Owner

@beberlei commented on GitHub (Oct 29, 2020):

Around PHP 8 release in a month

@beberlei commented on GitHub (Oct 29, 2020): Around PHP 8 release in a month
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6465