sharkdaa.blogg.se

Yii2 Theme
Yii2 Theme







Yii2 Theme

  • describe the desired config in the README file and invite programmers to copy and paste it.
  • The author of an extension has two options: And the framework doesn't help here much. But even the simplest extension needs a config. Yii2 supports extensions and they enable the organization of reusable code and you can plug them into a project with composer. I have to slow down here and define a plugin. So yes, create a project as a plugin, split the project into plugins and assemble the application's config automatically from these configs or plugins. So here is the solution: Use a plugins based system - from the very beginning or outset.

    Yii2 Theme

    I want to share my solution to these outlined problems.

    Yii2 Theme

    But removing the copying and pasting of code will not hurt anyone. These problems become more acute for repeated projects when you have to deploy many/several similar projects with big/small changes. But then you've got a second problem - this extension needs configuring. The first one can be solved by separating the reusable code and turning it into an extension. This is the second problem.īoth these problems are covered together here because they are closely related.

    Yii2 Theme

    in a big project many extensions can be used - the application config becomes huge and unreadable. I notice I am copying and pasting again! This method causes problems, e.g. Then I find the example config for the extension in it's README and copy this example into my application config. This certainly poses the first problem with the current situation.Ĭurrently, how does a Yii2 project evolve? Choose suitable extensions and plug them in with composer. And conversely or similarly my improvements that are specifically generated from my tasks will not be accepted into the yii2-app-basic template. I do not get fixes to the template automatically into my project. My project and the template I notice develop separately now. Wham! I've copied and pasted it into my fork. How does one create a Yii2 project currently? I choose a template project: either basic or advanced, fork it, then edit and commit it, right there.









    Yii2 Theme