-
Poetawd Member
  
-
Posts: 66
Threads: 12
Joined: Jul 2016
Reputation:
1
10-31-2019, 02:16 PM
(This post was last modified: 10-31-2019, 02:57 PM by Poetawd.)
Hello All !
First of all, Thank you very much Lonnie for this mythic auth library !
Following the installation instruction, I used composer with the command:
PHP Code: composer require myth/auth
And I got the following error:
I am not a "composer" guy I´m from the time we had to download the zip file and upload it using FTP... hehe
Is there a way to install it without composer ?
Tried this:
Code: λ composer require myth/auth:*
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package myth/auth * is satisfiable by myth/auth[dev-develop, dev-entityrefactor, dev-services, v1.0-beta] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
-
Poetawd Member
  
-
Posts: 66
Threads: 12
Joined: Jul 2016
Reputation:
1
(11-01-2019, 09:04 AM)kilishan Wrote: You're right, I should add manual installation instructions back in. Had it there at one point, but then got it up on Packagist so Composer install would work and I replaced it instead of augmented the instructions. I'll get that remedied soon-ish.
The beauty of auto-loading is that you can place those files anywhere on the system you want (maybe app/ThirdParty?). Then you just have to tell the autoloader where to find it by editing app/Config/Autoload.php and add the Myth\Auth namespace to the $psr4 array.
PHP Code: $psr4 = [ 'Config' => APPPATH . 'Config', APP_NAMESPACE => APPPATH, 'App' => APPPATH, 'Myth/Auth' => APPPATH .'ThirdParty/Myth/Auth/src', ];
Since CI4 have the option to be installed without composer, a good library should also have that option...
I will keep the app folder only with my own code. I will place the Myth/Auth inside root/third-party (just my personal taste)
Another question, is auto-loading really required ? I mean, is it going to be loaded in every controller ? What about the controllers that doesn´t require it ? Is there a way to load it just when it is needed ?
Thanks again !
|