Gii customized templates and Yii core update

Hi,

What should be done when there’s a Yii source update that involves Gii ?

All gii customized templates should be checked/rebuilt ?

thanks

I don’t actually follow your question? What is your problem?

Gii customized templates are exactly that the name says: just… templates. How would you like to rebuild them?

When I’m updating you I’m simply copying customized Gii templates to an outside folder and copy them back after update.

What seems to be the problem?

If the core evoluates and the generated code has to evoluate the same way, templates may need to be adjusted, or not. I don’t know. It was just a question.

I guess you mean additional futures that shows up in newer versions, is that right? So when something new is available in newer version, gii usually uses that new future in generated demo blog (ex. Yii 1.1 introduced breadcrumbs so it is used in blog demo and crud generator since then).

As far as I know there is no way to update older template to new one if you made any changes to your application. So if you generated crud and try to generate new one from newer yii version it will show you which files will be overwritten but there is no way to update existing file without loosing your changes. You could always generate new crud and use some diff program to compare what is new and apply changes you want.

Yes I think we’ll have to use diff to check the differences between the new generated code and the generated code we have in our templates, to see if adjustments are needed.

Before that you can just take a look at changelog and look for new futures and enhancements :)

Yes, that’s what I’ll do.

Anyway I really enjoy the ease of use of the system to generate some code.