Skip to content

Commit c24966e

Browse files
author
Bryant Luk
committed
MAGETWO-38823: Stabilize builds
- Rename user interface
1 parent a577c69 commit c24966e

File tree

9 files changed

+44
-43
lines changed

9 files changed

+44
-43
lines changed

app/code/Magento/User/Model/UserInterface.php renamed to app/code/Magento/User/Api/Data/UserInterface.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\User\Model;
6+
namespace Magento\User\Api\Data;
77

88
/**
99
* Admin user interface.
@@ -14,119 +14,119 @@ interface UserInterface
1414
{
1515
/**
1616
* Get ID.
17-
*
17+
*
1818
* @return int
1919
*/
2020
public function getId();
21-
21+
2222
/**
2323
* Set ID.
24-
*
24+
*
2525
* @param int $id
2626
* @return $this
2727
*/
2828
public function setId($id);
29-
29+
3030
/**
3131
* Get first name.
32-
*
32+
*
3333
* @return string
3434
*/
3535
public function getFirstName();
36-
36+
3737
/**
3838
* Set first name.
39-
*
39+
*
4040
* @param string $firstName
4141
* @return $this
4242
*/
4343
public function setFirstName($firstName);
44-
44+
4545
/**
4646
* Get last name.
47-
*
47+
*
4848
* @return string
4949
*/
5050
public function getLastName();
51-
51+
5252
/**
5353
* Set last name.
54-
*
54+
*
5555
* @param string $lastName
5656
* @return $this
5757
*/
5858
public function setLastName($lastName);
59-
59+
6060
/**
6161
* Get email.
62-
*
62+
*
6363
* @return string
6464
*/
6565
public function getEmail();
66-
66+
6767
/**
6868
* Set email.
69-
*
69+
*
7070
* @param string $email
7171
* @return $this
7272
*/
7373
public function setEmail($email);
74-
74+
7575
/**
7676
* Get user name.
77-
*
77+
*
7878
* @return string
7979
*/
8080
public function getUserName();
81-
81+
8282
/**
8383
* Set user name.
84-
*
84+
*
8585
* @param string $userName
8686
* @return $this
8787
*/
8888
public function setUserName($userName);
89-
89+
9090
/**
9191
* Get password or password hash.
92-
*
92+
*
9393
* @return string
9494
*/
9595
public function getPassword();
96-
96+
9797
/**
9898
* Set password or password hash.
99-
*
99+
*
100100
* @param string $password
101101
* @return $this
102102
*/
103103
public function setPassword($password);
104-
104+
105105
/**
106106
* Get user record creation date.
107-
*
107+
*
108108
* @return string
109109
*/
110110
public function getCreated();
111-
111+
112112
/**
113113
* Set user record creation date.
114-
*
114+
*
115115
* @param string $created
116116
* @return $this
117117
*/
118118
public function setCreated($created);
119-
119+
120120
/**
121121
* Get user record modification date.
122-
*
122+
*
123123
* @return string
124124
*/
125125
public function getModified();
126-
126+
127127
/**
128128
* Set user record modification date.
129-
*
129+
*
130130
* @param string $modified
131131
* @return $this
132132
*/

app/code/Magento/User/Model/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\Backend\Model\Auth\Credential\StorageInterface;
99
use Magento\Framework\Model\AbstractModel;
1010
use Magento\Framework\Exception\AuthenticationException;
11+
use Magento\User\Api\Data\UserInterface;
1112

1213
/**
1314
* Admin user model

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
<type name="Magento\Authorization\Model\Role">
1515
<plugin name="updateRoleUsersAcl" type="Magento\User\Model\Plugin\AuthorizationRole" sortOrder="20"/>
1616
</type>
17-
<preference for="Magento\User\Model\UserInterface" type="Magento\User\Model\User" />
17+
<preference for="Magento\User\Api\Data\UserInterface" type="Magento\User\Model\User" />
1818
</config>

dev/tests/api-functional/_files/Magento/TestJoinDirectives/etc/extension_attributes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Api/etc/extension_attributes.xsd">
1010
<extension_attributes for="Magento\Quote\Api\Data\CartInterface">
11-
<attribute code="quoteApiTestAttribute" type="Magento\User\Model\UserInterface">
11+
<attribute code="quoteApiTestAttribute" type="Magento\User\Api\Data\UserInterface">
1212
<join reference_table="admin_user"
1313
join_on_field="store_id"
1414
reference_field="user_id"
@@ -20,7 +20,7 @@
2020
</attribute>
2121
</extension_attributes>
2222
<extension_attributes for="Magento\Sales\Api\Data\InvoiceInterface">
23-
<attribute code="invoiceApiTestAttribute" type="Magento\User\Model\UserInterface">
23+
<attribute code="invoiceApiTestAttribute" type="Magento\User\Api\Data\UserInterface">
2424
<join reference_table="admin_user"
2525
join_on_field="store_id"
2626
reference_field="user_id"

dev/tests/integration/testsuite/Magento/Downloadable/Model/Product/TypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testSaveTypeSpecificData()
140140
$this->assertCount(1, $links);
141141
/** @var \Magento\Downloadable\Model\Link $link */
142142
$link = reset($links);
143-
/** @var \Magento\User\Model\UserInterface $testAttribute */
143+
/** @var \Magento\User\Api\Data\UserInterface $testAttribute */
144144
$testAttribute = $link->getExtensionAttributes()->getTestAttribute();
145145
$this->assertEquals($expectedExtensionAttributes['firstname'], $testAttribute->getFirstName());
146146
$this->assertEquals($expectedExtensionAttributes['lastname'], $testAttribute->getLastName());
@@ -167,7 +167,7 @@ public function testSaveTypeSpecificData()
167167
$this->assertEquals(1, $samples->count());
168168
/** @var \Magento\Downloadable\Model\Sample $sample */
169169
$sample = $samples->getFirstItem()->getData();
170-
/** @var \Magento\User\Model\UserInterface $testAttribute */
170+
/** @var \Magento\User\Api\Data\UserInterface $testAttribute */
171171
$testAttribute = $sample['extension_attributes']->getTestAttribute();
172172
$this->assertEquals($expectedExtensionAttributes['firstname'], $testAttribute->getFirstName());
173173
$this->assertEquals($expectedExtensionAttributes['lastname'], $testAttribute->getLastName());

