I'm attempting to use a class from a repository I installed from packagist with composer. The PHP file I'm writing is under my Project
folder, along with the repository which is in Project>vendor
.
include "Project/vendor/autoload.php";
include "Project/vendor/smartcat/smartcat-api/src/SmartCAT/API/SmartCAT.php";
use SmartCAT\API\SmartCAT;
use SmartCAT\API\Model\CreateProjectWithFilesModel;
This is at the top of my file and it is how I'm retrieving the smartcat class from the repository. When I try to use the class I wrote $sc= new SmartCAT($login, $password);
. This causes the error: PHP Fatal error: Uncaught Error: Class 'SmartCAT\API\SmartCAT' not found in C:\Users\...\Project\createProject.php:20
. When I run get_included_files()
the necessary files are included. I'm not sure why I'm unable to use the class.