-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Started reworking expression strings into Expression objects #307
base: 5.x
Are you sure you want to change the base?
Conversation
Values of constants, named arguments, etc, should be parsed to include types and FQSENs that can be used in phpDocumentor to display links with. Since these are now simple strings, I have refactored this into a template string system with placeholder values that a consumer could replace with its own values.
We have added a couple of deprecation messages, but they trip up running unit tests. The only way I could fix this was to disable E_USER_DEPRECATED error reporting while running tests
The conversion from PHP-Parser's node to an Expression needs to take into account whether the provided parser is an Expression parser or the usual Standard parser. If it is an ExpressionParser, we can create a real Expression out of it
As part of checking whether everything works as expected I am adding integration tests, and find out that the pretty printer can be a bit greedy. This is exemplified in the ConstructorPromotionTest where I want to pass a reference to a local class constant, but the ExpressionPrinter picks up on the class reference and does not resolve it. This is a major issue, and more work is needed to a) parse the whole FQSEN and use that b) find out how to resolve references, such as self Another test is needed to see if it resolves relative references as well, as the Standard PrettyPrinter code gives me the idea it does not.
As part of checking whether everything works as expected I am adding This is a major issue, and more work is needed to a) parse the whole FQSEN and use that Another test is needed to see if it resolves relative references as |
Values of constants, named arguments, etc, should be parsed to include types and FQSENs that can be used in phpDocumentor to display links with. Since these are now simple strings, I have refactored this into a template string system with placeholder values that a consumer could replace with its own values.
TODO: