Skip to content

Mark interfaces and clases as api factories 2.4 #32661

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
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
2 changes: 2 additions & 0 deletions app/code/Magento/Catalog/Block/Product/ImageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Create imageBlock from product and view.xml
*
* @api
*/
class ImageFactory
{
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/Catalog/Model/Product/Type/Price/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
* See COPYING.txt for license details.
*/

namespace Magento\Catalog\Model\Product\Type\Price;

/**
* Product type price factory
*
* @api
*/
namespace Magento\Catalog\Model\Product\Type\Price;

class Factory
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* Magento\Config\Block\System\Config\Form\Field Class Factory
*
* @api
* @codeCoverageIgnore
*/
class Factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* Magento\Config\Block\System\Config\Form\Fieldset Class Factory
*
* @api
* @codeCoverageIgnore
*/
class Factory
Expand Down
7 changes: 5 additions & 2 deletions app/code/Magento/Customer/Model/Metadata/FormFactory.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
/**
* Customer Form Element Factory
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Customer\Model\Metadata;

/**
* Customer Form Element Factory
*
* @api
*/
class FormFactory
{
/**
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/ImportExport/Model/Export/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
* See COPYING.txt for license details.
*/

namespace Magento\ImportExport\Model\Export;

/**
* Entity factory
*
* @api
*/
namespace Magento\ImportExport\Model\Export;

class Factory
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Factory class for \Magento\Quote\Model\Quote\Address\RateCollectorInterface
*
* @api
*/
class RateCollectorInterfaceFactory
{
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Quote/Model/Quote/Address/TotalFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* Factory class for \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
*
* @api
*/
namespace Magento\Quote\Model\Quote\Address;

Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Sales/Model/Order/CreditmemoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/**
* Factory class for @see \Magento\Sales\Model\Order\Creditmemo
*
* @api
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CreditmemoFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Sales\Model\ResourceModel\Order\Collection;

/**
* @api
*/
class Factory
{
/**
Expand Down
2 changes: 2 additions & 0 deletions app/code/Magento/Ui/Component/Form/Fieldset/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* Class Factory
*
* @api
*/
class Factory
{
Expand Down
7 changes: 5 additions & 2 deletions lib/internal/Magento/Framework/Acl/AclResourceFactory.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php
/**
* Factory for Acl resource
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Acl;

use Magento\Framework\ObjectManagerInterface;

/**
* Factory for Acl resource
*
* @api
*/
class AclResourceFactory
{
const RESOURCE_CLASS_NAME = \Magento\Framework\Acl\AclResource::class;
Expand Down
7 changes: 5 additions & 2 deletions lib/internal/Magento/Framework/AclFactory.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
/**
* Acl object factory.
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework;

/**
* Acl object factory
*
* @api
*/
class AclFactory
{
/**
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Amqp/ConfigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Factory class for @see Config
*
* @api
*/
class ConfigFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* Data holder for extension attribute joins.
*
* @api
* @codeCoverageIgnore
*/
class JoinData implements JoinDataInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/**
* Factory class for @see
* \Magento\Framework\Api\ExtensionAttribute\JoinDataInterface
*
* @api
*/
class JoinDataInterfaceFactory
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/Api/Search/DocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\Api\Search;

/**
* @api
*/
class DocumentFactory
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\Api\Search;

/**
* @api
*/
class SearchCriteriaFactory
{
/**
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/App/Config/ValueFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Factory class
*
* @api
*/
class ValueFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Factory for ConfigData.
*
* @api
*/
class ConfigDataFactory
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/Config/ViewFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

use Magento\Framework\ObjectManagerInterface;

/**
* @api
*/
class ViewFactory
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Factory class for @see \Magento\Framework\Controller\Result\Json
*
* @api
*/
class JsonFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Factory for Mysql adapter
*
* @api
*/
class MysqlFactory
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/DB/Ddl/TriggerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\DB\Ddl;

/**
* @api
*/
class TriggerFactory
{
/**
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/DB/LoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* DB logger interface
*
* @api
*/
interface LoggerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Data/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Form factory class
*
* @api
*/
class FormFactory
{
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Data/Tree/NodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* Factory class for @see \Magento\Framework\Data\Tree\Node
*
* @api
*/
class NodeFactory
{
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Data/TreeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* Factory class for @see \Magento\Framework\Data\Tree
*
* @api
*/
class TreeFactory
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/DataObject/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\DataObject;

/**
* @api
*/
class Factory
{
/**
Expand Down
7 changes: 5 additions & 2 deletions lib/internal/Magento/Framework/Event/ObserverFactory.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php
/**
* Observer model factory
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Event;

/**
* Observer model factory
*
* @api
*/
class ObserverFactory
{
/**
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/EventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework;

/**
* @api
*/
class EventFactory
{
/**
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/File/UploaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\File;

/**
* @api
*/
class UploaderFactory
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* The factory of the filesystem directory instances for read operations.
*
* @api
*/
class ReadFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

/**
* Factory class for \Magento\Framework\Mail\TransportInterface
*
* @api
*/
class TransportInterfaceFactory
{
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/Message/CollectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

/**
* Message collection factory
*
* @api
*/
class CollectionFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Factory class for \Magento\Framework\Module\Setup\Migration
*
* @api
*/
class MigrationFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Magento\Framework\ObjectManagerInterface;

/**
* @api
* @see DiffInterface
*/
class DiffFactory
Expand Down
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/ValidatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* Factory class for \Magento\Framework\Validator
*
* @api
*/
class ValidatorFactory
{
Expand Down
Loading