Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SecurityBundle] also deprecate the internal rate limiter factory alias #60893

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 24, 2025

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT


$internalAliasId = \sprintf('.%s $%s.limiter', RateLimiterFactory::class, $name);

if ($container->hasAlias($internalAliasId)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerAliasForArgument() can register a second alias (that's what I call "internal alias" here):

if ($parsedName !== $name) {
$this->setAlias('.'.$type.' $'.$name, $type.' $'.$parsedName);
}

@alexandre-daubois
Copy link
Member

Actually should we deprecate it? If it is internal, just like @internal classes, I'm not sure we should do it?

@xabbuh
Copy link
Member Author

xabbuh commented Jun 25, 2025

not sure if we can bypass the deprecation here then in a good way:

if (!$referencingDefinition->isDeprecated()) {
$deprecation = $alias->getDeprecation($id);
trigger_deprecation($deprecation['package'], $deprecation['version'], rtrim($deprecation['message'], '. ').'. It is being referenced by the "%s" '.($container->hasDefinition($this->currentId) ? 'service.' : 'alias.'), $this->currentId);
}

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit f5390df into symfony:7.4 Jun 26, 2025
16 of 17 checks passed
@xabbuh xabbuh deleted the pr-60874 branch June 26, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants