Giter Club home page Giter Club logo

sw-cli-tools's People

Contributors

bcremer avatar danielruf avatar dependabot[bot] avatar dnoegel avatar emtii avatar flokli avatar gugiman avatar hoist1999 avatar isengo1989 avatar janbuecker avatar jkmw avatar jmatthiesen81 avatar mitelg avatar moritzkrafeld avatar ndzoesch avatar oliverskroblin avatar ray-magini avatar rokko11 avatar scrutinizer-auto-fixer avatar seggewiss avatar shyim avatar simonbaeumer avatar soebbing avatar svenherrmann avatar teiling88 avatar tiagojsag avatar vizo avatar yannickfricke 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

sw-cli-tools's Issues

Java and Ant

It would be great to have a pure PHP solution running from the phar so I can use it on more systems. Most do not have these 2 requirements.

composer install: preg_match(): Unknown modifier '.'

Hi,

I'm trying to install sw-cli-tools via composer -n install but get the following output. Running on PHP 5.6 and Composer version 1.2-dev. Any idea whats causing this?

Cheers,
Christian

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing dnoegel/php-xdg-base-dir (0.1)
    Downloading: 100%

  - Installing fzaninotto/faker (v1.5.0)
    Downloading: 100%

  - Installing react/promise (v2.4.0)
    Downloading: 100%

  - Installing guzzlehttp/streams (3.0.0)
    Downloading: 100%

  - Installing guzzlehttp/ringphp (1.1.0)
    Downloading: 100%

  - Installing guzzlehttp/guzzle (5.3.0)
    Downloading: 100%

  - Installing padraic/humbug_get_contents (1.0.4)
    Downloading: 100%

  - Installing padraic/phar-updater (1.0.3)
    Downloading: 100%

  - Installing piwik/ini (1.0.6)
    Downloading: 100%

  - Installing ramsey/array_column (1.1.3)
    Downloading: 100%

  - Installing justinrainbow/json-schema (1.6.1)
    Downloading: 100%

  - Installing shopwarelabs/plugin-info (dev-master 587ea68)
    Cloning 587ea68df2f9cb40f54458f3d422de549f1005cf

  - Installing symfony/filesystem (v2.8.4)
    Downloading: 100%

  - Installing symfony/config (v2.8.4)
    Downloading: 100%

  - Installing symfony/dependency-injection (v2.8.4)
    Downloading: 100%

  - Installing symfony/polyfill-mbstring (v1.1.1)
    Downloading: 100%

  - Installing symfony/stopwatch (v2.8.4)
    Downloading: 100%

  - Installing symfony/process (v2.8.4)
    Downloading: 100%

  - Installing symfony/finder (v2.8.4)
    Downloading: 100%

  - Installing symfony/event-dispatcher (v2.8.4)
    Downloading: 100%

  - Installing symfony/console (v2.8.4)
    Downloading: 100%

  - Installing sebastian/diff (1.4.1)
    Downloading: 100%

  - Installing fabpot/php-cs-fixer (v1.11.2)
    Downloading: 100%

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%

  - Installing phpunit/php-token-stream (1.4.8)
    Downloading: 100%

  - Installing symfony/yaml (v2.8.4)
    Downloading: 100%

  - Installing sebastian/version (1.0.6)
    Downloading: 100%

  - Installing sebastian/global-state (1.1.1)
    Downloading: 100%

  - Installing sebastian/recursion-context (1.0.2)
    Downloading: 100%

  - Installing sebastian/exporter (1.2.1)
    Downloading: 100%

  - Installing sebastian/environment (1.3.5)
    Downloading: 100%

  - Installing sebastian/comparator (1.2.0)
    Downloading: 100%

  - Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%

  - Installing doctrine/instantiator (1.0.5)
    Downloading: 100%

  - Installing phpunit/phpunit-mock-objects (2.3.8)
    Downloading: 100%

  - Installing phpunit/php-timer (1.0.7)
    Downloading: 100%

  - Installing phpunit/php-file-iterator (1.4.1)
    Downloading: 100%

  - Installing phpunit/php-code-coverage (2.2.4)
    Downloading: 100%

  - Installing phpspec/prophecy (v1.6.0)
    Downloading: 100%

  - Installing phpunit/phpunit (4.8.24)
    Downloading: 100%

symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/event-dispatcher suggests installing symfony/http-kernel ()
symfony/console suggests installing psr/log (For using the console logger)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files
> ln -sf ../../hooks/pre-commit .git/hooks/pre-commit


  [ErrorException]
  preg_match(): Unknown modifier '.'

