After figuring out some curious MySQL error message, I found that something goes wrong for boolean values FALSE, when inserting with insertAsDict in Phalcon 4.0.4. This worked fine in Phalcon 3.4 (and earlier).
CREATE TABLE `test_bool` (
  `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,  
  `test` boolean NOT NULL
) ENGINE='InnoDB';
This goes fine:
        $data = ['id' => null, 'test' => true];
        $this->db->insertAsDict('test_bool', $data);
The following gives error message: PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column some_database.test_bool.test at row 1
        $data = ['id' => null, 'test' => false];
        $this->db->insertAsDict('test_bool', $data);
This goes without error too, but the (int) makes the code messy:
        $data = ['id' => null, 'test' => (int)false];
        $this->db->insertAsDict('test_bool', $data);
I see this as a bug.