Closed jeffreyroberts closed 7 years ago
I tried to put a die in the ExtensionRegistry in _resolveClassName, but it doesnt die, so im a bit at a loss right now
Steps to reproduce locally....
#!/bin/bash
git clone https://github.com/CakePHPKitchen/CakeDC-API-Issue-27.git
cd CakeDC-API-Issue-27
composer install
bin/cake server -p 9001
Then navigate to
http://localhost:9001/api/foo/stats
Figured out why my die wasn't working, looks like there is 2 ExtensionRegistry.php files, almost identical...
I see there are two Extension folders as well, what I don't see is why one extension registry would be picked over another, and its picking the wrong one...
ok so I found the offending method, its in this method where we will decide to run
CakeDC\Api\Service\ExtensionRegistry
or
CakeDC\Api\Service\Action\ExtensionRegistry
Here is the method
public function extensions($extensions = null)
{
if ($extensions === null && $this->_extensions === null) {
$this->_extensions = new ExtensionRegistry($this);
}
if ($extensions !== null) {
$this->_extensions = $extensions;
}
return $this->_extensions;
}
Closed per #28