Apologies upfront if this question has been asked somewhere else or here even (search results did not give me what I was looking for). I would like to configure my core file to live in my own namespace meanwhile, say, application namespace seats somewhere.
Below is how the file structure is intended to be laid down.
app/Rentals
src/Core
Effectively, with the directory structure in mind I can have the following psr-4 autoloading entry in composer.json file.
{
...,
"psr-4": {
"Rentals\\": "app/",
"Selocrast\\": "src/"
}
}
Lastly I am going to show you my current phpspec.yaml file and the configuration it contains right now.
suites:
selocrast_suite:
namespace: Selocrat
rawson_suite:
namespace: Rentals
src_path: "%paths.config%/app"
extensions:
LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~
As it maybe seen on the configuration file above I did a few tweaks to get at least one namespace to work(the default). What I am struggling with is having multiple suites pointing to different namespace directories.
The type Rental\Component\Model\Entity\Simple was generated but could not be loaded. Do you need to configure an au toloader?
I am finding it difficult to move on with this setup is it something that PHPSpec is enforcing at code level? If not, what could I be doing wrong then?
Below is the version I am in:
$ bin/phpspec --version
phpspec 4.3.2
Is it a matter of creating an extension to manage my secondary namespace?