composer-phpcodeigniter-4

Codeigniter shiled missing files after composer install


i've installed codeigniter4/appstarter by composer.

After that i installed shield by composer

Here is the log of the last parts:

bash-5.1$ /usr/local/php82/bin/php composer.phar require codeigniter4/shield
./composer.json has been updated
Running composer update codeigniter4/shield
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking codeigniter4/settings (v2.2.0)
  - Locking codeigniter4/shield (v1.1.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Downloading codeigniter4/shield (v1.1.0)
  - Installing codeigniter4/settings (v2.2.0): Extracting archive
  - Installing codeigniter4/shield (v1.1.0): Extracting archive
Generating optimized autoload files
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^1.1 for codeigniter4/shield
bash-5.1$ /usr/local/php82/bin/php spark shieldConfusedetup

CodeIgniter v4.5.5 Command Line Tool - Server Time: 2024-11-28 20:23:18 UTC+00:00

  Created: APPPATH/Config/Auth.php
  Created: APPPATH/Config/AuthGroups.php
  Created: APPPATH/Config/AuthToken.php
  Updated: APPPATH/Config/Autoload.php
  Updated: APPPATH/Config/Routes.php
  Updated: We have updated file 'APPPATH/Config/Security.php' for security reasons.
  Updated: APPPATH/Config/Email.php

  Run `spark migrate --all` now? [y, n]: y
Running all new migrations...
        Running: (CodeIgniter\Shield) 2020-12-28-223112_CodeIgniter\Shield\Database\Migrations\CreateAuthTables
        Running: (CodeIgniter\Settings) 2021-07-04-041948_CodeIgniter\Settings\Database\Migrations\CreateSettingsTable
        Running: (CodeIgniter\Settings) 2021-11-14-143905_CodeIgniter\Settings\Database\Migrations\AddContextColumn
Migrations complete.

After all, i see in my database some new "auth_"-tables.

If if look into the app/Controller folder - i miss all files about the authentification part for example "ActionController, LoginController, RegisterController..." Also in App/views is only the error-folder and the welcome-message files. I think there must be much more files for example "login, register etc"

Why this files not in my folders, normaly this files should copy by installtion with the composer or am i wrong?

It seems that all the files from the shield-package are not copied to my folder!?

What i do wrong and what i should do now?

I've download the shield-project files from guthub. There i see much more files as on my folder are in after install by composer, so i think something went wrong!?


Solution

  • For thouse like me who are not firm with composer, the goal is that composer create a "vendor" subfolder, in this subfolder are all files about the installed script. In my case all controllers and modells about the shield-extension.

    The connection from the main-folder and the main-framework scripts in the "app" folder will create on setup command (in my case "php spark shield:setup") here all the things will done (create tables in database, extend the base_controller and modells with the controllers in the vendort-subfolder etc.