Skip to content

Commit ae6c5f0

Browse files
authored
Merge branch '5.0.0-develop' into 1239-string-index-out-of-bounds-exception
2 parents 2fb20b3 + a1b30c7 commit ae6c5f0

File tree

53 files changed

+296
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+296
-105
lines changed

resources/META-INF/plugin.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@
315315
enabledByDefault="true" level="WARNING"
316316
implementationClass="com.magento.idea.magento2plugin.inspections.xml.PluginAttributeTypeInspection"/>
317317

318+
<localInspection language="XML" groupPath="XML"
319+
shortName="ModuleScopeInspection"
320+
bundle="magento2.inspection" key="inspection.displayName.ModuleScopeInspection"
321+
groupBundle="magento2.inspection" groupKey="inspection.group.name"
322+
enabledByDefault="true" level="WARNING"
323+
implementationClass="com.magento.idea.magento2plugin.inspections.xml.ModuleScopeInspection"/>
324+
318325
<!-- UCT inspection -->
319326
<localInspection language="PHP" groupPath="UCT"
320327
shortName="ExtendingDeprecatedClass"

resources/fileTemplates/internal/Magento Backend Controller Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1515
/**
1616
* Authorization level of a basic admin session
1717
*/
18-
const ADMIN_RESOURCE = '${ACL}';
18+
public const ADMIN_RESOURCE = '${ACL}';
1919

