-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
5 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
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,63 @@ | ||
<?php | ||
|
||
namespace NextrasTests\Migrations; | ||
|
||
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; | ||
use Nextras\Migrations\Bridges\SymfonyBundle\NextrasMigrationsBundle; | ||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; | ||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\HttpKernel\Kernel; | ||
|
||
|
||
class TestSymfonyKernel6 extends Kernel | ||
{ | ||
/** @var string */ | ||
private $configPath; | ||
|
||
/** @var array */ | ||
private $parameters; | ||
|
||
|
||
/** | ||
* @param string $configPath | ||
* @param array $parameters | ||
*/ | ||
public function __construct($configPath, array $parameters) | ||
{ | ||
parent::__construct('dev', TRUE); | ||
|
||
$this->configPath = $configPath; | ||
$this->parameters = $parameters; | ||
} | ||
|
||
|
||
public function getRootDir() | ||
{ | ||
return TEMP_DIR . '/symfony-bundle'; | ||
} | ||
|
||
|
||
public function registerBundles(): iterable | ||
{ | ||
return [ | ||
new FrameworkBundle(), | ||
new DoctrineBundle(), | ||
new NextrasMigrationsBundle(), | ||
]; | ||
} | ||
|
||
|
||
public function registerContainerConfiguration(LoaderInterface $loader) | ||
{ | ||
$loader->load(function (ContainerBuilder $container) { | ||
$container->addResource(new ContainerParametersResource($this->parameters)); | ||
foreach ($this->parameters as $key => $value) { | ||
$container->setParameter($key, $value); | ||
} | ||
}); | ||
|
||
$loader->load($this->configPath); | ||
} | ||
} |
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,15 @@ | ||
#!/usr/bin/env bash | ||
PHP_VERSION_MIN="80000" | ||
PHP_VERSION_MAX="80199" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~3.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.11" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle:~2.6" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~6.0" | ||
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/tester:~2.3" | ||
DBAL='doctrine' |