Scoping Interfaces implemented by Enums
Bug report
| Question | Answer |
|---|---|
| PHP-Scoper version | 0.18.17 |
| PHP version | 8.3.16 |
| Platform with version | macOS Sequoia 15.3.1 |
We have some Enums which do implement our own Interfaces. When bundling wich php scoper those Enums are not handled correctly.
Original File:
File after Scoped with "dcAGBundleMigration":
I would expect it to look like this (have a look at the changes in line 8):
Hmm the FQCN is not ideal but it should cause a problem either, does it?
Well, the FQCN in the actual output (Screenshot 2) is technically correct, but not as a scoped result as the file which could be loaded with that exact namespace (\General\Lib\Collection\Interface\CollectionItemInterface) does no longer exist in the places where this phar bundle (yes, we are bundling after scoping) is used. So it should just look like my expected output (Screenshot 3) where the use statement is still there (again - scoped correctly) as well as it is used in the implements section on line 8.
@theofidry any news so far?