I'm having some issues with namespaces in PHP.
I've got everything nailed down and working within my project which is all running great. I used composer's autoload features to autoload all my project classes.
Recently I've needed to pull in a dependency through composer for securimage (captcha application). The problem I've got is that it won't work until I go editing the files and insert the following at the top of each php script.:
<?php namespace vendor\dapphp\securimage;
My composer.json file is using PSR-4 if that helps identify where I'm going wrong.
"psr-4": {
"vendor\\dapphp\\securimage\\": "vendor/dapphp/securimage"
}
My question in case it isn't obvious how do I pull in composer vendor projects and make PHP automatically insert/understand that these should be placed under the namespace
vendor\{userid}\{projectid}
without editing the actual files within.
I'm sure I've just missed something within the composer.json file?