[RFC] Allow #[\Override] on class constants#20478
Conversation
|
Someone at MergePHP suggested this today, I'll write up the RFC when I have a chance |
f5fdc15 to
fc3124d
Compare
33a3179 to
f89b1f0
Compare
f89b1f0 to
4c749b6
Compare
44e5335 to
3f0f1d1
Compare
TimWolla
left a comment
There was a problem hiding this comment.
Looks correct, except for test remark. But please have someone else double-check the engine implementation.
| #[\Override] | ||
| public const C1 = 'C1'; | ||
| public const C2 = 'C2'; |
There was a problem hiding this comment.
C2 is not tested at all. The original Zend/tests/attributes/override/001.phpt test specifically had 4 cases to test all situations:
- p1: Override in PP and C.
- p2: Override in C, implementation in PP.
- p3: Override in PP.
- p4: Override in C, implementation in P.
There was a problem hiding this comment.
I added the cases from the origin test file which I think now covers everything
d1ac360 to
9af924d
Compare
|
Rebased onto latest master |
iluuu1994
left a comment
There was a problem hiding this comment.
I'm very sorry for the big delay. Some things got in the way yesterday.
Only a nit. The implementation looks correct. Too many tests for my taste.
e083a2c to
aedaf7b
Compare
|
Rebased and added UPGRADING, will merge once CI passes |
https://wiki.php.net/rfc/override_constants