Skip to content
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

[TASK] Fix invalid FlexForm code samples #164

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,43 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition('Migrate email flag to email type', [new CodeSample(
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<email_field>
<label>Email</label>
<config>
<type>input</type>
<eval>trim,email</eval>
<max>255</max>
</config>
</email_field>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<email_field>
<config>
<type>input</type>
<eval>trim,email</eval>
<max>255</max>
</config>
</email_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<email_field>
<label>Email</label>
<config>
<type>email</type>
</config>
</email_field>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<email_field>
<config>
<type>email</type>
</config>
</email_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
)]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,60 @@ public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Migrate eval int and double2 to type number', [new CodeSample(
<<<'CODE_SAMPLE'
<int_field>
<label>int field</label>
<config>
<type>input</type>
<eval>int</eval>
</config>
</int_field>
<double2_field>
<label>double2 field</label>
<config>
<type>input</type>
<eval>double2</eval>
</config>
</double2_field>
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<int_field>
<label>int field</label>
<config>
<type>input</type>
<eval>int</eval>
</config>
</int_field>
<double2_field>
<label>double2 field</label>
<config>
<type>input</type>
<eval>double2</eval>
</config>
</double2_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
<int_field>
<label>int field</label>
<config>
<type>number</type>
</config>
</int_field>
<double2_field>
<label>double2 field</label>
<config>
<type>number</type>
<format>decimal</format>
</config>
</double2_field>
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<int_field>
<label>int field</label>
<config>
<type>number</type>
</config>
</int_field>
<double2_field>
<label>double2 field</label>
<config>
<type>number</type>
<format>decimal</format>
</config>
</double2_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
)]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,36 +63,42 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition('Migrates TCA internal_type into new new TCA type folder', [new CodeSample(
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<label>aFlexFieldLabel</label>
<config>
<type>group</type>
<internal_type>folder</internal_type>
</config>
</aFlexField>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<aColumn>
<config>
<type>group</type>
<internal_type>folder</internal_type>
</config>
</aColumn>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<label>aFlexFieldLabel</label>
<config>
<type>folder</type>
</config>
</aFlexField>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<aColumn>
<config>
<type>folder</type>
</config>
</aColumn>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
)]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,35 +93,41 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition('Migrate null flag', [new CodeSample(
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<label>aFlexFieldLabel</label>
<config>
<eval>null</eval>
</config>
</aFlexField>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<config>
<eval>null</eval>
</config>
</aFlexField>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<label>aFlexFieldLabel</label>
<config>
<nullable>true</nullable>
</config>
</aFlexField>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<aFlexField>
<config>
<nullable>true</nullable>
</config>
</aFlexField>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
)]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,50 +104,54 @@ public function getRuleDefinition(): RuleDefinition
return new RuleDefinition('Migrate password and salted password to password type', [new CodeSample(
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<password_field>
<label>Password</label>
<config>
<type>input</type>
<eval>trim,password,saltedPassword</eval>
</config>
</password_field>
<another_password_field>
<label>Password</label>
<config>
<type>input</type>
<eval>trim,password</eval>
</config>
</another_password_field>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<password_field>
<config>
<type>input</type>
<eval>trim,password,saltedPassword</eval>
</config>
</password_field>
<another_password_field>
<config>
<type>input</type>
<eval>trim,password</eval>
</config>
</another_password_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
,
<<<'CODE_SAMPLE'
<T3DataStructure>
<ROOT>
<sheetTitle>aTitle</sheetTitle>
<type>array</type>
<el>
<password_field>
<label>Password</label>
<config>
<type>password</type>
</config>
</password_field>
<another_password_field>
<label>Password</label>
<config>
<type>password</type>
<hashed>false</hashed>
</config>
</another_password_field>
</el>
</ROOT>
<sheets>
<sDEF>
<ROOT>
<sheetTitle>Sheet Title</sheetTitle>
<type>array</type>
<el>
<password_field>
<config>
<type>password</type>
</config>
</password_field>
<another_password_field>
<config>
<type>password</type>
<hashed>false</hashed>
</config>
</another_password_field>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
CODE_SAMPLE
)]);
Expand Down
Loading