Add backwards compatibility layer for Behat configuration referenced in Sylius-Standard

This commit is contained in:
Kamil Kokot 2018-08-24 10:48:25 +02:00
parent 5b0185f3a9
commit d9fc350e55
No known key found for this signature in database
GPG key ID: 7BD76F7054D93C89
5 changed files with 37 additions and 3 deletions

16
app/AppKernel.php Normal file
View file

@ -0,0 +1,16 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
@trigger_error('The "AppKernel" class located at "app/AppKernel.php" is deprecated since Sylius 1.3. Use "Kernel" class located at "src/Kernel.php" instead.', E_USER_DEPRECATED);
class_alias(Kernel::class, AppKernel::class);

16
app/TestAppKernel.php Normal file
View file

@ -0,0 +1,16 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
@trigger_error('The "TestAppKernel" class located at "app/TestAppKernel.php" is deprecated since Sylius 1.3. Use "Kernel" class located at "src/Kernel.php" instead.', E_USER_DEPRECATED);
class_alias(Kernel::class, TestAppKernel::class);

View file

@ -1,6 +1,8 @@
# This file is part of the Sylius package.
# (c) Paweł Jędrzejewski
# This file is referenced in Sylius-Standard v1.0.0 - v1.2.x
imports:
- src/Sylius/Behat/Resources/config/profiles.yml
- src/Sylius/Behat/Resources/config/suites.yml

View file

@ -188,7 +188,7 @@
"psr-4": {
"Sylius\\Tests\\": "tests/"
},
"classmap": ["src/Kernel.php"]
"classmap": ["app/AppKernel.php", "app/TestAppKernel.php", "src/Kernel.php"]
},
"extra": {
"symfony-app-dir": "app",

View file

@ -43,8 +43,8 @@ default:
FriendsOfBehat\SymfonyExtension:
env_file: .env.test
kernel:
class: Kernel
path: src/Kernel.php
class: TestAppKernel
path: app/TestAppKernel.php
bootstrap: ~
FriendsOfBehat\ContextServiceExtension: