Skip to content

Commit 5a55fe0

Browse files
committed
- CURLOPT_SSL_VERIFYSTATUS disabled by default.
- Raise User-Agent version to match new version - Updated PHPUnit config file
1 parent 23d285e commit 5a55fe0

2 files changed

Lines changed: 23 additions & 24 deletions

File tree

phpunit.xml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php">
3-
<php>
4-
<var name="DB_DSN" value="mysql:host=127.0.0.1;dbname=test"/>
5-
<var name="DB_USER" value="travis"/>
6-
<var name="DB_PASSWD" value=""/>
7-
<var name="DB_DBNAME" value="test"/>
8-
</php>
9-
<testsuites>
10-
<testsuite>
11-
<directory>tests</directory>
12-
</testsuite>
13-
</testsuites>
14-
<filter>
15-
<whitelist>
16-
<directory suffix=".php">src</directory>
17-
</whitelist>
18-
</filter>
19-
<logging>
20-
<log type="coverage-clover" target="build/logs/clover.xml"/>
21-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
4+
<coverage>
5+
<include>
6+
<directory suffix=".php">src</directory>
7+
</include>
8+
<report>
9+
<clover outputFile="build/logs/clover.xml"/>
10+
</report>
11+
</coverage>
12+
<php>
13+
<var name="DB_DSN" value="mysql:host=127.0.0.1;dbname=test"/>
14+
<var name="DB_USER" value="travis"/>
15+
<var name="DB_PASSWD" value=""/>
16+
<var name="DB_DBNAME" value="test"/>
17+
</php>
18+
<testsuites>
19+
<testsuite name="tests">
20+
<directory>tests</directory>
21+
</testsuite>
22+
</testsuites>
23+
<logging/>
2224
</phpunit>

src/UriClient.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UriClient extends TxtClient
2323
/**
2424
* User-agent
2525
*/
26-
const CURL_USER_AGENT = 'RobotsTxtParser-VIPnytt/2.0 (+https://github.com/VIPnytt/RobotsTxtParser/blob/master/README.md)';
26+
const CURL_USER_AGENT = 'RobotsTxtParser-VIPnytt/2.1 (+https://github.com/VIPnytt/RobotsTxtParser/blob/master/README.md)';
2727

2828
/**
2929
* Base uri
@@ -123,9 +123,6 @@ private function request($options = [])
123123
)
124124
) ? CURLOPT_CAPATH : CURLOPT_CAINFO => $caPathOrFile
125125
]);
126-
if (PHP_VERSION_ID >= 70700) {
127-
curl_setopt($curl, CURLOPT_SSL_VERIFYSTATUS, true);
128-
}
129126
// Apply custom cURL options
130127
curl_setopt_array($curl, $options);
131128
// Initialize the header parser

0 commit comments

Comments
 (0)