Skip to content

Commit 28b35dd

Browse files
author
Eric Bohanon
committed
MAGETWO-83872: Write metadata service
- Rename type to fix backwards compatibility
1 parent 7c206ec commit 28b35dd

File tree

11 files changed

+27
-28
lines changed

11 files changed

+27
-28
lines changed

app/code/Magento/Eav/Model/TypeLocator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
namespace Magento\Eav\Model;
88

99
use Magento\Framework\Reflection\TypeProcessor;
10-
use Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface;
10+
use Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface;
1111

1212
/**
1313
* Class to locate types for Eav custom attributes
1414
*/
15-
class TypeLocator implements TypeLocatorInterface
15+
class TypeLocator implements CustomAttributeTypeLocatorInterface
1616
{
1717
/**
18-
* @var \Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface[]
18+
* @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface[]
1919
*/
2020
private $typeLocators;
2121

2222
/**
23-
* Initialize CustomAttributeTypeLocator
23+
* Initialize TypeLocator
2424
*
25-
* @param \Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface[] $typeLocators
25+
* @param \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface[] $typeLocators
2626
*/
2727
public function __construct(
2828
array $typeLocators = []

app/code/Magento/Eav/Model/TypeLocator/ComplexType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
use Magento\Eav\Api\AttributeRepositoryInterface;
1010
use Magento\Framework\Stdlib\StringUtils;
1111
use Magento\Framework\Reflection\TypeProcessor;
12-
use Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface;
12+
use Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface;
1313
use Magento\Framework\Webapi\CustomAttribute\ServiceTypeListInterface;
1414
use Magento\Framework\Exception\NoSuchEntityException;
1515

1616
/**
1717
* Class to locate complex types for EAV custom attributes
1818
*/
19-
class ComplexType implements ServiceTypeListInterface, TypeLocatorInterface
19+
class ComplexType implements ServiceTypeListInterface, CustomAttributeTypeLocatorInterface
2020
{
2121
/**
2222
* @var StringUtils

app/code/Magento/Eav/Model/TypeLocator/SimpleType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
use Magento\Framework\Exception\NoSuchEntityException;
1010
use Magento\Framework\Reflection\TypeProcessor;
1111
use Magento\Eav\Api\AttributeRepositoryInterface;
12-
use Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface;
12+
use Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface;
1313

1414
/**
1515
* Class to locate simple types for Eav custom attributes
1616
*/
17-
class SimpleType implements TypeLocatorInterface
17+
class SimpleType implements CustomAttributeTypeLocatorInterface
1818
{
1919
/**
2020
* @var AttributeRepositoryInterface

app/code/Magento/Eav/Test/Unit/Model/CustomAttributeTypeLocatorTest.php renamed to app/code/Magento/Eav/Test/Unit/Model/TypeLocatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1414

1515
/**
16-
* Unit test class for \Magento\Eav\Model\CustomAttributeTypeLocator
16+
* Unit test class for \Magento\Eav\Model\TypeLocator
1717
*/
18-
class CustomAttributeTypeLocatorTest extends \PHPUnit\Framework\TestCase
18+
class TypeLocatorTest extends \PHPUnit\Framework\TestCase
1919
{
2020
/**
2121
* @var TypeLocator

app/code/Magento/Eav/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<preference for="Magento\Eav\Api\Data\AttributeSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
2525
<preference for="Magento\Eav\Api\Data\AttributeSetSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
2626
<preference for="Magento\Eav\Api\Data\AttributeGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
27-
<preference for="Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface" type="Magento\Eav\Model\TypeLocator" />
27+
<preference for="Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface" type="Magento\Eav\Model\TypeLocator" />
2828

2929
<type name="Magento\Eav\Model\Entity\Attribute\Config">
3030
<arguments>

app/code/Magento/GraphQl/Model/Resolver/CustomAttributeMetadata.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
use Magento\Framework\Exception\LocalizedException;
1010
use Magento\Framework\Reflection\TypeProcessor;
11-
use Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface;
11+
use Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface;
1212
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1313
use Magento\Framework\GraphQl\ArgumentInterface;
1414
use Magento\GraphQl\Model\ResolverInterface;
@@ -20,7 +20,7 @@
2020
class CustomAttributeMetadata implements ResolverInterface
2121
{
2222
/**
23-
* @var TypeLocatorInterface
23+
* @var CustomAttributeTypeLocatorInterface
2424
*/
2525
private $typeLocator;
2626

@@ -30,11 +30,11 @@ class CustomAttributeMetadata implements ResolverInterface
3030
private $typeProcessor;
3131

3232
/**
33-
* @param TypeLocatorInterface $typeLocator
33+
* @param CustomAttributeTypeLocatorInterface $typeLocator
3434
* @param TypeProcessor $typeProcessor
3535
*/
3636
public function __construct(
37-
TypeLocatorInterface $typeLocator,
37+
CustomAttributeTypeLocatorInterface $typeLocator,
3838
TypeProcessor $typeProcessor
3939
) {
4040
$this->typeLocator = $typeLocator;

app/code/Magento/Webapi/Test/Unit/Model/Rest/Swagger/GeneratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class GeneratorTest extends \PHPUnit\Framework\TestCase
3030
protected $typeProcessorMock;
3131

3232
/**
33-
* @var \Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
33+
* @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
3434
*/
3535
protected $customAttributeTypeLocatorMock;
3636

@@ -74,7 +74,7 @@ protected function setUp()
7474
->will($this->returnValue(self::OPERATION_NAME));
7575

7676
$this->customAttributeTypeLocatorMock = $this->getMockBuilder(
77-
\Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface::class
77+
\Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface::class
7878
)->disableOriginalConstructor()
7979
->getMock();
8080
$this->customAttributeTypeLocatorMock->expects($this->any())

app/code/Magento/Webapi/Test/Unit/Model/Soap/Wsdl/GeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GeneratorTest extends \PHPUnit\Framework\TestCase
1717
protected $_wsdlGenerator;
1818

1919
/**
20-
* @var \Magento\Framework\Webapi\CustomAttribute\TypeLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
20+
* @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
2121
*/
2222
protected $customAttributeTypeLocator = null;
2323

dev/tests/integration/testsuite/Magento/Eav/Model/CustomAttributeTypeLocatorTest.php renamed to dev/tests/integration/testsuite/Magento/Eav/Model/TypeLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
use Magento\TestFramework\Helper\Bootstrap;
1010

11-
class CustomAttributeTypeLocatorTest extends \PHPUnit\Framework\TestCase
11+
class TypeLocatorTest extends \PHPUnit\Framework\TestCase
1212
{
1313
/**
1414
* @var TypeLocator

lib/internal/Magento/Framework/Webapi/CustomAttribute/TypeLocatorInterface.php renamed to lib/internal/Magento/Framework/Webapi/CustomAttributeTypeLocatorInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
namespace Magento\Framework\Webapi\CustomAttribute;
7+
namespace Magento\Framework\Webapi;
88

99
/**
1010
* Interface to locate types for custom attributes
1111
*/
12-
interface TypeLocatorInterface
12+
interface CustomAttributeTypeLocatorInterface
1313
{
1414
/**
1515
* Get Data Interface type for a given custom attribute code

0 commit comments

Comments
 (0)