flack

Results 60 comments of flack

> Because it actively hurts debugging Well, in my case, it helps debugging, because without it `var_dump($entity)` takes 1-2 minutes and 100s of MB of memory (I use `__debugInfo` to...

> Debugging is done with a debugger, not by introducing echoing statements in your code. Sure, why not. The way I actually discovered this memory usage issue was because after...

Yeah, the less layers, the better, I definitely agree with that. But just to circle back to my original problem: I have code roughly equivalent to this: ```php function show_name($entity)...

What do you guys think about having `ProxyGenerator` create a `__debugInfo` function like this: ```php public function __debugInfo() { if (!$this->__isInitialized()) { return array_keys(get_object_vars($this)); // or maybe just hardcode what...

OK, fine. But currently Doctrine generates code that throws an Exception in a place where PHP simply does not allow/support throwing exceptions. That needs to be addressed somehow

> It throws an exception for invalid proxy references, because of the __debugInfo() side-effect. > That is still a smaller side-effect than shadowing the entire structure: it's an acceptable trade-off,...

So I did a bit of code archaeology, it seems I added the datetime code in 2014 to an already existing event listener which translates ENUM fields from legacy databases....

nothing fancy, really. I sets the type to string and saves the original type information in the comment field: ```php public function onSchemaColumnDefinition(SchemaColumnDefinitionEventArgs $args) { $column = array_change_key_case($args->getTableColumn(), CASE_LOWER); $type...

just chiming in to say I've hit the same issue. If I instantiate `Comparator` without passing `$platform`, the diff comes back empty, otherwise I get a `ColumDiff` for every column...

@morozov it's quite old, but you think something like this could be a viable approach for creating a reproducer script? https://github.com/doctrine/orm/pull/6487