Skip to content

Commit

Permalink
Merge pull request #54 from FriendsOfShopware/sw-65
Browse files Browse the repository at this point in the history
feat: make shopware 6.5 compatible
  • Loading branch information
shyim authored Feb 22, 2023
2 parents ab570a0 + 102dc5d commit 948d01d
Show file tree
Hide file tree
Showing 33 changed files with 207 additions and 513 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: BuildPlugin
name: Build extension
on:
push:
branches:
- '0.3'
workflow_dispatch:
push:
branches:
- main

jobs:
build:
uses: FriendsOfShopware/actions/.github/workflows/store.yml@main
with:
extensionName: ${{ github.event.repository.name }}
shopwareVersion: '6.4.0'
secrets:
accountUser: ${{ secrets.ACCOUNT_USER }}
accountPassword: ${{ secrets.ACCOUNT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
build:
uses: FriendsOfShopware/actions/.github/workflows/store-shopware-cli.yml@main
with:
extensionName: ${{ github.event.repository.name }}
secrets:
accountUser: ${{ secrets.ACCOUNT_USER }}
accountPassword: ${{ secrets.ACCOUNT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
29 changes: 0 additions & 29 deletions .gitpod.Dockerfile

This file was deleted.

111 changes: 0 additions & 111 deletions .gitpod.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG_en-GB.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0

- Shopware 6.5 compatibility

# 0.3.6

- Updated psysh package
Expand Down
38 changes: 0 additions & 38 deletions CHANGELOG_de-DE.md

This file was deleted.

9 changes: 2 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frosh/development-helper",
"version": "0.3.6",
"version": "1.0.0",
"description": "Development Helper",
"type": "shopware-platform-plugin",
"license": "MIT",
Expand All @@ -16,16 +16,11 @@
}
},
"require": {
"shopware/core": "~6.4.11",
"shopware/core": "~6.5.0",
"nikic/php-parser": "*",
"friendsofphp/php-cs-fixer": "*",
"psy/psysh": "^0.11.9"
},
"config": {
"platform": {
"php": "7.4.3"
}
},
"extra": {
"shopware-plugin-class": "Frosh\\DevelopmentHelper\\FroshDevelopmentHelper",
"copyright": "FriendsOfShopware",
Expand Down
12 changes: 4 additions & 8 deletions src/Command/ExtendTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Frosh\DevelopmentHelper\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Frosh\DevelopmentHelper\Component\Twig\BlockCollector;
use Shopware\Core\Framework\Adapter\Cache\CacheClearer;
use Symfony\Component\Console\Command\Command;
Expand All @@ -13,25 +14,20 @@
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Filesystem;

#[AsCommand('frosh:extend:template', description: 'Generates the template extension for you')]
class ExtendTemplate extends Command
{
public static $defaultName = 'frosh:extend:template';
private BlockCollector $blockCollector;
private array $pluginInfos;
private CacheClearer $cacheClearer;
private readonly CacheClearer $cacheClearer;

public function __construct(BlockCollector $blockCollector, array $pluginInfos, CacheClearer $cacheClearer)
public function __construct(private readonly BlockCollector $blockCollector, private readonly array $pluginInfos, CacheClearer $cacheClearer)
{
parent::__construct();
$this->blockCollector = $blockCollector;
$this->pluginInfos = $pluginInfos;
$this->cacheClearer = $cacheClearer;
}

protected function configure()
{
$this
->setDescription('Generates the template extension for you')
->addArgument('pluginName', InputArgument::REQUIRED, 'Plugin Name');
}

Expand Down
54 changes: 9 additions & 45 deletions src/Command/MakeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Frosh\DevelopmentHelper\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Frosh\DevelopmentHelper\Component\Generator\Definition\CollectionGenerator;
use Frosh\DevelopmentHelper\Component\Generator\Definition\EntityConsoleQuestion;
use Frosh\DevelopmentHelper\Component\Generator\Definition\DefinitionGenerator;
Expand All @@ -14,60 +15,23 @@
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand('frosh:make:definition', description: 'Generates an entity')]
class MakeDefinition extends Command
{
public static $defaultName = 'frosh:make:definition';

/**
* @var EntityLoader
*/
private $entityLoader;

/**
* @var EntityConsoleQuestion
*/
private $entityConsoleQuestion;

/**
* @var DefinitionGenerator
*/
private $definitionGenerator;

/**
* @var EntityGenerator
*/
private $entityGenerator;

/**
* @var CollectionGenerator
*/
private $collectionGenerator;

/**
* @var FixCodeStyle
*/
private $fixCodeStyle;

public function __construct(
EntityLoader $entityLoader,
EntityConsoleQuestion $entityConsoleQuestion,
DefinitionGenerator $definitionGenerator,
EntityGenerator $entityGenerator,
CollectionGenerator $collectionGenerator,
FixCodeStyle $fixCodeStyle
private readonly EntityLoader $entityLoader,
private readonly EntityConsoleQuestion $entityConsoleQuestion,
private readonly DefinitionGenerator $definitionGenerator,
private readonly EntityGenerator $entityGenerator,
private readonly CollectionGenerator $collectionGenerator,
private readonly FixCodeStyle $fixCodeStyle
) {
parent::__construct();
$this->entityLoader = $entityLoader;
$this->entityConsoleQuestion = $entityConsoleQuestion;
$this->definitionGenerator = $definitionGenerator;
$this->entityGenerator = $entityGenerator;
$this->collectionGenerator = $collectionGenerator;
$this->fixCodeStyle = $fixCodeStyle;
}

protected function configure(): void
{
$this->setDescription('Generates an entity')
$this
->addArgument('namespace', InputArgument::REQUIRED, 'Namespace (FroshTest\\Content\\Store)');
}

Expand Down
Loading

0 comments on commit 948d01d

Please sign in to comment.