Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation of methods as being dropped in 2.x #154

Open
raziel057 opened this issue May 12, 2020 · 7 comments
Open

Deprecation of methods as being dropped in 2.x #154

raziel057 opened this issue May 12, 2020 · 7 comments

Comments

@raziel057
Copy link

raziel057 commented May 12, 2020

It's strange that you deprecate the following methods (tableize, classify, ...), because it's still used in Doctrine ORM:

For example Inflector::classify is used in:
https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/EntityRepository.php

@alcaeus
Copy link
Member

alcaeus commented May 13, 2020

The deprecation refers to the legacy API and instructs users to switch to the new API (found in the Doctrine\Inflector namespace without “Common”). The logic is still available.

@Healyhatman
Copy link

... instructs users to switch to the new API (found in the Doctrine\Inflector namespace without “Common”)

On Laravel what would I replace this with when adding new rules? Because Doctrine\Inflector\Inflector::rules is no good

Doctrine\Common\Inflector\Inflector::rules('plural', [
    '/^is$/' => 'are',
    '/^Is$/' => 'Are'
]);

@ninjasitm
Copy link

@Healyhatman I'm also experiencing the same issue but there is no documentation for how to migrate from this.

@alcaeus Do you have any insight on how to migrate to the new method of adding irregular inflection rules?

@garrettw
Copy link

garrettw commented Jun 2, 2020

@ninjasitm
Copy link

@garrettw Yes. But how do we do this in Laravel? Here you have to create an inflector instance where as before it was created statically. Can you help me out on this in case I'm missing something really simple?

@malarzm
Copy link
Member

malarzm commented Jun 2, 2020

@ninjasitm I'd suggest asking Laravel community about this. We're not documenting how other frameworks use and expose usage of Inflector to their users

@ninjasitm
Copy link

OK. Will create an issue on the laravel/framework github repo. If I find a solution I'll link back here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants