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

String vs String_ #192

Closed
basz opened this issue Apr 3, 2015 · 2 comments
Closed

String vs String_ #192

basz opened this issue Apr 3, 2015 · 2 comments

Comments

@basz
Copy link

basz commented Apr 3, 2015

I'm getting an 'Cannot redeclare class PhpParser\Node\Scalar\String' error if I do new PhpParser\Node\Scalar\String('foo').
Now I've noticed some changes to the namespaces and naming of classes to prepare for PHP7. So I'm not sure if this is a bug or that I should use String_ instead of String? I'm guessing string might be(come) a reserved word in 7?

I use 1.2.2 and PHP5.5.18

@nikic
Copy link
Owner

nikic commented Apr 3, 2015

You're right on all counts ... it's going to be reserved in PHP 7, you should use String_ and this is a bug. The old class name is still supposed to work. I messed up when fixing another class_alias issue :/

@basz
Copy link
Author

basz commented Apr 3, 2015

ok, now i know what i should do... :-) i'll leave the issue open on your behave... thanks

@nikic nikic closed this as completed in 6aaa87f Apr 3, 2015
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

2 participants