Skip to content

Instantly share code, notes, and snippets.

@jalogut
Last active September 21, 2018 08:49
Show Gist options
  • Save jalogut/95399d1ad61e55a4f6ff8f1cf9238f09 to your computer and use it in GitHub Desktop.
Save jalogut/95399d1ad61e55a4f6ff8f1cf9238f09 to your computer and use it in GitHub Desktop.
PHPStorm External Tools for Magento 2 (~/Library/Preferences/<product name><version number>/tools/External\ Tools.xml)
<!-- Local Setups -->
<toolSet name="External Tools">
<tool name="mg2 clear cache" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="bin/magento" />
<option name="PARAMETERS" value="cache:clean" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento" />
</exec>
</tool>
<tool name="mg2 generation flush" description="Flushs generated code like factories and proxies" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="bin/n98-magerun2" />
<option name="PARAMETERS" value="--root-dir=magento generation:flush" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 purge all" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="find" />
<option name="PARAMETERS" value="var/di var/generation generated var/cache var/page_cache var/view_preprocessed dev/tests/integration/tmp pub/static -mindepth 1 -maxdepth 1 -not -name .htaccess -exec rm -r {} +" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento" />
</exec>
</tool>
<tool name="mg2 enable module" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="bin/magento" />
<option name="PARAMETERS" value="module:enable $SelectedText$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento" />
</exec>
</tool>
<tool name="mg2 setup upgrade" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="bin/magento" />
<option name="PARAMETERS" value="setup:upgrade" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento" />
</exec>
</tool>
<tool name="mg2 test unit" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="bin/phpunit" />
<option name="PARAMETERS" value="--config magento/dev/tests/unit/phpunit.xml $FileRelativePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test unit method" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="bin/phpunit" />
<option name="PARAMETERS" value="--config magento/dev/tests/unit/phpunit.xml --filter $SelectedText$ $FileRelativePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test integration" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="../../../../bin/phpunit " />
<option name="PARAMETERS" value="--config phpunit.xml $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento/dev/tests/integration" />
</exec>
</tool>
<tool name="mg2 test integration method" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="../../../../bin/phpunit " />
<option name="PARAMETERS" value="--config phpunit.xml --filter $SelectedText$ $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento/dev/tests/integration" />
</exec>
</tool>
</toolSet>
<!-- Dockergento Setup -->
<toolSet name="External Tools">
<tool name="mg2 clear cache" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T magento c:f" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 purge all" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T magento-purge" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 setup upgrade" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T magento setup:upgrade" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test unit" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T test-unit --config magento/dev/tests/unit/phpunit.xml $FileRelativePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test unit method" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T test-unit --config magento/dev/tests/unit/phpunit.xml --filter $SelectedText$ $FileRelativePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test integration" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T test-integration --config phpunit.xml $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 test integration method" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="true" showConsoleOnStdErr="true" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T test-integration --config phpunit.xml --filter $SelectedText$ $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 mirror host" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T mirror-host $FileRelativePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 mirror generated from container" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T mirror-container -f generated" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="mg2 unison watch" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="dockergento" />
<option name="PARAMETERS" value="-T watch vendor/staempfli/$FileDirName$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
</toolSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment