Skip to content

Commit 54ea806

Browse files
authored
Merge pull request #105 from php-mod/3.0
Version 3.0
2 parents a8e98b8 + b67d66c commit 54ea806

File tree

7 files changed

+21
-56
lines changed

7 files changed

+21
-56
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
os: [ubuntu-latest]
40-
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
40+
php: ['8.0', '8.1', '8.2', '8.3']
4141
steps:
4242
## checkout the repoistory
4343
- name: Checkout Repo
@@ -66,18 +66,18 @@ jobs:
6666
## run unit tests
6767
- name: PHP Unit tests for PHP
6868
run: vendor/bin/phpunit --verbose --configuration actions.phpunit.xml
69-
if: matrix.php == '8.3' || matrix.php == '8.2' || matrix.php == '8.1' || matrix.php == '8.0' || matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2' || matrix.php == '7.0' || matrix.php == '5.6'
69+
if: matrix.php == '8.3' || matrix.php == '8.2' || matrix.php == '8.1'
7070

7171
## unit test with coverage
72-
- name: PHP Unit tests for PHP 7.1
72+
- name: PHP Unit tests for PHP 8.0
7373
run: vendor/bin/phpunit --verbose --coverage-clover=clover.xml --configuration actions.phpunit.xml
74-
if: matrix.php == '7.1'
74+
if: matrix.php == '8.0'
7575

7676
## coverage
7777
- name: Code coverage
7878
run: |
7979
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
8080
chmod +x ./cc-test-reporter
8181
./cc-test-reporter after-build -t clover
82-
if: matrix.php == '7.1'
82+
if: matrix.php == '8.0'
8383
continue-on-error: true # if is fork

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## 2.6.0
5+
## 3.0.0
6+
7+
> Check the [UPGRADE document](UPGRADE.md) to read more about breaking changes.
8+
9+
+ [#105](https://github.com/php-mod/curl/pull/105) Min PHP version is 8.x, json-extension is required and dropped deprecated methods.
10+
611

712
## 2.5.0 (14. December 2022)
813

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ In order to install this library via composer run the following command in the c
1717
composer require curl/curl
1818
```
1919

20-
or add the package manually to your composer.json file in the require section:
21-
22-
```json
23-
"curl/curl": "^2.0"
24-
```
25-
2620
## Usage examples
2721

2822
A few example for using CURL with get:

UPGRADE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This document will help you upgrading from a Version into another.
2+
3+
# 2.x to 3.0
4+
5+
+ Raised minimum PHP version to 8.x
6+
+ Added php `json` extensions are required in composer defintion
7+
+ Removed deprecated methods `_exec()` use `exec()`, `setReferrer()` use `setReferer()` and `verbose()` use `setVerbose()`

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
}
2525
],
2626
"require": {
27-
"php": "^5.6 | ^7.0 | ^8.0",
28-
"ext-curl": "*"
27+
"php": "^8.0",
28+
"ext-curl": "*",
29+
"ext-json": "*"
2930
},
3031
"require-dev": {
3132
"yoast/phpunit-polyfills": "^0.2.0"

src/Curl/Curl.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,6 @@ protected function setHttpAuth($httpauth)
282282
$this->setOpt(CURLOPT_HTTPAUTH, $httpauth);
283283
}
284284

285-
// public methods
286-
287-
/**
288-
* @deprecated use `exec()` directly. Will be removed in 3.0
289-
*/
290-
public function _exec()
291-
{
292-
return $this->exec();
293-
}
294-
295285
// functions
296286

297287
/**
@@ -511,18 +501,6 @@ public function setUserAgent($useragent)
511501
return $this;
512502
}
513503

514-
/**
515-
* @deprecated Call setReferer() instead. Will be removed in 3.0
516-
*
517-
* @param $referrer
518-
* @return self
519-
*/
520-
public function setReferrer($referrer)
521-
{
522-
$this->setReferer($referrer);
523-
return $this;
524-
}
525-
526504
/**
527505
* Set the HTTP referer header.
528506
*
@@ -617,17 +595,6 @@ public function setVerbose($on = true)
617595
return $this;
618596
}
619597

620-
/**
621-
* @deprecated Call setVerbose() instead. Will be removed in 3.0
622-
*
623-
* @param bool $on
624-
* @return self
625-
*/
626-
public function verbose($on = true)
627-
{
628-
return $this->setVerbose($on);
629-
}
630-
631598
/**
632599
* Reset all curl options.
633600
*

tests/CurlTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,6 @@ public function testReferrer()
266266
)) === 'myreferrer');
267267
}
268268

269-
public function testDeprecatedReferrer()
270-
{
271-
$this->curl->setReferrer('myreferrer');
272-
$this->assertTrue($this->server('GET', array(
273-
'test' => 'server',
274-
'key' => 'HTTP_REFERER',
275-
)) === 'myreferrer');
276-
}
277-
278269
public function testCookies()
279270
{
280271
$this->curl->setCookie('mycookie', 'yum');

0 commit comments

Comments
 (0)