Skip to content

Conversation

czosel
Copy link
Collaborator

@czosel czosel commented Apr 3, 2021

Copy of #697 with formatting fix applied.

@czosel czosel changed the base branch from master to php8 April 3, 2021 15:12
@czosel czosel changed the title Php promoted props v2 feat(php8): promoted props v2 Apr 3, 2021
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 96.118% when pulling dfd2abf on czosel:php-promoted-props-v2 into 0b7781f on glayzzle:php8.

@czosel czosel changed the title feat(php8): promoted props v2 feat(php8): promoted params v2 Apr 3, 2021
@czosel czosel merged commit dcbd0f7 into glayzzle:php8 Apr 3, 2021
public Repo|string|null $a;
}`)
).toMatchSnapshot();
it("Test promoted class properties php 8", function () {
Copy link
Member

@ichiriac ichiriac Apr 4, 2021

Choose a reason for hiding this comment

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

@czosel / @cseufert seems that it("Test class union properties", function () { was removed, is there a reason ?

const KIND = "parameter";

// eslint-disable-next-line no-unused-vars
const MODIFIER_PUBLIC = 1;
Copy link
Member

@ichiriac ichiriac Apr 4, 2021

Choose a reason for hiding this comment

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

@czosel / @cseufert not sure thats a good approach, flags are better in memory usage but not readable, here I've used a different approch in other classes : https://github.com/glayzzle/php-parser/blob/master/src/ast/classconstant.js#L12

@czosel
Copy link
Collaborator Author

czosel commented Apr 4, 2021

@ichiriac I'll go ahead and cc @cseufert who implemented this 😉

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

Successfully merging this pull request may close these issues.

4 participants