10quality / wpmvc-commands

Ayuco commands for Wordpress MVC,
MIT License
2 stars 4 forks source link

Rename CategoryModel to TaxonomyModel to remove confusion #22

Closed garretthyder closed 4 years ago

garretthyder commented 4 years ago

Hello @amostajo

Playing around still I was initially confused by the CategoryModel vs TermModel as a category is a single term of the category taxonomy.

What are your thoughts on renaming CategoryModel to TaxonomyModel to remove confusion as plugins aren't really expected to play with the pre-existing categories more they're likely to create a custom taxonomy so devs would better understand taxonomy.

I was going to setup a PR but it spans multiple repos as it would require not only the commands in this repo be updated but also the Model template itself which is in another repo.

Happy to work on a PR for this if you think it's worthy, would just need your help handling the merge as it would span multiple repos.

Thanks

amostajo commented 4 years ago

@garretthyder I understand your suggestion.

I think the confusion is caused because the category model was created in an earlier version, way before the TermModel was introduced.

The term model can perfectly cover all the functionality of the category model.

I think that instead of removing or renaming the category model, we should deprecate it and remove it from the documentation. Removing or renaming it will cause compatibility errors with existing projects using the framework, and we want to avoid this.

What do you think?

amostajo commented 4 years ago

I already removed it from the documentation menu. And has been labeled as DEPRECATED: https://www.wordpress-mvc.com/v1/models/category-models/

The command should print a deprecated message when used.

garretthyder commented 4 years ago

That's awesome @amostajo I think that's the best path forward. I think my confusion was thinking the catmodel was to spin up a taxonomy while the term one was for individual terms but that doesn't make much sense. The TermModel seems like it'll cover the desired need here.

Thank you