dcarbone / php-fhir

Tools for consuming data from a FHIR server with PHP
Apache License 2.0
129 stars 40 forks source link

PHPFHIRConfigKeyEnum::values() returning no results, thus setting PHPFHIRConfig doesn't work at all #128

Closed yunosh closed 3 months ago

yunosh commented 3 months ago

This is because the UnitEnum::cases() method returns a list of enums, not a list of descriptive array (see https://www.php.net/manual/en/unitenum.cases)

You cannot use this: https://github.com/dcarbone/php-fhir/blame/fdfdfc85f87bf2cb92e3931a7929f7bdc4edf8e0/template/core/enums/enum_config_key.php#L72

dcarbone commented 3 months ago

I have decided that the trait and its use were useless, and have opted to simply update each of the individual enum funcs with more succinct implementations where needed.

yunosh commented 3 months ago

See also PR #129

dcarbone commented 3 months ago

@yunosh I've release v3.0.6 with a fix for this, as well as a test to help ensure it doesn't break in the future.

Could you test v3.0.6 output and let me know if this addresses it for you?

yunosh commented 3 months ago

Yes, this works for me now, but see my other comment in the PR about a BC break (that doesn't affect me personally though).