Skip to content

Commit

Permalink
bc: deprecate config auto_refresh_proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
nikophil committed Mar 1, 2024
1 parent 5884bd3 commit 967932b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ DATABASE_URL="mysql://root:1234@127.0.0.1:3307/foundry_test?serverVersion=5.7.42
MONGO_URL="mongodb://127.0.0.1:27018/dbName?compressors=disabled&gssapiServiceName=mongodb"
USE_FOUNDRY_BUNDLE=1
TEST_MIGRATIONS=0
MAKER_PHP_CS_FIXER_BINARY_PATH="vendor/bin/php-cs-fixer"
1 change: 1 addition & 0 deletions src/Bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function getConfigTreeBuilder(): TreeBuilder
$treeBuilder->getRootNode()
->children()
->booleanNode('auto_refresh_proxies')
->setDeprecated('zenstruck/foundry', '1.37.0', 'The option "zenstruck_foundry.auto_refresh_proxies" is deprecated, you should remove it.')
->info('Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh)')
->defaultNull()
->end()
Expand Down
2 changes: 0 additions & 2 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public function defaultProxyAutoRefresh(): bool
}

if (null === $this->defaultProxyAutoRefresh) {
trigger_deprecation('zenstruck\foundry', '1.9', 'Not explicitly configuring the default proxy auto-refresh is deprecated and will default to "true" in 2.0. Use "zenstruck_foundry.auto_refresh_proxies" in the bundle config or TestState::enableDefaultProxyAutoRefresh()/disableDefaultProxyAutoRefresh().');

$this->defaultProxyAutoRefresh = false;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
}

if (\getenv('USE_FOUNDRY_BUNDLE')) {
$foundryConfig = ['auto_refresh_proxies' => true];
$foundryConfig = [];
if ($this->defaultMakeFactoryNamespace) {
$foundryConfig['make_factory'] = ['default_namespace' => $this->defaultMakeFactoryNamespace];
}
Expand Down

0 comments on commit 967932b

Please sign in to comment.