Craig Manley

Results 24 issues of Craig Manley

My dates and date-times are DateTimeImmutable objects. E.g. ```php // $cell_style = (new \OpenSpout\Common\Entity\Style\Style())->setFormat('dd/mm/yyyy'); $cell_style = null; $value = new \DateTimeImmutable('now'); $cell = \OpenSpout\Common\Entity\Cell::fromValue($value, $cell_style); $writer->addRow(new \OpenSpout\Common\Entity\Row([$cell])); ``` If I...

This dies with a TypeError: `(new \NumNum\UBL\Invoice())->setInvoiceTypeCode(\NumNum\UBL\InvoiceTypeCode::INVOICE)` for the reason explained in the subject.

The use of DateTime is often unnecessary and prevents the use of DateTimeImmutable objects which share the same interface.