-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from mbugla/support_sylius-1.4
Support sylius 1.4
- Loading branch information
Showing
17 changed files
with
188 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,53 @@ | ||
imports: | ||
- vendor/sylius/sylius/behat.yml.dist | ||
- vendor/sylius/sylius/src/Sylius/Behat/Resources/config/suites.yml | ||
- tests/Behat/Resources/suites.yml | ||
|
||
default: | ||
extensions: | ||
FriendsOfBehat\ContextServiceExtension: | ||
imports: | ||
- vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml | ||
- tests/Behat/Resources/services.yml | ||
Lakion\Behat\MinkDebugExtension: | ||
directory: etc/build | ||
clean_start: false | ||
screenshot: true | ||
|
||
Behat\MinkExtension: | ||
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" | ||
base_url: "http://localhost:8080/" | ||
default_session: symfony | ||
javascript_session: chrome | ||
sessions: | ||
symfony: | ||
symfony: ~ | ||
chrome: | ||
selenium2: | ||
browser: chrome | ||
capabilities: | ||
browserName: chrome | ||
browser: chrome | ||
version: "" | ||
marionette: null # https://github.com/Behat/MinkExtension/pull/311 | ||
chrome: | ||
switches: | ||
- "start-fullscreen" | ||
- "start-maximized" | ||
- "no-sandbox" | ||
firefox: | ||
selenium2: | ||
browser: firefox | ||
show_auto: false | ||
|
||
FriendsOfBehat\SymfonyExtension: | ||
env_file: tests/Application/.env.test | ||
bootstrap: tests/Application/config/bootstrap.php | ||
kernel: | ||
env: test | ||
debug: true | ||
class: Tests\BitBag\SyliusElasticsearchPlugin\Application\Kernel | ||
path: tests/Application/Kernel.php | ||
bootstrap: ~ | ||
|
||
Lakion\Behat\MinkDebugExtension: | ||
directory: etc/build | ||
clean_start: false | ||
screenshot: true | ||
FriendsOfBehat\VariadicExtension: ~ | ||
|
||
FriendsOfBehat\SuiteSettingsExtension: | ||
paths: | ||
- "features" | ||
|
||
formatters: | ||
pretty: | ||
verbose: true | ||
paths: false | ||
snippets: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
/var/* | ||
!/var/.gitignore | ||
|
||
/public/assets | ||
/public/bundles | ||
/public/css | ||
/public/js | ||
/public/media | ||
/public/media/* | ||
!/public/media/image/ | ||
/public/media/image/* | ||
!/public/media/image/.gitignore | ||
|
||
/vendor | ||
/node_modules | ||
|
||
/.env | ||
/.env.prod | ||
/.env.staging | ||
/.env.test | ||
/.env.test_cached | ||
###> symfony/framework-bundle ### | ||
/.env.*.local | ||
/.env.local | ||
/.env.local.php | ||
/public/bundles | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/web-server-bundle ### | ||
/.web-server-pid | ||
###< symfony/web-server-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,38 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Tests\BitBag\SyliusElasticsearchPlugin\Application\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Debug\Debug; | ||
use Symfony\Component\Dotenv\Dotenv; | ||
use Tests\BitBag\SyliusElasticsearchPlugin\Application\Kernel; | ||
|
||
set_time_limit(0); | ||
|
||
require __DIR__.'/../../../vendor/autoload.php'; | ||
|
||
if (!class_exists(Application::class)) { | ||
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); | ||
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); | ||
} | ||
|
||
if (!isset($_SERVER['APP_ENV'])) { | ||
if (!class_exists(Dotenv::class)) { | ||
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); | ||
} | ||
$input = new ArgvInput(); | ||
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { | ||
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); | ||
} | ||
|
||
$envFile = file_exists(__DIR__.'/../.env') ? __DIR__.'/../.env' : __DIR__.'/../.env.dist'; | ||
(new Dotenv())->load($envFile); | ||
if ($input->hasParameterOption('--no-debug', true)) { | ||
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); | ||
} | ||
|
||
$input = new ArgvInput(); | ||
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true); | ||
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true); | ||
require dirname(__DIR__).'/config/bootstrap.php'; | ||
|
||
if ($debug) { | ||
if ($_SERVER['APP_DEBUG']) { | ||
umask(0000); | ||
|
||
if (class_exists(Debug::class)) { | ||
Debug::enable(); | ||
} | ||
} | ||
|
||
$kernel = new Kernel($env, $debug); | ||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); | ||
$application = new Application($kernel); | ||
$application->run($input); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Symfony\Component\Dotenv\Dotenv; | ||
|
||
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) | ||
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { | ||
$_SERVER += $env; | ||
$_ENV += $env; | ||
} elseif (!class_exists(Dotenv::class)) { | ||
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); | ||
} else { | ||
// load all the .env files | ||
(new Dotenv())->loadEnv(dirname(__DIR__).'/.env'); | ||
} | ||
|
||
$_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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
imports: | ||
- { resource: "../../Behat/Resources/services.yml" } | ||
- { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" } |
Oops, something went wrong.