shopwareLabs / sw-cli-tools

The shopware CLI tools are your console helpers for all kind of shopware tasks
MIT License
84 stars 52 forks source link

Interactive Mode on sw plugin:create #150

Closed thomas-gravel closed 5 years ago

thomas-gravel commented 5 years ago

If you call sw plugin:create --haveBackend --haveFrontend SwagTest then the cli wants to have the model name for the Backend -> Model

If you type in the correct name, you want to have. The created file class is: 'plugin:create' --haveBackend --haveFrontend SwagTest.php

And after you finished, the Backend is a blank white page...

I used the release 0.1.0 on a shopware 5.5.4 (Rev 201812030839)

mitelg commented 5 years ago

hey @thomas-gravel do you have some error message for us? how do the files look like?

thomas-gravel commented 5 years ago

bin/sw.phar plugin:create --haveBackend --haveFrontend --haveWidget SwagTest Please specify the main model for your backend application: SwagTest\Models\Test

after enter SwagTest and finishing

you can type bin/console

and you will get the error message: PHP Parse error: syntax error, unexpected ''plugin:create'' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) in custom/plugins/SwagTest/SwagTest.php on line 71

in the php file you can read something funny like: $this->container->get('models')->getClassMetadata(\SwagTest\Models\'plugin:create' --haveBackend --haveFrontend --haveWidget SwagTest::class)

mitelg commented 5 years ago

sorry, but I cannot reproduce this issue. I tried the suggest default model class name, and also an own model name

larsbo commented 5 years ago

@thomas-gravel do you have the latest version of sw-cli-tools?

thomas-gravel commented 5 years ago

I downloaded the assests sw.phar https://github.com/shopwareLabs/sw-cli-tools/releases

I tried it two times and everytime I get the same issue and error Message.

mitelg commented 5 years ago

it seems, there is a problem with the creating of the phar file. it is not the latest version unfortunately.

try to create the following file: ~/.config/sw-cli-tools/config.yaml with the following content:

update:
  pharUrl: https://shopwarelabs.github.io/sw-cli-tools/sw.phar
  vesionUrl: https://shopwarelabs.github.io/sw-cli-tools/sw.phar.version
  verifyPublicKey: false
  checkOnStartup: true

if you then start the command again it should auto-update itself

mitelg commented 5 years ago

closed due to inactivity