Skip to content

Commit

Permalink
- CURLOPT_SSL_VERIFYSTATUS disabled by default.
Browse files Browse the repository at this point in the history
- Raise User-Agent version to match new version
- Updated PHPUnit config file
  • Loading branch information
JanPetterMG committed Apr 10, 2021
1 parent 23d285e commit 5a55fe0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
42 changes: 22 additions & 20 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php">
<php>
<var name="DB_DSN" value="mysql:host=127.0.0.1;dbname=test"/>
<var name="DB_USER" value="travis"/>
<var name="DB_PASSWD" value=""/>
<var name="DB_DBNAME" value="test"/>
</php>
<testsuites>
<testsuite>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php"
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"/>
</report>
</coverage>
<php>
<var name="DB_DSN" value="mysql:host=127.0.0.1;dbname=test"/>
<var name="DB_USER" value="travis"/>
<var name="DB_PASSWD" value=""/>
<var name="DB_DBNAME" value="test"/>
</php>
<testsuites>
<testsuite name="tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>
5 changes: 1 addition & 4 deletions src/UriClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UriClient extends TxtClient
/**
* User-agent
*/
const CURL_USER_AGENT = 'RobotsTxtParser-VIPnytt/2.0 (+https://github.com/VIPnytt/RobotsTxtParser/blob/master/README.md)';
const CURL_USER_AGENT = 'RobotsTxtParser-VIPnytt/2.1 (+https://github.com/VIPnytt/RobotsTxtParser/blob/master/README.md)';

/**
* Base uri
Expand Down Expand Up @@ -123,9 +123,6 @@ private function request($options = [])
)
) ? CURLOPT_CAPATH : CURLOPT_CAINFO => $caPathOrFile
]);
if (PHP_VERSION_ID >= 70700) {
curl_setopt($curl, CURLOPT_SSL_VERIFYSTATUS, true);
}
// Apply custom cURL options
curl_setopt_array($curl, $options);
// Initialize the header parser
Expand Down

0 comments on commit 5a55fe0

Please sign in to comment.