Skip to content
Draft
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
56 changes: 56 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
<code><![CDATA[$value]]></code>
</MixedAssignment>
</file>
<file src="src/DispatchableInterface.php">
<DeprecatedClass>
<code><![CDATA[Response|mixed]]></code>
</DeprecatedClass>
<DeprecatedInterface>
<code><![CDATA[?ResponseInterface]]></code>
<code><![CDATA[RequestInterface]]></code>
</DeprecatedInterface>
</file>
<file src="src/ErrorHandler.php">
<InvalidArgument>
<code><![CDATA[[static::class, 'addError']]]></code>
Expand Down Expand Up @@ -152,6 +161,9 @@
</PossiblyNullOperand>
</file>
<file src="src/Message.php">
<DeprecatedInterface>
<code><![CDATA[Message]]></code>
</DeprecatedInterface>
<DocblockTypeContradiction>
<code><![CDATA[! is_array($spec) && ! $spec instanceof Traversable]]></code>
<code><![CDATA[is_scalar($key)]]></code>
Expand All @@ -177,6 +189,11 @@
<code><![CDATA[setMetadata]]></code>
</MissingReturnType>
</file>
<file src="src/Parameters.php">
<DeprecatedInterface>
<code><![CDATA[Parameters]]></code>
</DeprecatedInterface>
</file>
<file src="src/PriorityList.php">
<FalsableReturnStatement>
<code><![CDATA[$node ? $node['data'] : false]]></code>
Expand All @@ -201,6 +218,24 @@
<code><![CDATA[unserialize]]></code>
</MethodSignatureMustProvideReturnType>
</file>
<file src="src/Request.php">
<DeprecatedClass>
<code><![CDATA[Message]]></code>
</DeprecatedClass>
<DeprecatedInterface>
<code><![CDATA[Request]]></code>
<code><![CDATA[Request]]></code>
</DeprecatedInterface>
</file>
<file src="src/Response.php">
<DeprecatedClass>
<code><![CDATA[Message]]></code>
</DeprecatedClass>
<DeprecatedInterface>
<code><![CDATA[Response]]></code>
<code><![CDATA[Response]]></code>
</DeprecatedInterface>
</file>
<file src="src/SplPriorityQueue.php">
<DocblockTypeContradiction>
<code><![CDATA[is_array($priority)]]></code>
Expand Down Expand Up @@ -322,6 +357,9 @@
</UndefinedInterfaceMethod>
</file>
<file src="test/ArrayUtilsTest.php">
<DeprecatedClass>
<code><![CDATA[new Parameters($array)]]></code>
</DeprecatedClass>
<DeprecatedConstant>
<code><![CDATA[ArrayUtils::ARRAY_FILTER_USE_BOTH]]></code>
<code><![CDATA[ArrayUtils::ARRAY_FILTER_USE_KEY]]></code>
Expand Down Expand Up @@ -381,7 +419,25 @@
<code><![CDATA[assertIsArray]]></code>
</RedundantConditionGivenDocblockType>
</file>
<file src="test/MessageTest.php">
<DeprecatedClass>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
<code><![CDATA[new Message()]]></code>
</DeprecatedClass>
</file>
<file src="test/ParametersTest.php">
<DeprecatedClass>
<code><![CDATA[$parameters]]></code>
<code><![CDATA[new Parameters()]]></code>
<code><![CDATA[new Parameters()]]></code>
<code><![CDATA[new Parameters()]]></code>
<code><![CDATA[new Parameters(['foo' => 'bar'])]]></code>
</DeprecatedClass>
<UndefinedPropertyFetch>
<code><![CDATA[$parameters->bar]]></code>
<code><![CDATA[$parameters->baz]]></code>
Expand Down
3 changes: 3 additions & 0 deletions src/DispatchableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Laminas\Stdlib;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
*/
interface DispatchableInterface
{
/**
Expand Down
6 changes: 6 additions & 0 deletions src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
use function is_scalar;
use function sprintf;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
class Message implements MessageInterface
{
/** @var array */
Expand Down
7 changes: 7 additions & 0 deletions src/MessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

use Traversable;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
* Use Psr\Http\Message\MessageInterface instead
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
interface MessageInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
use function parse_str;

/**
* @deprecated since 3.21.0; Will be removed in 4.0.0.
*
* @see https://github.com/laminas/laminas-diactoros as a possible replacement.
*
Comment thread
tyrsson marked this conversation as resolved.
* @template TKey of array-key
* @template TValue
* @template-extends PhpArrayObject<TKey, TValue>
Expand Down
2 changes: 2 additions & 0 deletions src/ParametersInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* class QueryParams extends ArrayObject implements Parameters {}
* and have 90% of the functionality
*
* @deprecated since 3.21.0; Will be removed in 4.0.0.
*
* @template TKey
* @template TValue
* @template-extends ArrayAccess<TKey, TValue>
Expand Down
6 changes: 6 additions & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

namespace Laminas\Stdlib;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
class Request extends Message implements RequestInterface
{
// generic request implementation
Expand Down
7 changes: 7 additions & 0 deletions src/RequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

namespace Laminas\Stdlib;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

laminas-router uses this interface:

namespace Laminas\Router;

use Laminas\Stdlib\RequestInterface as Request;

interface RouteInterface
{
    /**
     * Match a given request.
     *
     * @return RouteMatch|null
     */
    public function match(Request $request);

    // …

https://github.com/laminas/laminas-router/blob/ec4b33834199bcf04c1b90b98c10f53c9e77e046/src/RouteInterface.php#L29-L34

And laminas-router is one of the router implementation of Mezzio.

* Use Psr\Http\Message\RequestInterface instead
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
interface RequestInterface extends MessageInterface
{
}
6 changes: 6 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

namespace Laminas\Stdlib;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
class Response extends Message implements ResponseInterface
{
// generic response implementation
Expand Down
7 changes: 7 additions & 0 deletions src/ResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

namespace Laminas\Stdlib;

/**
* @deprecated since 3.21.0 due to the retirement of Laminas MVC. Will be removed in 4.0.0.
* Use Psr\Http\Message\ResponseInterface instead
*
* @see https://www.php-fig.org/psr/psr-7/
* @see https://github.com/laminas/laminas-diactoros as a possible implementation.
*/
interface ResponseInterface extends MessageInterface
{
}