Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reverted] docs: fix event points descriptions #8055

Merged
merged 3 commits into from
Oct 22, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 18, 2023

Description
Fixes #8049

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • User guide updated
  • [] Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them documentation Pull requests for documentation only labels Oct 18, 2023
@kenjis kenjis force-pushed the docs-fix-event-points branch from c8898f0 to 82ccf15 Compare October 19, 2023 08:37
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments

@@ -153,6 +153,12 @@ Hooks
- Instead of CI3's ``$hook['post_controller_constructor']`` you now use
``Events::on('post_controller_constructor', ['MyClass', 'MyFunction']);``, with the namespace ``CodeIgniter\Events\Events;``.
- Events are always enabled, and are available globally.
- The hook point ``pre_controller`` and ``post_controller`` have been removed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this come from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source code, and the current docs.

$ grep -R Events::trigger system/
system//Database/BaseConnection.php:                Events::trigger('DBQuery', $query);
system//Database/BaseConnection.php:            Events::trigger('DBQuery', $query);
system//Database/BaseConnection.php:        Events::trigger('DBQuery', $query);
system//Database/MigrationRunner.php:        Events::trigger('migrate', $data);
system//Database/MigrationRunner.php:        Events::trigger('migrate', $data);
system//Database/BasePreparedQuery.php:                Events::trigger('DBQuery', $query);
system//Database/BasePreparedQuery.php:            Events::trigger('DBQuery', $query);
system//Database/BasePreparedQuery.php:        Events::trigger('DBQuery', $query);
system//Test/Mock/MockEmail.php:            Events::trigger('email', $this->archive);
system//CodeIgniter.php:        Events::trigger('pre_system');
system//CodeIgniter.php:            Events::trigger('post_controller_constructor');
system//CodeIgniter.php:        Events::trigger('post_system');
system//Email/Email.php:            Events::trigger('email', $this->archive);
system//Email/Email.php:        Events::trigger('email', $this->archive);

@kenjis kenjis merged commit 0ab6fb9 into codeigniter4:develop Oct 22, 2023
2 checks passed
@kenjis kenjis deleted the docs-fix-event-points branch October 22, 2023 21:41
@kenjis
Copy link
Member Author

kenjis commented Oct 22, 2023

Oh, v4.4.2 was already released!

@kenjis kenjis restored the docs-fix-event-points branch October 22, 2023 21:44
@kenjis kenjis changed the title docs: fix event points descriptions [Reverted] docs: fix event points descriptions Oct 22, 2023
@kenjis kenjis mentioned this pull request Oct 22, 2023
2 tasks
@kenjis kenjis deleted the docs-fix-event-points branch October 22, 2023 21:53
@kenjis
Copy link
Member Author

kenjis commented Oct 22, 2023

I created a new PR #8076

@MGatner
Copy link
Member

MGatner commented Oct 23, 2023

Sorry I missed that. New PR looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them documentation Pull requests for documentation only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event Point pre_system and post_system are different from the docs
2 participants