Welcome Guest, Not a member yet? Register   Sign In
Class not found error

Following the procedure for Managing your Applications I installed the starter app then created two directories with their own app/ and public/ subdirectories, respectively, and modified the Config/Paths.php $systemDirectory, $writableDirectory, and $testDirectory in each to reflect the change. However, after
composer require guzzlehttp/guzzle
and calling
PHP Code:
var_dump(new \GuzzleHttp\Client()); 
on the default Home.php Controller I get a Class "GuzzleHttp\Client" not found error. If on the other hand I leave the app/ and public/ subdirectories and revert Config/Paths.php to its default values the var_dump works just fine (i.e. the guzzle Client object is created successfully). What configuration variable am I neglecting to set in order to locate the appropriate namespace and class?

You need to fix COMPOSER_PATH.
See https://codeigniter4.github.io/CodeIgnit...stallation

The fix composer path solves it all. Thanks.

Theme © iAndrew 2016 - Forum software by © MyBB