Welcome Guest, Not a member yet? Register   Sign In
Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement)
#13

(01-21-2020, 07:39 AM)kilishan Wrote: As for type hints and Entities, in my experience things have a tendency to come out of the database as a string, which is what makes casting and mutations helpful.

That's why I would use the Reflector Class to get the type of a property. Currently you have to use a string based workaround to cast columns to specific types AND tell your IDEin a Docblock what type a property really is.
7.4 could help there and make the usage of Models & Entities a bit more intuitive
Reply


Messages In This Thread
RE: Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement) - by fabsn182 - 01-22-2020, 03:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB