Composer.json is missing from project

I am left with a previously developed yii project that I now have to manage. The app is functional and running on a server. I tried to download file tree to set up a local instance of the app to get a look at the code etc.

I am noticing that the filesystem is not canon, for example:

  • All “major” folders are not in main path, but inside a ‘protected’ folder, such as ‘controllers’, ‘components’ etc
  • In the ‘protected/config’ folder there isn’t a ‘web.php’ file. Instead there is a ‘main.php’ that contains the configuration.
  • There isn’t a ‘web’ folder altogether.
  • ‘index.php’ is in main path
    These are a few examples. Was directory structure different in Yii 1 ?
    And the most baffling question that I have is that there isn’t a ‘composer.json’ or ‘composer.lock’ file to be found anywhere. How is this possible?

Yes, the directory structure was different in 1.x and composer was introduced in 2.0.

You can find the directory structure in this page (scroll down).

1 Like

Yii 1.1 was created before Composer was a thing and it could be used without Composer. It is possible that this application have manually managed dependencies (it is much easier to manage than modern projects, since your main dependency is framework itself and probably a few standalone extensions).

1 Like

Thank you all for your help!