Skip to content

Conversation

@mickverm
Copy link
Contributor

@mickverm
Copy link
Contributor Author

I noticed that my current implementation doesn't support aliased use statements:

namespace App\Document;

-use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
+use Doctrine\ODM\MongoDB\Mapping\Attribute\Document;
+use Doctrine\ODM\MongoDB\Mapping\Attribute\Field;

-#[ODM\Document]
+#[Document]
 class Item
 {
-    #[ODM\Field(name: 'name')]
+    #[Field(name: 'name')]
     private string $name;

Is there another way to replace these attributes that I'm missing?

@TomasVotruba TomasVotruba marked this pull request as ready for review January 21, 2026 13:22
…e to 'Doctrine\ODM\MongoDB\Mapping\Attribute'
@mickverm mickverm force-pushed the annotations-namespace-to-attribute branch from 7f0604e to a3e2c86 Compare January 22, 2026 07:37
@TomasVotruba TomasVotruba merged commit 46e4f77 into rectorphp:main Jan 22, 2026
7 checks passed
@TomasVotruba
Copy link
Member

Looks good, thanks

@mickverm mickverm deleted the annotations-namespace-to-attribute branch January 22, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants