-
Notifications
You must be signed in to change notification settings - Fork 6
Home
CakeDto plugin | branch | CakePHP core | PHP min |
---|---|---|---|
0.x [EOL] | cake3 | 3.x | PHP 5.6 |
1.x | cake4 | 4.x | PHP 7.2 |
2.x | master | 5.x | PHP 8.1 |
- Provide a PHP generic lib, and this as wrapper around it for CakePHP? (
dereuromark/dto
as Dto anddereuromark/cakephp-dto
CakeDto) - When PHP 7.4 introduces typed properties, we can remove the doc blocks and type the properties with the new, built-in syntax.
Open Prio High to finalize:
- Make toArray() and fromArray() work with complex collections (and count > 0)
- Add tests for validation
- Implement serialize() deserialize() methods (using Json as intermediate?) for deep and complex arrays/objects
Do we need to split the Builder more cleanly? into parsing and validation? also, the building could be done with a stack of parsers, to have a more clear way of processing.
Do we want to use DTOs or some objects instead of arrays inside Builder?
Definitions DTO => Definition DTO collection
Would make it a lot cleaner IMO if those would come in from the parse() result.
Right now only array
is allowed and is a not collection itself
Do we semantically make a difference here?
-
array
=> no collection/list, but simple setter/getter (nullable) -
[]
is a collection/list with adding etc (not nullable) - but e.g.int[]
also isnt right now..
mixed[]
would still not be allowed for consistency reasons (as it is the same as array
or []
) respectively.
should we remove the interface for immutable? not really true as non-static method (clones anyway).
you can see from the shell setup, that Cake really is missing some factory or DI system manually creating them on the fly inside communication layer is just annoying. not sure what we could do here.