doctrine / orm

Compare 38b1fee ... +9 ... e308b0a

Coverage Reach
Query/Parser.php Query/SqlWalker.php Query/AST/Functions/SizeFunction.php Query/AST/Functions/DateAddFunction.php Query/AST/Functions/TrimFunction.php Query/AST/Functions/DateSubFunction.php Query/AST/Functions/IdentityFunction.php Query/AST/Functions/LocateFunction.php Query/AST/Functions/SubstringFunction.php Query/AST/Functions/ConcatFunction.php Query/AST/Functions/BitOrFunction.php Query/AST/Functions/BitAndFunction.php Query/AST/Functions/ModFunction.php Query/AST/Functions/DateDiffFunction.php Query/AST/Functions/LengthFunction.php Query/AST/Functions/LowerFunction.php Query/AST/Functions/AbsFunction.php Query/AST/Functions/UpperFunction.php Query/AST/Functions/SqrtFunction.php Query/AST/Functions/CurrentTimeFunction.php Query/AST/Functions/CurrentDateFunction.php Query/AST/Functions/CurrentTimestampFunction.php Query/AST/Functions/CountFunction.php Query/AST/Functions/SumFunction.php Query/AST/Functions/MaxFunction.php Query/AST/Functions/AvgFunction.php Query/AST/Functions/MinFunction.php Query/AST/Functions/FunctionNode.php Query/AST/Node.php Query/AST/QuantifiedExpression.php Query/AST/InputParameter.php Query/AST/ArithmeticFactor.php Query/AST/OrderByItem.php Query/AST/BetweenExpression.php Query/AST/ConditionalPrimary.php Query/AST/ArithmeticExpression.php Query/AST/IndexBy.php Query/AST/CollectionMemberExpression.php Query/AST/ComparisonExpression.php Query/AST/InstanceOfExpression.php Query/AST/Literal.php Query/AST/ConditionalExpression.php Query/AST/ParenthesisExpression.php Query/AST/RangeVariableDeclaration.php Query/AST/JoinClassPathExpression.php Query/AST/Join.php Query/AST/UpdateClause.php Query/AST/AggregateExpression.php Query/AST/OrderByClause.php Query/AST/CoalesceExpression.php Query/AST/GroupByClause.php Query/AST/SimpleArithmeticExpression.php Query/AST/FromClause.php Query/AST/NewObjectExpression.php Query/AST/SelectClause.php Query/AST/PathExpression.php Query/AST/ConditionalTerm.php Query/AST/SubselectFromClause.php Query/AST/ArithmeticTerm.php Query/AST/GeneralCaseExpression.php Query/AST/LikeExpression.php Query/AST/DeleteClause.php Query/AST/JoinAssociationDeclaration.php Query/AST/SelectStatement.php Query/AST/SelectExpression.php Query/AST/WhereClause.php Query/AST/ExistsExpression.php Query/AST/WhenClause.php Query/AST/EmptyCollectionComparisonExpression.php Query/AST/Subselect.php Query/AST/HavingClause.php Query/AST/UpdateStatement.php Query/AST/DeleteStatement.php Query/AST/SimpleSelectExpression.php Query/AST/NullIfExpression.php Query/AST/SimpleWhenClause.php Query/AST/JoinVariableDeclaration.php Query/AST/ConditionalFactor.php Query/AST/NullComparisonExpression.php Query/AST/SimpleCaseExpression.php Query/AST/SimpleSelectClause.php Query/AST/UpdateItem.php Query/AST/IdentificationVariableDeclaration.php Query/AST/InExpression.php Query/AST/PartialObjectExpression.php Query/AST/ASTException.php Query/AST/JoinAssociationPathExpression.php Query/AST/SubselectIdentificationVariableDeclaration.php Query/Exec/MultiTableUpdateExecutor.php Query/Exec/MultiTableDeleteExecutor.php Query/Exec/SingleTableDeleteUpdateExecutor.php Query/Exec/AbstractSqlExecutor.php Query/Exec/SingleSelectExecutor.php Query/Expr/Base.php Query/Expr/Join.php Query/Expr/Math.php Query/Expr/Composite.php Query/Expr/OrderBy.php Query/Expr/From.php Query/Expr/Comparison.php Query/Expr/Func.php Query/Expr/Orx.php Query/Expr/Andx.php Query/Expr/Select.php Query/Expr/GroupBy.php Query/Expr/Literal.php Query/Expr.php Query/ResultSetMapping.php Query/ResultSetMappingBuilder.php Query/QueryExpressionVisitor.php Query/Lexer.php Query/QueryException.php Query/Filter/SQLFilter.php Query/Filter/FilterException.php Query/FilterCollection.php Query/ParameterTypeInferer.php Query/TreeWalkerChain.php Query/Parameter.php Query/ParserResult.php Query/TreeWalkerAdapter.php Query/Printer.php Mapping/Driver/XmlDriver.php Mapping/Driver/AnnotationDriver.php Mapping/Driver/AttributeDriver.php Mapping/Driver/DatabaseDriver.php Mapping/Driver/DoctrineAnnotations.php Mapping/Driver/AttributeReader.php Mapping/Driver/SimplifiedXmlDriver.php Mapping/ClassMetadataInfo.php Mapping/Builder/ClassMetadataBuilder.php Mapping/Builder/FieldBuilder.php Mapping/Builder/AssociationBuilder.php Mapping/Builder/ManyToManyAssociationBuilder.php Mapping/Builder/OneToManyAssociationBuilder.php Mapping/Builder/EntityListenerBuilder.php Mapping/Builder/EmbeddedBuilder.php Mapping/ClassMetadataFactory.php Mapping/MappingException.php Mapping/DefaultQuoteStrategy.php Mapping/ReflectionEnumProperty.php Mapping/UnderscoreNamingStrategy.php Mapping/DefaultNamingStrategy.php Mapping/AnsiQuoteStrategy.php Mapping/ReflectionEmbeddedProperty.php Mapping/Column.php Mapping/ReflectionReadonlyProperty.php Mapping/DefaultEntityListenerResolver.php Mapping/AssociationOverride.php Mapping/Exception/InvalidCustomGenerator.php Mapping/Exception/CannotGenerateIds.php Mapping/Exception/UnknownGeneratorType.php Mapping/InverseJoinColumn.php Mapping/JoinTable.php Mapping/ManyToMany.php Mapping/AttributeOverrides.php Mapping/OneToMany.php Mapping/OneToOne.php Mapping/AssociationOverrides.php Mapping/Index.php Mapping/Table.php Mapping/UniqueConstraint.php Mapping/DiscriminatorColumn.php Mapping/ManyToOne.php Mapping/SequenceGenerator.php Mapping/Cache.php Mapping/AttributeOverride.php Mapping/Entity.php Mapping/EntityListeners.php Mapping/ClassMetadata.php Mapping/GeneratedValue.php Mapping/OrderBy.php Mapping/ChangeTrackingPolicy.php Mapping/DiscriminatorMap.php Mapping/MappedSuperclass.php Mapping/InheritanceType.php Mapping/CustomIdGenerator.php Mapping/JoinColumn.php Mapping/Embedded.php Persisters/Entity/BasicEntityPersister.php Persisters/Entity/JoinedSubclassPersister.php Persisters/Entity/SingleTablePersister.php Persisters/Entity/AbstractEntityInheritancePersister.php Persisters/Entity/CachedPersisterContext.php Persisters/Collection/ManyToManyPersister.php Persisters/Collection/OneToManyPersister.php Persisters/Collection/AbstractCollectionPersister.php Persisters/SqlValueVisitor.php Persisters/SqlExpressionVisitor.php Persisters/Exception/UnrecognizedField.php Persisters/Exception/CantUseInOperatorOnCompositeKeys.php Persisters/Exception/InvalidOrientation.php Persisters/MatchingAssociationFieldRequiresObject.php Persisters/PersisterException.php Tools/Console/Command/ClearCache/CollectionRegionCommand.php Tools/Console/Command/ClearCache/EntityRegionCommand.php Tools/Console/Command/ClearCache/QueryRegionCommand.php Tools/Console/Command/ClearCache/MetadataCommand.php Tools/Console/Command/ClearCache/QueryCommand.php Tools/Console/Command/ClearCache/ResultCommand.php Tools/Console/Command/SchemaTool/DropCommand.php Tools/Console/Command/SchemaTool/UpdateCommand.php Tools/Console/Command/SchemaTool/CreateCommand.php Tools/Console/Command/SchemaTool/AbstractCommand.php Tools/Console/Command/MappingDescribeCommand.php Tools/Console/Command/RunDqlCommand.php Tools/Console/Command/ValidateSchemaCommand.php Tools/Console/Command/GenerateProxiesCommand.php Tools/Console/Command/InfoCommand.php Tools/Console/Command/AbstractEntityManagerCommand.php Tools/Console/ConsoleRunner.php Tools/Console/MetadataFilter.php Tools/Console/EntityManagerProvider/SingleManagerProvider.php Tools/Console/EntityManagerProvider/ConnectionFromManagerProvider.php Tools/Console/EntityManagerProvider/UnknownManagerException.php Tools/Pagination/LimitSubqueryOutputWalker.php Tools/Pagination/Paginator.php Tools/Pagination/LimitSubqueryWalker.php Tools/Pagination/WhereInWalker.php Tools/Pagination/CountOutputWalker.php Tools/Pagination/CountWalker.php Tools/Pagination/RowNumberOverFunction.php Tools/Pagination/Exception/RowNumberOverFunctionNotEnabled.php Tools/SchemaTool.php Tools/SchemaValidator.php Tools/DebugUnitOfWorkListener.php Tools/ResolveTargetEntityListener.php Tools/Event/GenerateSchemaTableEventArgs.php Tools/Event/GenerateSchemaEventArgs.php Tools/AttachEntityListenersListener.php Tools/Exception/MissingColumnException.php Tools/Exception/NotSupported.php Tools/ToolsException.php Cache/Persister/Entity/AbstractEntityPersister.php Cache/Persister/Entity/ReadWriteCachedEntityPersister.php Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersister.php Cache/Persister/Entity/ReadOnlyCachedEntityPersister.php Cache/Persister/Collection/AbstractCollectionPersister.php Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php Cache/Persister/Collection/NonStrictReadWriteCachedCollectionPersister.php Cache/Persister/Collection/ReadOnlyCachedCollectionPersister.php Cache/DefaultQueryCache.php Cache/Region/FileLockRegion.php Cache/Region/DefaultRegion.php Cache/Region/UpdateTimestampCache.php Cache/DefaultCache.php Cache/Logging/StatisticsCacheLogger.php Cache/Logging/CacheLoggerChain.php Cache/DefaultEntityHydrator.php Cache/DefaultCacheFactory.php Cache/DefaultCollectionHydrator.php Cache/RegionsConfiguration.php Cache/CacheConfiguration.php Cache/Exception/FeatureNotImplemented.php Cache/Exception/NonCacheableEntityAssociation.php Cache/Exception/NonCacheableEntity.php Cache/Exception/CannotUpdateReadOnlyEntity.php Cache/Exception/CannotUpdateReadOnlyCollection.php Cache/TimestampQueryCacheValidator.php Cache/EntityCacheEntry.php Cache/CollectionCacheKey.php Cache/AssociationCacheEntry.php Cache/EntityCacheKey.php Cache/QueryCacheKey.php Cache/QueryCacheEntry.php Cache/CollectionCacheEntry.php Cache/TimestampCacheEntry.php Cache/CacheException.php Cache/Lock.php Cache/TimestampCacheKey.php Cache/QueryCache.php UnitOfWork.php Internal/Hydration/ObjectHydrator.php Internal/Hydration/AbstractHydrator.php Internal/Hydration/ArrayHydrator.php Internal/Hydration/SimpleObjectHydrator.php Internal/Hydration/HydrationException.php Internal/Hydration/SingleScalarHydrator.php Internal/Hydration/ScalarHydrator.php Internal/Hydration/ScalarColumnHydrator.php Internal/CommitOrderCalculator.php Internal/HydrationCompleteHandler.php Internal/SQLResultCasing.php QueryBuilder.php AbstractQuery.php EntityManager.php PersistentCollection.php Query.php Configuration.php Event/ListenersInvoker.php Event/PreUpdateEventArgs.php Event/LifecycleEventArgs.php Event/OnClassMetadataNotFoundEventArgs.php Event/PostFlushEventArgs.php Event/OnClearEventArgs.php Event/OnFlushEventArgs.php Event/PreFlushEventArgs.php Event/LoadClassMetadataEventArgs.php Utility/PersisterHelper.php Utility/IdentifierFlattener.php Utility/HierarchyDiscriminatorResolver.php Proxy/ProxyFactory.php Decorator/EntityManagerDecorator.php ORMInvalidArgumentException.php EntityRepository.php ORMSetup.php Id/SequenceGenerator.php Id/AssignedGenerator.php Id/BigIntegerIdentityGenerator.php Id/IdentityGenerator.php Id/AbstractIdGenerator.php Exception/NotSupported.php Exception/MultipleSelectorsFoundException.php Exception/InvalidEntityRepository.php Exception/UnrecognizedIdentifierFields.php Exception/MissingMappingDriverImplementation.php Exception/MissingIdentifierField.php Exception/EntityMissingAssignedId.php Exception/MismatchedEventManager.php Exception/EntityManagerClosed.php Exception/UnexpectedAssociationValue.php Exception/InvalidHydrationMode.php LazyCriteriaCollection.php NativeQuery.php Repository/Exception/InvalidMagicMethodCall.php Repository/Exception/InvalidFindByCall.php Repository/DefaultRepositoryFactory.php OptimisticLockException.php EntityNotFoundException.php PessimisticLockException.php NonUniqueResultException.php TransactionRequiredException.php NoResultException.php

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -23,7 +23,7 @@
Loading
23 23
    /**
24 24
     * Converts a comparison expression into the target query language output.
25 25
     *
26 -
     * @return void
26 +
     * {@inheritDoc}
27 27
     */
