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] Remove v:switch and v:case #1003

Merged
merged 1 commit into from
Mar 24, 2016
Merged

[TASK] Remove v:switch and v:case #1003

merged 1 commit into from
Mar 24, 2016

Conversation

NamelessCoder
Copy link
Member

This removes the two now redundant ViewHelpers - every supported TYPO3 version now contains proper Switch/Case ViewHelpers.

To migrate:

  • Identify all templates containing v:switch
  • Replace v:switch with f:switch
  • Use expression argument on f:switch (the value argument does not exist there)
  • Remove as argument (undocumented, no substitution)
  • Replace v:case with f:case
  • Special: if v:case with case="default" exists - replace with default="1" on f:case (or f:defaultCase without arguments if your minimum core version is TYPO3v8 and up)
  • Use value argument on f:case (the case argument does not exist there)

@cedricziel
Copy link
Member

That woul mean vhs 3.0 - is there anything we can release upfront?

@NamelessCoder
Copy link
Member Author

That is exactly what that would mean :)

We can make a bugfix release for 2.4.1 if necessary.

@NamelessCoder
Copy link
Member Author

We could also make class aliases. I'll do that!

@cedricziel
Copy link
Member

Alright - great idea!

@cedricziel
Copy link
Member

Are they 100% compatible argument-wise?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 56.059% when pulling 97c9174 on NamelessCoder:removeswitch into d4804a7 on FluidTYPO3:development.

@NamelessCoder
Copy link
Member Author

Are they 100% compatible argument-wise?

Hmm, now that you mention it... they're not. We do have to remove these without aliases, and the migration description needs to include argument differences.

@cedricziel
Copy link
Member

Agreed. :)

This removes the two now redundant ViewHelpers - every supported TYPO3 version now contains proper Switch/Case ViewHelpers.

To migrate:

* Identify all templates containing `v:switch`
* Replace `v:switch` with `f:switch`
* Use `expression` argument on `f:switch` (the `value` argument does not exist there)
* Remove `as` argument (undocumented, no substitution)
* Replace `v:case` with `f:case`
* Special: if `v:case` with `case="default"` exists - replace with `default="1"` on `f:case` (or `f:defaultCase` without arguments if your minimum core version is TYPO3v8 and up)
* Use `value` argument on `f:case` (the `case` argument does not exist there)
@bjo3rnf bjo3rnf merged commit 02f16a3 into FluidTYPO3:development Mar 24, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 56.059% when pulling de54975 on NamelessCoder:removeswitch into d4804a7 on FluidTYPO3:development.

@TheNaderio
Copy link
Contributor

Someone shold mark the v:switch as DEPRECATED in the viewhelper reference at:
https://fluidtypo3.org/viewhelpers/vhs/master/SwitchViewHelper.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants