diff --git a/.travis.yml b/.travis.yml index 46f6e50e0..8b610d76f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,12 @@ matrix: env: SYMFONY_VERSION='~3.3.0' - php: '7.1' env: SYMFONY_VERSION='~3.4.0@dev' + - php: '7.1' + env: SYMFONY_VERSION='~4.0.0@dev' allow_failures: - php: nightly - env: SYMFONY_VERSION='~3.4.0@dev' + - env: SYMFONY_VERSION='~4.0.0@dev' before_install: - set -eo pipefail diff --git a/composer.json b/composer.json index 6ce698d47..fbe6eda22 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "phpspec/prophecy": "^1.6", "phpunit/phpunit": "^6.0", "symfony/phpunit-bridge": "^3.3 || ^4.0", - "symfony/var-dumper": "^3.2" + "symfony/var-dumper": "^3.2 || ^4.0" }, "autoload": { diff --git a/fixtures/Bridge/Symfony/Application/AppKernel.php b/fixtures/Bridge/Symfony/Application/AppKernel.php index 68928d8ff..70d6d151a 100644 --- a/fixtures/Bridge/Symfony/Application/AppKernel.php +++ b/fixtures/Bridge/Symfony/Application/AppKernel.php @@ -16,6 +16,10 @@ use Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\PassConfig; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\HttpKernel\Kernel; class AppKernel extends Kernel @@ -45,7 +49,7 @@ public function registerBundles() } /** - * {@inheritdoc} + * @inheritdoc */ public function registerContainerConfiguration(LoaderInterface $loader) { @@ -54,6 +58,25 @@ public function registerContainerConfiguration(LoaderInterface $loader) $loader->load($config); } + /** + * @inheritdoc + */ + public function build(ContainerBuilder $container) + { + $container->addCompilerPass(new class implements CompilerPassInterface { + public function process(ContainerBuilder $container) + { + foreach ($container->getDefinitions() as $id => $definition) { + $definition->setPublic(true); + } + + foreach ($container->getAliases() as $id => $definition) { + $definition->setPublic(true); + } + } + }, PassConfig::TYPE_OPTIMIZE); + } + public function setConfigurationResource(string $resource) { $this->config = $resource; diff --git a/fixtures/Bridge/Symfony/Application/config.yml b/fixtures/Bridge/Symfony/Application/config.yml index 2fb2b7003..7cb1c4a8d 100644 --- a/fixtures/Bridge/Symfony/Application/config.yml +++ b/fixtures/Bridge/Symfony/Application/config.yml @@ -12,7 +12,6 @@ framework: router: resource: ~ strict_requirements: '%kernel.debug%' - trusted_proxies: ~ test: ~ session: storage_id: session.storage.mock_file diff --git a/fixtures/Bridge/Symfony/Application/config_custom.yml b/fixtures/Bridge/Symfony/Application/config_custom.yml index ce245d934..2ac49a911 100644 --- a/fixtures/Bridge/Symfony/Application/config_custom.yml +++ b/fixtures/Bridge/Symfony/Application/config_custom.yml @@ -12,7 +12,6 @@ framework: router: resource: ~ strict_requirements: '%kernel.debug%' - trusted_proxies: ~ test: ~ session: storage_id: session.storage.mock_file diff --git a/vendor-bin/symfony/composer.json b/vendor-bin/symfony/composer.json index 3b67ac8f0..7f9956810 100644 --- a/vendor-bin/symfony/composer.json +++ b/vendor-bin/symfony/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "symfony/symfony": "^3.1", + "symfony/symfony": "^3.3 || ^4.0", "theofidry/composer-inheritance-plugin": "^1.0" }, "config": {