28 28
    public function walkComparison(Comparison $comparison)
29 29
    {
@@ -32,35 +32,39 @@
Loading
32 32
        $operator = $comparison->getOperator();
33 33
34 34
        if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
35 -
            return;
35 +
            return null;
36 36
        } elseif ($operator === Comparison::NEQ && $value === null) {
37 -
            return;
37 +
            return null;
38 38
        }
39 39
40 40
        $this->values[] = $value;
41 41
        $this->types[]  = [$field, $value, $operator];
42 +
43 +
        return null;
42 44
    }
43 45
44 46
    /**
45 47
     * Converts a composite expression into the target query language output.
46 48
     *
47 -
     * @return void
49 +
     * {@inheritDoc}
48 50
     */
49 51
    public function walkCompositeExpression(CompositeExpression $expr)
50 52
    {
51 53
        foreach ($expr->getExpressionList() as $child) {
52 54
            $this->dispatch($child);
53 55
        }
56 +
57 +
        return null;
54 58
    }
55 59
56 60
    /**
57 61
     * Converts a value expression into the target query language part.
58 62
     *
59 -
     * @return void
63 +
     * {@inheritDoc}
60 64
     */
61 65
    public function walkValue(Value $value)
62 66
    {
63 -
        return;
67 +
        return null;
64 68
    }
