Skip to content

Commit

Permalink
Added deprecation warnings to the core package
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum authored and markstory committed Nov 11, 2017
1 parent b19018c commit 53cac1b
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 90 deletions.
5 changes: 5 additions & 0 deletions src/Core/InstanceConfigTrait.php
Expand Up @@ -175,6 +175,11 @@ public function getConfig($key = null, $default = null)
*/
public function config($key = null, $value = null, $merge = true)
{
deprecationWarning(
'InstanceConfigTrait::config() is deprecated. ' .
'Use setConfig()/getConfig() instead.'
);

if (is_array($key) || func_num_args() >= 2) {
return $this->setConfig($key, $value, $merge);
}
Expand Down
10 changes: 10 additions & 0 deletions src/Core/StaticConfigTrait.php
Expand Up @@ -163,6 +163,11 @@ public static function getConfig($key)
*/
public static function config($key, $config = null)
{
deprecationWarning(
'StaticConfigTrait::config() is deprecated. ' .
'Use setConfig()/getConfig() instead.'
);

if ($config !== null || is_array($key)) {
static::setConfig($key, $config);

Expand Down Expand Up @@ -362,6 +367,11 @@ public static function getDsnClassMap()
*/
public static function dsnClassMap(array $map = null)
{
deprecationWarning(
'StaticConfigTrait::setDsnClassMap() is deprecated. ' .
'Use setDsnClassMap()/getDsnClassMap() instead.'
);

if ($map !== null) {
static::setDsnClassMap($map);
}
Expand Down

0 comments on commit 53cac1b

Please sign in to comment.