Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecation message to specify version 2.4.0 not 2.3.2 #265

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ parameters:
-
message: """
#^Instantiation of deprecated class OpenSearch\\\\Common\\\\Exceptions\\\\InvalidArgumentException\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\.$#
"""
count: 1
path: src/OpenSearch/Endpoints/Monitoring/Bulk.php

-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 3
path: src/OpenSearch/Namespaces/AsyncSearchNamespace.php
Expand All @@ -27,7 +27,7 @@ parameters:
-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 8
path: src/OpenSearch/Namespaces/DataFrameTransformDeprecatedNamespace.php
Expand Down Expand Up @@ -75,31 +75,31 @@ parameters:
-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 1
path: src/OpenSearch/Namespaces/MonitoringNamespace.php

-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 4
path: src/OpenSearch/Namespaces/SearchableSnapshotsNamespace.php

-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 1
path: src/OpenSearch/Namespaces/SecurityNamespace.php

-
message: """
#^Access to deprecated property \\$endpoints of class OpenSearch\\\\Namespaces\\\\AbstractNamespace\\:
in 2\\.3\\.2 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
in 2\\.4\\.0 and will be removed in 3\\.0\\.0\\. Use \\$endpointFactory property instead\\.$#
"""
count: 1
path: src/OpenSearch/Namespaces/SslNamespace.php
Expand Down
10 changes: 5 additions & 5 deletions src/OpenSearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Client
/**
* @var Transport
*
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
public $transport;

Expand All @@ -86,7 +86,7 @@ class Client
/**
* @var callable
*
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
protected $endpoints;

Expand Down Expand Up @@ -277,7 +277,7 @@ public function __construct(
array $registeredNamespaces,
) {
if (!$transport instanceof TransportInterface) {
@trigger_error('Passing an instance of \OpenSearch\Transport to ' . __METHOD__ . '() is deprecated in 2.3.2 and will be removed in 3.0.0. Pass an instance of \OpenSearch\TransportInterface instead.', E_USER_DEPRECATED);
@trigger_error('Passing an instance of \OpenSearch\Transport to ' . __METHOD__ . '() is deprecated in 2.4.0 and will be removed in 3.0.0. Pass an instance of \OpenSearch\TransportInterface instead.', E_USER_DEPRECATED);
// @phpstan-ignore property.deprecated
$this->transport = $transport;
// @phpstan-ignore new.deprecated
Expand All @@ -286,13 +286,13 @@ public function __construct(
$this->httpTransport = $transport;
}
if (is_callable($endpointFactory)) {
@trigger_error('Passing a callable as the $endpointFactory param in ' . __METHOD__ . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Pass an instance of \OpenSearch\EndpointFactoryInterface instead.', E_USER_DEPRECATED);
@trigger_error('Passing a callable as the $endpointFactory param in ' . __METHOD__ . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Pass an instance of \OpenSearch\EndpointFactoryInterface instead.', E_USER_DEPRECATED);
$endpoints = $endpointFactory;
// @phpstan-ignore new.deprecated
$endpointFactory = new LegacyEndpointFactory($endpointFactory);
} else {
$endpoints = function ($c) use ($endpointFactory) {
@trigger_error('The $endpoints property is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error('The $endpoints property is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);
return $endpointFactory->getEndpoint('OpenSearch\\Endpoints\\' . $c);
};
}
Expand Down
12 changes: 6 additions & 6 deletions src/OpenSearch/ClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
use ReflectionClass;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(ClientBuilder::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(ClientBuilder::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class ClientBuilder
{
Expand Down Expand Up @@ -188,11 +188,11 @@ public function getTransport(): Transport
/**
* Can supply second param to Client::__construct() when invoking manually or with dependency injection
*
* @deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::getEndpointFactory() instead.
* @deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::getEndpointFactory() instead.
*/
public function getEndpoint(): callable
{
@trigger_error(__METHOD__ . '() is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::getEndpointFactory() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__ . '() is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::getEndpointFactory() instead.', E_USER_DEPRECATED);
return fn ($c) => $this->endpointFactory->getEndpoint('OpenSearch\\Endpoints\\' . $c);
}

Expand Down Expand Up @@ -336,11 +336,11 @@ public function setConnectionPool($connectionPool, array $args = []): ClientBuil
*
* @param callable $endpoint
*
* @deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::setEndpointFactory() instead.
* @deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::setEndpointFactory() instead.
*/
public function setEndpoint(callable $endpoint): ClientBuilder
{
@trigger_error(__METHOD__ . '() is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::setEndpointFactory() instead.', E_USER_DEPRECATED);
@trigger_error(__METHOD__ . '() is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::setEndpointFactory() instead.', E_USER_DEPRECATED);
$this->endpointFactory = new LegacyEndpointFactory($endpoint);

return $this;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/EmptyLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
use Psr\Log\LoggerInterface;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(EmptyLogger::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Use Psr\Log\NullLogger instead', E_USER_DEPRECATED);
@trigger_error(EmptyLogger::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Use Psr\Log\NullLogger instead', E_USER_DEPRECATED);

/**
* Class EmptyLogger
*
* Logger that doesn't do anything. Similar to Monolog's NullHandler,
* but avoids the overhead of partially loading Monolog
*
* @deprecated in 2.3.2 and will be removed in 3.0.0. Use Psr\Log\NullLogger instead.
* @deprecated in 2.4.0 and will be removed in 3.0.0. Use Psr\Log\NullLogger instead.
*/
class EmptyLogger extends AbstractLogger implements LoggerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(AuthenticationConfigException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(AuthenticationConfigException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class AuthenticationConfigException extends \RuntimeException implements OpenSearchException
{
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(BadMethodCallException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(BadMethodCallException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* BadMethodCallException
*
* Denote problems with a method call (e.g. incorrect number of arguments)
*
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class BadMethodCallException extends \BadMethodCallException implements OpenSearchException
{
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/BadRequest400Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(BadRequest400Exception::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(BadRequest400Exception::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class BadRequest400Exception extends \Exception implements OpenSearchException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(ClientErrorResponseException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(ClientErrorResponseException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/Conflict409Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(Conflict409Exception::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(Conflict409Exception::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class Conflict409Exception extends \Exception implements OpenSearchException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
use OpenSearch\Common\Exceptions\TransportException;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(CouldNotConnectToHost::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(CouldNotConnectToHost::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
use OpenSearch\Common\Exceptions\TransportException;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(CouldNotResolveHostException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(CouldNotResolveHostException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
use OpenSearch\Common\Exceptions\TransportException;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(OperationTimeoutException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(OperationTimeoutException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/Forbidden403Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
use OpenSearch\Exception\ForbiddenHttpException;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(Forbidden403Exception::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\ForbiddenHttpException instead', E_USER_DEPRECATED);
@trigger_error(Forbidden403Exception::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\ForbiddenHttpException instead', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @see \OpenSearch\Exception\ForbiddenHttpException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(InvalidArgumentException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(InvalidArgumentException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
class InvalidArgumentException extends \InvalidArgumentException implements OpenSearchException
{
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/MaxRetriesException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(MaxRetriesException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(MaxRetriesException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/Missing404Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

@trigger_error(
// @phpstan-ignore classConstant.deprecatedClass
Missing404Exception::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\NotFoundHttpException instead.',
Missing404Exception::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\NotFoundHttpException instead.',
E_USER_DEPRECATED
);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @see \OpenSearch\Exception\NotFoundHttpException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

@trigger_error(
// @phpstan-ignore classConstant.deprecatedClass
NoDocumentsToGetException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoDocumentsToGetException instead.',
NoDocumentsToGetException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoDocumentsToGetException instead.',
E_USER_DEPRECATED
);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoDocumentsToGetException instead.
* @deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoDocumentsToGetException instead.
*
* @see \OpenSearch\Exception\ScriptLangNotSupportedException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(NoNodesAvailableException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(NoNodesAvailableException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(NoShardAvailableException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoShardAvailableException instead.', E_USER_DEPRECATED);
@trigger_error(NoShardAvailableException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoShardAvailableException instead.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoShardAvailableException instead.
* @deprecated in 2.4.0 and will be removed in 3.0.0. Use \OpenSearch\Exception\NoShardAvailableException instead.
*
* @see \OpenSearch\Exception\NoShardAvailableException
*/
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Common/Exceptions/OpenSearchException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
use OpenSearch\Exception\OpenSearchExceptionInterface;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(NoNodesAvailableException::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(NoNodesAvailableException::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*/
interface OpenSearchException extends OpenSearchExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
namespace OpenSearch\Common\Exceptions;

// @phpstan-ignore classConstant.deprecatedClass
@trigger_error(RequestTimeout408Exception::class . ' is deprecated in 2.3.2 and will be removed in 3.0.0.', E_USER_DEPRECATED);
@trigger_error(RequestTimeout408Exception::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED);

/**
* @deprecated in 2.3.2 and will be removed in 3.0.0.
* @deprecated in 2.4.0 and will be removed in 3.0.0.
*
* @phpstan-ignore class.extendsDeprecatedClass
*/
Expand Down
Loading
Loading