Skip to content

define() in Events #5977

Description

@kenjis

I would like to move the following define() from the Events class file, because it causes an errors when using preloading.
Where should these be located?

define('EVENT_PRIORITY_LOW', 200);
define('EVENT_PRIORITY_NORMAL', 100);
define('EVENT_PRIORITY_HIGH', 10);

CRITICAL - 2022-05-08 06:28:21 --> Undefined constant "CodeIgniter\Events\EVENT_PRIORITY_NORMAL"
#0 /Users/kenji/work/codeigniter/ci3-and-4-benchmark/ci4/app/Config/Events.php(50): CodeIgniter\Events\Events::on('pre_system', Object(Closure))
#1 /Users/kenji/work/codeigniter/ci3-and-4-benchmark/ci4/vendor/codeigniter4/framework/system/Events/Events.php(94): include('/Users/kenji/wo...')
#2 /Users/kenji/work/codeigniter/ci3-and-4-benchmark/ci4/vendor/codeigniter4/framework/system/Events/Events.php(141): CodeIgniter\Events\Events::initialize()
#3 /Users/kenji/work/codeigniter/ci3-and-4-benchmark/ci4/vendor/codeigniter4/framework/system/CodeIgniter.php(308): CodeIgniter\Events\Events::trigger('pre_system')
#4 /Users/kenji/work/codeigniter/ci3-and-4-benchmark/ci4/public/index.php(37): CodeIgniter\CodeIgniter->run()
#5 {main}

Related #5974

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions