You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ class Foo extends Command
118
118
119
119
#### Several traits conflict?
120
120
121
-
If you're using some other cool `illuminated/console-%` packages, well, you can find yourself getting "traits conflict".
121
+
If you're using some other cool `illuminated/console-%` packages, well, then you can find yourself getting "traits conflict".
122
122
For example, if you're trying to build [loggable command](https://packagist.org/packages/illuminated/console-logger), which is protected against overlapping:
123
123
```php
124
124
class Foo extends Command
@@ -130,7 +130,7 @@ class Foo extends Command
130
130
}
131
131
```
132
132
133
-
You'll get fatal error here, the "traits conflict", because both of these traits are overriding `initialize` method:
133
+
You'll get fatal error, the "traits conflict", because both of these traits are overriding `initialize` method:
134
134
>If two traits insert a method with the same name, a fatal error is produced, if the conflict is not explicitly resolved.
135
135
136
136
But don't worry, solution is very simple. Just override `initialize` method by yourself, and initialize traits in required order:
0 commit comments