Answer the question
In order to leave comments, you need to log in
What is the problem of connecting the trait?
src\Controllers\Commands.php:
namespace Project\Controllers;
use Library\SubDir\Traits\Trait;
class Commands
{
use Trait;
...
'Library\\SubDir\\' => array($vendorDir . '/library/name/src'),
/library/name/src/Traits/Trait.php
Fatal error: Trait "Library\SubDir\Traits\Trait" not found in /project/src/Controllers/Commands.php on line 8
namespace Library\SubDir\Traits;
use Library\SubDir\Api;
trait Trait
{
...
Answer the question
In order to leave comments, you need to log in
The problem was in the specifics of the package, where for the trait to work correctly, you need to set certain properties for it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question