diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..826dad5e
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,82 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+# Change these settings to your own preference
+indent_style = space
+indent_size = 4
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.feature]
+indent_style = space
+indent_size = 4
+
+[*.js]
+indent_style = space
+indent_size = 2
+
+[*.json]
+indent_style = space
+indent_size = 2
+
+[*.md]
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = false
+
+[*.neon]
+indent_style = space
+indent_size = 4
+
+[*.php]
+indent_style = space
+indent_size = 4
+
+[*.sh]
+indent_style = space
+indent_size = 4
+
+[*.{yaml, yml}]
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = false
+
+[.babelrc]
+indent_style = space
+indent_size = 2
+
+[.gitmodules]
+indent_style = tab
+indent_size = 4
+
+[.php_cs{,.dist}]
+indent_style = space
+indent_size = 4
+
+[composer.json]
+indent_style = space
+indent_size = 4
+
+[package.json]
+indent_style = space
+indent_size = 2
+
+[phpspec.yml{,.dist}]
+indent_style = space
+indent_size = 4
+
+[phpstan.neon]
+indent_style = space
+indent_size = 4
+
+[phpunit.xml{,.dist}]
+indent_style = space
+indent_size = 4
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index af273c33..4a288785 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,10 +6,9 @@ on:
- 'dependabot/**'
pull_request: ~
release:
- types: [created]
+ types: [ created ]
schedule:
- -
- cron: "0 1 * * 6" # Run at 1am every Saturday
+ - cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
@@ -21,15 +20,14 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: ["8.0", "7.4"]
- symfony: ["^4.4", "^5.2"]
- sylius: ["~1.9.0", "~1.10.0@alpha"]
- node: ["10.x"]
- mysql: ["8.0"]
+ php: [ "8.0", "7.4" ]
+ symfony: [ "^4.4", "^5.2" ]
+ sylius: [ "~1.9.0", "~1.10.0@alpha" ]
+ node: [ "10.x" ]
+ mysql: [ "8.0" ]
exclude:
- -
- php: "8.0"
+ - php: "8.0"
sylius: "~1.9.0"
@@ -38,11 +36,9 @@ jobs:
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
steps:
- -
- uses: actions/checkout@v2
+ - uses: actions/checkout@v2
- -
- name: Setup PHP
+ - name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
@@ -50,46 +46,37 @@ jobs:
tools: symfony
coverage: none
- -
- name: Setup Node
+ - name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node }}"
- -
- name: Shutdown default MySQL
+ - name: Shutdown default MySQL
run: sudo service mysql stop
- -
- name: Setup MySQL
+ - name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
- -
- name: Output PHP version for Symfony CLI
+ - name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
- -
- name: Install certificates
+ - name: Install certificates
run: symfony server:ca:install
- -
- name: Run Chrome Headless
+ - name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
- -
- name: Run webserver
+ - name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
- -
- name: Get Composer cache directory
+ - name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- -
- name: Cache Composer
+ - name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
@@ -97,29 +84,24 @@ jobs:
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
- -
- name: Restrict Symfony version
+ - name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"
- -
- name: Restrict Sylius version
+ - name: Restrict Sylius version
if: matrix.sylius != ''
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
- -
- name: Install PHP dependencies
+ - name: Install PHP dependencies
run: composer install --no-interaction
- -
- name: Get Yarn cache directory
+ - name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- -
- name: Cache Yarn
+ - name: Cache Yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
@@ -127,60 +109,47 @@ jobs:
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
- -
- name: Install JS dependencies
+ - name: Install JS dependencies
run: (cd tests/Application && yarn install)
- -
- name: Prepare test application database
+ - name: Prepare test application database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
- -
- name: Prepare test application assets
+ - name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn build)
- -
- name: Prepare test application cache
+ - name: Prepare test application cache
run: (cd tests/Application && bin/console cache:warmup -vvv)
- -
- name: Load fixtures in test application
+ - name: Load fixtures in test application
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
- -
- name: Validate composer.json
+ - name: Validate composer.json
run: composer validate --ansi --strict
- -
- name: Validate database schema
+ - name: Validate database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)
- -
- name: Run PHPStan
+ - name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/
- -
- name: Run Psalm
+ - name: Run Psalm
run: vendor/bin/psalm
- -
- name: Run PHPSpec
+ - name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
- -
- name: Run PHPUnit
+ - name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
- -
- name: Run Behat
+ - name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
- -
- name: Upload Behat logs
+ - name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
diff --git a/README.md b/README.md
index d23faeb7..c4b23004 100644
--- a/README.md
+++ b/README.md
@@ -10,8 +10,9 @@
## Documentation
-For a comprehensive guide on Sylius Plugins development please go to Sylius documentation,
-there you will find the Plugin Development Guide, that is full of examples.
+For a comprehensive guide on Sylius Plugins development please go to Sylius documentation, there you will find
+the Plugin Development Guide, that
+is full of examples.
## Quickstart Installation
@@ -28,72 +29,73 @@ there you will find the ['test' => true, 'test_cached' => true],
];
```
-* If you use our Travis CI configuration, follow [these changes](https://github.com/Sylius/PluginSkeleton/pull/156/files#diff-354f30a63fb0907d4ad57269548329e3) introduced in `.travis.yml` file
-* Create `tests/Application/config/services_test.yaml` file with the following code and add these your own Behat services as well:
+* If you use our Travis CI configuration,
+ follow [these changes](https://github.com/Sylius/PluginSkeleton/pull/156/files#diff-354f30a63fb0907d4ad57269548329e3)
+ introduced in `.travis.yml` file
+* Create `tests/Application/config/services_test.yaml` file with the following code and add these your own Behat
+ services as well:
```yaml
imports:
- { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
@@ -56,16 +69,22 @@ If you're using Behat and want to be up-to-date with our configuration
* Remove all `` tags from your Behat services
* Make your Behat services public by default with ``
* Change `contexts_services ` in your suite definitions to `contexts`
-* Take a look at [SymfonyExtension UPGRADE guide](https://github.com/FriendsOfBehat/SymfonyExtension/blob/master/UPGRADE-2.0.md) if you have any more problems
+* Take a look
+ at [SymfonyExtension UPGRADE guide](https://github.com/FriendsOfBehat/SymfonyExtension/blob/master/UPGRADE-2.0.md) if
+ you have any more problems
### Phpstan
-* Fix the container XML path parameter in the `phpstan.neon` file as done [here](https://github.com/Sylius/PluginSkeleton/commit/37fa614dbbcf8eb31b89eaf202b4bd4d89a5c7b3)
+* Fix the container XML path parameter in the `phpstan.neon` file as
+ done [here](https://github.com/Sylius/PluginSkeleton/commit/37fa614dbbcf8eb31b89eaf202b4bd4d89a5c7b3)
# UPGRADE FROM `v1.2.X` TO `v1.4.0`
-Firstly, check out the [PluginSkeleton 1.3 upgrade guide](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.3.md) to update Sylius version step by step.
-To upgrade to Sylius 1.4 follow instructions from [the previous section](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.4.md#upgrade-from-v13x-to-v140) with following changes:
+Firstly, check out
+the [PluginSkeleton 1.3 upgrade guide](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.3.md) to update
+Sylius version step by step. To upgrade to Sylius 1.4 follow instructions
+from [the previous section](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.4.md#upgrade-from-v13x-to-v140)
+with following changes:
### Doctrine migrations
@@ -73,11 +92,13 @@ To upgrade to Sylius 1.4 follow instructions from [the previous section](https:/
### Dotenv
-* These changes are not required, but can be done as well, if you've changed application directory structure in `1.2.x` to `1.3` update
+* These changes are not required, but can be done as well, if you've changed application directory structure in `1.2.x`
+ to `1.3` update
### Behat
-* Add `\FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle()` to your bundles lists in `tests/Application/AppKernel.php` (preferably only in `test` environment)
+* Add `\FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle()` to your bundles lists
+ in `tests/Application/AppKernel.php` (preferably only in `test` environment)
* Import Sylius Behat services in `tests/Application/config/config_test.yml` and your own Behat services as well:
```yaml
imports:
@@ -91,7 +112,6 @@ To upgrade to Sylius 1.4 follow instructions from [the previous section](https:/
path: tests/Application/app/AppKernel.php
```
-
# UPGRADE FROM `v1.2.X` TO `v1.3.0`
## Application
@@ -106,17 +126,18 @@ To upgrade to Sylius 1.4 follow instructions from [the previous section](https:/
FriendsOfBehat\SymfonyExtension:
env_file: ~
```
-
+
* Incorporate changes from the following files into plugin's test application:
- * [`tests/Application/package.json`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/package.json) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-726e1353c14df7d91379c0dea6b30eef))
+ * [`tests/Application/package.json`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/package.json) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-726e1353c14df7d91379c0dea6b30eef))
* [`tests/Application/.babelrc`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.babelrc) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-a2527d9d8ad55460b2272274762c9386))
* [`tests/Application/.eslintrc.js`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.eslintrc.js) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-396c8c412b119deaa7dd84ae28ae04ca))
-
+
* Update PHP and JS dependencies by running `composer update` and `(cd tests/Application && yarn upgrade)`
* Clear cache by running `(cd tests/Application && bin/console cache:clear)`
-* Install assets by `(cd tests/Application && bin/console assets:install web)` and `(cd tests/Application && yarn build)`
+* Install assets by `(cd tests/Application && bin/console assets:install web)`
+ and `(cd tests/Application && yarn build)`
* optionally, remove the build for PHP 7.1. in `.travis.yml`
diff --git a/behat.yml.dist b/behat.yml.dist
index b9401b79..b3cd0975 100644
--- a/behat.yml.dist
+++ b/behat.yml.dist
@@ -46,7 +46,7 @@ default:
FriendsOfBehat\SymfonyExtension:
bootstrap: tests/Application/config/bootstrap.php
kernel:
- class: Tests\Acme\SyliusExamplePlugin\Application\Kernel
+ class: Tests\BitBag\SyliusGraphqlPlugin\Application\Kernel
FriendsOfBehat\VariadicExtension: ~
diff --git a/bin/create_node_symlink.php b/bin/create_node_symlink.php
index 10d69b45..e214c41c 100644
--- a/bin/create_node_symlink.php
+++ b/bin/create_node_symlink.php
@@ -4,8 +4,7 @@
const PATH_TO_NODE_MODULES = 'tests' . DIRECTORY_SEPARATOR . 'Application' . DIRECTORY_SEPARATOR . 'node_modules';
/* cannot use `file_exists` or `stat` as gives false on symlinks if target path does not exist yet */
-if (@lstat(NODE_MODULES_FOLDER_NAME))
-{
+if (@lstat(NODE_MODULES_FOLDER_NAME)) {
if (is_link(NODE_MODULES_FOLDER_NAME) || is_dir(NODE_MODULES_FOLDER_NAME)) {
echo '> `' . NODE_MODULES_FOLDER_NAME . '` already exists as a link or folder, keeping existing as may be intentional.' . PHP_EOL;
exit(0);
@@ -29,7 +28,7 @@
exec(sprintf('mklink /J %s %s 2> NUL', NODE_MODULES_FOLDER_NAME, PATH_TO_NODE_MODULES), $output, $returnCode);
$success = $returnCode === 0;
if (!$success) {
- echo '> Failed o create the required symlink' . PHP_EOL;
+ echo '> Failed o create the required symlink' . PHP_EOL;
exit(2);
}
}
diff --git a/composer.json b/composer.json
index 49753ee7..58a87d93 100644
--- a/composer.json
+++ b/composer.json
@@ -1,15 +1,18 @@
{
- "name": "sylius/plugin-skeleton",
+ "name": "bitbag/graphql-plugin",
"type": "sylius-plugin",
- "description": "Acme example plugin for Sylius.",
+ "description": "GraphQL Plugin on top of ApiPlatform for Sylius",
"keywords": [
"sylius",
- "sylius-plugin"
+ "sylius-plugin",
+ "graphql",
+ "api-platform"
],
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
- "sylius/sylius": "~1.9.0 || ~1.10.0@beta"
+ "sylius/sylius": "^1.10",
+ "webonyx/graphql-php": "^14.6"
},
"require-dev": {
"behat/behat": "^3.6.1",
@@ -51,8 +54,8 @@
},
"autoload": {
"psr-4": {
- "Acme\\SyliusExamplePlugin\\": "src/",
- "Tests\\Acme\\SyliusExamplePlugin\\": "tests/"
+ "BitBag\\SyliusGraphqlPlugin\\": "src/",
+ "Tests\\BitBag\\SyliusGraphqlPlugin\\": "tests/"
}
},
"autoload-dev": {
diff --git a/ecs.php b/ecs.php
index bf40cc9f..4f5dca97 100644
--- a/ecs.php
+++ b/ecs.php
@@ -1,7 +1,6 @@
-
+
diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index 56465a10..d305b4d3 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Acme\SyliusExamplePlugin\DependencyInjection;
+namespace BitBag\SyliusGraphqlPlugin\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
@@ -14,7 +14,7 @@ final class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder(): TreeBuilder
{
- $treeBuilder = new TreeBuilder('acme_sylius_example_plugin');
+ $treeBuilder = new TreeBuilder('bitbag_sylius_graphql_plugin');
$rootNode = $treeBuilder->getRootNode();
return $treeBuilder;
diff --git a/tests/Application/.babelrc b/tests/Application/.babelrc
index e563a62e..7d7b5a0c 100644
--- a/tests/Application/.babelrc
+++ b/tests/Application/.babelrc
@@ -1,15 +1,21 @@
{
"presets": [
- ["env", {
- "targets": {
- "node": "6"
- },
- "useBuiltIns": true
- }]
+ [
+ "env",
+ {
+ "targets": {
+ "node": "6"
+ },
+ "useBuiltIns": true
+ }
+ ]
],
"plugins": [
- ["transform-object-rest-spread", {
- "useBuiltIns": true
- }]
+ [
+ "transform-object-rest-spread",
+ {
+ "useBuiltIns": true
+ }
+ ]
]
}
diff --git a/tests/Application/.eslintrc.js b/tests/Application/.eslintrc.js
index 92c4cee3..dfddb254 100644
--- a/tests/Application/.eslintrc.js
+++ b/tests/Application/.eslintrc.js
@@ -1,20 +1,20 @@
module.exports = {
- extends: 'airbnb-base',
- env: {
- node: true,
- },
- rules: {
- 'object-shorthand': ['error', 'always', {
- avoidQuotes: true,
- avoidExplicitReturnArrows: true,
- }],
- 'function-paren-newline': ['error', 'consistent'],
- 'max-len': ['warn', 120, 2, {
- ignoreUrls: true,
- ignoreComments: false,
- ignoreRegExpLiterals: true,
- ignoreStrings: true,
- ignoreTemplateLiterals: true,
- }],
- },
+ extends: 'airbnb-base',
+ env: {
+ node: true,
+ },
+ rules: {
+ 'object-shorthand': ['error', 'always', {
+ avoidQuotes: true,
+ avoidExplicitReturnArrows: true,
+ }],
+ 'function-paren-newline': ['error', 'consistent'],
+ 'max-len': ['warn', 120, 2, {
+ ignoreUrls: true,
+ ignoreComments: false,
+ ignoreRegExpLiterals: true,
+ ignoreStrings: true,
+ ignoreTemplateLiterals: true,
+ }],
+ },
};
diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php
index a61479fe..c3dcdd54 100644
--- a/tests/Application/Kernel.php
+++ b/tests/Application/Kernel.php
@@ -2,7 +2,7 @@
declare(strict_types=1);
-namespace Tests\Acme\SyliusExamplePlugin\Application;
+namespace Tests\BitBag\SyliusGraphqlPlugin\Application;
use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
use Sylius\Bundle\CoreBundle\Application\Kernel as SyliusKernel;
diff --git a/tests/Application/bin/console b/tests/Application/bin/console
index bf889e97..21b9dc2b 100755
--- a/tests/Application/bin/console
+++ b/tests/Application/bin/console
@@ -1,14 +1,14 @@
#!/usr/bin/env php
getParameterOption(['--env', '-e'], null, true)) {
- putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
+ putenv('APP_ENV=' . $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}
if ($input->hasParameterOption('--no-debug', true)) {
- putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
+ putenv('APP_DEBUG=' . $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}
-require dirname(__DIR__).'/config/bootstrap.php';
+require dirname(__DIR__) . '/config/bootstrap.php';
if ($_SERVER['APP_DEBUG']) {
umask(0000);
@@ -33,6 +33,6 @@ if ($_SERVER['APP_DEBUG']) {
}
}
-$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
+$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php
index e23eca03..55d18ad0 100644
--- a/tests/Application/config/bootstrap.php
+++ b/tests/Application/config/bootstrap.php
@@ -4,7 +4,7 @@
use Symfony\Component\Dotenv\Dotenv;
-require dirname(__DIR__).'../../../vendor/autoload.php';
+require dirname(__DIR__) . '../../../vendor/autoload.php';
// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
@@ -20,4 +20,4 @@
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
-$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], \FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
+$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php
index c01727ba..8f675003 100644
--- a/tests/Application/config/bundles.php
+++ b/tests/Application/config/bundles.php
@@ -45,7 +45,7 @@
Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
- Acme\SyliusExamplePlugin\AcmeSyliusExamplePlugin::class => ['all' => true],
+ BitBag\SyliusGraphqlPlugin\BitBagSyliusGraphqlPlugin::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
diff --git a/tests/Application/config/packages/fos_rest.yaml b/tests/Application/config/packages/fos_rest.yaml
index a72eef7c..099a8c8b 100644
--- a/tests/Application/config/packages/fos_rest.yaml
+++ b/tests/Application/config/packages/fos_rest.yaml
@@ -3,9 +3,9 @@ fos_rest:
view:
formats:
json: true
- xml: true
+ xml: true
empty_content: 204
format_listener:
rules:
- - { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
+ - { path: '^/api/.*', priorities: [ 'json', 'xml' ], fallback_format: json, prefer_extension: true }
- { path: '^/', stop: true }
diff --git a/tests/Application/config/packages/security_checker.yaml b/tests/Application/config/packages/security_checker.yaml
index 0f9cf00f..dad316cb 100644
--- a/tests/Application/config/packages/security_checker.yaml
+++ b/tests/Application/config/packages/security_checker.yaml
@@ -3,7 +3,7 @@ services:
public: false
SensioLabs\Security\Command\SecurityCheckerCommand:
- arguments: ['@SensioLabs\Security\SecurityChecker']
+ arguments: [ '@SensioLabs\Security\SecurityChecker' ]
public: false
tags:
- { name: console.command, command: 'security:check' }
diff --git a/tests/Application/config/packages/twig.yaml b/tests/Application/config/packages/twig.yaml
index 8545473d..3342d5ea 100644
--- a/tests/Application/config/packages/twig.yaml
+++ b/tests/Application/config/packages/twig.yaml
@@ -1,5 +1,5 @@
twig:
- paths: ['%kernel.project_dir%/templates']
+ paths: [ '%kernel.project_dir%/templates' ]
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
diff --git a/tests/Application/config/routes/dev/web_profiler.yaml b/tests/Application/config/routes/dev/web_profiler.yaml
index 3e79dc21..9beef2a6 100644
--- a/tests/Application/config/routes/dev/web_profiler.yaml
+++ b/tests/Application/config/routes/dev/web_profiler.yaml
@@ -1,7 +1,7 @@
_wdt:
resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
- prefix: /_wdt
+ prefix: /_wdt
_profiler:
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
- prefix: /_profiler
+ prefix: /_profiler
diff --git a/tests/Application/config/routes/sylius_shop.yaml b/tests/Application/config/routes/sylius_shop.yaml
index 92eeae0c..41104bdf 100644
--- a/tests/Application/config/routes/sylius_shop.yaml
+++ b/tests/Application/config/routes/sylius_shop.yaml
@@ -9,6 +9,6 @@ sylius_shop_payum:
sylius_shop_default_locale:
path: /
- methods: [GET]
+ methods: [ GET ]
defaults:
_controller: sylius.controller.shop.locale_switch:switchAction
diff --git a/tests/Application/config/sylius/1.10/packages/security.yaml b/tests/Application/config/sylius/1.10/packages/security.yaml
index 10628102..56882048 100644
--- a/tests/Application/config/sylius/1.10/packages/security.yaml
+++ b/tests/Application/config/sylius/1.10/packages/security.yaml
@@ -22,7 +22,7 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_chain_provider:
chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
+ providers: [ sylius_api_shop_user_provider, sylius_api_admin_user_provider ]
encoders:
Sylius\Component\User\Model\UserInterface: argon2i
@@ -124,13 +124,13 @@ security:
anonymous: true
dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
+ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/sylius/1.8/packages/security.yaml b/tests/Application/config/sylius/1.8/packages/security.yaml
index 8161bdab..4717127e 100644
--- a/tests/Application/config/sylius/1.8/packages/security.yaml
+++ b/tests/Application/config/sylius/1.8/packages/security.yaml
@@ -22,7 +22,7 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_chain_provider:
chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
+ providers: [ sylius_api_shop_user_provider, sylius_api_admin_user_provider ]
encoders:
Sylius\Component\User\Model\UserInterface: argon2i
@@ -135,13 +135,13 @@ security:
anonymous: true
dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
+ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/sylius/1.9/packages/security.yaml b/tests/Application/config/sylius/1.9/packages/security.yaml
index 8161bdab..4717127e 100644
--- a/tests/Application/config/sylius/1.9/packages/security.yaml
+++ b/tests/Application/config/sylius/1.9/packages/security.yaml
@@ -22,7 +22,7 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_chain_provider:
chain:
- providers: [sylius_api_shop_user_provider, sylius_api_admin_user_provider]
+ providers: [ sylius_api_shop_user_provider, sylius_api_admin_user_provider ]
encoders:
Sylius\Component\User\Model\UserInterface: argon2i
@@ -135,13 +135,13 @@ security:
anonymous: true
dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
+ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
access_control:
- - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
+ - { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [ 127.0.0.1, ::1 ] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
diff --git a/tests/Application/config/symfony/4.4/packages/framework.yaml b/tests/Application/config/symfony/4.4/packages/framework.yaml
index 62f82d35..2850325d 100644
--- a/tests/Application/config/symfony/4.4/packages/framework.yaml
+++ b/tests/Application/config/symfony/4.4/packages/framework.yaml
@@ -1,2 +1,2 @@
framework:
- templating: { engines: ["twig"] }
+ templating: { engines: [ "twig" ] }
diff --git a/tests/Application/gulpfile.babel.js b/tests/Application/gulpfile.babel.js
index 5920316f..07ff5dd1 100644
--- a/tests/Application/gulpfile.babel.js
+++ b/tests/Application/gulpfile.babel.js
@@ -2,7 +2,7 @@ import chug from 'gulp-chug';
import gulp from 'gulp';
import yargs from 'yargs';
-const { argv } = yargs
+const {argv} = yargs
.options({
rootPath: {
description: ' path to public assets directory',
@@ -26,26 +26,26 @@ const config = [
];
export const buildAdmin = function buildAdmin() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'build' }));
+ return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', {read: false})
+ .pipe(chug({args: config, tasks: 'build'}));
};
buildAdmin.description = 'Build admin assets.';
export const watchAdmin = function watchAdmin() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'watch' }));
+ return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', {read: false})
+ .pipe(chug({args: config, tasks: 'watch'}));
};
watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';
export const buildShop = function buildShop() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'build' }));
+ return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', {read: false})
+ .pipe(chug({args: config, tasks: 'build'}));
};
buildShop.description = 'Build shop assets.';
export const watchShop = function watchShop() {
- return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
- .pipe(chug({ args: config, tasks: 'watch' }));
+ return gulp.src('../../vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', {read: false})
+ .pipe(chug({args: config, tasks: 'watch'}));
};
watchShop.description = 'Watch shop asset sources and rebuild on changes.';
diff --git a/tests/Application/public/index.php b/tests/Application/public/index.php
index af4ad7e6..e80b39a3 100644
--- a/tests/Application/public/index.php
+++ b/tests/Application/public/index.php
@@ -2,9 +2,9 @@
declare(strict_types=1);
-use Tests\Acme\SyliusExamplePlugin\Application\Kernel;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
+use Tests\BitBag\SyliusGraphqlPlugin\Application\Kernel;
require dirname(__DIR__) . '/config/bootstrap.php';
@@ -22,7 +22,7 @@
Request::setTrustedHosts([$trustedHosts]);
}
-$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
+$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
diff --git a/tests/Application/webpack.config.js b/tests/Application/webpack.config.js
index ba0308f7..bd2558f8 100644
--- a/tests/Application/webpack.config.js
+++ b/tests/Application/webpack.config.js
@@ -41,7 +41,7 @@ const adminConfig = Encore.getWebpackConfig();
adminConfig.resolve.alias['sylius/ui'] = uiBundleScripts;
adminConfig.resolve.alias['sylius/ui-resources'] = uiBundleResources;
adminConfig.resolve.alias['sylius/bundle'] = syliusBundles;
-adminConfig.externals = Object.assign({}, adminConfig.externals, { window: 'window', document: 'document' });
+adminConfig.externals = Object.assign({}, adminConfig.externals, {window: 'window', document: 'document'});
adminConfig.name = 'admin';
module.exports = [shopConfig, adminConfig];