Doctrine Object Relational Mapper (ORM)
This report summarizes scanner evidence for doctrine/orm, a PHP project with 10,164 GitHub stars. SynthScan examined 183,767 lines of code across 1630 source files, recording 2540 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 13.7 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 2493 finding(s).
Are imports declared and package/API names verified? 47 finding(s).
Are wrappers, guards, and repeated structures necessary? 2474 finding(s).
Which changes need focused human review? 2540 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 2540 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Tests/TestUtil.php | 168 | private static function getPrivilegedConnectionParameters(): array | CODE |
| LOW | tests/Tests/TestUtil.php | 181 | private static function getTestConnectionParameters(): array | CODE |
| LOW | tests/Tests/OrmTestCase.php | 84 | protected function createTestEntityManagerWithConnection(Connection $connection): EntityManagerMock | CODE |
| LOW | tests/Tests/OrmTestCase.php | 89 | protected function createTestEntityManagerWithPlatform(AbstractPlatform $platform): EntityManagerMock | CODE |
| LOW | tests/Tests/OrmTestCase.php | 110 | private function buildTestEntityManagerWithPlatform(Connection $connection): EntityManagerMock | CODE |
| LOW | tests/Tests/OrmTestCase.php | 147 | private static function getSharedMetadataCacheImpl(): CacheItemPoolInterface | CODE |
| LOW | tests/Tests/OrmTestCase.php | 159 | protected function getSharedSecondLevelCache(): CacheItemPoolInterface | CODE |
| LOW | tests/Tests/OrmFunctionalTestCase.php | 502 | final protected function getUpdateSchemaSqlForModels(string ...$models): array | CODE |
| LOW | tests/Tests/Mocks/ArrayResultFactory.php | 20 | public static function createDriverResultFromArray(array $resultSet): ArrayResult | CODE |
| LOW | tests/Tests/Mocks/ArrayResultFactory.php | 35 | public static function createWrapperResultFromArray(array $resultSet, Connection|null $connection = null): Result | CODE |
| LOW | tests/Tests/Mocks/EntityPersisterMock.php | 107 | public function countOfExecuteInsertCalls(): int | CODE |
| LOW | tests/Tests/DbalTypes/UpperCaseStringType.php | 22 | public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform): string | CODE |
| LOW | tests/Tests/DbalTypes/NegativeToPositiveType.php | 30 | public function convertToDatabaseValueSQL($sqlExpr, AbstractPlatform $platform): string | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 66 | public function setUpPersistentCollection(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 74 | public function testCanBePutInLazyLoadingMode(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 85 | public function testCurrentInitializesCollection(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 94 | public function testKeyInitializesCollection(): void | CODE |
| LOW⚡ | tests/Tests/ORM/PersistentCollectionTest.php | 103 | public function testNextInitializesCollection(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 130 | public function testRemovingElementsAlsoRemovesKeys(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 142 | public function testClearWillAlsoClearKeys(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 150 | public function testClearWillAlsoResetKeyPositions(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 164 | public function testWillKeepNewItemsInDirtyCollectionAfterInitialization(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 197 | public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 239 | public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 276 | public function testModifyUOWForDeferredImplicitOwnerOnClear(): void | CODE |
| LOW | tests/Tests/ORM/PersistentCollectionTest.php | 285 | public function testItCanBeSerializedAndUnserializedBack(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 17 | public function testItMakesHydrationCacheProfilesAwareOfTheResultCache(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 32 | public function testItMakesResultCacheProfilesAwareOfTheResultCache(): void | CODE |
| LOW | tests/Tests/ORM/AbstractQueryTest.php | 46 | public function testSettingTheResultCacheIsPossibleWithoutCallingDeprecatedMethods(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 80 | public function testDeleteWithLimitNotSupported(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 90 | public function testUpdateWithLimitNotSupported(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 135 | public function testSimpleSelectWithFromIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 144 | public function testSimpleSelectWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 186 | public function testComplexInnerJoinWithComparisonCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 200 | public function testComplexInnerJoinWithCompositeCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 217 | public function testComplexInnerJoinWithFuncCondition(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 234 | public function testComplexInnerJoinWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 277 | public function testMultipleFromWithIndexBy(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 299 | public function testMultipleFromWithMultipleJoin(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 322 | public function testWhereWithUnexpectedNamedArguments(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 367 | public function testComplexAndWhereOrWhereNesting(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 482 | public function testOrderByWithExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 541 | public function testLegacyAddOrderByString(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 553 | public function testAddOrderByWithExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 579 | public function testAddMultipleSameCriteriaWhere(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 598 | public function testAddCriteriaWhereWithMultipleParametersWithSameField(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 615 | public function testAddCriteriaWhereWithMultipleParametersWithDifferentFields(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 632 | public function testAddCriteriaWhereWithMultipleParametersWithSubpathsAndDifferentProperties(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 649 | public function testAddCriteriaWhereWithMultipleParametersWithSubpathsAndSameProperty(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 681 | public function testAddCriteriaOrderOnJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 713 | public function testAddCriteriaUndefinedLimit(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 845 | public function testWhereInWithStringLiterals(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 859 | public function testWhereInWithObjectLiterals(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 901 | public function testMultipleIsolatedQueryConstruction(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 933 | public function testSelectWithFuncExpression(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1005 | public function testAddCriteriaWhereWithJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1023 | public function testAddCriteriaWhereWithDefaultAndJoinAlias(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1041 | public function testAddCriteriaWhereOnJoinAliasWithDuplicateFields(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1102 | public function testGetSeveralRootAliases(): void | CODE |
| LOW | tests/Tests/ORM/QueryBuilderTest.php | 1114 | public function testBCAddJoinWithoutRootAlias(): void | CODE |
| 2414 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 24 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 26 | self::assertSame('John Doe', $wrappedReflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 27 | self::assertSame('John Doe', $reflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 29 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 31 | self::assertSame('John Doe', $wrappedReflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 32 | self::assertSame('John Doe', $reflection->getValue($author)); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 42 | $reflection->setValue($author, 'John Doe'); | CODE |
| LOW⚡ | …s/Tests/ORM/Mapping/ReflectionReadonlyPropertyTest.php | 46 | $reflection->setValue($author, 'Jane Doe'); | CODE |
| LOW⚡ | …ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php | 21 | $query->setHint('dummy-hint', 'dummy-value'); | CODE |
| LOW⚡ | …ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php | 28 | self::assertSame('dummy-value', $walker->getQuery()->getHint('dummy-hint')); | CODE |
| LOW | …s/Tests/ORM/Functional/StandardEntityPersisterTest.php | 34 | $customer->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 26 | $user->name = 'John Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 29 | $user2->name = 'Jane Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 55 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 68 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 81 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 94 | self::assertSame([['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 108 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/QueryParameterTest.php | 108 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 122 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW | tests/Tests/ORM/Functional/QueryParameterTest.php | 122 | self::assertSame([['name' => 'Jane Doe'], ['name' => 'John Doe']], $result); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 667 | self::assertEquals('Lorem ipsum dolor sunt.', $articleNew->text); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 671 | $articleNew->text = 'Lorem ipsum dolor sunt. And stuff!'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 677 | self::assertEquals('Lorem ipsum dolor sunt. And stuff!', $articleNew->text); | CODE |
| LOW | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 654 | $article->text = 'Lorem ipsum dolor sunt.'; | CODE |
| LOW | tests/Tests/ORM/Functional/BasicFunctionalTest.php | 697 | $article->text = 'Lorem ipsum dolor sunt.'; | CODE |
| LOW | tests/Tests/ORM/Functional/GH11345Test.php | 124 | $auction1->setData('lorem ipsum'); | CODE |
| LOW | tests/Tests/ORM/Functional/PropertyHooksTest.php | 37 | $user->fullName = 'John Doe'; | CODE |
| LOW | tests/Tests/ORM/Functional/PropertyHooksTest.php | 48 | self::assertEquals('John Doe', $user->fullName); | CODE |
| LOW⚡ | …RM/Functional/OneToOneBidirectionalAssociationTest.php | 28 | $this->customer->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH5762Test.php | 83 | $driver = new GH5762Driver(1, 'John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC211Test.php | 32 | $user->setName('John Doe'); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 32 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 42 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 50 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 65 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 73 | $manager->phoneNumber = '555-5555'; | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH6937Test.php | 88 | self::assertSame('555-5555', $persistedManager->phoneNumber); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/GH7012Test.php | 32 | $user->name = 'John Doe'; | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/DDC3303Test.php | 36 | 'John Doe', | CODE |
| LOW⚡ | tests/Tests/ORM/Functional/Ticket/DDC3303Test.php | 45 | self::assertEquals($employee, $this->_em->find(DDC3303Employee::class, 'John Doe')); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 96 | $john->setName('John Doe'); | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 120 | ->setParameter(1, 'John Doe') | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 142 | ->setParameter(1, 'John Doe') | CODE |
| LOW | tests/Tests/ORM/Functional/Ticket/DDC1884Test.php | 162 | ->setParameter(1, 'John Doe') | CODE |
| LOW⚡ | …ts/Tests/ORM/Functional/Ticket/GH11386/GH11386Test.php | 27 | $customer->setName('John Doe') | CODE |
| LOW⚡ | …ts/Tests/ORM/Functional/Ticket/GH11386/GH11386Test.php | 37 | self::assertEquals('John Doe', $customer->getName()); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/Tests/Models/Cache/Attraction.php | 21 | #[Table('cache_attraction')] | COMMENT |
| LOW | tests/Tests/Models/DDC117/DDC117Editor.php | 21 | { | COMMENT |
| LOW | tests/Tests/Models/Routing/RoutingRoute.php | 21 | #[Entity] | COMMENT |
| LOW | tests/Tests/Models/Company/CompanyContract.php | 21 | #[ORM\InheritanceType('SINGLE_TABLE')] | COMMENT |
| LOW | tests/Tests/ORM/Mapping/BasicInheritanceMappingTest.php | 321 | #[Id] | COMMENT |
| LOW | tests/Tests/ORM/Tools/SchemaToolTest.php | 1181 | #[Id] | COMMENT |
| LOW | tests/Tests/ORM/Tools/SchemaToolTest.php | 1201 | #[ManyToOne(targetEntity: GH12651Target::class)] | COMMENT |
| LOW | tests/Tests/ORM/Tools/SchemaToolTest.php | 1481 | COMMENT | |
| LOW | tests/Tests/ORM/Tools/SchemaToolTest.php | 1521 | #[UniqueConstraint(name: 'uniq_name', columns: ['name'])] | COMMENT |
| LOW | …ests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php | 321 | COMMENT | |
| LOW | tests/Tests/ORM/Functional/Ticket/GH10531Test.php | 121 | #[ORM\Table(name: 'gh10531_a')] | COMMENT |
| LOW | …ts/ORM/Functional/Ticket/GH12225/AbstractDirectory.php | 21 | COMMENT | |
| LOW | src/UnitOfWork.php | 421 | // Perform entity insertions first, so that all new entities have their rows in the database | COMMENT |
| LOW | src/UnitOfWork.php | 1321 | COMMENT | |
| LOW | src/Tools/SchemaTool.php | 1341 | // Both associations reference the same foreign table and columns, so a | COMMENT |
| LOW | src/Persisters/Entity/BasicEntityPersister.php | 641 | } | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/Mapping/Driver/DatabaseDriver.php | 503 | // Here we need to check if $fkColumns are the same as $primaryKeys | COMMENT |
| LOW | src/Query/Parser.php | 1433 | // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression | COMMENT |
| LOW | src/Query/Parser.php | 3246 | // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression | COMMENT |