2020
#end
2121
/**

resources/fileTemplates/internal/Magento Customer Eav Attribute Data Patch Class.php.ft

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@ use $use;
1212
class ${CLASS_NAME} implements ${IMPLEMENTS}
1313
{
1414
/**
15-
* @var ${MODULE_DATA_SETUP_INTERFACE}
16-
*/
17-
private $moduleDataSetup;
15+
* @var ${MODULE_DATA_SETUP_INTERFACE}
16+
*/
17+
private ${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup;
1818

19-
/**
20-
* @var ${EAV_SETUP_FACTORY}
21-
*/
22-
private $eavSetupFactory;
19+
/**
20+
* @var ${EAV_SETUP_FACTORY}
21+
*/
22+
private ${EAV_SETUP_FACTORY} $eavSetupFactory;
2323

2424
/**
25-
* @var ${EAV_CONFIG_CLASS}
26-
*/
27-
private $eavConfig;
25+
* @var ${EAV_CONFIG_CLASS}
26+
*/
27+
private ${EAV_CONFIG_CLASS} $eavConfig;
2828

2929
/**
30-
* @var ${ATTRIBUTE_RESOURCE}
31-
*/
32-
private $attributeResource;
30+
* @var ${ATTRIBUTE_RESOURCE}
31+
*/
32+
private ${ATTRIBUTE_RESOURCE} $attributeResource;
3333

34-
/**
35-
* @param ${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup
36-
* @param ${EAV_SETUP_FACTORY} $eavSetupFactory
37-
* @param ${EAV_CONFIG_CLASS} $eavConfig
38-
* @param ${ATTRIBUTE_RESOURCE} $attributeResource
39-
*/
34+
/**
35+
* @param ${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup
36+
* @param ${EAV_SETUP_FACTORY} $eavSetupFactory
37+
* @param ${EAV_CONFIG_CLASS} $eavConfig
38+
* @param ${ATTRIBUTE_RESOURCE} $attributeResource
39+
*/
4040
public function __construct(
4141
${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup,
4242
${EAV_SETUP_FACTORY} $eavSetupFactory,

resources/fileTemplates/internal/Magento Data Model Interface.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface ${NAME}
1616
#set ($propertyData = $property.split(";"))
1717
#set ($propertyUpperSnake = $propertyData.get(0))
1818
#set ($propertyLowerSnake = $propertyData.get(1))
19-
const $propertyUpperSnake = "$propertyLowerSnake";
19+
public const $propertyUpperSnake = "$propertyLowerSnake";
2020
#end
2121
#end
2222
#if (${PROPERTIES})

resources/fileTemplates/internal/Magento Data Model.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
2626
#set ($propertyData = $property.split(";"))
2727
#set ($propertyUpperSnake = $propertyData.get(0))
2828
#set ($propertyLowerSnake = $propertyData.get(1))
29-
const $propertyUpperSnake = "$propertyLowerSnake";
29+
public const $propertyUpperSnake = "$propertyLowerSnake";
3030
#end
3131

3232
#end

resources/fileTemplates/internal/Magento Delete Entity By Id Command.php.ft

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ class ${CLASS_NAME}
1616
/**
1717
* @var ${LOGGER}
1818
*/
19-
private $logger;
19+
private ${LOGGER} $logger;
2020

2121
/**
2222
* @var ${MODEL_FACTORY}
2323
*/
24-
private $modelFactory;
24+
private ${MODEL_FACTORY} $modelFactory;
2525

2626
/**
2727
* @var ${RESOURCE}
2828
*/
29-
private $resource;
29+
private ${RESOURCE} $resource;
3030

3131
/**
3232
* @param ${LOGGER} $logger

resources/fileTemplates/internal/Magento Eav Attribute Data Patch Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class ${CLASS_NAME} implements ${IMPLEMENTS} {
1515
/**
1616
* @var ${MODULE_DATA_SETUP_INTERFACE}
1717
*/
18-
private $moduleDataSetup;
18+
private ${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup;
1919

2020
/**
2121
* @var ${EAV_SETUP_FACTORY}
2222
*/
23-
private $eavSetupFactory;
23+
private ${EAV_SETUP_FACTORY} $eavSetupFactory;
2424

2525
/**
2626
* @param ${MODULE_DATA_SETUP_INTERFACE} $moduleDataSetup

resources/fileTemplates/internal/Magento Entity Data Mapper.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ${CLASS_NAME}
1616
/**
1717
* @var ${DTO_FACTORY}
1818
*/
19-
private $entityDtoFactory;
19+
private ${DTO_FACTORY} $entityDtoFactory;
2020

2121
/**
2222
* @param ${DTO_FACTORY} $entityDtoFactory

resources/fileTemplates/internal/Magento Entity Delete Controller Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class ${CLASS_NAME} extends ${EXTENDS} implements ${IMPLEMENTS_POST}, ${IMPLEMEN
1818
*
1919
* @see _isAllowed()
2020
*/
21-
const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
21+
public const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
2222

2323
/**
2424
* @var ${DELETE_COMMAND}
2525
*/
26-
private $deleteByIdCommand;
26+
private ${DELETE_COMMAND} $deleteByIdCommand;
2727

2828
/**
2929
* @param Context $context

resources/fileTemplates/internal/Magento Entity Edit Action Controller Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ${CLASS_NAME} extends ${EXTENDS} implements ${IMPLEMENTS}
1818
*
1919
* @see _isAllowed()
2020
*/
21-
const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
21+
public const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
2222

2323
/**
2424
* Edit ${ENTITY_NAME} action.

resources/fileTemplates/internal/Magento Entity Index Adminhtml Controller Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ${CLASS_NAME} extends ${PARENT_CLASS_NAME} implements ${HTTP_GET_METHOD}
1616
/**
1717
* Authorization level of a basic admin session.
1818
*/
19-
const ADMIN_RESOURCE = '${ACL}';
19+
public const ADMIN_RESOURCE = '${ACL}';
2020

2121
/**
2222
* Execute action based on request and return result.

resources/fileTemplates/internal/Magento Entity New Action Controller Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ${CLASS_NAME} extends ${EXTENDS} implements ${IMPLEMENTS}
1818
*
1919
* @see _isAllowed()
2020
*/
21-
const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
21+
public const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
2222

2323
/**
2424
* Create new ${ENTITY_NAME} action.

resources/fileTemplates/internal/Magento Entity Save Controller Class.php.ft

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ class ${CLASS_NAME} extends ${EXTENDS} implements ${IMPLEMENTS}
1818
*
1919
* @see _isAllowed()
2020
*/
21-
const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
21+
public const ADMIN_RESOURCE = '${ADMIN_RESOURCE}';
2222

2323
/**
2424
* @var ${DATA_PERSISTOR}
2525
*/
26-
private $dataPersistor;
26+
private ${DATA_PERSISTOR} $dataPersistor;
2727

2828
/**
2929
* @var ${SAVE_COMMAND}
3030
*/
31-
private $saveCommand;
31+
private ${SAVE_COMMAND} $saveCommand;
3232

3333
/**
3434
* @var ${ENTITY_DTO_FACTORY}
3535
*/
36-
private $entityDataFactory;
36+
private ${ENTITY_DTO_FACTORY} $entityDataFactory;
3737

3838
/**
3939
* @param Context $context

resources/fileTemplates/internal/Magento Get List Query Model.php.ft

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ class ${CLASS_NAME}
1616
/**
1717
* @var ${COLLECTION_PROCESSOR_TYPE}
1818
*/
19-
private $collectionProcessor;
19+
private ${COLLECTION_PROCESSOR_TYPE} $collectionProcessor;
2020

2121
/**
2222
* @var ${ENTITY_COLLECTION_FACTORY_TYPE}
2323
*/
24-
private $entityCollectionFactory;
24+
private ${ENTITY_COLLECTION_FACTORY_TYPE} $entityCollectionFactory;
2525

2626
/**
2727
* @var ${ENTITY_DATA_MAPPER_TYPE}
2828
*/
29-
private $entityDataMapper;
29+
private ${ENTITY_DATA_MAPPER_TYPE} $entityDataMapper;
3030

3131
/**
3232
* @var ${SEARCH_CRITERIA_BUILDER_TYPE}
3333
*/
34-
private $searchCriteriaBuilder;
34+
private ${SEARCH_CRITERIA_BUILDER_TYPE} $searchCriteriaBuilder;
3535

3636
/**
3737
* @var ${SEARCH_RESULT_FACTORY_TYPE}
3838
*/
39-
private $searchResultFactory;
39+
private ${SEARCH_RESULT_FACTORY_TYPE} $searchResultFactory;
4040

4141
/**
4242
* @param ${COLLECTION_PROCESSOR_TYPE} $collectionProcessor

resources/fileTemplates/internal/Magento Grid Ui Component Action Column Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
2727
/**
2828
* @var ${URL}
2929
*/
30-
private $urlBuilder;
30+
private ${URL} $urlBuilder;
3131

3232
/**
3333
* @param ${CONTEXT} $context

resources/fileTemplates/internal/Magento Module Setup Patch File.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ${CLASS_NAME} implements DataPatchInterface
1414
/**
1515
* @var ModuleDataSetupInterface
1616
*/
17-
private $moduleDataSetup;
17+
private ModuleDataSetupInterface $moduleDataSetup;
1818

1919
/**
2020
* @param ModuleDataSetupInterface $moduleDataSetup

resources/fileTemplates/internal/Magento PHP Form Generic Button Block Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class ${CLASS_NAME}
1616
/**
1717
* @var ${CONTEXT}
1818
*/
19-
private $context;
19+
private ${CONTEXT} $context;
2020

2121
/**
2222
* @var ${URL}
2323
*/
24-
private $urlBuilder;
24+
private ${URL} $urlBuilder;
2525

2626
/**
2727
* @param ${CONTEXT} $context

resources/fileTemplates/internal/Magento Save Entity Command Model.php.ft

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ class ${CLASS_NAME}
1616
/**
1717
* @var ${LOGGER}
1818
*/
19-
private $logger;
19+
private ${LOGGER} $logger;
2020

2121
/**
2222
* @var ${MODEL_FACTORY}
2323
*/
24-
private $modelFactory;
24+
private ${MODEL_FACTORY} $modelFactory;
2525

2626
/**
2727
* @var ${RESOURCE}
2828
*/
29-
private $resource;
29+
private ${RESOURCE} $resource;
3030

3131
/**
3232
* @param ${LOGGER} $logger

resources/fileTemplates/internal/Magento UI Component Custom Data Provider Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class ${CLASS_NAME} extends ${EXTENDS}
2222
/**
2323
* @var ${GET_LIST_QUERY_TYPE}
2424
*/
25-
private $getListQuery;
25+
private ${GET_LIST_QUERY_TYPE} $getListQuery;
2626

2727
/**
2828
* @var ${SEARCH_RESULT_FACTORY}
2929
*/
30-
private $searchResultFactory;
30+
private ${SEARCH_RESULT_FACTORY} $searchResultFactory;
3131

3232
/**
3333
* @var array
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<body>
3+
<h1>Magento area type check.</h1>
4+
<p>
5+
Magento is organized into these main areas:
6+
7+
Admin (adminhtml): entry point for this area is pub/index.php. The Admin panel area includes the code needed for store management. The /app/design/adminhtml directory contains all the code for components you’ll see while working in the Admin.
8+
9+
Storefront (frontend): entry point for this area is pub/index.php. The storefront (or frontend) contains template and layout files that define the appearance of your storefront.
10+
11+
Basic (base): used as a fallback for files absent in adminhtml and frontend areas.
12+
13+
Cron (crontab): In pub/cron.php, the \Magento\Framework\App\Cron class always loads the ‘crontab’ area.
14+
15+
You can also send requests to Magento using the SOAP, REST and GraphQL APIs. These three areas
16+
17+
Web API REST (webapi_rest): entry point for this area is pub/index.php. The REST area has a front controller that understands how to do URL lookups for REST-based URLs.
18+
19+
GraphQL (graphql): entry point for this area is pub/index.php.
20+
21+
Web API SOAP (webapi_soap): entry point for this area is pub/index.php.
22+
</p>
23+
<p>
24+
See https://developer.adobe.com/commerce/php/architecture/modules/areas/ for more information.
25+
</p>
26+
</body>
27+
</html>

resources/magento2/inspection.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@ inspection.warning.class.does.not.exist=The class "{0}" does not exist
3939
inspection.warning.method.does.not.exist=The method "{0}" does not exist in the service class
4040
inspection.warning.method.should.have.public.access=The method "{0}" should have public access
4141
inspection.warning.method.should.have.public.access.fix=Change the method access
42+
inspection.displayName.ModuleScopeInspection=Module Configuration Scope Inspection
43+
inspection.config.wrong.area = The area of this config file is wrong. Please check the spelling of the parent directory, it should be equal to one of the following: adminhtml, frontend, crontab, webapi_rest, webapi_soap, graphql.

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewCategoryEavAttributeDialog.form

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
<preferred-size width="150" height="-1"/>
5858
</grid>
5959
</constraints>
60-
<properties/>
60+
<properties>
61+
<text value="Display Settings"/>
62+
</properties>
6163
</component>
6264
<component id="20b6c" class="javax.swing.JLabel">
6365
<constraints>

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewProductEavAttributeDialog.form

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
<preferred-size width="150" height="-1"/>
4848
</grid>
4949
</constraints>
50-
<properties/>
50+
<properties>
51+
<text value="Product Details"/>
52+
</properties>
5153
</component>
5254
<component id="20b6c" class="javax.swing.JLabel">
5355
<constraints>

0 commit comments

Comments
 (0)