65 69
66 70
    /**

@@ -48,8 +48,8 @@
Loading
48 48
    }
49 49
50 50
    /**
51 -
     * @param object                         $object
52 -
     * @param int|string|int[]|string[]|null $value
51 +
     * @param object                                                 $object
52 +
     * @param int|string|int[]|string[]|BackedEnum|BackedEnum[]|null $value
53 53
     */
54 54
    public function setValue(mixed $object, mixed $value = null): void
55 55
    {
@@ -66,8 +66,12 @@
Loading
66 66
        $this->originalReflectionProperty->setValue($object, $value);
67 67
    }
68 68
69 -
    private function initializeEnumValue(object $object, int|string $value): BackedEnum
69 +
    private function initializeEnumValue(object $object, int|string|BackedEnum $value): BackedEnum
70 70
    {
71 +
        if ($value instanceof BackedEnum) {
72 +
            return $value;
73 +
        }
74 +
71 75
        $enumType = $this->enumType;
72 76
73 77
        try {

@@ -317,14 +317,14 @@
Loading
317 317
                        break;
318 318
                    }
319 319
320 -
                    if ($value !== null && isset($cacheKeyInfo['enumType'])) {
321 -
                        $value = $this->buildEnum($value, $cacheKeyInfo['enumType']);
322 -
                    }
323 -
324 320
                    $rowData['data'][$dqlAlias][$fieldName] = $type
325 321
                        ? $type->convertToPHPValue($value, $this->_platform)
326 322
                        : $value;
327 323
324 +
                    if ($rowData['data'][$dqlAlias][$fieldName] !== null && isset($cacheKeyInfo['enumType'])) {
325 +
                        $rowData['data'][$dqlAlias][$fieldName] = $this->buildEnum($rowData['data'][$dqlAlias][$fieldName], $cacheKeyInfo['enumType']);
326 +
                    }
327 +
328 328
                    if ($cacheKeyInfo['isIdentifier'] && $value !== null) {
329 329
                        $id[$dqlAlias]                .= '|' . $value;
330 330
                        $nonemptyComponents[$dqlAlias] = true;

@@ -391,6 +391,8 @@
Loading
391 391
392 392
    /**
393 393
     * {@inheritdoc}
394 +
     *
395 +
     * @template TMaybeContained
394 396
     */
395 397
    public function contains($element): bool
396 398
    {

@@ -72,12 +72,11 @@
Loading
72 72
    }
73 73
74 74
    /**
75 -
     * Do an optimized search of an element
75 +
     * {@inheritDoc}
76 76
     *
77 -
     * @param object $element
78 -
     * @psalm-param TValue $element
77 +
     * Do an optimized search of an element
79 78
     *
80 -
     * @return bool
79 +
     * @template TMaybeContained
81 80
     */
82 81
    public function contains($element)
83 82
    {

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
lib/Doctrine/ORM +<.01% 89.69%
Project Totals (332 files) 89.69%
Loading