diff --git a/README.md b/README.md index 02fe778..9817695 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,14 @@

## Important -- "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below**

+- "_**new Message()**_" is deprecated and could be removed in a future release. Use _**HL7 factory**_ class instead. See documents below

+- The global setting `SEGMENT_ENDING_BAR` is deprecated and will be removed in a future release. If you're using this in your code, replace it with `WITH_SEGMENT_ENDING_FIELD_SEPARATOR`. - Minimum supported PHP version has been updated to 8.0
Last supported versions:
- PHP 7.0 or 7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
- PHP 7.2 => [2.0.2](https://github.com/senaranya/HL7/tree/2.0.2)
- PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7) - PHP 8.1 => [3.1.7](https://github.com/senaranya/HL7/tree/3.1.8) -- The global setting `SEGMENT_ENDING_BAR` is deprecated and will be removed in a future release. Use -`WITH_SEGMENT_ENDING_FIELD_SEPARATOR` instead. ## Introduction @@ -158,7 +157,7 @@ Handle ACK message returned from a remote HL7 listener... use Aranyasen\HL7\Connection; $ack = (new Connection($ip, $port))->send($message); // Send a HL7 to remote listener $returnString = $ack->toString(true); -if (strpos($returnString, 'MSH') === false) { +if (str_contains($returnString, 'MSH') === false) { echo "Failed to send HL7 to 'IP' => $ip, 'Port' => $port"; } $msa = $ack->getFirstSegmentInstance('MSA'); diff --git a/UPGRADE.md b/UPGRADE.md index 5ad7288..dd87dff 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -9,5 +9,8 @@ - Using `new Message()` is deprecated, and might be removed in a future version. Use HL7 factory to create a new HL7 object instead. See readme on how to use it - `setSegment` method is deprecated. Use `insertSegment` instead - In `insertSegment`, added a replace parameter to replace a current segment in place + - Updated API docs - Added `replaceSegment` method + - PhpUnit bumped to v11 - Added `create` method in HL7 factory that is an alias to `createMessage` + - Code has been significantly cleaned up, especially in Message class