Skip to content

CI4: Load_config class not found #3586

Closed

Description

@objecttothis

In the CI4 branch, we are needing to replace hooks with events. Currently loading the page renders:
image

The Load_config class now exists in app/Events/Load_config.php and seems to be namespaced properly. The CI3 method of doing this allowed you to specify the director that the class was in but CI4 doesn't have this.
Load_config is now called in an event in the app/Config/Events.php file.

Activity

  1. added this to the 3.4.0 milestone on Nov 1, 2022
  2. self-assigned this
    on Nov 1, 2022
  3. jekkos commented on Nov 6, 2022

    @jekkos
    Member

    So does this mean we can get rid of the hooks.php? Currently git considers it removed, so I can just keep it that way?

  4. linked a pull request that will close this issueFeature: CodeIgniter 4 upgrade #3592on Dec 10, 2022
  5. objecttothis commented on Jan 30, 2023

    @objecttothis
    MemberAuthor

    So does this mean we can get rid of the hooks.php? Currently git considers it removed, so I can just keep it that way?

    Correct, hooks become Events in CI4. I have moved the hooks in hooks.php to Events.php for now. We may need to adjust them later.

  6. objecttothis commented on Jan 30, 2023

    @objecttothis
    MemberAuthor

    This is working now with the update to CI 4.3.1. Either a bug was fixed or possibly a previous install of CI4 did not fully merge all the files properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions