diff --git a/composer.json b/composer.json
index 0ef299d..6dc3772 100644
--- a/composer.json
+++ b/composer.json
@@ -25,12 +25,12 @@
}
},
"require-dev": {
- "phpunit/phpunit": "^6",
- "vimeo/psalm": "^1|^2"
+ "phpunit/phpunit": "^8",
+ "vimeo/psalm": "^3"
},
"require": {
- "php": "^7",
- "zendframework/zend-mail": "^2.8",
+ "php": "^7.2",
+ "laminas/laminas-mail": "^2.8",
"pear/crypt_gpg": "^1.6"
}
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 2f6c532..c08f857 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -9,13 +9,7 @@
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
- syntaxCheck="true"
>
-
-
- tests
-
-
./tests
diff --git a/src/GPGMailer.php b/src/GPGMailer.php
index ccc2d20..46b2001 100644
--- a/src/GPGMailer.php
+++ b/src/GPGMailer.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace ParagonIE\GPGMailer;
-use Zend\Mail\{
+use Laminas\Mail\{
Message,
Transport\TransportInterface
};
@@ -70,7 +70,7 @@ public function export(string $fingerprint): string
throw new GPGMailerException(
'Could not export fingerprint "' . $fingerprint . '": ' .
$ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -97,7 +97,7 @@ public function decrypt(Message $message): Message
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not decrypt message: ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -127,7 +127,7 @@ public function encrypt(Message $message, string $fingerprint): Message
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not encrypt message: ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -161,7 +161,7 @@ public function encryptAndSign(Message $message, string $fingerprint): Message
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not encrypt and sign message: ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -195,7 +195,7 @@ public function import(string $gpgKey): string
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not import public key: ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -295,7 +295,7 @@ public function setOption(string $key, $value): self
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not set option "' . $key . '": ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -356,7 +356,7 @@ public function sign(Message $message): Message
} catch (\PEAR_Exception $ex) {
throw new GPGMailerException(
'Could not sign message: ' . $ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
@@ -396,7 +396,7 @@ public function verify(Message $message, string $fingerprint): bool
throw new GPGMailerException(
'An error occurred trying to verify this message: ' .
$ex->getMessage(),
- $ex->getCode(),
+ (int) $ex->getCode(),
$ex
);
}
diff --git a/tests/GPGMailerTest.php b/tests/GPGMailerTest.php
index 2b55b45..e40e32b 100644
--- a/tests/GPGMailerTest.php
+++ b/tests/GPGMailerTest.php
@@ -1,6 +1,6 @@
assertTrue($gm->getOption('invalid key'));
\mkdir(__DIR__ . '/test/', 0400);
+ if (is_writable(__DIR__ . '/test/')) {
+ $this->markTestSkipped('Inside virtualbox shared folder.');
+ }
try {
$gm->setOption('homedir', __DIR__ . '/test/');
$this->fail('No exception thrown');