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

Commit707e52a

Browse files
minor#28037 [Form] fix truncating form views in data collector (nicolas-grekas)
This PR was merged into the 3.4 branch.Discussion----------[Form] fix truncating form views in data collector| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no (fixing a non released patch)| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -Fixes#27923.Commits-------5fa1f12 [Form] fix truncating form views in data collector
2 parentsad31667 +5fa1f12 commit707e52a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

‎src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
useSymfony\Component\Validator\ConstraintViolationInterface;
2020
useSymfony\Component\VarDumper\Caster\Caster;
2121
useSymfony\Component\VarDumper\Caster\ClassStub;
22+
useSymfony\Component\VarDumper\Caster\StubCaster;
2223
useSymfony\Component\VarDumper\Cloner\Stub;
2324

2425
/**
@@ -262,6 +263,7 @@ protected function getCasters()
262263
Caster::PREFIX_VIRTUAL.'type_class' =>newClassStub(get_class($f->getConfig()->getType()->getInnerType())),
263264
);
264265
},
266+
FormView::class =>array(StubCaster::class,'cutInternals'),
265267
ConstraintViolationInterface::class =>function (ConstraintViolationInterface$v,array$a) {
266268
returnarray(
267269
Caster::PREFIX_VIRTUAL.'root' =>$v->getRoot(),

‎src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
useSymfony\Component\Form\FormView;
1616
useSymfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
1717
useSymfony\Component\Validator\ConstraintViolationInterface;
18-
useSymfony\Component\VarDumper\Caster\CutStub;
1918

2019
/**
2120
* Default implementation of {@link FormDataExtractorInterface}.
@@ -156,10 +155,6 @@ public function extractViewVariables(FormView $view)
156155
);
157156

158157
foreach ($view->varsas$varName =>$value) {
159-
// Removing redundant variable from view variables
160-
if ('form' ===$varName) {
161-
$value =newCutStub($value);
162-
}
163158
$data['view_vars'][$varName] =$value;
164159
}
165160

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp