viperet / vscode-magento-wizard Goto Github PK
View Code? Open in Web Editor NEWHelps develop Magento 2 extensions using VSCode
Helps develop Magento 2 extensions using VSCode
When i create a new file in app/code/Vendor/Module/Block/file.php the file is not populated with template data.
No errors , no template.
As title explains
Context aware plugin would be appreciated
If you add a module as a git submodule this plugin will not acknowledge that the files you are working on are in fact magento. This is not good behaviour
Would be helpful if we could toggle it on/off. We are developers we typically know which files we are working with ;)
when create new extension after enter vendor and extension name
Error come : Error creating extension folder
Sometimes i need to use a remote generated catalog. I have a PC in which i work, and a server where is installed the Magento store. Will be amazing if the Generate Catalog feature use a catalog already generated.
Maybe another command just to run the "convert catalog" part, so you can generate the catalog manually and then run this command, or you can generate and convert.
Currently, it is assumed that:
./app/code/
.Whilst this is a reasonable assumption, IRL it's not always the case.
Proposal is to:
./dest/{{ MAGENTO_INSTALLATION }}/
)./{{ PATH_TO_MAGENTO }}/vendor/
)@viperet Do you have any opinions on regarding this or implementation before I tackle this?
When I use the inject dependency, the new class property added has a docblock @param. It should be @var.
Sample below was produced by the MagentoWizard vscode extension:
/**
* @param \Psr\Log\LoggerInterface
*/
private $logger;
public function __construct(
\Psr\Log\LoggerInterface $logger
) {
$this->logger = $logger;
}
Hi,
Thank you very much for your extension.
I work with open vscode in wsl 2 and I use docker to run the different services like php.
I don't want to install php in my wsl2, so at the root of my project I have a ./php file containing:
#!/bin/bash
docker exec -it php7.4-fpm php $@
This allows me to expose php access for other vscode extensions, like for php intellisense and it works great.
Unfortunately this configuration does not work with the extension vscode-magento-wizard.
Here is the configuration:
"php.validate.executablePath": "./php",
"magentoWizard.tasks.php": "./php",
And the error message from the extension output:
`undefined
Looks like we don't have PHP executable available at './php'. Please set correct path in the extension settings.
Many features would be unavailable without access to PHP executable.
Found Magento root at /home/XXX/XXX/magento2
Do you know why this is not working?
Thank you in advance for your help,
After installing MagentoWizard I try to create new extension in Magento tree (just unzipped CE tree, not installation). After selecting command "MagentoWizard: create a new extension" opens dialog option "Select workplace folder". I have no idea, what should workspace folder be. I have tried different folder names and '.' to set it on current folder, but nothing helps.
This is my first time to try Magento extensions dev, so maybe I did something wrong, but this dialog has no helpful hints.
Currently, it is possible to enter PHP reserved words in the vendor, extension or class name inputs, which results in incorrect PHP code generated by extension. Strict input validation should be added using list of reserved + soft reserved words from PHP 7.2 (https://www.php.net/manual/en/reserved.other-reserved-words.php)
I am receiving this error when using the command: MagentoWizard: Inject Dependency
Our magento convention keeps our code out of app/code like in your example. We use composer to manage everything so inside a custom folder, our code is linked to vendor/$vendor/$package
by using the "symlink": true
option within composer.json.
I can image not supporting a custom folder, but developing out of vendor locally is a feature that is supported by composer and it would be great to see it supported here. If it is possible to work out of a custom folder (by search for the magento root directory, reading the namespace or something similar) that would be awesome as well.
For what it's worth i'm creating a file in Vendor\Module\Setup\InstallData
inside vendor/$vendor\$module\Setup\InstallData.php
and receiving this error.
Somewhat related to #1 but different issue.
I'm using vendor/
modules as well, but within a workspace.
For example:
magento2.code-workspace
:
{
"folders": [
{
"path": "vendor/magento/module-catalog"
},
{
"path": "vendor/magento/module-checkout"
},
{
"path": "."
}
],
"settings": {}
}
Place this file in your magento2 root and open the workspace.
You'll have three folders for the two modules and root dir in which you can work just fine.
Except that this extension doesn't recognize that the workspace folder is some magento2 extension.
I am trying to utilize this extension, although it is not working properly, when I installed and tried to utilize it only works when creating/generating new modules, when adding observers for example it does not work, and this is the log:
Found Magento root at d:\xyz\xyz\Magento
- Modules: 0
- Themes: 0
- Blocks: 0
I am using the latest version of VS Code
This is a great extension! Is it possible to disable the auto-generated content when you create new files thgouh? For example, creating a PHTML template file you get this:
<?php
/** @var \Vendor\Module\Block\Template $block */
?>
<div class="template">
<h1><?=$block->getName()?></h1>
</div>
This is code that I always delete, every single time. Not sure how useful it is? Same goes for a lot of the XML templates.
I am more than happy to open a PR for this, but would rather not do it if you object to merging it.
Thanks!
When I do F1
and try to inject dependency
from the MagentoWizard nothing comes up. But looking into the Runtime Status I get: File not in the workspace (not saved yet?)
And when looking into the output tab
I get:
Found files registration files:
FileSystemWatcher: Deleted ~\app\code\JCWizard\Boiler\etc\di.xml
Originally posted by @jcellon in #29 (comment)
Firstly thanks for you work on this and sharing.
I've had a quick play round and the generation features are a big set up from my current collection of snippets.
Are you open to contributions?
With the latest Master branch I am getting the below erorr when I run the extension in Debug mode. Does anyone have any idea what is causing this error?
Activating extension 'viperet.vscode-magento-wizard' failed: Invalid Version: .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.