Coder Social home page Coder Social logo

viperet / vscode-magento-wizard Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 16.0 8.23 MB

Helps develop Magento 2 extensions using VSCode

TypeScript 95.04% PHP 4.14% JavaScript 0.72% Handlebars 0.07% HTML 0.03%
extension hacktoberfest magento magento2 php vscode vscode-extension

vscode-magento-wizard's Introduction

Hi there πŸ‘‹

vscode-magento-wizard's People

Contributors

dasxander avatar dependabot[bot] avatar netstorm84 avatar tvthu avatar tzvicons avatar viperet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-magento-wizard's Issues

Doesn't work with git submodules

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 model

when create new extension after enter vendor and extension name
Error come : Error creating extension folder

Possibility of using a remote generated catalog

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.

Add ability to configure custom directory for Magento root

Currently, it is assumed that:

  • Magento will be installed in the project root
  • that all module development will occur within ./app/code/.

Whilst this is a reasonable assumption, IRL it's not always the case.

Proposal is to:

  • Add config for setting path to Magento install dir. (e.g. ./dest/{{ MAGENTO_INSTALLATION }}/)
  • Add config for setting path to module development dir. (e.g. ./{{ PATH_TO_MAGENTO }}/vendor/)

@viperet Do you have any opinions on regarding this or implementation before I tackle this?

Class Property for injected dependency has incorrect phpdoc tag

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;
    }

Path executable php

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

  • Modules: 0
  • Themes: 0
  • Blocks: 0
    `

Do you know why this is not working?
Thank you in advance for your help,

"Select workplace folder" issue

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.

Error: "Not a Magento 2 extension file"

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.

Not able to install extension.

I am using VS code version - 1.31.0 that is latest I believe. I tried to install this extension but I am getting error as Unable to install extension '{{extension_name}}' compatible with current version '1.31.0' of VS code is not found
image

Not a Magento 2 extension file | workspace support

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.

It is not reading modules, themes and blocks

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

Disable auto-generated content

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!

File not in the workspace (not saved yet?)

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)

Contributions

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?

Error when activating extension

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: .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.