Error generating category demo data

I want to generate some demo data with 'sw generate'.
When generating categories I get the following error:

Using Shopware 5.2.3 with PHP7. (https://github.com/PieterScheffers/Shopware-Docker-Plugin-Development)

[Exception]
Failed to execute INSERT INTO s_categories (id, parent, path, description, position, active) VALUES (1, NULL, '', 'Root', 1, 1),
(3, 1, '', 'Deutsch', 3, 1),
(4, 3, '|3|', 'quidem', 4, 1),
(1000001, 4, '|4|3|', 'omnis', 1000001, 1),
(1000002, 4, '|4|3|', 'tempora', 1000002, 1),
(1000003, 4, '|4|3|', 'sed', 1000003, 1),
(1000004, 4, '|4|3|', 'sequi', 1000004, 1),
(5, 4, '|4|3|', 'assumenda', 5, 1),
(1000005, 5, '|5|4|3|', 'quas', 1000005, 1),
(1000006, 5, '|5|4|3|', 'a', 1000006, 1),
(1000007, 4, '|4|3|', 'voluptates', 1000007, 1),
(6, 3, '|3|', 'fugiat', 6, 1),
(1000008, 6, '|6|3|', 'quia', 1000008, 1),
(1000009, 6, '|6|3|', 'reiciendis', 1000009, 1),
(1000010, 6, '|6|3|', 'corrupti', 1000010, 1),
(1000011, 6, '|6|3|', 'doloribus', 1000011, 1),
(1000012, 6, '|6|3|', 'perferendis', 1000012, 1),
(1000013, 6, '|6|3|', 'dolores', 1000013, 1),
(7, 3, '|3|', 'sunt', 7, 1),
(1000014, 7, '|7|3|', 'corporis', 1000014, 1),
(1000015, 7, '|7|3|', 'nemo', 1000015, 1),
(1000016, 7, '|7|3|', 'sint', 1000016, 1),
(1000017, 7, '|7|3|', 'rerum', 1000017, 1),
(8, 7, '|7|3|', 'fugiat', 8, 1),
(1000018, 8, '|8|7|3|', 'dicta', 1000018, 1),
(1000019, 8, '|8|7|3|', 'impedit', 1000019, 1),
(1000020, 7, '|7|3|', 'ut', 1000020, 1),
(1000021, 3, '|3|', 'aliquid', 1000021, 1) ;
Code: HY000,1364,Field 'left' doesn't have a default value

Release download not working

Seems Shopware changed the location of the release packages. install:release is now broken.

[RuntimeException]
Could not open URL 'http://releases.s3.shopware.com/install_5.0.4.zip'.

Problem with legacy PluginCreator

Scenario:
Customer has Shopware 5.1, all plugins and tests are written under SW5.1.
The Customer wishes an update to SW5.2.

Problem:
The legacy PluginCreator copies the phpunit.xml.dist with bootstrap "../../../../../../tests/Shopware/TestHelper.php"
But under SW5.2 the whole tests/Shopware dir gots deleted und the tests are not working.

Is there probably a way to provide both test-scenarios for legacy and new plugin structure?

SwagLicense not found

Hi!
The "install:release"-command fails when Shopware tries to import the Licences:

Running license import 
  [RuntimeException]                                                  
  An exception occurred: Plugin by name "SwagLicense" was not found.  

In s_core_plugins a plugin called "License" is listed:

 {
      "id":"18",
      "namespace":"Core",
      "name":"License",
      "label":"License",
      "source":"Default",
      "description":"",
      "description_long":"",
      "active":"1",
      "added":"2012-08-28 00:00:00",
      "installation_date":"2010-10-18 00:00:00",
      "update_date":"2010-10-18 00:00:00",
      "refresh_date":null,
      "author":"shopware AG",
      "copyright":"Copyright \u00a9 2010, shopware AG",
      "license":"",
      "version":"1",
      "support":"http:\/\/www.shopware.de\/wiki\/",
      "changes":"",
      "link":"http:\/\/www.shopware.de\/",
      "store_version":null,
      "store_date":null,
      "capability_update":"0",
      "capability_install":"0",
      "capability_enable":"0",
      "capability_dummy":"0",
      "update_source":null,
      "update_version":null
   },

In the select-statement of sw:plugin:list there is a filter by capability_enable = 1, so the License-Plugin is not listed and so it is not installable.

Wrong file-permissions after unzipping release.zip

Hi!

When I tried to install Shopware by "install:release", it fails, because the permissions of

./bin/console
./cache/clear_cache.sh

are not executable. When I unzip the cached Shopware-zip-File by not using the shell, the permissions are ok.

When I use

CustomScripts:
- chmod 755 ./bin/console
- chmod 755 ./cache/clear_cache.sh

it works.

Error when trying to generate articles

Edit: Looks like something wasn't correctly patched...

With blank shopware git 5.6 installation

[Exception]                                                                                                             
  Failed to execute LOAD DATA LOCAL INFILE '/app/output/articles_attributes.csv' IGNORE INTO TABLE s_articles_attributes  
  FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'                                                                       
  (`articleID`, `articledetailsID`);                                                                                      
  Code: 42S22,1054,Unknown column 'articleID' in 'field list'                                                             

Exception trace:

() at phar:///app/sw.phar/src/Extensions/Shopware/DataGenerator/Writer/DatabaseWriter.php:53
Shopware\DataGenerator\Writer\DatabaseWriter->flush() at phar:///app/sw.phar/src/Extensions/Shopware/DataGenerator/Writer/WriterManager.php:108
Shopware\DataGenerator\Writer\WriterManager->flushAll() at phar:///app/sw.phar/src/Extensions/Shopware/DataGenerator/Resources/BaseResource.php:200
Shopware\DataGenerator\Resources\BaseResource->generateData() at phar:///app/sw.phar/src/Extensions/Shopware/DataGenerator/DataGenerator.php:79
Shopware\DataGenerator\DataGenerator->run() at phar:///app/sw.phar/src/Extensions/Shopware/DataGenerator/Command/CreateDataCommand.php:288
Shopware\DataGenerator\Command\CreateDataCommand->execute() at phar:///app/sw.phar/vendor/symfony/console/Command/Command.php:267
Symfony\Component\Console\Command\Command->run() at phar:///app/sw.phar/vendor/symfony/console/Application.php:846
Symfony\Component\Console\Application->doRunCommand() at phar:///app/sw.phar/vendor/symfony/console/Application.php:191
Symfony\Component\Console\Application->doRun() at phar:///app/sw.phar/src/Application.php:65
ShopwareCli\Application->doRun() at phar:///app/sw.phar/vendor/symfony/console/Application.php:122
Symfony\Component\Console\Application->run() at phar:///app/sw.phar/bin/sw:18
require() at /app/sw.phar:11

Install for usage system-wide

I wanted to install the sw-cli tool in the /usr/local/bin directory, which is in the path variable, so it makes the command available system wide for all users. This is also the place I have the composer command and some other commands installed.

I have installed the tool with root in /usr/local/bin and then gave it 755 access rights with chmod.
I can now use the tool with the root user.

If I login with a different user, it keeps giving me an exception that /usr/local/bin/sw is not writable.

[Humbug\SelfUpdate\Exception\FilesystemException]
The current phar file is not writeable and cannot be replaced: /usr/local/bin/sw.

I guess the sw-cli tool is doing a self-update on startup, but with a non-root user it shouldn't.

OS: Ubuntu 14.04

SQL Permissions checking seems to be broken

Command I ran:

sudo -H -u www-data /var/www/bin/sw.phar install:release --no-interaction --release 5.5.4 --install-dir /var/www/shopware.example.org/htdocs --shop-host shopware.example.org --db-host 10.128.3.16 --db-port 3306 --db-user shopware --db-password kjahdkjhagsjdhasd --db-name shopware

Output:

Downloading release

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///var/www/bin/sw.phar/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Unzipping archive
Creating database shopware
Writing config.php



  [RuntimeException]
  Your user has not enough privileges for database "shopware" the ALTER privilege is required



install [--db-host="..."] [--db-port="..."] [--db-socket="..."] [--db-user="..."] [--db-password="..."] [--db-name="..."] [--no-skip-import] [--shop-locale="..."] [--shop-host="..."] [--shop-path="..."] [--shop-name="..."] [--shop-email="..."] [--shop-currency="..."] [--skip-admin-creation] [--admin-username="..."] [--admin-password="..."] [--admin-email="..."] [--admin-locale="..."] [--admin-name="..."]




  [RuntimeException]
  Command failed. Error Output:

    [RuntimeException]
    Your user has not enough privileges for database "shopware" the ALTER privilege is required

  install [--db-host="..."] [--db-port="..."] [--db-socket="..."] [--db-user="..."] [--db-password="..."] [--db-name="..."] [--no-skip-import] [--shop-locale="..."] [--shop-host="..."] [--shop-path="..."] [--shop-name="..."] [--shop-email="..."] [--shop-currency="..."] [--skip-admin-creation] [--admin-username="..."] [--admin-password="..."] [--admin-email=".
  .."] [--admin-locale="..."] [--admin-name="..."]


install:release [-r|--release RELEASE] [-i|--install-dir INSTALL-DIR] [--unpack-only] [--skip-download] [--db-host DB-HOST] [--db-port DB-PORT] [--db-socket DB-SOCKET] [--db-user DB-USER] [--db-password DB-PASSWORD] [--db-name DB-NAME] [--no-skip-import] [--shop-locale SHOP-LOCALE] [--shop-host SHOP-HOST] [-p|--shop-path SHOP-PATH] [--shop-name SHOP-NAME] [--shop-email SHOP-EMAIL] [--shop-currency SHOP-CURRENCY] [--skip-admin-creation] [--admin-username ADMIN-USERNAME] [--admin-password ADMIN-PASSWORD] [--admin-email ADMIN-EMAIL] [--admin-locale ADMIN-LOCALE] [--admin-name ADMIN-NAME]

But permissions should be enough:

root@mbaur:/var/log/mysql# pt-show-grants | grep shopware
-- Grants for 'shopware'@'10.128.3.%'
CREATE USER IF NOT EXISTS 'shopware'@'10.128.3.%';
ALTER USER 'shopware'@'10.128.3.%' IDENTIFIED WITH 'mysql_native_password' AS '*lkjahdkjhajkdhaskldjhaskljdhajdhaskld.hasd' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK;
GRANT ALL PRIVILEGES ON `shopware`.* TO 'shopware'@'10.128.3.%';
GRANT USAGE ON *.* TO 'shopware'@'10.128.3.%';

Global installation

When the user is not able to write the sw.phar file (because it is located in /usr/local/bin/) it exits with the following error:

[Humbug\SelfUpdate\Exception\FilesystemException]
The current phar file is not writeable and cannot be replaced: /usr/local/bin/sw.phar.

--installDir option option not working properly

Hi,

I get following strange error:
$ /opt/sw-cli-tools/bin/sw install:release -r latest -d xxx -i /path/to/shopware -p xxx --username xxx --password xxx --name Administrator --mail [email protected]

result:

 [RuntimeException]                                           
  Command failed. Error Output:                                
  checkdir:  cannot create extraction directory: path/to/shopware  
             No such file or directory

/path/to/shopware exists. It seems that the installer is cutting the leading "/".

Following command works properly
cd /path/to/shopware && /opt/sw-cli-tools/bin/sw install:release -r latest -d xxx -i . -p xxx --username xxx --password xxx --name Administrator --mail [email protected]

Plugin by name .. not found

I can't wrap my head around sw:plugin:install .. Following scenario:

$ bin/console sw:plugin:list -f active
+-------------------+-------------------------+---------+--------------+--------+-----------+
| Plugin            | Label                   | Version | Author       | Active | Installed |
+-------------------+-------------------------+---------+--------------+--------+-----------+
| InputFilter       | InputFilter             | 1       | shopware AG  | Yes    | Yes       |
| MoptPaymentPayone | PAYONE Payment Plugin   | 3.12.1  | FATCHIP GmbH | Yes    | Yes       |
| PluginManager     | Plugin Manager          | 1.0.0   | shopware AG  | Yes    | Yes       |
| Statistics        | Statistics              | 1       | shopware AG  | Yes    | Yes       |
| SwagDemoDataDE    | Shopware 5 Demo Data DE | 5.4.0   | shopware AG  | Yes    | Yes       |
| SwagUpdate        | Shopware Auto Update    | 1.0.0   | shopware AG  | Yes    | Yes       |
+-------------------+-------------------------+---------+--------------+--------+-----------+

I manually remove MoptPaymentPayone via backend and delete it completely. Then run

$ bin/console sw:plugin:install MoptPaymentPayone
Plugin by name "MoptPaymentPayone" was not found.

I install and activate it again via the backend and run

$ bin/console sw:plugin:install MoptPaymentPayone
The plugin MoptPaymentPayone is already installed.

What am I doing wrong?

Backend does not work after creating plugin with --haveBackend

I created a basic plugin using the CLI and everything went well. The working plugin was created and I could install it into my Shopware 5.2.10 system. But when I wanted to open the backend, I received a 503 error window.

There is a forum entry that shows the error message in full length.

Link: https://forum.shopware.com/discussion/37227/problem-mit-cli-generiertem-plugin

After digging into the source code of the Shopware_Controllers_Backend_Application class I found the reason for the problem. The $model property of the backend controller needs the full path to the model not just the model name.
At the moment the property only holds the model name itself. So I guess that's an issue of the CLI that needs to add the full path of the model during plugin creation too.

Invalid VCS root mapping in PhpStorm

if you install a plugin via the command sw plugin:install and the plugin is build after the new plugin system you will get an error in PhpStorm regarding an invalid VCS root mapping.

The directory /.../engine/Shopware/Plugins/Local/Frontend/SwagTest is registered as a Git root, but no Git repositories were found there.

Seperate downloading and installing of shopware

Hey,

What about an option to seperate the download-process from the later installing?

For example if you want to build a docker-image:
The shopware sources should be part of the docker-image but the creation of the database definitions and admin users (and so on) should be defined at runtime of the docker-container.

Generation does not work on MySQL 8

Exception:

[Exception]
Failed to execute LOAD DATA LOCAL INFILE '/var/www/html/shopware/output/articles.csv' IGNORE INTO TABLE s_articles
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
(id, supplierID, name, description, description_long, shippingtime, datum, active, taxID, pseudosales, topseller, keywords, changetime, pricegroupID, pricegroupActive, filtergro upID, laststock, crossbundlelook, notification, template, mode, main_detail_id, available_from, available_to, configurator_set_id);
Code: 42000,1148,The used command is not allowed with this MySQL version

Introduce IO Helper

tl;dr: Too many IO relates method params.

As of Symfony 2.5 the Dialog Helper is deprecated in favour of the new Question helper and will eventually removed in Syfony 3.0.

I already started the replacement in the following commit: dee8fd7.

Problem

The new Question helper does not have a reference to the InputInterface so we have to introduce another $input param in many methods.

Old:

$interactionManager = new PluginOperationManager(
    $pluginManager, 
    $pluginSelector,
    $dialogHelper, 
    $output, 
    $utilities,
)

New

$interactionManager = new PluginOperationManager(
    $pluginManager, 
    $pluginSelector,
    $questionHelper, 
    $output, 
    $input,
    $utilities,
)

In my opinion it's cumbersome to have so many IO related method params in sometimes deeply nested method calles.

Proposal

I would like to introduce a IO Helper that abstracts IO related tasks like input/output questions, dialogs in a simple interface.

We should have a closer look on Composer´s IOInterface for a possible solution to that problem.

Proposed

$interactionManager = new PluginOperationManager(
    $pluginManager, 
    $pluginSelector,
    $ioInterface,
    $utilities,
)

/ping @dnoegel

Remove \ShopwareCli\Services\Rest\RestClient

Currently \ShopwareCli\Services\Rest\RestClient is a 3rd party component - it should either be installed via composer or be replaced with an own implementation.

It's currently used insrc/Plugin/RepositoryFactory.php:50 for repository calls to stash/github/bitbucket.

Release install broken

Hey,

i got the following error message if i use the sw install:release command:

PHP Warning: file_get_contents(latest/install/assets/sql/sw4_clean.sql): failed to open stream: No such file or directory in /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Services/Database.php on line 86
PHP Stack trace:
PHP 1. {main}() /Users/oliverdenter/bin/sw-cli-tools/bin/sw:0
PHP 2. Symfony\Component\Console\Application->run() /Users/oliverdenter/bin/sw-cli-tools/bin/sw:19
PHP 3. ShopwareCli\Application->doRun() /Users/oliverdenter/bin/sw-cli-tools/vendor/symfony/console/Symfony/Component/Console/Application.php:124
PHP 4. Symfony\Component\Console\Application->doRun() /Users/oliverdenter/bin/sw-cli-tools/src/Application.php:59
PHP 5. Symfony\Component\Console\Application->doRunCommand() /Users/oliverdenter/bin/sw-cli-tools/vendor/symfony/console/Symfony/Component/Console/Application.php:193
PHP 6. Symfony\Component\Console\Command\Command->run() /Users/oliverdenter/bin/sw-cli-tools/vendor/symfony/console/Symfony/Component/Console/Application.php:887
PHP 7. Shopware\Install\Command\ShopwareInstallReleaseCommand->execute() /Users/oliverdenter/bin/sw-cli-tools/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
PHP 8. Shopware\Install\Services\Install\Release->installShopware() /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Command/ShopwareInstallReleaseCommand.php:103
PHP 9. Shopware\Install\Services\Install\Release->setupDatabase() /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Services/Install/Release.php:98
PHP 10. Shopware\Install\Services\Database->importReleaseInstallDeltas() /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Services/Install/Release.php:145
PHP 11. file_get_contents() /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Services/Database.php:86

Warning: file_get_contents(latest/install/assets/sql/sw4_clean.sql): failed to open stream: No such file or directory in /Users/oliverdenter/bin/sw-cli-tools/src/Extensions/Shopware/Install/Services/Database.php on line 86

I think the sw4_clean.sql can not be found. ;)

--haveBackend creates Models with broken Classname

When running php sw.phar plugin:create --haveBackend --haveModels "Foobar" I will get a request to specify the main model name. Entering something like "Bar" creates a model with following file name:
'plugin:create' --haveBackend --haveModels Foobar.php instead of just Bar.php.
Same goes for the Classname and the database table itself.

References for the model in the backend controller are broken too.

Leaving out the backend solves the problem.

It seems that this is related to #108 which had a similar problem.

Use non-interactive shopware cli-installer

Since Shopware 5.1.2 the shopware cli-installer can be used fully non-interactive.

Instead of maintaining the installation logik in https://github.com/shopwareLabs/sw-cli-tools/blob/master/src/Extensions/Shopware/Install/Services/Install/Release.php we should delegate the parameters to the shopware installer script like this:

php recovery/install/index.php -n --db-host=localhost --db-user=root --db-password=root --db-name=master --shop-locale=en_GB --shop-host=localhost --shop-name=DemoShop --shop-currency=EUR --admin-username=demo --admin-password=demo [email protected] --admin-locale=en_GB --admin-name=AdminUser 

Official release planned?

Coming from other .php and .js projects where cli is king, I wanted to ask if there are any plans for a final 1.0.0 release of the sw-cli-tools? And if there is, are there any release stoping bugs that need to be fixed before?

I would also like to know if it's okay for you guys if I'd create a Homebrew formula once the cli is released. That would make installing the cli even simpler on macOS (Linux).

plugin creator

if you create a new plugin without any parameter, an empty services.xml is created. this results in a fatal error after installation of the plugin. the file should not be created, if no services are created

Directory "output" was not created

PHP Warning:  mkdir(): File exists in 
phar:///.../sw.phar/src/Extensions/Shopware/DataGenerator/Struct/Config.php on line 344
Warning: mkdir(): File exists in phar:///.../sw.phar/src/Extensions/Shopware/DataGenerator/Struct/Config.php on line 344

Einmal in Shopware etwas funktionierendes und ich tanze nackt auf dem Eifelturm ^^

Zipping a dir doesn't work

I tried to run on a mac this command it results in this.

❯ sw.phar plugin:zip:dir SwagMapPlugin


  [RuntimeException]
  Could not find Bootstrap.php or SwagMapPlugin.php in SwagMapPlugin


plugin:zip:dir <dir>

Simple Eventmanager?

For the refactoring of the repositories into a plugin I could need a simple event manager like https://github.com/fruux/sabre-event. The symfony eventDispatcher might be a bit over-done.

Note sure if it is to early for an event system - but I'd like to refactor this call

    $container->get('plugin_provider')->setRepositories($container->get('repository_manager')->getRepositories());

from src/Application.php:56 (which triggers \ShopwareCli\Application\RepositoryManager::collectPluginRepositories) into a plugin and think, that there is no proper way to hook into the core at specific points.

@bcremer What do you think?

Use SchemaTool::updateSchema instead of createSchema

The generator uses the SchemaTool::createSchema call in the generated bootstrap if models are added.
As the function is called if you reinstall the plugin it tries to create the model's database tables but fails.
Therefore calling SchemaTool::updateSchema($classes, true); instead is preferable as it also creates the tables if they aren't present but won't raise any errors.

Interactive Mode on sw plugin:create

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)

Option -b creates wrong model file name

I want to create a plugin with both a backend module and a command. If i use

sw plugin:create MyPluginName -b -c

it asks for a backend main model and creates the plugin boilerplace where the command and model file names are

Commands/'plugin:create' MyPluginName -b -c.php
Models/'plugin:create' MyPluginName -b -c.php

Using just the -b option creates also a wrong model file called

Models/'plugin:create' MyPluginName -b.php

Testet on MacOs Sierra inside iTerm2 using zsh with latest cli version 1933dbc

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.