Welcome Guest, Not a member yet? Register   Sign In
Using phpCas in CI4 (Composer install)
#1

Dear all,
I installed the apereo/phpcas classes by means of Composer (which correctly appears in my vendor path: as directory App\ThirdParty\vendor\apereo\phpcas\source\CAS and file ...\source\CAS.php).
Now I want to use this class in a custom library, so I added 

PHP Code:
namespace App\Libraries;

use 
apereo\phpcas;

class 
Auth
{

      protected $cas;


    
      
public function __construct(){

        $this->cas = new phpCAS();
      

But I get the error:

Class "apereo\phpcas" not found
APPPATH/Libraries/Auth.php at line 10
7    public function __construct()
8    {
9
10        $this->cas = new phpCAS();


I'm rather new to Composer, but I believe Composer autoloading is active by default in CI4?
Many thanks in advance for your help or helpfull links/tuts!

Sincerely,


Zeff
Reply


Messages In This Thread
Using phpCas in CI4 (Composer install) - by Zeff - 03-26-2024, 02:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB