Skip to content

Commit 7aaffd2

Browse files
committed
Merge remote-tracking branch 'adrorocker/1.1' into 1.x
2 parents 78fa45f + a68017f commit 7aaffd2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/FluentDriver.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Doctrine\ORM\Mapping\MappingException;
77
use Doctrine\Persistence\Mapping\ClassMetadata;
88
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
9+
use Doctrine\ORM\Mapping\NamingStrategy;
910
use InvalidArgumentException;
1011
use LaravelDoctrine\Fluent\Builders\Builder;
1112
use LaravelDoctrine\Fluent\Mappers\MapperSet;
@@ -27,11 +28,14 @@ class FluentDriver implements MappingDriver
2728
* documents and operates in the specified operating mode.
2829
*
2930
* @param string[] $mappings
31+
* @param null|NamingStrategy $namingStrategy
3032
*/
31-
public function __construct(array $mappings = [])
32-
{
33-
$this->fluentFactory = function (ClassMetadata $metadata) {
34-
return new Builder(new ClassMetadataBuilder($metadata));
33+
public function __construct(
34+
array $mappings = [],
35+
NamingStrategy $namingStrategy = null
36+
) {
37+
$this->fluentFactory = function (ClassMetadata $metadata) use ($namingStrategy) {
38+
return new Builder(new ClassMetadataBuilder($metadata), $namingStrategy);
3539
};
3640

3741
$this->mappers = new MapperSet();

0 commit comments

Comments
 (0)