Skip to content

Mark Framework interfaces as API part 2 #32140

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

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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Framework\App;
Expand All @@ -12,6 +11,8 @@

/**
* Action that's aware of CSRF protection.
*
* @api
*/
interface CsrfAwareActionInterface extends ActionInterface
{
Expand Down
6 changes: 4 additions & 2 deletions lib/internal/Magento/Framework/App/DefaultPathInterface.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php
/**
* Abstract application router
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App;

/**
* Interface \Magento\Framework\App\DefaultPathInterface
* Abstract application router
*
* @api
*/
interface DefaultPathInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\DeploymentConfig;

use Magento\Framework\Exception\State\InvalidTransitionException;

/**
* Interface for importers which import data from shared configuration files to appropriate data storage.
*
* @api
*/
interface ImporterInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\DeploymentConfig;

/**
* Validator interface for section data from shared configuration files.
*
* @api
*/
interface ValidatorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\DeploymentConfig\Writer;

/**
* Interface \Magento\Framework\App\DeploymentConfig\Writer\FormatterInterface
*
* @api
*/
interface FormatterInterface
{
Expand Down
4 changes: 4 additions & 0 deletions lib/internal/Magento/Framework/App/DesignInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App;

/**
* Design Interface
*
* @api
*/
interface DesignInterface
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/App/EnvironmentInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App;

Expand All @@ -12,6 +13,8 @@

/**
* Interface for ObjectManager Environment
*
* @api
*/
interface EnvironmentInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App;

use Magento\Framework\App\Response\Http as ResponseHttp;
use Magento\Framework\App\Request\Http as RequestHttp;

/**
* Interface ExceptionHandler
*
* @api
*/
interface ExceptionHandlerInterface
{
Expand Down
4 changes: 3 additions & 1 deletion lib/internal/Magento/Framework/App/FeedFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Feed factory interface
*
* @api
*/
interface FeedFactoryInterface
{
Expand All @@ -26,5 +28,5 @@ interface FeedFactoryInterface
* @param string $format
* @return FeedInterface
*/
public function create(array $data, string $format = self::FORMAT_RSS) : FeedInterface;
public function create(array $data, string $format = self::FORMAT_RSS): FeedInterface;
}
4 changes: 3 additions & 1 deletion lib/internal/Magento/Framework/App/FeedInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Feed interface
*
* @api
*/
interface FeedInterface
{
Expand All @@ -17,5 +19,5 @@ interface FeedInterface
*
* @return string
*/
public function getFormattedContent() : string;
public function getFormattedContent(): string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Framework\App\ObjectManager;

/**
* Write compiled object manager configuration to storage
*
* @api
*/
interface ConfigWriterInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/**
* HTTP response interface
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\PageCache;

/**
* Interface \Magento\Framework\App\PageCache\NotCacheableInterface
*
* @api
*/
interface NotCacheableInterface
{
Expand Down
6 changes: 5 additions & 1 deletion lib/internal/Magento/Framework/App/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Request;

use Magento\Framework\App\HttpRequestInterface;
Expand All @@ -16,6 +18,8 @@

/**
* Http request
*
* @api
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class Http extends Request implements RequestContentInterface, RequestSafetyInterface, HttpRequestInterface
Expand Down Expand Up @@ -255,7 +259,7 @@ public function setControllerModule($module)
/**
* Get module name of currently used controller
*
* @return string
* @return string
*/
public function getControllerModule()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Framework\App\Request;
Expand All @@ -16,6 +15,8 @@

/**
* Received request is invalid.
*
* @api
*/
class InvalidRequestException extends RuntimeException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

declare(strict_types=1);

namespace Magento\Framework\App\Request;
Expand All @@ -13,6 +12,8 @@

/**
* Validate interface before giving passing it to an ActionInterface.
*
* @api
*/
interface ValidatorInterface
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/**
* Resource configuration interface
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\ResourceConnection;

/**
* Interface \Magento\Framework\App\ResourceConnection\ConfigInterface
*
* @api
*/
interface ConfigInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\ResourceConnection;

use Magento\Framework\DB\Adapter\AdapterInterface;
Expand All @@ -12,6 +14,7 @@
/**
* Connection adapter interface
*
* @api
*/
interface ConnectionAdapterInterface
{
Expand Down
5 changes: 3 additions & 2 deletions lib/internal/Magento/Framework/App/Response/FileInterface.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/**
* Interface of response sending file content
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Response;

/**
* Interface \Magento\Framework\App\Response\FileInterface
*
* @api
*/
interface FileInterface extends HttpInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Response\HeaderProvider;

/**
* Interface \Magento\Framework\App\Response\HeaderProvider\HeaderProviderInterface
*
* @api
*/
interface HeaderProviderInterface
{
Expand Down
1 change: 1 addition & 0 deletions lib/internal/Magento/Framework/App/Response/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/**
* HTTP Response.
*
* @api
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class Http extends \Magento\Framework\HTTP\PhpEnvironment\Response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/**
* Response redirect interface
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Response;

/**
* Interface \Magento\Framework\App\Response\RedirectInterface
*
* @api
*/
interface RedirectInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Router;

/**
* Interface \Magento\Framework\App\Router\NoRouteHandlerInterface
*
* @api
*/
interface NoRouteHandlerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Framework\App\Router;

/**
* Interface \Magento\Framework\App\Router\PathConfigInterface
*
* @api
*/
interface PathConfigInterface
{
Expand Down
Loading