Closed Kimotu closed 1 year ago
Hi, welcome, We've made some changes to how helpers are loaded. Please run the following command and check again.
Composer Update
I don't know why this error happens.
This should work, because composer upgrade
is an alias for composer update
.
And Composer will autoload the helpers.
https://github.com/codeigniter4/shield/blob/5e6d5175da45b06dbe7d1deda03458d79d45a951/composer.json#L41-L44
@kenjis I just ran composer update
and email_helper.php
is gone. I'm using dev-develop branch
Edit:
I deleted shield
folder from vendor and ran composer update
and now it's fine. Strange :D
@jozefrebjak It is very strange! I think composer update
does not delete email_helper.
I don't know why your helper is gone.
PHP Version
7.4.6
CodeIgniter4 Version
4.2.8
Shield Version
1.0.0-beta.3
Which operating systems have you tested for this bug?
Linux
Which server did you use?
fpm-fcgi
Database
MariaDB
Did you customize Shield?
No.
No inherited classes, just own views.
What happened?
I upgraded to shield-1.0.0-beta3 (composer upgrade), checked new user creation with mail verification and got
Call to undefined function CodeIgniter\Shield\Controllers\emailer()
.I looked through the code. Three classes use emailer()
When I add
helper('email')
before each of the threeemailer()
calls, everything works as before.Steps to Reproduce
Upgrade to latest shield via composer and try a function that uses mails.
Expected Output
activation mail, 2FA or magic link mail sent
Anything else?
Was there a helper call in previous version or is something wrong in autoloading the helper class?