Skip to content

Commit

Permalink
Merge pull request #17 from robbieaverill/pulls/1.0/user-warning-on-c…
Browse files Browse the repository at this point in the history
…onfig-update

API Throw user warning when using Config::inst()->update()
  • Loading branch information
Damian Mooyman committed Jul 17, 2017
2 parents d49acbc + aa25663 commit a0b4b8a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Collections/CachedConfigCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,15 @@ public function setMiddlewares($middlewares)
"Please apply middleware to collection factory via setCollectionCreator()"
);
}

/**
* @deprecated 4.0...5.0 Please use YAML configuration, ::modify()->set() or ::modify()->merge()
* @throws BadMethodCallException
*/
public function update($class, $name, $value)
{
throw new BadMethodCallException(
'Config::inst()->update() is deprecated. Please use YAML configuration, Config::modify()->merge() or ->set()'
);
}
}

0 comments on commit a0b4b8a

Please sign in to comment.