Skip to content

Commit

Permalink
Merge pull request #13 from maximehuran/feature/some-clean
Browse files Browse the repository at this point in the history
Clean some files in plugin maker
  • Loading branch information
maximehuran authored Jul 31, 2024
2 parents 4d43fb5 + b48b1a2 commit 463a4b7
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 79 deletions.
2 changes: 1 addition & 1 deletion PluginTemplate/Makefile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test.container: ## Lint the symfony container
${CONSOLE} lint:container

test.yaml: ## Lint the symfony Yaml files
${CONSOLE} lint:yaml ../../recipes ../../src/Resources/config
${CONSOLE} lint:yaml ../../src/Resources/config

test.schema: ## Validate MySQL Schema
${CONSOLE} doctrine:schema:validate
Expand Down
4 changes: 4 additions & 0 deletions PluginTemplate/___.github/workflows/recipe.yaml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
fail-fast: false
matrix:
php: ['{{ defaultPhpVersion }}']
{% if minimumSyliusVersion != defaultSyliusVersion %}
sylius: ["~{{ minimumSyliusVersion }}.0", "~{{ defaultSyliusVersion }}.0"]
{% else %}
sylius: ["~{{ defaultSyliusVersion }}.0"]
{% endif %}
{% verbatim %}
steps:
- name: Setup PHP
Expand Down
50 changes: 13 additions & 37 deletions PluginTemplate/composer.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,16 @@
"license": "{{ pluginLicense }}",
"require": {
"php": "^{{ defaultPhpVersion }}",
"sylius/sylius": ">={{ defaultSyliusVersion }} <{{ limitSyliusVersion }}"
"sylius/sylius": ">={{ minimumSyliusVersion }} <{{ limitSyliusVersion }}"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friendsofphp/php-cs-fixer": "^3.51",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"phpmd/phpmd": "^2.15",
"phpspec/phpspec": "^7.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.8.1",
"phpstan/phpstan-doctrine": "1.3.40",
"phpstan/phpstan-strict-rules": "^1.3.0",
"phpstan/phpstan-webmozart-assert": "^1.2.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "^4.2",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/flex": "^2.2.2",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"vimeo/psalm": "5.12.0"
"friendsofphp/php-cs-fixer": "^3.16",
"phpspec/phpspec": "^7.0",
"phpstan/phpstan": "^1.8.4",
"phpstan/phpstan-doctrine": "^1.3.2",
"phpstan/phpstan-webmozart-assert": "^1.1",
"phpunit/phpunit": "^10.5",
"phpmd/phpmd": "^2.15"
},
"prefer-stable": true,
"autoload": {
Expand All @@ -51,8 +28,8 @@
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"phpcs": "php-cs-fixer fix --using-cache=no",
"phpstan": "phpstan analyse -c phpstan.neon src/",
"phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=no",
"phpstan": "phpstan analyse -c phpstan.neon",
"phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml",
"phpunit": "phpunit",
"phpspec": "phpspec run"
Expand All @@ -73,12 +50,11 @@
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/thanks": true,
"ergebnis/composer-normalize": true,
"symfony/flex": true,
"php-http/discovery": false,
"phpstan/extension-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"php-http/discovery": true
}
}
}
1 change: 1 addition & 0 deletions PluginTemplate/dist/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SYLIUS_FIXTURES_HOSTNAME=${SYMFONY_DEFAULT_ROUTE_HOST:-localhost}

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions PluginTemplate/docker-compose.yaml.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
database:
image: mysql:8.0
Expand All @@ -18,4 +17,4 @@ services:
- 1080

volumes:
database: {}
database: {}
7 changes: 2 additions & 5 deletions PluginTemplate/phpstan.neon.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
parameters:
level: max
level: 8
paths:
- %rootDir%/src/

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
- src/

excludePaths:
# Makes PHPStan crash
Expand Down

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions PluginTemplate/recipes/1.0-dev/manifest.json.twig

This file was deleted.

Empty file.
File renamed without changes.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ You have a Sylius installed with your plugin, you can start coding your plugin.

![Sylius in setup !](assets/sylius.jpg)

For you recipe, create a folder for your plugin with the `0.1` version in the [MonsieurBiz Symfony Recipe repo](https://github.com/monsieurbiz/symfony-recipes/).
Example : `monsieurbiz/sylius-amazing-plugin/0.1/`.

## License

Under MIT.
Expand Down
6 changes: 4 additions & 2 deletions castor.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ function create(
// true|false
'isMonsieurBizPlugin' => io()->confirm('Is this a Monsieur Biz plugin?', true),
// 1.12
'defaultSyliusVersion' => io()->ask('What is the default Sylius version of your plugin?', '1.12'),
'minimumSyliusVersion' => io()->ask('What is the minimum Sylius version of your plugin?', '1.12'),
// 1.13
'limitSyliusVersion' => io()->ask('What is the limit Sylius version of your plugin?', '1.13'),
'defaultSyliusVersion' => io()->ask('What is the default Sylius version of your plugin?', '1.13'),
// 1.14
'limitSyliusVersion' => io()->ask('What is the limit Sylius version of your plugin? (Current Sylius version +1)', '1.14'),
// 8.2
'defaultPhpVersion' => io()->ask('What is the default PHP version of your plugin?', '8.2'),
// MonsieurBizSyliusBazingaExtension
Expand Down

0 comments on commit 463a4b7

Please sign in to comment.