Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
20302b8
Create Psr7Response and Psr18Client
Art4 Jan 25, 2023
c023ea3
Psr18Client follows redirects
Art4 Jan 26, 2023
4ff0bc1
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 26, 2023
69cf5fb
Add tests with local files for FileClient
Art4 Jan 26, 2023
b5ae752
Add tests with local files for Psr18Client
Art4 Jan 26, 2023
188c154
Fix tests for PHP < 8.0
Art4 Jan 26, 2023
b0a0a0a
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 26, 2023
9dd5bf9
Add SimplePie::set_http_client(), add tests
Art4 Jan 27, 2023
9b5a099
Add integration test for loading a feed from cache
Art4 Jan 27, 2023
3bfd01c
Add integration tests for PSR-16 cache and PSR-18 client
Art4 Jan 27, 2023
b36e934
Add code examples in README.markdown for PSR-18 HTTP client and PSR-1…
Art4 Jan 27, 2023
b8b2373
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 30, 2023
b7f4650
Deprecate method SimplePie\SimplePie::set_file()
Art4 Jan 30, 2023
54a99bd
set SimplePie->$file to private, improve user notices
Art4 Jan 30, 2023
d6d2224
Fix phpdoc
Art4 Jan 30, 2023
74de990
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Feb 13, 2023
27bee6e
Provide PSR implementations to Sanitize instead of internal HTTP Client
Art4 Feb 16, 2023
9059c41
Do not require internal Response interface in Sniffer
Art4 Feb 16, 2023
87f77e5
Accept internal Response implementations in Locator and Sniffer
Art4 Feb 16, 2023
803cc9a
Accept PSR implementations in Locator constructor, deprecate old argu…
Art4 Feb 16, 2023
136dab9
BC: Do not cache FileClient, or we wont be able to change the timeout
Art4 Feb 16, 2023
b9688df
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Feb 16, 2023
16b440d
remove package phpdoc annotations
Art4 Feb 17, 2023
1a57dcd
Add Locator::set_http_client(), update CHANGELOG.md
Art4 Feb 17, 2023
69e6594
Restore BC in Locator::__construct()
Art4 Feb 17, 2023
374c7c7
Set new set_http_client() methods to final
Art4 Feb 17, 2023
3c3bf9a
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Mar 20, 2023
c9a8f0e
Replace copyright comments with spdx notes
Art4 Mar 20, 2023
5361353
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 May 19, 2023
9660095
Fix tests
Art4 May 19, 2023
0c3fde1
fix code style
Art4 May 19, 2023
1ece520
Merge branch 'master' into add-psr18-http-client-support
Art4 May 23, 2023
67471c5
Merge branch 'master' into add-psr18-http-client-support
Art4 Jun 12, 2023
7554d6f
Fix parameter doc
Art4 Jun 12, 2023
a998d64
Merge branch 'master' into add-psr18-http-client-support
Art4 Aug 9, 2023
53d005b
Merge branch 'master' into add-psr18-http-client-support
Art4 Aug 25, 2023
3811a7d
run php-cs-fixer
Art4 Aug 25, 2023
33e27f8
Fix PHPStan errors
Art4 Aug 25, 2023
9a820ac
Psr7Response should always return full stream as body content
Art4 Aug 25, 2023
7201979
finetune tests
Art4 Aug 25, 2023
aceabdd
fix tests
Art4 Aug 25, 2023
c7330e6
ignore not fixable phpstan errors
Art4 Aug 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into add-psr18-http-client-support
  • Loading branch information
Art4 committed Aug 25, 2023
commit 53d005b11890826047b1f8f0b78d9d5ec14f6752
15 changes: 13 additions & 2 deletions src/Locator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

namespace SimplePie;

use DomDocument;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;
use SimplePie\Exception\HttpException;
use SimplePie\HTTP\Client;
use SimplePie\HTTP\FileClient;
use SimplePie\HTTP\Psr18Client;
use SimplePie\HTTP\Response;

/**
* Used for feed auto-discovery
Expand All @@ -23,8 +25,11 @@
*/
class Locator implements RegistryAware
{
/** @var ?string */
public $useragent = null;
/** @var int */
public $timeout = 10;
/** @var File */
public $file;
/** @var string[] */
public $local = [];
Expand Down Expand Up @@ -56,7 +61,10 @@ class Locator implements RegistryAware
*/
private $http_client = null;

public function __construct(File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10, $force_fsockopen = false, $curl_options = [])
/**
* @param array<int, mixed> $curl_options
*/
public function __construct(File $file, int $timeout = 10, ?string $useragent = null, int $max_checked_feeds = 10, bool $force_fsockopen = false, array $curl_options = [])
{
$this->file = $file;
$this->useragent = $useragent;
Expand Down Expand Up @@ -95,7 +103,10 @@ final public function set_http_client(
$this->http_client = new Psr18Client($http_client, $request_factory, $uri_factory);
}

public function set_registry(\SimplePie\Registry $registry)/* : void */
/**
* @return void
*/
public function set_registry(\SimplePie\Registry $registry)
{
$this->registry = $registry;
}
Expand Down
1 change: 1 addition & 0 deletions src/SimplePie.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use SimplePie\HTTP\Client;
use SimplePie\HTTP\FileClient;
use SimplePie\HTTP\Psr18Client;
use SimplePie\HTTP\Response;

/**
* SimplePie
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.