Skip to content

feat: Support custom application namespace#66

Open
georgeconstantinou wants to merge 3 commits intoCakeDC:4.next-cake5from
georgeconstantinou:issue-63
Open

feat: Support custom application namespace#66
georgeconstantinou wants to merge 3 commits intoCakeDC:4.next-cake5from
georgeconstantinou:issue-63

Conversation

@georgeconstantinou
Copy link
Copy Markdown

This changeset adds support for defining a custom application namespace via configuration, for example:

parameters:
    cakeDC:
        appNamespace: MyApp

Related issue: #63

This changeset adds support for defining a custom application namespace via configuration, for example:

```yaml
parameters:
    cakeDC:
        appNamespace: MyApp
```

Related issue: CakeDC#63
@dereuromark dereuromark added the enhancement New feature or request label Mar 26, 2026
@dereuromark
Copy link
Copy Markdown
Collaborator

@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.

@steinkel
Copy link
Copy Markdown
Member

@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

@dereuromark
Copy link
Copy Markdown
Collaborator

Yeah, IMO it should always be the "first" bullet point :)

@steinkel
Copy link
Copy Markdown
Member

Yeah, IMO it should always be the "first" bullet point :)

updated, thank you

@dereuromark
Copy link
Copy Markdown
Collaborator

@steinkel Another important one:
Screenshot from 2026-03-26 14-59-04

@steinkel
Copy link
Copy Markdown
Member

@steinkel Another important one: Screenshot from 2026-03-26 14-59-04

done

Copy link
Copy Markdown
Contributor

@rochamarcelo rochamarcelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in 4.2.0 to avoid issues if someone was using (unlikely) CakeNameRegistry or affected file.

Please check git conflicts.

*/
public function __construct(?CakeNameRegistry $cakeNameRegistry = null)
{
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed $this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();? PHPStan should inject CakeNameRegistry

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rochamarcelo this was added for BC (see #66 (comment)). I can revert the change if is not needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Lets keep it for now.

*/
public function __construct(?CakeNameRegistry $cakeNameRegistry = null)
{
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

*/
public function __construct(?CakeNameRegistry $cakeNameRegistry = null)
{
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

$this->methodName = 'helper';
$this->defaultClass = Helper::class;
$this->namespaceFormat = '%s\\Command\Helper\\%sHelper';
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

$this->className = $className;
$this->defaultClass = EntityInterface::class;
$this->namespaceFormat = '%s\\Model\Entity\\%s';
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

$this->className = $className;
$this->defaultClass = EntityInterface::class;
$this->namespaceFormat = '%s\\Model\Entity\\%s';
$this->cakeNameRegistry = $cakeNameRegistry ?? CakeNameRegistry::instance();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants