propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 399 forks source link

[DRAFT] Added strict types in generated code #1887

Closed geega closed 2 years ago

dereuromark commented 2 years ago

Can you please clarify the closing? Regarding all changes?

dereuromark commented 2 years ago

In this case: Closed in favor of https://github.com/propelorm/Propel2/pull/1888

geega commented 2 years ago

@dereuromark This is my draft PR. A lot of issues with tests. I reverted some changes but not helped. So, I moved some changes into another PR for simple checks and testing. https://github.com/propelorm/Propel2/pull/1888 test passed. I tried to add some type-hint for getters and setters. But. I can't resolve all issues. It takes a lot of time to study the tests Because sometimes our setters or getters returned DateTime object or string and a lot of tests filed. Maybe when PHP can support union types like `string | DateTime' it will be easier.