You are viewing revision #2 of this wiki article.
This is the latest version of this article.
You may want to see the changes made in this revision.
Yii 3 and many Yii 2 package sources are contained within src
directory which is convenient since you have less directories to check.
/config
/runtime
/src
/assets
/commands
/controllers
/mail
/models
/views
/widgets
/tests
/vendor
/web
yii
Let's start with the basic applicaiton template.
- Create
src
directory. - Move source directories there.
- Adjust
config/web.php
:
$config = [
// ...
'basePath' => dirname(__DIR__) . '/src',
'runtimePath' => dirname(__DIR__) . '/runtime',
'vendorPath' => dirname(__DIR__) . '/vendor',
// ...
];
And config/console.php
:
$config = [
// ...
'basePath' => dirname(__DIR__) . '/src',
'runtimePath' => dirname(__DIR__) . '/runtime',
'vendorPath' => dirname(__DIR__) . '/vendor',
// ...
];
That's it now you have both console and web application source code in src
.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.