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

No ability to add usegroup for namespace. #5

Open
Sevavietl opened this issue Dec 14, 2017 · 2 comments
Open

No ability to add usegroup for namespace. #5

Sevavietl opened this issue Dec 14, 2017 · 2 comments
Assignees

Comments

@Sevavietl
Copy link
Contributor

Hello.

Thank you for the great library.

Are you going to implement ability for usegroup creation?

This can be very useful, when I, for example, what to extend class by fully qualified name. Then I can put this name as usergroup and extend with short name only. Same can be applied to implements.

Another great feature would be the ability to get first namespace or first entity of the code. Assuming the PHP code follows PSR-4, we then can get them from content without the need for providing the name.

Going even further we, having that, can determine the type of PHP file (class, interface, trait) only from its content.

Are those features out of scope of this library?

If not, I can try to implement them myself and make pull request.

Thank you in advance.

@ichiriac
Copy link
Member

Hi,

Great idea, could be a good feature !

Your PR is welcome, as the language features are not fully implemented (just what I needed for a project) fell free to add more support.

Just one thing, try to cover with tests your code as the code coverage is really low.

Thanks again for your proposal :)

@ichiriac
Copy link
Member

Just released it under 3.0.0 using your clone of php-unparser. I'll make a new release just after the ¨R chris-l/php-unparser#12 will be merged

@ichiriac ichiriac reopened this Dec 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants