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

PHP7 compliance: annotation classes sometimes use reserved names #1368

Closed
zio-mitch opened this issue Feb 29, 2016 · 2 comments
Closed

PHP7 compliance: annotation classes sometimes use reserved names #1368

zio-mitch opened this issue Feb 29, 2016 · 2 comments

Comments

@zio-mitch
Copy link

The name of some of the annotations e.g. "String", "Boolean" are considered reserverd words in php7, so them cannot be used to name a class:
http://php.net/manual/en/reserved.other-reserved-words.php

If is intended to support PHP7, I can start working to this fix.

@alcaeus
Copy link
Member

alcaeus commented Feb 29, 2016

Hi! Thanks for the offer - we have indeed taken care of this already: #1205 prevents importing the annotation classes that use reserved words - so if you use @String somewhere it would fail because the annotation class was not found. To be consistent across our mappings and with ORM, #1318 deprecates all type annotations (e.g. @String, @Int) and replaces them with @Field(type="string"). This is what you should use for PHP 7.

@alcaeus alcaeus closed this as completed Feb 29, 2016
@ZioMitch
Copy link

ZioMitch commented Mar 4, 2016

Thank you so much for the help!

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

No branches or pull requests

3 participants