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

Add Type::GUID to $typeAlias list in EntityGenerator #6826

Merged
merged 1 commit into from
Nov 27, 2017
Merged

Add Type::GUID to $typeAlias list in EntityGenerator #6826

merged 1 commit into from
Nov 27, 2017

Conversation

JKapitein
Copy link
Contributor

Right now, when generating entities, a column of type 'guid' will generate the following PHPDoc:

/**
 * Get id
 *
 * @return guid
 */
public function getId() {...}

Since guid is not a valid PHP type, this throws a warning in PHPStorm, and I assume most IDEs.

Adding the type to the type alias list fixes the problem.

@carlosbuenosvinos
Copy link
Contributor

@JKapitein, thanks for your contribution! Would you mine to go a bit deeper and provide a unit test for this change? It would be awesome! Thanks!

@JKapitein
Copy link
Contributor Author

I've added the test. I ran it, and it passed with the type alias set and failed without it.

Right now, when generating entities, a column of type 'guid' will generate the following PHPDoc:

```
/**
 * Get id
 *
 * @return guid
 */
public function getId() {...}
```

Since guid is not a valid PHP type, this throws a warning in PHPStorm, and I assume most IDEs.

Adding the type to the type alias list fixes the problem.
Copy link
Member

@lcobucci lcobucci left a comment

Choose a reason for hiding this comment

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

I've rebased the branch to sync it with the latest version of master. LGTM 👍

@lcobucci lcobucci self-assigned this Nov 27, 2017
@lcobucci lcobucci added this to the 2.6.0 milestone Nov 27, 2017
@lcobucci lcobucci merged commit 92dd27f into doctrine:master Nov 27, 2017
@lcobucci
Copy link
Member

@JKapitein 🚢 it will be available on our next minor release. Thanks for your contribution!

@JKapitein JKapitein deleted the patch-1 branch November 28, 2017 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants