The reason is that in Yii2, attributes are treated UNSAFE by default for massive assignment. Yii by default sets the attribute to safe, if you have at least one validation model rule defined.
The solution is for you to define the attributes you want safe by using scenarios. OR you need to do implicitly set your attributes as safe:
public function rules()
{
return [
[['name', 'attrib1', 'attrib2'], 'safe'], // set all attribs you want as safe
];
}