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

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
Code:
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?
Reply
#2

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

The fix composer path solves it all. Thanks.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB