Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Remove obsolete feature detection#51620

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:6.4fromderrabus:remove/fwb-detections
Sep 11, 2023

Conversation

derrabus
Copy link
Member

QA
Branch?6.4
Bug fix?no
New feature?no
Deprecations?no
TicketsN/A
LicenseMIT
Doc PRN/A

This PR removes some feature detection logic from theFrameworkExtension class that I could identify as obsolete.

I'll add some comments to the PR to elaborate why I think a piece of code can be removed.

@@ -227,11 +217,6 @@ public function load(array $configs, ContainerBuilder $container)
}

$loader->load('web.php');

if (!class_exists(BackedEnumValueResolver::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Added to symfony/http-kernel with#44831 (6.1). FrameworkBundle requires v6.4+

@@ -775,11 +760,6 @@ private function registerFormConfiguration(array $config, ContainerBuilder $cont
if (!ContainerBuilder::willBeAvailable('symfony/translation', Translator::class, ['symfony/framework-bundle', 'symfony/form'])) {
$container->removeDefinition('form.type_extension.upload.validator');
}
if (!method_exists(CachingFactoryDecorator::class, 'reset')) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Method was added in#30597 (Symfony 4.2)

@@ -1219,10 +1199,6 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
->replaceArgument(0, $config['default_uri']);
}

if (!class_exists(Psr4DirectoryLoader::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Added to symfony/routing with#47916 (6.2). FrameworkBundle requires v6.4+.

@@ -1688,10 +1664,6 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
if (!class_exists(ExpressionLanguage::class)) {
$container->removeDefinition('validator.expression_language');
}

if (!class_exists(WhenValidator::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Added to symfony/validator with#42593 (6.2). FrameworkBundle requires v6.4+.

@@ -1911,7 +1883,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
$container->removeDefinition('serializer.encoder.yaml');
}

if (!class_exists(UnwrappingDenormalizer::class) || !$this->isInitializedConfigEnabled('property_access')) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Class was added in#31390 (Symfony 5.1).

@@ -2370,10 +2336,6 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder

private function registerCacheConfiguration(array $config, ContainerBuilder $container): void
{
if (!class_exists(DefaultMarshaller::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Class exists since#27645 (Symfony 4.2).

->setPublic($pool['public'])
->addTag('cache.taggable', ['pool' => $name])
;

if (method_exists(TagAwareAdapter::class, 'setLogger')) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Method has been added in#40740 (Symfony 4.4).

@@ -2469,7 +2425,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
$container->setDefinition($name, $definition);
}

if (method_exists(PropertyAccessor::class, 'createCache')) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Method exists since#16838 (Symfony 3.2).

@@ -2514,20 +2470,16 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder
$this->registerRetryableHttpClient($retryOptions, 'http_client', $container);
}

if ($hasUriTemplate = class_exists(UriTemplateHttpClient::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Class was added to symfony/http-client with#49302 (6.3), FrameworkBundle requires 6.3+.

@@ -3021,10 +2971,6 @@ private function registerUidConfiguration(array $config, ContainerBuilder $conta
$container->getDefinition('name_based_uuid.factory')
->setArguments([$config['name_based_uuid_namespace']]);
}

if (!class_exists(UidValueResolver::class)) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Class was added to symfony/http-kernel with#44665 (6.1), FrameworkBundle requires 6.4+

@nicolas-grekas
Copy link
Member

Thank you@derrabus.

@nicolas-grekasnicolas-grekas merged commit8d2b79e intosymfony:6.4Sep 11, 2023
@derrabusderrabus deleted the remove/fwb-detections branchSeptember 11, 2023 16:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@derrabus@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp