Skip to content

Commit

Permalink
Remove legacy config "fixture_loader"
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Dec 12, 2023
1 parent f7e9d49 commit b1c7a1f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
7 changes: 0 additions & 7 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ public function getConfigTreeBuilder(): TreeBuilder
->scalarNode('persistent_collection_namespace')->defaultValue('PersistentCollections')->end()
->scalarNode('persistent_collection_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/mongodb/PersistentCollections')->end()
->scalarNode('auto_generate_persistent_collection_classes')->defaultValue(ODMConfiguration::AUTOGENERATE_NEVER)->end()
->scalarNode('fixture_loader')
->setDeprecated(
'doctrine/mongodb-odm-bundle',
'4.7',
'The "fixture_loader" option is deprecated and will be dropped in doctrine/mongodb-odm-bundle 5.0.',
)
->end()
->scalarNode('default_document_manager')->end()
->scalarNode('default_connection')->end()
->scalarNode('default_database')->defaultValue('default')->end()
Expand Down
16 changes: 0 additions & 16 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection;

use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Configuration;
use Doctrine\Bundle\MongoDBBundle\Loader\SymfonyFixturesLoader;
use Doctrine\Bundle\MongoDBBundle\Tests\Fixtures\Filter\BasicFilter;
use Doctrine\Bundle\MongoDBBundle\Tests\Fixtures\Filter\ComplexFilter;
use Doctrine\Bundle\MongoDBBundle\Tests\Fixtures\Filter\DisabledFilter;
Expand Down Expand Up @@ -512,19 +511,4 @@ public function testNullReplicaSetValue(): void
$processedConfig = $processor->processConfiguration($configuration, [$config]);
$this->assertFalse(array_key_exists('replicaSet', $processedConfig['connections']['conn1']['options']));
}

/** @group legacy */
public function testFixtureLoaderDeprecated(): void
{
$config = [
'fixture_loader' => SymfonyFixturesLoader::class,
];

$processor = new Processor();
$configuration = new Configuration();

$this->expectDeprecation('Since doctrine/mongodb-odm-bundle 4.7: The "fixture_loader" option is deprecated and will be dropped in doctrine/mongodb-odm-bundle 5.0.');

$processor->processConfiguration($configuration, [$config]);
}
}
5 changes: 3 additions & 2 deletions Tests/Form/Type/GuesserTestType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name')
->add('date')
->add('ts')
// Not setting "date_widget" is deprecated in Symfony 6.4
->add('date', null, ['date_widget' => 'single_text'])
->add('ts', null, ['date_widget' => 'single_text'])
->add('categories', null, ['document_manager' => $options['dm']])
->add('boolField')
->add('floatField')
Expand Down
1 change: 0 additions & 1 deletion Tests/Form/Type/TypeGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ protected function tearDown(): void
parent::tearDown();
}

/** @group legacy */
public function testTypesShouldBeGuessedCorrectly(): void
{
$form = $this->factory->create(GuesserTestType::class, null, ['dm' => $this->dm]);
Expand Down

0 comments on commit b1c7a1f

Please sign in to comment.