DDC-1487: orm:schema-tool:create. the generation of an entity does not use the @comments #1862

Closed
opened 2026-01-22 13:28:46 +01:00 by admin · 6 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 9, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user nonlux:

I wanted to set an example:

<?php /**** - @Entity @Table(name="prices") _/ class Money_Price { /_*\* @Id @Column(type="integer") @GeneratedValue **/ protected $_id; /**\* @Column(type="string", length="50") *_/ protected $_title; } doctrine-cli has created a wrong request CREATE TABLE Money_Price (_id VARCHAR(255) NOT NULL, _title VARCHAR(255) NOT NULL, PRIMARY KEY(*id)) ENGINE = InnoDB I debug doctrine packege DocParser use private function newAnnotation($name, $values) { if ($this->creationFn !== null) { $fn = $this->creationFn; return $fn($name, $values); } ``` return new $name($values); } ``` for create different Annotations. Doctrine\ORM\Mapping\Entity and others implements interface Annotation but this annotations classes have not construct function, what associated class properties whit values array Doctrine\Common\Annotations\Anotation has this constructor I think Annotations classes must extends Doctrine\Common\Annotations\Anotation
Originally created by @doctrinebot on GitHub (Nov 9, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user nonlux: I wanted to set an example: <?php /**** - @Entity @Table(name="prices") _/ class Money_Price { /_*\* @Id @Column(type="integer") @GeneratedValue **/ protected $_id; /**\* @Column(type="string", length="50") *_/ protected $_title; } doctrine-cli has created a wrong request CREATE TABLE Money_Price (_id VARCHAR(255) NOT NULL, _title VARCHAR(255) NOT NULL, PRIMARY KEY(*id)) ENGINE = InnoDB I debug doctrine packege DocParser use private function newAnnotation($name, $values) { if ($this->creationFn !== null) { $fn = $this->creationFn; return $fn($name, $values); } ``` return new $name($values); } ``` for create different Annotations. Doctrine\ORM\Mapping\Entity and others implements interface Annotation but this annotations classes have not construct function, what associated class properties whit values array Doctrine\Common\Annotations\Anotation has this constructor I think Annotations classes must extends Doctrine\Common\Annotations\Anotation
admin added the Bug label 2026-01-22 13:28:46 +01:00
admin closed this issue 2026-01-22 13:28:49 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2011):

Comment created by @beberlei:

I think you are combining the wrong versions of ORM and Common. Can you post the details from your Doctrine\Common\Version and Doctrine\ORM\Version constants?

@doctrinebot commented on GitHub (Nov 9, 2011): Comment created by @beberlei: I think you are combining the wrong versions of ORM and Common. Can you post the details from your Doctrine\Common\Version and Doctrine\ORM\Version constants?
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2011):

Comment created by nonlux:

ORM
VERSION = '2.2.0-DEV';
Common
VERSION = '2.1.2';

I download lastest Doctrine2 from php pear

@doctrinebot commented on GitHub (Nov 9, 2011): Comment created by nonlux: ORM VERSION = '2.2.0-DEV'; Common VERSION = '2.1.2'; I download lastest Doctrine2 from php pear
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2011):

Comment created by @beberlei:

Can you call "pear list -c doctrine" and list the output? It seems strange that you got 2.2.0-DEV through PEAR.

@doctrinebot commented on GitHub (Nov 9, 2011): Comment created by @beberlei: Can you call "pear list -c doctrine" and list the output? It seems strange that you got 2.2.0-DEV through PEAR.
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2011):

Comment created by nonlux:

Oh!!! I am donkey)))
Thank you, Benjamin.
I download 2 packeges, frirst from pear, second fromi don't know (possibly github)
And I realy mixed up the packages

But I'm right in the end.

in ORM 2.1.2
final class DiscriminatorColumn extends Annotation

in ORM 2.2.0-DEV
interface Annotation {}
final class Entity implements Annotation

This part of ORM-package changes in the stable version or change the parsing algorithm of comments?

@doctrinebot commented on GitHub (Nov 9, 2011): Comment created by nonlux: Oh!!! I am donkey))) Thank you, Benjamin. I download 2 packeges, frirst from pear, second fromi don't know (possibly github) And I realy mixed up the packages But I'm right in the end. in ORM 2.1.2 final class DiscriminatorColumn extends Annotation in ORM 2.2.0-DEV interface Annotation {} final class Entity implements Annotation This part of ORM-package changes in the stable version or change the parsing algorithm of comments?
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2011):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Nov 9, 2011): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/c3aa268beaa2259277fb

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/c3aa268beaa2259277fb - [11103_DoctrineAnnotations.php](https://gist.github.com/c3aa268beaa2259277fb#file-11103_DoctrineAnnotations-php)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1862