cakephp/cakephp — pull request #3939 by lorenzo (2014-07-10 21:21:39+00:00)
Title: 3.0 - unify options for newEntity() and save()

As the first step for https://github.com/cakephp/cakephp/issues/3831, I unified the options array accepted by both newEntity and save. This helps keep your controllers DRY

Before:

```php
$entity = $this->Articles->newEntity($data, ['Author', 'Comments']);
$this->Articles->save($entity, ['validate' => 'custom', 'associated' => ['Author', 'Comments']])
```

Now:

```php
$options = ['validate' => 'custom', 'associated' => ['Author', 'Comments']];
$entity = $this->Articles->newEntity($data, $options);
$this->Articles->save($entity, $options);
```

More importantly, this opens the way for passing more options to the marshaller, like the list of fields to marshal, for instance.