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

Does this work for CI 2? #14

Open
ipkpjersi opened this issue Feb 8, 2018 · 7 comments
Open

Does this work for CI 2? #14

ipkpjersi opened this issue Feb 8, 2018 · 7 comments

Comments

@ipkpjersi
Copy link

Hi, does this work for CodeIgniter 2.*? Thanks.

@natanfelles
Copy link
Owner

I do not know. And, I think that some classes have different names. You will need to check the User Guide and do some updates, but... Why do not start with CodeIgniter 4? CI 2 will be deprecated soon.

@ipkpjersi
Copy link
Author

I have old CI2 projects, I was wondering if this'd work on them before installing it and trying it out.

@natanfelles
Copy link
Owner

I never tested. Open the phpstorm.php file and see how it is done. You could customize your own file according with CI 2 and your project classes, if you want.

This article describe how to.

CI 4 help with code completion natively.

@guillermoizqgar
Copy link

Did you try it?

@guillermoizqgar
Copy link

I got it working on CI 2 with the same instructions you gave us.

@ipkpjersi
Copy link
Author

ipkpjersi commented Apr 17, 2018

Great to hear that it works with CI 2, I have been too busy to try it out but the confirmation that it works is certainly nice!

Mind sharing your custom CI 2 file with us - assuming there were changes that were needed to be made there?

@guillermoizqgar
Copy link

I just followed your instructions and it worked at first try, the only thing I have added is the same properties to both CI_Model and CI_controller in phpstorm.php, in order to get the definitions in my controllers and my models, aIthough do not know if that is a good practice

/* @Property example_model $example_model */
class CI_Controller{--}

/* @Property example_model $example_model */
class CI_Model{--}

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

3 participants