php-fhir icon indicating copy to clipboard operation
php-fhir copied to clipboard

R4 Builder throws exception Enum

Open sjpadgett opened this issue 2 years ago • 2 comments

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

sjpadgett avatar Sep 09 '22 22:09 sjpadgett

I have same exception. Using newest source code from master branch.

SkyKnight avatar Oct 11 '22 19:10 SkyKnight

Looks like anything past rel 4.0.1 is not yet supported.

sjpadgett avatar Oct 11 '22 20:10 sjpadgett

@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.

dcarbone avatar Oct 30 '22 02:10 dcarbone