yiisoft / app

Yii3 application template

Home Page:https://www.yiiframework.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

composer run serve EventDispatcher error

julianrutten opened this issue · comments

What steps will reproduce the problem?

I just ran composer create-project --prefer-dist --stability=dev yiisoft/app app
And then composer run serve

What is the expected result?

Start development webserver

What do you get instead?

PHP Fatal error: Uncaught Yiisoft\Factory\Exceptions\NotFoundException: No definition for Psr\EventDispatcher\EventDispatcherInterface in <removed>/vendor/yiisoft/di/src/Container.php:222

Additional info

Unsure what about my system setup is wrong here, couldnt find anything regarding this on google or obvious packages I needed to install. What am I missing?

Q A
Version 1.0.?
PHP version 7.4.11
Operating system Ubuntu 20.04

I fixed this by adding the event-dispatcher provider to config/providers.php and the development webserver starts. However now I am getting this on request:
GET / - Uncaught Yiisoft\Injector\MissingRequiredArgumentException: Missing required argument "event" when calling "collect" in "/home/julian/yiisoft/app/vendor/yiisoft/yii-debug/src/Collector/WebAppInfoCollector.php" at line 32. in /home/julian/yiisoft/app/vendor/yiisoft/injector/src/Injector.php:147

Any ideas? Edit: when I disable yii-debug by setting enabled to false it works..

That last one I (temporarily) 'fixed' by disabling debug.

Apparently we tried that out at the same time haha, so at least im not the only one with the issue. Guess we will wait for fixes then, you guys can close this if it is a duplicate.

Likely is this case: yiisoft/di#185