php-fhir
php-fhir copied to clipboard
R4 Builder throws exception Enum
PHP 8.1 [09-Sep-2022 22:00:22 UTC] PHP Fatal error: Uncaught UnexpectedValueException: Value 'AccountStatusEnum' is not part of the enum DCarbone\PHPFHIR\Enum\PrimitiveTypeEnum in C:\xampp\htdocs\php-fhir\vendor\myclabs\php-enum\src\Enum.php:245 Stack trace: #0 C:\xampp\htdocs\php-fhir\vendor\myclabs\php-enum\src\Enum.php(73): MyCLabs\Enum\Enum::assertValidValueReturningKey('AccountStatusEn...') #1 C:\xampp\htdocs\php-fhir\src\Definition\TypeDecorator.php(266): MyCLabs\Enum\Enum->__construct('AccountStatusEn...') #2 C:\xampp\htdocs\php-fhir\src\Definition.php(80): DCarbone\PHPFHIR\Definition\TypeDecorator::determinePrimitiveTypes(Object(DCarbone\PHPFHIR\Config\VersionConfig), Object(DCarbone\PHPFHIR\Definition\Types)) #3 C:\xampp\htdocs\php-fhir\bin\generate.php(468): DCarbone\PHPFHIR\Definition->buildDefinition() #4 {main} thrown in C:\xampp\htdocs\php-fhir\vendor\myclabs\php-enum\src\Enum.php on line 245
I have same exception. Using newest source code from master branch.
Looks like anything past rel 4.0.1 is not yet supported.
@sjpadgett @SkyKnight apologies for the lack of v4.3.0 support. I've updated master with the result of the last year or so of effort to modernize the output of this generator, and included the fix for this there.
If you could, please try the version in master and let me know if that addresses things for you.