Skip to content

Commit

Permalink
check for getDeprecation not definition...
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Apr 2, 2020
1 parent 7af6e60 commit 0c0cefa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .docker
Submodule .docker added at 795b0f
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule ".docker"]
path = .docker
url = https://github.com/jrushlow/docker-symfony
8 changes: 4 additions & 4 deletions DependencyInjection/Configuration.php
Expand Up @@ -695,15 +695,15 @@ private function getAutoGenerateModes() : array
* Returns the correct deprecation param's as an array for setDeprecated.
*
* Symfony/Config v5.1 introduces a deprecation notice when calling
* setDeprecation() with less than 3 args and the getDefinition method was
* introduced at the same time. By checking if getDefinition() exists,
* setDeprecation() with less than 3 args and the getDeprecation method was
* introduced at the same time. By checking if getDeprecation() exists,
* we can determine the correct param count to use when calling setDeprecated.
*/
private function getCommentedParamDeprecationMsg() : array
{
$msg = 'The doctrine-bundle type commenting features removed; the corresponding config parameter was deprecated in 2.0 and will be dropped in 3.0.';
$msg = 'The doctrine-bundle type commenting features were removed; the corresponding config parameter was deprecated in 2.0 and will be dropped in 3.0.';

if (method_exists(BaseNode::class, 'getDefinition')) {
if (method_exists(BaseNode::class, 'getDeprecation')) {
return [
'doctrine/doctrine-bundle',
'2.0',
Expand Down

0 comments on commit 0c0cefa

Please sign in to comment.