types
types copied to clipboard
Missing data types for PHP. Highly extendable.
What i did: ```php $data = [ 'quantity' => Quantity::from(5) ]; debug(json_encode($data)); ``` Expected result: ```json { "quantity": 5 } ``` Actual result: ```json { "quantity": {} } ```
Extract values should be also possile from objects implementing ArrayAccess. BC break: No New feature: Yes If you implement own collection or you want to extract values maybe from \Nette\Database\IRow....
Tohle nema task na jolande, ale prislo mi to fajn udelat. Nemění to funkcionalitu, jen změna datovych typu / checku tak, aby lip fungoval autocomplete a diagnostika nehlasila blbosti.