-
I haven't used Composer for years, I know how this user feels about it. So I wanted to answer this question. Below I will answer how to install Shield without Composer. But I never suggest not to use Composer. I don't do anything without Composer now. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Step 1: Download the latest version of Codeigniter4. Step 2: Download the latest version of Settings. Step 3: Download the latest version of Shield. Step 4: Edit file public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
'Config' => APPPATH . 'Config',
// add this lines
'CodeIgniter\\Settings' => APPPATH . 'ThirdParty/settings-2.1.0/src',
'CodeIgniter\\Shield' => APPPATH . 'ThirdParty/shield-1.0.0-beta.3/src',
]; and add : public $files = [
APPPATH . 'ThirdParty/shield-1.0.0-beta.3/src/Helpers/auth_helper.php',
APPPATH . 'ThirdParty/shield-1.0.0-beta.3/src/Helpers/email_helper.php',
]; Step5: Creating a database and setting it up. public $default = [
'DSN' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'imshield',
'DBDriver' => 'MySQLi',
'DBPrefix' => '',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
]; Or you can use file Step6: Now go to the root of your project ( php spark shield:setup Done.The shield was installed. Now ask yourself which installation method is easier? Type command If a new version is released for each package(shield, settings, CI4) which method is better and faster to update, typing command |
Beta Was this translation helpful? Give feedback.
-
My reason for wanting to try and make this hand-install recipe work is that I don't have SSH access using my current package with the ISP where I hope to use Codeigniter and shield. Getting SSH access would cost me an additional 50% on my ISP bill. Off the cuff, I wonder if I can codify these instructions in a post-update script for the git repository. Provided I have a test harness before I try it live, this should be as simple as "git pull" when there is an update to Codeigniter or shield. If this works, I will report back. |
Beta Was this translation helpful? Give feedback.
-
The both method, either composer way or install manually didn't work for me $ php spark shield:setup
CodeIgniter v4.4.1 Command Line Tool - Server Time: 2024-03-16 12:52:11 UTC+07:00
Command "shield:setup" not found. $ composer require codeigniter4/shield:dev-develop
Composer could not detect the root package (codeigniter4/framework) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Your GitHub credentials are required to fetch private repository metadata (https://github.com/kenjis/codeigniter4-extensions)
When working with _public_ GitHub repositories only, head here to retrieve a token:
https://github.com/settings/tokens/new?scopes=&description=Composer+on+localhost+2024-03-16+0553
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to:
https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost+2024-03-16+0553
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/data/data/com.termux/files/home/.composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
Token (hidden):
Token stored successfully.
In CurlDownloader.php line 647:
The "https://api.github.com/repos/kenjis/codeigniter4-
extensions" file could not be downloaded (HTTP/2 404 )
:
{"message":"Not Found","documentation_url":"https://do
cs.github.com/rest/repos/repos#get-a-repository"}
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>... |
Beta Was this translation helpful? Give feedback.
Step 1: Download the latest version of Codeigniter4.
Extract file
framework-4.x.x.zip
in any path (eg. P:\ShieldTest)Step 2: Download the latest version of Settings.
Extract file
settings-2.x.x.zip
inP:\ShieldTest\framework-4.x.x\app\ThirdParty
Step 3: Download the latest version of Shield.
Extract file
shield-1.0.0-beta.3.zip
inP:\ShieldTest\framework-4.x.x\app\ThirdParty
Step 4: Edit file
P:\ShieldTest\framework-4.x.x\app\Config\Autoload.php
: