Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos in code in README #36

Open
bencresty opened this issue Jul 19, 2021 · 0 comments · May be fixed by #43
Open

Typos in code in README #36

bencresty opened this issue Jul 19, 2021 · 0 comments · May be fixed by #43

Comments

@bencresty
Copy link

bencresty commented Jul 19, 2021

Fyi: There are some typos in the example code in the README on how to register a custom provider;

The line $event->types[] = MyProvider:class is missing both a colon and a semicolon and throws an error when using it like this. When using this here it needed to be changed into

$event->types[] = MyProvider::class;

I don't know if there are other ways of making these publicly available, but in my case, in order to make it work, I had to add the Event use too, which isn't in the example:

use yii\base\Event;
// ...

I also needed to add namespaces to reach the custom provider, but not sure if that's really required as I'm not a full time php developer and focussed on front end.

Hope this helps.

@Mosnar Mosnar linked a pull request Aug 12, 2022 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant