vierge-noire / cakephp-fixture-factories

CakePHP Fixture Factories
https://vierge-noire.github.io/
MIT License
83 stars 21 forks source link

#165 Skip setters if required #166

Closed pabloelcolombiano closed 2 years ago

Erwane commented 2 years ago

My comment is in "pending" :/ It's about line 669 of DataCompiler. method setSkippedSetters()

Maybe this method should have a bool $merge = true param to allow overwrite or merge skipped setters. Like Cake\Core\InstanceConfigTrait::setConfig() (https://github.com/cakephp/cakephp/blob/9cb11c941566cae80a825889a2c007e1860abbd3/src/Core/InstanceConfigTrait.php#L44)

pabloelcolombiano commented 2 years ago

@Erwane thanks for the hint. This is now implemented. Let me know if this looks good enough for you.

Erwane commented 2 years ago

It's looks okay. I don't like mutable array (&$data) but it's working ;)

Thanks

pabloelcolombiano commented 2 years ago

Good catch, this was a rest of an early implementation. Fixed, merging this.

Erwane commented 2 years ago

Thanks :+1: