Commit 48bee72 1 parent c00fd7d commit 48bee72 Copy full SHA for 48bee72
File tree 1 file changed +6
-7
lines changed
lib/Doctrine/ORM/Mapping/Driver
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 10
10
use Doctrine \DBAL \Schema \Table ;
11
11
use Doctrine \DBAL \Types \Type ;
12
12
use Doctrine \DBAL \Types \Types ;
13
- use Doctrine \Deprecations \Deprecation ;
14
13
use Doctrine \Inflector \Inflector ;
15
14
use Doctrine \Inflector \InflectorFactory ;
16
15
use Doctrine \ORM \Mapping \ClassMetadata ;
17
16
use Doctrine \ORM \Mapping \MappingException ;
18
17
use Doctrine \Persistence \Mapping \ClassMetadata as PersistenceClassMetadata ;
19
18
use Doctrine \Persistence \Mapping \Driver \MappingDriver ;
20
19
use InvalidArgumentException ;
20
+ use TypeError ;
21
21
22
22
use function array_diff ;
23
23
use function array_keys ;
28
28
use function in_array ;
29
29
use function preg_replace ;
30
30
use function sort ;
31
+ use function sprintf ;
31
32
use function strtolower ;
32
33
33
34
/**
@@ -157,14 +158,12 @@ public function setInflector(Inflector $inflector): void
157
158
public function loadMetadataForClass (string $ className , PersistenceClassMetadata $ metadata ): void
158
159
{
159
160
if (! $ metadata instanceof ClassMetadata) {
160
- Deprecation::trigger (
161
- 'doctrine/orm ' ,
162
- 'https://github.com/doctrine/orm/pull/249 ' ,
163
- 'Passing an instance of %s to %s is deprecated, please pass a %s instance instead. ' ,
164
- $ metadata ::class,
161
+ throw new TypeError (sprintf (
162
+ 'Argument #2 passed to %s() must be an instance of %s, %s given. ' ,
165
163
__METHOD__ ,
166
164
ClassMetadata::class,
167
- );
165
+ $ metadata ::class,
166
+ ));
168
167
}
169
168
170
169
$ this ->reverseEngineerMappingFromDatabase ();
You can’t perform that action at this time.
0 commit comments