Closed WCrash7 closed 1 year ago
Use options as temporary fix
model(UserLicense::class, false);
Duplicate of #7694
If you have opinion, please post in #7694.
Dose model(UserLicense::class, false)
work?
Try:
model('User/LicenseModel');
Dose
model(UserLicense::class, false)
work?Try:
model('User/LicenseModel');
Yes, They both work as temporary fixes
PHP Version
8.2
CodeIgniter4 Version
4.3.6
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli-server (PHP built-in webserver)
Database
No response
What happened?
model() function returns same class when passing classes with different namespace and similar short name.
Steps to Reproduce
Store "LicenseModel ":
User "LicenseModel ":
Test:
Result: Store Model: App\Models\Store\LicenseModel User Model: App\Models\Store\LicenseModel
Expected Output
Store Model: App\Models\Store\LicenseModel User Model: App\Models\User\LicenseModel
Anything else?
No response