How to get started with Yii 3.0 application

The project template for Yii 3.0 is located at https://github.com/yiisoft/yii-project-template.

Installation could be done like described in the corresponding README section of the template:

6 Likes

Thank you!

How can I run Gii inside Yii 3.0 template? I’ve tested using http://localhost:8080/index.php?r=gii without luck.

It’s not ready yet.

A good starting point for contributing is https://github.com/yiisoft/docs

2 Likes

Thank you very much! All of you are doing a great job.

where is the app logic, all I see is this

2 Likes

The main logic seems to reside in “yii-base-web” which is required in the composer.json of this template.

Yes, that’s the idea.

For now template installs web part as default but that may be changed.

1 Like

So if I want to customize the provided controllers, models & views (like SiteController or User) I need to go into vendor/ dir and edit them there, right?

I don’t like the idea of editing files in vendor, this is plain out wrong imo

Of course, no. You can add your own files.

1 Like

Most of the user files are under the “src” directory.
You can see the directory structure of “yii-base-web” here.

“yii-base-web” itself is a template.

3 Likes

Lucky I read this comment first.

I am afraid changes introduced in yii3 template will only push people away from the framework and community at large, and will confuse new comers, you will see people creating a mishmash of structures.

I remember when I first started yii it was the ease of building applications, a sensible directory structure was in place and lot of the code was already provided out of the box which made it super easy building apps.

perhaps we can have 3 different template but projects created from these templates must contain the files and directory structure.

2 Likes

for those who have composer asset plugin installed, I think --no-plugins should be added, ideally it should be disabled in composer.json.

edit well, that will also disable composer-config-plugin and the app will not work.

@alirz23 that’s likely to happen. That’s why Basic template vs new Yii 3.0 template

1 Like

If I follow the steps above, I get an empty repo cloned without any dependencies installed…

$ composer create-project --prefer-dist --stability=dev yiisoft/yii-project-template myapp1
Installing yiisoft/yii-project-template (dev-master 5a515dfc28e36f36d54a283c83da7f987c25a4dc)
  - Installing yiisoft/yii-project-template (dev-master master): Loading from cache
Created project in myapp1
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

Please see the update installation instructions https://github.com/yiisoft/yii-project-template#installation

Installing api does not generate vendor/bin/yii. Is that missing by design?