one vendor for all projects

Most of my projects are on local network (“off internet”),
I like to downloads packages from the internet by composer and distribute the vendor folder to
all projects on local network.

You may just generate ALL the script files by using PHPMaker (make sure you have enabled Composer update from Generate tab menu), after that just copy the vendors folder to all of your local projects.

but I get this error:Fatal error: Uncaught Error: Class ‘PHPMaker2021\M_PROJ\HttpErrorHandler’ not found in C:\laragon\www\p2021\index.php:80 Stack trace: #0 {main} thrown in C:\laragon\www\p2021\index.php on line 80

You may try to re-generate ALL the script files to another new folder, and see whether this would help.

The file “composer.json” is same in all my projects except the “proj name” like this:“psr-4”: {
“PHPMaker2021\P1_PROJ\”: [
“src/”,
“models/”,
“controllers/”
]
}

Ok , I finde the solution:
the “project name” must be same in “autoload_psr4.php” & “autoload_static.php”

sal1150 wrote:

Ok , I finde the solution:
the “project name” must be same in “autoload_psr4.php”
& “autoload_static.php”

Hi. May I know what exactly did you do about this? Thank you

That means you may open the above 2 files in the folder generated “vendor\composer” folder and replace, for example, ‘PHPMaker2021\project1\’, by another project name, for example, ‘PHPMaker2021\project2\’.