Download the PHP package romeldev/php-fhir-r5 without Composer
On this page you can find all versions of the php package romeldev/php-fhir-r5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download romeldev/php-fhir-r5
More information about romeldev/php-fhir-r5
Files in romeldev/php-fhir-r5
Package php-fhir-r5
Short Description HL7 FHIR R5 PHP library, PHP 7.4+ compatible. Generated from dcarbone/php-fhir and downgraded with Rector.
License Apache-2.0
Informations about the package php-fhir-r5
romeldev/php-fhir-r5
HL7 FHIR R5 PHP library, compatible with PHP 7.4+.
This package is a downgraded build of dcarbone/php-fhir (which targets PHP 8.1+), produced with Rector so it can be consumed by legacy applications — typically Laravel projects still on PHP 7.4.
It provides fully-typed PHP models for every FHIR R5 resource and data type, JSON & XML (de)serialization, validation rules, and a ready-to-use FHIR REST client.
Requirements
- PHP 7.4 or newer
- PHP extensions:
ctype,curl,dom,json,libxml,simplexml,xmlreader,xmlwriter
Installation
Usage
All classes live under the Romeldev\Fhir namespace. FHIR types for the R5 version are nested under Romeldev\Fhir\Versions\R5\Types.
Parse a FHIR JSON resource
Serialize a resource back to JSON
Parse FHIR XML
Use the REST client
Namespace layout
Compatibility notes
- No PHP 8+ features at runtime. Enums, union types,
match, named arguments andmixedhave been transformed to their PHP 7.4 equivalents (classes with constants, PHPDoc@return,switch, positional args, untyped). - Constants instead of enums. What was
enum Foo: stringin the original is nowclass Foo { public const XML = 'xml'; ... }. UseFoo::XMLas before — the API surface is unchanged. Type hints that originally referenced these enums (e.g.SerializeFormatEnum $format) have been rewritten tostringsince the constants are now string literals. #[Attribute]markers on classes are preserved as#[...]lines — PHP 7.4 parses them as single-line comments, so they are inert.- Warnings-free under PHP 7.4
php -l(includingXMLWritersubclass signature compatibility). - Test suite passes on PHP 7.4 — 5368 tests / 19743 assertions, using PHPUnit 9.6 and
symfony/polyfill-php80(forpreg_last_error_msg()).
Running the test suite
Upstream & attribution
All generation logic, schemas and the original library architecture belong to Daniel Carbone and the dcarbone/php-fhir project. This package only:
- Generates under a different PHP namespace (
Romeldev\Fhirinstead ofDCarbone\PHPFHIRGenerated). - Transpiles the output down to PHP 7.4 with Rector.
If you can run PHP 8.1+, prefer the upstream dcarbone/php-fhir-generated directly.
License
Apache License 2.0 — same as upstream. See LICENSE.
All versions of php-fhir-r5 with dependencies
ext-ctype Version *
ext-curl Version *
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-simplexml Version *
ext-xmlreader Version *
ext-xmlwriter Version *
psr/log Version ^1.1 || ^2.0 || ^3.0
composer/semver Version ^3.4
symfony/polyfill-php80 Version ^1.27