dev/tests/integration/testsuite/Magento/Downloadable/etc/extension_attributes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Api/etc/extension_attributes.xsd">
1010
<extension_attributes for="Magento\Downloadable\Api\Data\LinkInterface">
11-
<attribute code="testAttribute" type="Magento\User\Model\UserInterface">
11+
<attribute code="testAttribute" type="Magento\User\Api\Data\UserInterface">
1212
<join reference_table="admin_user"
1313
join_on_field="product_id"
1414
reference_field="user_id"
@@ -20,7 +20,7 @@
2020
</attribute>
2121
</extension_attributes>
2222
<extension_attributes for="Magento\Downloadable\Api\Data\SampleInterface">
23-
<attribute code="testAttribute" type="Magento\User\Model\UserInterface">
23+
<attribute code="testAttribute" type="Magento\User\Api\Data\UserInterface">
2424
<join reference_table="admin_user"
2525
join_on_field="product_id"
2626
reference_field="user_id"

dev/tests/integration/testsuite/Magento/Quote/Model/Quote/Item/RepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testGetList()
3131
/** @var \Magento\Quote\Api\Data\CartItemInterface $actualQuoteItem */
3232
$actualQuoteItem = array_pop($quoteItems);
3333
$this->assertInstanceOf('Magento\Quote\Api\Data\CartItemInterface', $actualQuoteItem);
34-
/** @var \Magento\User\Model\UserInterface $testAttribute */
34+
/** @var \Magento\User\Api\Data\UserInterface $testAttribute */
3535
$testAttribute = $actualQuoteItem->getExtensionAttributes()->getQuoteItemTestAttribute();
3636
$this->assertEquals($expectedExtensionAttributes['firstname'], $testAttribute->getFirstName());
3737
$this->assertEquals($expectedExtensionAttributes['lastname'], $testAttribute->getLastName());

dev/tests/integration/testsuite/Magento/Quote/Model/QuoteRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testGetList()
3131
$actualQuote = array_pop($items);
3232
$this->assertInstanceOf('Magento\Quote\Api\Data\CartInterface', $actualQuote);
3333
$this->assertEquals('test01', $actualQuote->getReservedOrderId());
34-
/** @var \Magento\User\Model\UserInterface $testAttribute */
34+
/** @var \Magento\User\Api\Data\UserInterface $testAttribute */
3535
$testAttribute = $actualQuote->getExtensionAttributes()->getQuoteTestAttribute();
3636
$this->assertEquals($expectedExtensionAttributes['firstname'], $testAttribute->getFirstName());
3737
$this->assertEquals($expectedExtensionAttributes['lastname'], $testAttribute->getLastName());

dev/tests/integration/testsuite/Magento/Quote/etc/extension_attributes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/Api/etc/extension_attributes.xsd">
1010
<extension_attributes for="Magento\Quote\Api\Data\CartInterface">
11-
<attribute code="quoteTestAttribute" type="Magento\User\Model\UserInterface">
11+
<attribute code="quoteTestAttribute" type="Magento\User\Api\Data\UserInterface">
1212
<join reference_table="admin_user"
1313
join_on_field="store_id"
1414
reference_field="user_id"
@@ -20,7 +20,7 @@
2020
</attribute>
2121
</extension_attributes>
2222
<extension_attributes for="Magento\Quote\Api\Data\CartItemInterface">
23-
<attribute code="quoteItemTestAttribute" type="Magento\User\Model\UserInterface">
23+
<attribute code="quoteItemTestAttribute" type="Magento\User\Api\Data\UserInterface">
2424
<join reference_table="admin_user"
2525
join_on_field="store_id"
2626
reference_field="user_id"

0 commit comments

Comments
 (0)