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

+2
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

+2
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

+2
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

+2
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

+2
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

+2
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

+2
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

+2
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

+2
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

+2
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
/**

src/Exception/MultipleRedirectionException.php

+2
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__.'\MultipleRedirectionException class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Exception\MultipleRedirectionException instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\HttpException;
68

79
/**

src/Exception/ServerErrorException.php

+2
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__.'\ServerErrorException class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Exception\ServerErrorException instead.', E_USER_DEPRECATED);
6+
57
use Http\Client\Exception\HttpException;
68

79
/**

src/HeaderAppendPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

79
/**

src/HeaderDefaultsPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

79
/**

src/HeaderRemovePlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

79
/**

src/HeaderSetPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

79
/**

src/HistoryPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/Journal.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/LoggerPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/Plugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

5+
@trigger_error('The '.__NAMESPACE__.'\Plugin class is deprecated since version 1.1 and will be removed in 2.0. Use Http\Client\Common\Plugin instead.', E_USER_DEPRECATED);
6+
57
/**
68
* A plugin is a middleware to transform the request and/or the response.
79
*

src/PluginClient.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/RedirectPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/RetryPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

src/StopwatchPlugin.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Http\Client\Plugin;
44

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

0 commit comments

Comments
 (0)