Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
WE2-876

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored and mrts committed Mar 6, 2024
1 parent 52493e7 commit dd29882
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require-dev": {
"phpunit/phpunit": "^9.6.14"
"phpunit/phpunit": "^11.0.4"
},
"autoload": {
"psr-4": {
Expand All @@ -27,12 +27,17 @@
}
},
"require": {
"phpseclib/phpseclib": "3.0.34"
"phpseclib/phpseclib": "3.0.37"
},
"scripts": {
"fix-php": [
"prettier src/**/* --write", "prettier src/* --write"
"prettier src/**/* --write",
"prettier src/* --write"
],
"test": "phpunit"
"test": "phpunit --no-coverage",
"test-coverage": [
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-html coverage"
]
}
}
36 changes: 19 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml" />
<html outputDirectory="build/coverage" />
<text outputFile="build/coverage.txt" />
</report>
</coverage>
<testsuites>
<testsuite name="OCSP PHP Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="OCSP PHP Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
5 changes: 4 additions & 1 deletion src/certificate/CertificateLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ class CertificateLoader
*/
public function fromFile(string $pathToFile)
{
$fileContent = false;
try {
$fileContent = file_get_contents($pathToFile);
$fileContent = @file_get_contents($pathToFile);
} catch (Exception $e) {
}
if ($fileContent === false) {
throw new OcspCertificateException(
"Certificate file not found: " . $pathToFile
);
Expand Down

0 comments on commit dd29882

Please sign in to comment.