Skip to content

Commit

Permalink
Merge branch '1' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Mar 30, 2023
2 parents 6096fde + 511aef2 commit 245c930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"psr/simple-cache": "^3.0.0"
},
"require-dev": {
"silverstripe/framework": "^5",
"phpunit/phpunit": "^9.5",
"mikey179/vfsstream": "^1.6",
"squizlabs/php_codesniffer": "^3.7"
Expand All @@ -21,4 +20,4 @@
"SilverStripe\\Config\\Tests\\": "tests/"
}
}
}
}
6 changes: 5 additions & 1 deletion src/Collections/MemoryConfigCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ public function checkForDeprecatedConfig($class, $name): void
$deprecated = $this->getClassConfig('__deprecated', true);
$data = $deprecated['config'][strtolower($class)][$name] ?? [];
if (!empty($data)) {
Deprecation::notice($data['version'], $data['message'], Deprecation::SCOPE_CONFIG);
if (class_exists(Deprecation::class)) {
Deprecation::notice($data['version'], $data['message'], Deprecation::SCOPE_CONFIG);
} else {
user_error($data['message'], E_USER_DEPRECATED);
}
}
}

Expand Down

0 comments on commit 245c930

Please sign in to comment.