diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 88e79f495..912bc36b5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,7 +5,7 @@ name: Run automated tests on: pull_request: - branches: [ master, 4.2.0-develop ] + branches: [ master, 3.1.0-develop ] jobs: build-linux: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d8e21220..da21cd146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,131 +2,10 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). - -## 4.2.0 - -### Added - -- Extending of the built-in Upgrade Compatibility Tool [#read-more](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.2.0-Release) - -### Changed - -- Enhanced Magento 2 version resolving in [#747](https://github.com/magento/magento2-phpstorm-plugin/pull/747), [#751](https://github.com/magento/magento2-phpstorm-plugin/pull/751), [#777](https://github.com/magento/magento2-phpstorm-plugin/pull/777) - -### Fixed - -- Fixed NullPointerException for the InjectAViewModelAction in [#800](https://github.com/magento/magento2-phpstorm-plugin/pull/800) -- Fixed NullPointerException for a name attribute of the event tag and code style fixes in [#799](https://github.com/magento/magento2-phpstorm-plugin/pull/799) -- Fixed NullPointerException for PluginReferenceProvider in [#801](https://github.com/magento/magento2-phpstorm-plugin/pull/801) - -## 4.1.0 - -### Added - -- Added UI integration with the Adobe Commerce Upgrade Compatibility Tool in [#625](https://github.com/magento/magento2-phpstorm-plugin/pull/625) -- Added MVP version of the built-in Upgrade Compatibility Tool, read more in [wiki](https://github.com/magento/magento2-phpstorm-plugin/wiki/4.1.0-Release#the-built-in-upgrade-compatibility-tool) - -## 4.0.0 - -### Added - -- Added XML file header include code template in [#615](https://github.com/magento/magento2-phpstorm-plugin/pull/615) -- Added Web API generation for the Magento Entity Creator in [#597](https://github.com/magento/magento2-phpstorm-plugin/pull/597) and [#607](https://github.com/magento/magento2-phpstorm-plugin/pull/607) -- Added DI XML plugin type attribute inspections in [#588](https://github.com/magento/magento2-phpstorm-plugin/pull/588) -- Added Web API interface for service (PHP class) generation in [#586](https://github.com/magento/magento2-phpstorm-plugin/pull/586) -- Added DI XML type tag attributes inspections that related to the PHP/Magento types in [#582](https://github.com/magento/magento2-phpstorm-plugin/pull/582) -- Added DI XML preference tag attributes inspections in [#578](https://github.com/magento/magento2-phpstorm-plugin/pull/578) -- Added Web API XML service tag attributes inspections in [#577](https://github.com/magento/magento2-phpstorm-plugin/pull/577) -- Added an error handler to help user with a new bug issue creation on the GitHub side in [#552](https://github.com/magento/magento2-phpstorm-plugin/pull/552) and [#593](https://github.com/magento/magento2-phpstorm-plugin/pull/593) -- Added Web API declaration generation in [#548](https://github.com/magento/magento2-phpstorm-plugin/pull/548) and [#595](https://github.com/magento/magento2-phpstorm-plugin/pull/595) -- Added JS and CSS support for Copy Magento Path action in [#536](https://github.com/magento/magento2-phpstorm-plugin/pull/536) - -### Changed - -- Changed the content of the generated plugin class in [#612](https://github.com/magento/magento2-phpstorm-plugin/pull/612) -- Changed using of hardcoded entity id value into the constant in all files generated by the Entity Creator in [#606](https://github.com/magento/magento2-phpstorm-plugin/pull/606) - -### Fixed - -- Fixed a casting exception in the XML index in [#617](https://github.com/magento/magento2-phpstorm-plugin/pull/617) -- Fixed a bug with plugin generation for complex non-primitive types in [#609](https://github.com/magento/magento2-phpstorm-plugin/pull/609) -- Fixed a bug with the namespace generation in a generated controller in [#571](https://github.com/magento/magento2-phpstorm-plugin/pull/571) -- Fixed a bug with directory validation for the generation dialogues in [#565](https://github.com/magento/magento2-phpstorm-plugin/pull/565) -- Fixed wrong entity data mapper file template position in [#549](https://github.com/magento/magento2-phpstorm-plugin/pull/549) -- Fixed incorrect data saving into table model within editing a table in [#544](https://github.com/magento/magento2-phpstorm-plugin/pull/544) -- Fixed an error when plugin or observer name is not set in [#533](https://github.com/magento/magento2-phpstorm-plugin/pull/533) -- Fixed incorrect duplication warning for disabled plugin in di.xml in [#529](https://github.com/magento/magento2-phpstorm-plugin/pull/529) - -## 3.2.2 - -### Fixed - -- New entity layout name and edit entity layout name inside it -- `Java.lang.IllegalArgumentException` During adding a new method into an existing plugin - -## 3.2.1 - -### Fixed - -- Directory validator -- Entity data mapper file template - -## 3.2.0 - -### Added - -- Code generation for a Magento Entity in [#521](https://github.com/magento/magento2-phpstorm-plugin/pull/521) -- Code generation for email templates in [#350](https://github.com/magento/magento2-phpstorm-plugin/pull/350) -- Reference navigation for disabled observers in `events.xml` in [#439](https://github.com/magento/magento2-phpstorm-plugin/pull/439) -- Line markers for test fixtures in [#477](https://github.com/magento/magento2-phpstorm-plugin/pull/477) - -### Changed - -- Added ability to set the module sequence at generating new module [#266](https://github.com/magento/magento2-phpstorm-plugin/pull/266) - -### Fixed - -- ArrayIndexOutOfBoundsException in the New Module Action in [#519](https://github.com/magento/magento2-phpstorm-plugin/pull/519) - -## 3.1.3 - -### Changed - -- Require restart on plugin update due to using native libraries - -### Fixed - -- Class completion doesn't display interfaces -- Fixed invalid check 'setup_version' in the etc/module.xml - -## 3.1.2 - -### Fixed - -- Reference navigation for classes under directories with underscores -- Fixed the array access exception when using copy path action - -## 3.1.1 - -### Fixed - -- Fixed null pointer exception on the copy path action +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). ## 3.1.0 -### Added - -- Extended `.phpstorm.meta.php` for more convenient autocomplete [#467](https://github.com/magento/magento2-phpstorm-plugin/pull/467) -- Code generation for message queue in [#411](https://github.com/magento/magento2-phpstorm-plugin/pull/411) -- Code generation for declarative schema [#453](https://github.com/magento/magento2-phpstorm-plugin/pull/453) -- Inspection warning for disabled observer [#432](https://github.com/magento/magento2-phpstorm-plugin/pull/432) -- The action item to the context menu to copy file path in the Magento format [#451](https://github.com/magento/magento2-phpstorm-plugin/pull/451) - -### Fixed - -- The null pointer exception on the Create Module Dialog - ## 3.0.4 ### Fixed diff --git a/README.md b/README.md index 89214bcf7..c03a8415e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ [![Version](http://phpstorm.espend.de/badge/8024/version)](https://plugins.jetbrains.com/plugin/8024) [![Downloads](http://phpstorm.espend.de/badge/8024/downloads)](https://plugins.jetbrains.com/plugin/8024) ![merge-chance-badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fmerge-chance.info%2Fbadge%3Frepo%3Dmagento/magento2-phpstorm-plugin) -[![Made With Love](https://img.shields.io/badge/Made%20With-Love-orange.svg)](https://magento.com) ## Installation @@ -22,7 +21,7 @@ ## Works with -* PhpStorm >= 2021.2.1 +* PhpStorm >= 2020.3 * JRE >= 11 ## Features @@ -43,11 +42,8 @@ 1. Check out this repository 1. Open a folder with the project in the IntelliJ Ultimate using the `open` action button. -1. Make sure that you on the latest develop branch (e.g `4.2.0-develop`) -1. Right-click on the `build.gradle` file, choose "Import Gradle project" (if this is not exist look for "Build module ''") (you need to have Gradle plugin installed) -1. Check if the right SDK version is used for the project. - - Current Java version for the project is **java 11**, so you should additionally download **SDK 11** and choose it in the module settings: `Right click by the project root > Open Module Settings > Project Settings > Project > Project SDK` - - Check if right SDK version is used for the Gradle plugin: `Intellij IDEA > Preferences... > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM` and choose your JDK. +1. Make sure that you on the latest develop branch (e.g `1.0.0-develop`) +1. Right-click on the `build.gradle` file, choose "Import Gradle project" (you need to have Gradle plugin installed) 1. When the Gradle sections appeared in the right bar, navigate there and right-click `magento-2-php-storm-plugin > Tasks -> Intellij -> runIde` 1. Click `Run "magento-2-php-storm-plugin"` to run the plugin. You should see a new instance of IntelliJ launched with the plugin installed. Make sure the plugin is enabled in IntelliJ settings and indexing is finished. Plugin features should be accessible at this point. diff --git a/build.gradle b/build.gradle index 366739199..44045f4f1 100644 --- a/build.gradle +++ b/build.gradle @@ -4,10 +4,10 @@ */ plugins { - id 'org.jetbrains.intellij' version '1.1.4' + id 'org.jetbrains.intellij' version '0.6.5' id 'checkstyle' id 'pmd' - id 'org.jetbrains.changelog' version '1.2.1' + id 'org.jetbrains.changelog' version '0.6.2' } repositories { @@ -15,7 +15,7 @@ repositories { } group 'com.magento.idea' -version '4.2.0' +version '3.1.0' apply plugin: 'org.jetbrains.intellij' apply plugin: 'java' @@ -23,17 +23,17 @@ apply plugin: 'idea' apply plugin: 'groovy' apply plugin: 'org.jetbrains.changelog' -def phpPluginVersion = System.getProperty("phpPluginVersion", "212.5080.55") -def ideaVersion = System.getProperty("ideaVersion", "2021.2.1") +def phpPluginVersion = System.getProperty("phpPluginVersion", "203.5981.175") +def ideaVersion = System.getProperty("ideaVersion", "2020.3") def javaVersion = 11 sourceCompatibility = javaVersion targetCompatibility = javaVersion intellij { - version = ideaVersion - type = 'IU' - pluginName = 'com.magento.idea.magento2plugin' + version ideaVersion + type 'IU' + pluginName 'com.magento.idea.magento2plugin' plugins = [ "com.jetbrains.php:$phpPluginVersion", 'yaml', @@ -41,17 +41,17 @@ intellij { 'properties', 'CSS', 'JavaScriptLanguage', - 'com.intellij.lang.jsgraphql:3.0.0', + 'com.intellij.lang.jsgraphql:2.7.0', 'platform-images', 'copyright' ] - updateSinceUntilBuild = false - sameSinceUntilBuild = false - downloadSources = !Boolean.valueOf(System.getenv('CI')) - sandboxDir = "${project.rootDir}/.idea-sandbox" + updateSinceUntilBuild false + sameSinceUntilBuild false + downloadSources !Boolean.valueOf(System.getenv('CI')) + sandboxDirectory "${project.rootDir}/.idea-sandbox" patchPluginXml { - changeNotes = provider { changelog.getLatest().toHTML() } + changeNotes({ changelog.getLatest().toHTML() }) } } @@ -85,7 +85,7 @@ apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle" changelog { version = "${project.version}" path = "${project.projectDir}/CHANGELOG.md" - header = provider { "[${project.version}] - ${getDate()}" } + header = { "[${project.version}] - ${getDate()}" } headerParserRegex = ~/(\d+\.)?(\d+\.)?(\*|\d+)/ itemPrefix = "-" keepUnreleasedSection = true diff --git a/gradle-tasks/checkstyle/checkstyle.xml b/gradle-tasks/checkstyle/checkstyle.xml index fbd3f0565..c6466eb76 100644 --- a/gradle-tasks/checkstyle/checkstyle.xml +++ b/gradle-tasks/checkstyle/checkstyle.xml @@ -330,8 +330,4 @@ - - - - diff --git a/gradle-tasks/staticChecks.gradle b/gradle-tasks/staticChecks.gradle index 222f3b7be..d2a20af56 100644 --- a/gradle-tasks/staticChecks.gradle +++ b/gradle-tasks/staticChecks.gradle @@ -19,6 +19,7 @@ checkstyle { pmd { toolVersion = "6.21.0" consoleOutput = true + rulePriority = 5 ruleSets = [ rootProject.file("gradle-tasks/pmd/ruleset.xml") ] diff --git a/resources/.phpstorm.meta.php/di-autocomplete.php b/resources/.phpstorm.meta.php/di-autocomplete.php deleted file mode 100644 index 9fb8845b3..000000000 --- a/resources/.phpstorm.meta.php/di-autocomplete.php +++ /dev/null @@ -1,123 +0,0 @@ - '@'])); - override(\Magento\Framework\ObjectManagerInterface::create(0), map(['' => '@'])); - - override(\Magento\Framework\View\LayoutInterface::createBlock(0), map(['' => '@'])); - override(\Magento\Framework\View\TemplateEngine\Php::helper(0), map(['' => '@'])); - - override( - \Magento\Framework\Controller\ResultFactory::create(0), - map( - [ - \Magento\Framework\Controller\ResultFactory::TYPE_FORWARD => \Magento\Framework\Controller\Result\Forward::class, - \Magento\Framework\Controller\ResultFactory::TYPE_JSON => \Magento\Framework\Controller\Result\Json::class, - \Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT => \Magento\Framework\View\Result\Layout::class, - \Magento\Framework\Controller\ResultFactory::TYPE_PAGE => \Magento\Framework\View\Result\Page::class, - \Magento\Framework\Controller\ResultFactory::TYPE_RAW => \Magento\Framework\Controller\Result\Raw::class, - \Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT => \Magento\Framework\Controller\Result\Redirect::class, - ] - ) - ); - - expectedArguments( - \Magento\Framework\Controller\ResultFactory::create(), - 0, - \Magento\Framework\Controller\ResultFactory::TYPE_FORWARD, - \Magento\Framework\Controller\ResultFactory::TYPE_JSON, - \Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT, - \Magento\Framework\Controller\ResultFactory::TYPE_PAGE, - \Magento\Framework\Controller\ResultFactory::TYPE_RAW, - \Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT - ); - - registerArgumentsSet( - 'scope_types', - \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE - ); - expectedArguments( - \Magento\Framework\App\Config\ScopeConfigInterface::getValue(), - 1, - argumentsSet('scope_types') - ); - expectedArguments( - \Magento\Framework\App\Config\ScopeConfigInterface::isSetFlag(), - 1, - argumentsSet('scope_types') - ); - expectedArguments( - \Magento\Framework\App\Config\MutableScopeConfigInterface::setValue(), - 2, - argumentsSet('scope_types') - ); - - registerArgumentsSet( - 'condition_types', - 'eq', - 'in', - 'is', - 'to', - 'finset', - 'from', - 'gt', - 'gteq', - 'like', - 'lt', - 'lteq', - 'moreq', - 'neq', - 'nin', - 'notnull', - 'null' - ); - expectedArguments(\Magento\Framework\Api\SearchCriteriaBuilder::addFilter(), 2, argumentsSet('condition_types')); - expectedArguments(\Magento\Framework\Api\FilterBuilder::setConditionType(), 0, argumentsSet('condition_types')); - - expectedArguments( - \Magento\Framework\Api\SearchCriteriaBuilder::addSortOrder(), - 0, - \Magento\Framework\Api\SortOrder::SORT_ASC, - \Magento\Framework\Api\SortOrder::SORT_DESC - ); - - registerArgumentsSet( - 'field_types', - 'button', - 'checkbox', - 'checkboxes', - 'column', - 'date', - 'editablemultiselect', - 'editor', - 'fieldset', - 'file', - 'gallery', - 'hidden', - 'image', - 'imagefile', - 'label', - 'link', - 'multiline', - 'multiselect', - 'note', - 'obscure', - 'password', - 'radio', - 'radios', - 'reset', - 'select', - 'submit', - 'text', - 'textarea', - 'time' - ); - expectedArguments(\Magento\Framework\Data\Form\AbstractForm::addField(), 1, argumentsSet('field_types')); - expectedArguments(\Magento\Framework\Data\Form\Element\Fieldset::addField(), 1, argumentsSet('field_types')); - -} diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index c22b26d43..35d9f7eb1 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -4,10 +4,10 @@ * See COPYING.txt for license details. */ --> - + com.magento.idea.magento2plugin Magento PhpStorm - 4.2.0 + 3.1.0 Magento Inc. - + @@ -58,7 +58,6 @@ - @@ -66,7 +65,6 @@ - @@ -96,12 +94,6 @@ - - - - - - - - - - - - - - - - - - @@ -134,7 +108,6 @@ - @@ -170,346 +143,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -539,33 +227,16 @@ - - - - - - - - - - - - - - - - - - - + + diff --git a/resources/META-INF/pluginIcon.svg b/resources/META-INF/pluginIcon.svg index 564f534c2..a79977df8 100644 --- a/resources/META-INF/pluginIcon.svg +++ b/resources/META-INF/pluginIcon.svg @@ -1,7 +1 @@ - - - - - - \ No newline at end of file +Magento-colorAlexis Doreau \ No newline at end of file diff --git a/resources/META-INF/pluginIcon_dark.svg b/resources/META-INF/pluginIcon_dark.svg new file mode 100644 index 000000000..35daec279 --- /dev/null +++ b/resources/META-INF/pluginIcon_dark.svg @@ -0,0 +1 @@ +Vorillaz \ No newline at end of file diff --git a/resources/fileTemplates/code/GitHub New Bug Issue Body Template.txt.ft b/resources/fileTemplates/code/GitHub New Bug Issue Body Template.txt.ft deleted file mode 100644 index b4fa84a2d..000000000 --- a/resources/fileTemplates/code/GitHub New Bug Issue Body Template.txt.ft +++ /dev/null @@ -1,36 +0,0 @@ -**Describe the bug** (*) - -${BUG_DESCRIPTION} - -``` -${STACK_TRACE} -``` - -**To Reproduce** (*) - -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** (*) - -A clear and concise description of what you expected to happen. - -**Screenshots** - -If applicable, add screenshots to help explain your problem. - -**Please complete the following information:** (*) - -#set($os = "#if(${OS_VERSION})${OS_VERSION}#else[e.g. MacOS or Ubuntu Linux 20.04]#end") -#set($intellijVersion = "#if(${INTELLIJ_VERSION})${INTELLIJ_VERSION}#else[e.g. 2019.3.3]#end") -#set($pluginVersion = "#if(${PLUGIN_VERSION})${PLUGIN_VERSION}#else[e.g. 1.0.0]#end") - - OS: $os - - PhpStorm/Intellij version: $intellijVersion - - Plugin Version: $pluginVersion - -**Additional context** - -Add any other context about the problem here. diff --git a/resources/fileTemplates/code/GitHub New Bug Issue Body Template.txt.html b/resources/fileTemplates/code/GitHub New Bug Issue Body Template.txt.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/resources/fileTemplates/code/Magento Grid UI Component Column.xml.ft b/resources/fileTemplates/code/Magento Grid UI Component Column.xml.ft deleted file mode 100644 index 99a43eec6..000000000 --- a/resources/fileTemplates/code/Magento Grid UI Component Column.xml.ft +++ /dev/null @@ -1,8 +0,0 @@ - - -#if (${COLUMN_FILTER}) - ${COLUMN_FILTER} -#end - - - diff --git a/resources/fileTemplates/code/Magento Grid UI Component Column.xml.html b/resources/fileTemplates/code/Magento Grid UI Component Column.xml.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/resources/fileTemplates/code/Magento Module Email Template Xml.xml.ft b/resources/fileTemplates/code/Magento Module Email Template Xml.xml.ft deleted file mode 100644 index 359f7d77a..000000000 --- a/resources/fileTemplates/code/Magento Module Email Template Xml.xml.ft +++ /dev/null @@ -1 +0,0 @@ -