Craig Francis

Results 76 comments of Craig Francis

My PR to fix the `Expr::countDistinct()` arguments has been accepted & merged for Doctrine ORM 3.0. But 3.0 doesen't seem to have an expected release date. There are "what to...

Thanks, have commented out those tests. The failing tests are for PHP 8.2, which seems to be affecting main as well... and I did re-create the patch, as I made...

The [isNotNull()](https://github.com/doctrine/orm/blob/856c3143f8c45028c80d338183e2ebe0822cf6e9/lib/Doctrine/ORM/Query/Expr.php#L509) method is very simple in what it does: ```php /** * Creates an IS NOT NULL expression with the given arguments. * * @param string $x Field in...

@ondrejmirtes; Am I going in the right direction with [this patch](https://github.com/phpstan/phpstan-doctrine/compare/master...craigfrancis:issue-294)? Not sure if I sure if I should be returning an `IntersectionType` like this (got it from [ConstantStringType](https://github.com/phpstan/phpstan-src/blob/69095c795d29867001ec5d1b6fafe87bf1a1b1d2/src/Type/Constant/ConstantStringType.php#L330)). And...

Thanks @ondrejmirtes; I've been thinking about this a lot, and because these functions return DQL (like SQL), I'm fairly sure their inputs should be checked as `literal-string`'s, so errors can...

Both certainly work, and I'm happy to do either, I'm just thinking about how easy it would be to find/fix issues (something Dan Ackroyd is quite passionate about). Please forgive...

Thanks @ondrejmirtes, that's fair, and [Dan](https://twitter.com/MrDanack/status/1499399692412592144) is "Not interested", so I'll complete my patch with some tests (might be a couple of days, due to work things).

I've added some tests, but I'm not completely sure about this yet (thoughts welcome), because these functions can also accept stringable objects. I can't think of any realistic examples at...

With the unit tests, `QueryBuilderDqlRuleSlowTest` and `QueryBuilderDqlRuleTest`, they use [qbExprIsNull](https://github.com/phpstan/phpstan-doctrine/blob/master/tests/Rules/Doctrine/ORM/data/query-builder-dql.php#L203) and [qbExprIsNullSyntaxError](https://github.com/phpstan/phpstan-doctrine/blob/master/tests/Rules/Doctrine/ORM/data/query-builder-dql.php#L215), which use `isNull()`, and now report "Could not analyse QueryBuilder with dynamic arguments". Should I try to bypass...

Good point, the PHP implementation from Joe Watkins treats `\stdClass::class` as a literal: ```php var_dump(is_literal(\stdClass::class)); // true class example { } $e = new example(); var_dump(is_literal(example::class)); // true var_dump(is_literal($e::class)); //...