Good day. I am not very strong in professional (team) development, I am just learning, so 2 questions arose:

Suppose I have a project in PHP and with the help of Composer I download a module, say, for my site on the Yii engine.

The module is placed in the Vendor folder, everything is put there together with the module: views, controllers, models. How do I rule, say, View? If I change this file (when it is in Vendor ), then all this will go into gitignore , and as a result my editing of the file will not be saved.

Do I really need to manually drag away all these files in the standard View, Controller, Model directories (+ all the logic and ways to correct), and this is all to change a simple php file? Or are these files simply not editable?

And then the second question: How can I transfer the entire project to the combat server from my computer?

Initially, I laid out the entire project on a githab, and then from the combat server I had already cloned the repository and downloaded the dependencies with the same package manager. But will Vendor be in a guitar player?

What am I mistaken?

  • 2
    In vendor files do not rule. - Visman
  • And how then can I use the downloaded module? Here is really all manually redoing? And if this module is updated? Sense then in everything in it - Ahmed228
  • inheritance, oop polymorphism in general, and in general many frameworks have walked with which you can publish views of a specific module, you can also redefine controllers and factories whatever you want and inherit from the base class. Or zayuzat patterns similar to the Observer. - Naumov
  • Classes yes, I can inherit and use. And, say, View? This is just a piece of PHP-HTML code. I do not inherit it? Should I not use the harvested View from Vendor at all? He goes there as a sample, it turns out? And already in my module, I make my View. And, probably, therefore in View there should be least all logic. I begin to understand? - Ahmed228
  • 1) My advice :) go to Laravel :) :) :) 2) Once you expand the class, it means there is a caller view method, create a view in the project folder and redefine the call - Orange_shadow

0