Skip to content

Commit 85f8951

Browse files
committed
Adding Events information in the 'Upgrading from 3.x to 4.x' section
1 parent 02565d1 commit 85f8951

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

user_guide_src/source/installation/upgrade_4xx.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ subforum for an up-to-date list!
102102

103103
- Helpers are pretty much the same as before, though some have been simplified
104104

105+
**Events**
106+
107+
- Hooks have been replaced by Events
108+
- Instead of CI3's ``$hook['post_controller_constructor']`` you now use
109+
``Events::on('post_controller_constructor', ['MyClass', 'MyFunction']);``,
110+
with the namespace ``CodeIgniter\Events\Events;``
111+
- Events are always enabled, and are available globally
112+
105113
**Extending the framework**
106114

107115
- You don't need a ``core`` folder to hold ``MY_...`` framework

0 commit comments

Comments
 (0)