feat: Support custom application namespace#66
feat: Support custom application namespace#66georgeconstantinou wants to merge 3 commits intoCakeDC:4.next-cake5from
Conversation
This changeset adds support for defining a custom application namespace via configuration, for example:
```yaml
parameters:
cakeDC:
appNamespace: MyApp
```
Related issue: CakeDC#63
|
@steinkel Could you maybe change the default in github settings for this repo to not require manual workflow runs? I think I usually select it to "only for new members" or something. |
This is our current config https://ss.jorge-gonzalez.net/ss_20260326_111103_JbhSFbQw.png |
|
Yeah, IMO it should always be the "first" bullet point :) |
updated, thank you |
… if no instance is provided
ed64366 to
3072552
Compare
|
@steinkel Another important one: |
done |
| */ | ||
| public function __construct(?CakeNameRegistry $cakeNameRegistry = null) | ||
| { | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |
There was a problem hiding this comment.
Why is this needed $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();? PHPStan should inject CakeNameRegistry
There was a problem hiding this comment.
@rochamarcelo this was added for BC (see #66 (comment)). I can revert the change if is not needed.
There was a problem hiding this comment.
Okay. Lets keep it for now.
| */ | ||
| public function __construct(?CakeNameRegistry $cakeNameRegistry = null) | ||
| { | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |
| */ | ||
| public function __construct(?CakeNameRegistry $cakeNameRegistry = null) | ||
| { | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |
| $this->methodName = 'helper'; | ||
| $this->defaultClass = Helper::class; | ||
| $this->namespaceFormat = '%s\\Command\Helper\\%sHelper'; | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |
| $this->className = $className; | ||
| $this->defaultClass = EntityInterface::class; | ||
| $this->namespaceFormat = '%s\\Model\Entity\\%s'; | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |
| $this->className = $className; | ||
| $this->defaultClass = EntityInterface::class; | ||
| $this->namespaceFormat = '%s\\Model\Entity\\%s'; | ||
| $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance(); |


This changeset adds support for defining a custom application namespace via configuration, for example:
Related issue: #63