Class 'DI\ContainerBuilder' not found

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ayyashhilya
User
Posts: 20

Class 'DI\ContainerBuilder' not found

Post by ayyashhilya »

how to solustion in phpmaker 2021?
Fatal error: Uncaught Error: Class 'DI\ContainerBuilder' not found in C:\xampp\htdocs\....\...\index.php:35 Stack trace: #0 {main} thrown in C:\xampp\htdocs\....\....\index.php on line 35

arbei
User
Posts: 9389

Post by arbei »

Make sure you have run composer update. If you do not know what is "composer update', read: https://phpmaker.dev/doc/sysreq.htm#composer.

You better
1. Click Tools -> Delete Template Cache,
2. Delete all files in your project file and generate all files again,
3. Make sure composer update is run successfully after generation.

ayyashhilya
User
Posts: 20

Post by ayyashhilya »

error still appears
Fatal error: Uncaught Error: Class 'PHPMaker2021\ur\HttpErrorHandler' not found in C:\xampp\htdocs\ur\index.php:62 Stack trace: #0 {main} thrown in C:\xampp\htdocs\ur\index.php on line 62

arbei
User
Posts: 9389

Post by arbei »

I don't think your composer update was successful. Did you see the "vendor" folder?

You may try:
1. Delete composer.lock and "vendor" folder in the project folder,
2. Generate all files (including composer.json) again,
3. Open a command prompt or PowerShell at the project folder,
4. Enter "composer -V" to test your composer installation, make sure there is no error message.
5. Enter "composer update" to update. Then you should see a "vender" folder in the project file. In the "vendor" folder you should see many subfolders and an autoload.php.
6. In the project folder, you should find a "src" folder, in which you should find the HttpErrorHandler.php.
If the autoload.php is generated by composer correctly, your app should find the class HttpErrorHandler.

ayyashhilya
User
Posts: 20

Post by ayyashhilya »

Thank you for your help,
already successful

I hope phpmaker will be more successful

Post Reply