diff --git a/composer.lock b/composer.lock index 41666bb..7b6fd76 100644 --- a/composer.lock +++ b/composer.lock @@ -1799,11 +1799,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.33", + "version": "2.1.54", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f", - "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8be50c3992107dc837b17da4d140fbbdf9a5c5bd", + "reference": "8be50c3992107dc837b17da4d140fbbdf9a5c5bd", "shasum": "" }, "require": { @@ -1848,7 +1848,7 @@ "type": "github" } ], - "time": "2025-12-05T10:24:31+00:00" + "time": "2026-04-29T13:31:09+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2296,21 +2296,21 @@ }, { "name": "rector/rector", - "version": "2.3.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "9afc1bb43571b25629f353c61a9315b5ef31383a" + "reference": "e645b6463c6a88ea5b44b17d3387d35a912c7946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/9afc1bb43571b25629f353c61a9315b5ef31383a", - "reference": "9afc1bb43571b25629f353c61a9315b5ef31383a", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/e645b6463c6a88ea5b44b17d3387d35a912c7946", + "reference": "e645b6463c6a88ea5b44b17d3387d35a912c7946", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.33" + "phpstan/phpstan": "^2.1.48" }, "conflict": { "rector/rector-doctrine": "*", @@ -2344,7 +2344,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.3.1" + "source": "https://github.com/rectorphp/rector/tree/2.4.2" }, "funding": [ { @@ -2352,7 +2352,7 @@ "type": "github" } ], - "time": "2026-01-13T15:13:58+00:00" + "time": "2026-04-16T13:07:34+00:00" }, { "name": "sebastian/cli-parser", diff --git a/src/Command/ImportCodesCommand.php b/src/Command/ImportCodesCommand.php index e2f56b9..f6596d4 100644 --- a/src/Command/ImportCodesCommand.php +++ b/src/Command/ImportCodesCommand.php @@ -399,7 +399,7 @@ private function performImport( } catch (\Throwable $e) { // Check if this is a lock acquisition failure if (str_contains($e->getMessage(), 'Failed to acquire database lock')) { - throw new CodeImportException("Import failed: " . $e->getMessage()); + throw new CodeImportException("Import failed: " . $e->getMessage(), $e->getCode(), $e); } // Re-throw other exceptions as-is throw $e; diff --git a/src/Config/ConfigAccessorInterface.php b/src/Config/ConfigAccessorInterface.php index 3459c59..e55dfdc 100644 --- a/src/Config/ConfigAccessorInterface.php +++ b/src/Config/ConfigAccessorInterface.php @@ -11,6 +11,8 @@ * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ +declare(strict_types=1); + namespace OpenCoreEMR\CLI\ImportCodes\Config; interface ConfigAccessorInterface diff --git a/src/Config/GlobalsAccessor.php b/src/Config/GlobalsAccessor.php index 23c2109..029580c 100644 --- a/src/Config/GlobalsAccessor.php +++ b/src/Config/GlobalsAccessor.php @@ -11,6 +11,8 @@ * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ +declare(strict_types=1); + namespace OpenCoreEMR\CLI\ImportCodes\Config; class GlobalsAccessor implements ConfigAccessorInterface diff --git a/src/Service/OpenEMRConnector.php b/src/Service/OpenEMRConnector.php index c37f4b8..31b07e7 100644 --- a/src/Service/OpenEMRConnector.php +++ b/src/Service/OpenEMRConnector.php @@ -79,7 +79,11 @@ public function initialize(string $openemrPath, string $site = 'default'): void throw new OpenEMRConnectorException("OpenEMR database functions not available"); } } catch (\Throwable $e) { - throw new OpenEMRConnectorException("OpenEMR database connection test failed: " . $e->getMessage()); + throw new OpenEMRConnectorException( + "OpenEMR database connection test failed: " . $e->getMessage(), + $e->getCode(), + $e + ); } $this->initialized = true;