New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add missing trigger_deprecation calls to deprecated classes, methods #2265
Open
DominicLuidold
wants to merge
9
commits into
nelmio:master
Choose a base branch
from
DominicLuidold:trigger-deprecation-calls
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix: Add missing trigger_deprecation calls to deprecated classes, methods #2265
DominicLuidold
wants to merge
9
commits into
nelmio:master
from
DominicLuidold:trigger-deprecation-calls
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DominicLuidold
commented
Apr 13, 2024
DominicLuidold
force-pushed
the
trigger-deprecation-calls
branch
from
April 13, 2024 15:23
1c83c97
to
ce09829
Compare
DominicLuidold
changed the title
chore: Add missing trigger_deprecation calls to deprecated classes, methods
fix: Add missing trigger_deprecation calls to deprecated classes, methods
Apr 13, 2024
DjordyKoert
requested changes
Apr 15, 2024
DominicLuidold
force-pushed
the
trigger-deprecation-calls
branch
from
April 18, 2024 21:12
ce09829
to
aa51929
Compare
DjordyKoert
requested changes
Apr 20, 2024
Comment on lines
+30
to
+44
if (null === $schema) { | ||
trigger_deprecation( | ||
'nelmio/api-doc-bundle', | ||
'4.15.0', | ||
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable', | ||
); | ||
} | ||
|
||
if (null !== $groups) { | ||
trigger_deprecation( | ||
'nelmio/api-doc-bundle', | ||
'4.17.0', | ||
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']', | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this way of checking the parameter be better for triggering deprecations?
Suggested change
if (null === $schema) { | |
trigger_deprecation( | |
'nelmio/api-doc-bundle', | |
'4.15.0', | |
'Passing null for the $schema parameter of "PropertyDescriberInterface::describe()" is deprecated. In future versions, the $schema parameter will be made non-nullable', | |
); | |
} | |
if (null !== $groups) { | |
trigger_deprecation( | |
'nelmio/api-doc-bundle', | |
'4.17.0', | |
'Using the $groups parameter of "PropertyDescriberInterface::describe()" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\']', | |
); | |
} | |
if (null !== $groups || func_num_args() >= 3) { | |
trigger_deprecation( | |
'nelmio/api-doc-bundle', | |
'4.17.0', | |
'Using the $groups parameter of "%s" is deprecated and will be removed in a future version. Pass groups via $context[\'groups\'].', __METHOD__ | |
); | |
} | |
if (\func_num_args() < 4 || null === $schema) { | |
trigger_deprecation( | |
'nelmio/api-doc-bundle', | |
'4.15.0', | |
'The "%s()" method will have a new "OA\Schema $schema" arument not defining it is deprecated.', __METHOD__ | |
); | |
$schema = null; | |
} else { | |
$schema = func_get_arg(3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds missing deprecation triggers to classes and methods that have been deprecated with a
@deprecated
annotation.