Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix expected variable type #139

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

IndraGunawan
Copy link
Contributor

error when run doctrine:schema:update --dump-sql after creating entity using maker-bundle because of the attribute type error.

for example when generate field with length 100 the annotation will be generate like this
@ORM\Column(type="string", length="100", nullable=true) and when run the schema update command will throw exception

In AnnotationException.php line 83:

  [Type Error] Attribute "length" of @ORM\Column declared on property App\Entity\Entity::$field expects a(n) integer, but got string.

and it is also affect for precision and scale

@weaverryan
Copy link
Member

Wow! This is an absolutely wonderful PR! Fixed the bug & a great test. Thank you @IndraGunawan!

@weaverryan weaverryan merged commit 7f16f06 into symfony:master Mar 21, 2018
weaverryan added a commit that referenced this pull request Mar 21, 2018
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fix expected variable type

error when run `doctrine:schema:update --dump-sql` after creating entity using maker-bundle because of the attribute type error.

for example when generate field with length 100 the annotation will be generate like this
`@ORM\Column(type="string", length="100", nullable=true)` and when run the schema update command will throw exception
```
In AnnotationException.php line 83:

  [Type Error] Attribute "length" of @Orm\Column declared on property App\Entity\Entity::$field expects a(n) integer, but got string.
```

and it is also affect for `precision` and `scale`

Commits
-------

7f16f06 Fix expected variable type
@IndraGunawan IndraGunawan deleted the fix-variable-type branch March 21, 2018 14:18
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