# I give a class name in a MauticPlugin\\... namespace and it creates a class in a Mautic\\Entity\\MauticPlugin\\... namespace

**URL:** <https://forum.mautic.org/t/i-give-a-class-name-in-a-mauticplugin-namespace-and-it-creates-a-class-in-a-mautic-entity-mauticplugin-namespace/35314>\
**Category:** Development\
**Created:** [March 19, 2025, 9:13pm UTC](https://forum.mautic.org/t/i-give-a-class-name-in-a-mauticplugin-namespace-and-it-creates-a-class-in-a-mautic-entity-mauticplugin-namespace/35314 "2025-03-19T21:13:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic.mayers](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dominic.mayers/32/13549_2.png) [@dominic.mayers](https://forum.mautic.org/u/dominic.mayers)\
**Post date:** [March 19, 2025, 9:13pm UTC](https://forum.mautic.org/t/i-give-a-class-name-in-a-mauticplugin-namespace-and-it-creates-a-class-in-a-mautic-entity-mauticplugin-namespace/35314/1 "2025-03-19T21:13:32Z")

</div>

**Your software**  
My Mautic version is: 6.x  
My PHP version is: 8.3.6  
My Database type and version is: mysql 8.0.41

**Your problem**  
My problem is: I don’t understand why make:entity does not use the namespace of the class name provided when creating an entity class.

These errors are showing in the log: No, Mautic does not see it as an error. It just does it.

Steps I have tried to fix the problem:

Here is what I did at the command line:

```auto
$ bin/console make:entity 

 Class name of the entity to create or update (e.g. OrangePopsicle):
 > MauticPlugin\MauticSocialBundle\Entity\Test2

 created: app/bundles/Entity/MauticPlugin/MauticSocialBundle/Entity/Test2.php
 created: app/bundles/Repository/MauticPlugin/MauticSocialBundle/Entity/Test2Repository.php

```

The namespace of `Test2` is `Mautic\Entity\MauticPlugin\MauticSocialBundle\Entity;` not  
`MauticPlugin\MauticSocialBundle\Entity` as in the input.

However, if I give an existing class, then it uses the given namespace and modify the existing class without moving it. For example:

```auto

 Class name of the entity to create or update (e.g. DeliciousKangaroo):
 > MauticPlugin\MauticSocialBundle\Entity\Test

 Your entity already exists! So let's add some new fields!

```

Then the existing class in `plugins/MauticSocialBundle/Entity/Test.php` is modified.

I searched in the documentation, but found no explanations. Is it the expected behaviour ?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 20, 2025, 8:47am UTC](https://forum.mautic.org/t/i-give-a-class-name-in-a-mauticplugin-namespace-and-it-creates-a-class-in-a-mautic-entity-mauticplugin-namespace/35314/2 "2025-03-20T08:47:04Z")

</div>

I’ve moved this to #Development where you’re more likely to get the right 👀 on it.
