Skip to content

Commit 9b63dd5

Browse files
committed
Add deprecation error triggering
1 parent a445cdb commit 9b63dd5

24 files changed

+48
-0
lines changed

src/AddHostPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\AddHostPlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\AddHostPlugin instead.', E_USER_DEPRECATED);
6+
57
use Psr\Http\Message\RequestInterface;
68
use Psr\Http\Message\UriInterface;
79
use Symfony\Component\OptionsResolver\OptionsResolver;

src/AuthenticationPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\AuthenticationPlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\AuthenticationPlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Message\Authentication;
68
use Psr\Http\Message\RequestInterface;
79

src/CachePlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\CachePlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\CachePlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Message\StreamFactory;
68
use Http\Promise\FulfilledPromise;
79
use Psr\Cache\CacheItemPoolInterface;

src/ContentLengthPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\ContentLengthPlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\ContentLengthPlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Message\Encoding\ChunkStream;
68
use Psr\Http\Message\RequestInterface;
79

src/CookiePlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\CookiePlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\CookiePlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\TransferException;
68
use Http\Message\Cookie;
79
use Http\Message\CookieJar;

src/DecoderPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\DecoderPlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\DecoderPlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Message\Encoding\DechunkStream;
68
use Http\Message\Encoding\DecompressStream;
79
use Http\Message\Encoding\GzipDecodeStream;

src/ErrorPlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\ErrorPlugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin\ErrorPlugin instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Plugin\Exception\ClientErrorException;
68
use Http\Client\Plugin\Exception\ServerErrorException;
79
use Psr\Http\Message\RequestInterface;

src/Exception/CircularRedirectionException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin\Exception;
44

5+
@trigger_error('The '.__NAMESPACE__.'\CircularRedirectionException class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Exception\CircularRedirectionException instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\HttpException;
68

79
/**

src/Exception/ClientErrorException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin\Exception;
44

5+
@trigger_error('The '.__NAMESPACE__.'\ClientErrorException class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Exception\ClientErrorException instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\HttpException;
68

79
/**

src/Exception/LoopException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin\Exception;
44

5+
@trigger_error('The '.__NAMESPACE__.'\LoopException class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Exception\LoopException instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\RequestException;
68

79
/**

0 commit comments

Comments
 (0)