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

[Gii] Crud Generator table name 'd_xxxx' is wrong #397

Closed
atmanegara opened this issue Feb 9, 2019 · 6 comments
Closed

[Gii] Crud Generator table name 'd_xxxx' is wrong #397

atmanegara opened this issue Feb 9, 2019 · 6 comments
Labels
Milestone

Comments

@atmanegara
Copy link

What steps will reproduce the problem?

table name is d_polri
using Gii

  1. model generator
  2. CRUD Generator
    it's OK, but result for name folder view is 'dpolri' not 'd-polri'
    image
    so when it's accessed url is not found
    image

What is the expected result?

page index

What do you get instead?

rename folder view dpolri to d-polri
image

Additional info

Q A
Yii version 2.0.16
PHP version 7.1.20
Operating system Windows 10
@samdark samdark transferred this issue from yiisoft/yii2 Feb 11, 2019
@samdark samdark added the status:to be verified Needs to be reproduced and validated. label Feb 11, 2019
@schmunk42
Copy link
Contributor

Related commit: yiisoft/yii2@7c04ff0#diff-cc9bfd727870423bb306f65b04c230d4R102

I added a strict param to camel2id which AFAIR is not used by gii.

@machour machour removed the status:to be verified Needs to be reproduced and validated. label Feb 11, 2019
@machour
Copy link
Member

machour commented Feb 11, 2019

Just confirmed it. Passing strict as true fixes it, thank you @schmunk42!
Opening a PR.

@schmunk42
Copy link
Contributor

@machour Please think about making this an optional param for the generator as it might break existing CRUDs if they are regenerated. There are use-cases where you want the current behavior.

@machour
Copy link
Member

machour commented Feb 11, 2019

Oh, I thought that yiisoft/yii2@7c04ff0 broke BC and I was restoring it in #398, I didn't see that it was from 2014 :)

Would you expose this new parameter in cli & ui, or just allow to configure it through DI?

@schmunk42
Copy link
Contributor

To me DI would be enough to cover this edge-case

@samdark samdark added this to the 2.1.0 milestone Feb 13, 2019
@samdark samdark added the type:bug Bug label Feb 13, 2019
@samdark
Copy link
Member

samdark commented Feb 13, 2019

We're going to release 2.1 version so some minor BC breaks should be OK.

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

No branches or pull requests

4 participants