Yii Framework Forum

How to get started with Yii 3.0 application

(Alexander Makarov) #21

Yes. REST doesn’t need command line.

(Stefano Mtangoo) #22

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?

(Alexander Makarov) #23

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.

(Stefano Mtangoo) #24

You mean putting console app as dev dependency?

(Alexander Makarov) #25

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

(Stefano Mtangoo) #26

Got it. Thanks!

(shane) #27

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

(Alexander Makarov) #28

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

(slo-nik) #29

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 [][-][u1ogsen5ulpefd5vosmfa4eg47][error]
    yii\di\exceptions\NotFoundException] yii\di\exceptions\NotFoundException:
    No definition for "yii\db\mysql\Schema" found in

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

(Alexander Makarov) #30

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

(slo-nik) #31

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

(Alexander Makarov) #32

No, Yii 3.0 is different.

(slo-nik) #33

I can see the differences somewhere?

(Alexander Makarov) #34

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

(slo-nik) #35

do not recommend use?
for informational purposes only?

(Lostchall) #36

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.

(Lyubomir Parvanov) #37

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

(Alexander Makarov) #38

@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.

(slo-nik) #39

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.

(slo-nik) #40

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?