How to get started with Yii 3.0 application

Yes. REST doesn’t need command line.

what about ./yii serve or gii console commands? It’s not hard to replace them with PHP server or use Gii UI instead of Gii console (and I doubt if many people preferred them over web) but what about them since we can’t have Web either?

It depends on your application. These are both development tools so could be put into require-dev section of composer.json. But you can have queue consumers or utility command you want in production as well. In this case you need to put console dependency into require.

You mean putting console app as dev dependency?

If there’s nothing to execute at production server then yes, absolutely.

1 Like

Got it. Thanks!

But if I want to do some cron task in my REST app, counld yii cli tools included be better?

Yes. Then you move it from require-dev to require.

Hey.
Made the installation of the application as described here.
There is a problem with yii\db\mysql\Schema.
Attempting to submit a login form gave an error

  ` 2018-11-23 20:31:36 [127.0.0.1][-][u1ogsen5ulpefd5vosmfa4eg47][error]
    yii\di\exceptions\NotFoundException] yii\di\exceptions\NotFoundException:
    No definition for "yii\db\mysql\Schema" found in
    vendor/yiisoft/di/src/AbstractContainer.php:166`

The vendor is missing yii\db\mysql\Schema.
How to get the missing files?

Yes, because DB-related functionality isn’t ready yet. Yii 3.0 is work in progress…

1 Like

Will it be enough just to copy these files from yii2?

No, Yii 3.0 is different.

I can see the differences somewhere?

Yes, https://github.com/yiisoft/yii-core/blob/master/UPGRADE.md

do not recommend use?
for informational purposes only?

1 Like

Will it be possible to use Yii1 in parallel with Yii3, just like with Yii2? We were about to migrate a big Yii1 project to Yii2, but with Yii3 in development I think there would be a lot of work for nothing. But we can’t afford to stop development until we are fully migrated.

Trying to go through the Web application setup steps HERE gives this error:

@slo-nik sure since it’s not ready yet and it work in progress.

@SimonusA yes, it’s possible the same way. Still, mind that many parts of Yii 3.0 do not work and many will be changed before release.

Thank you.
With your help figured out a bit. It turned out to start the application, but without connecting to the database. While it is not necessary. I thought that the User model is the same as in yii2-basic, but it turned out that need to have a real table in the database.

I plugged in debug, but it works with an error. If I enter a nonexistent route into the address bar, I get a 404 error, and Error # 2 on the debug panel, but the logs contain only 404 errors.

In order to edit the template files need to transfer them to /src.
After that, i can delete yiisoft/yii-base-web? It will not affect the operation of the application?

1 Like