Skip to content

Conversation

@WerySkok
Copy link
Member

А вы знали, что правильное расширение для шаблонов — .latte? И я не знал, а оказалось, что только с таким расширением работает latte-lint, который должен помочь перейти на Latte 3.

Очевидно, это изменение должно работать в тандеме с изменениями в Chandler, потому это пока WIP. Тем временем можно оценить работу линтера (проблем не так много, как оказалось!)

Latte linter
------------
Scanning /opt/openvk/Web/Presenters/templates/
[ERROR]      /opt/openvk/Web/Presenters/templates/About/Tour.latte:10    Unknown tag {css} (on line 10)
[ERROR]      /opt/openvk/Web/Presenters/templates/About/Index.latte:9    Unknown tag {presenter} (on line 9)
[ERROR]      /opt/openvk/Web/Presenters/templates/_includeCSS.latte:3    Unknown tag {css} (on line 3)
[ERROR]      /opt/openvk/Web/Presenters/templates/Notes/Create.latte:23    Unknown tag {script} (on line 23)
[ERROR]      /opt/openvk/Web/Presenters/templates/Notes/Edit.latte:29    Unknown tag {script} (on line 29)
[ERROR]      /opt/openvk/Web/Presenters/templates/@layout.latte:15    Unknown tag {script} (on line 15)
[ERROR]      /opt/openvk/Web/Presenters/templates/components/attachment.latte:45    Unknown tag {presenter} (on line 45)
[ERROR]      /opt/openvk/Web/Presenters/templates/Group/View.latte:121    Unknown tag {presenter} (on line 121)
[ERROR]      /opt/openvk/Web/Presenters/templates/Group/Statistics.latte:23    Unknown tag {script} (on line 23)
[ERROR]      /opt/openvk/Web/Presenters/templates/Wall/HashtagFeed.latte:21    Unknown tag {script} (on line 21)
[ERROR]      /opt/openvk/Web/Presenters/templates/Apps/Play.latte:39    Unknown tag {script} (on line 39)
[ERROR]      /opt/openvk/Web/Presenters/templates/Audio/Embed.latte:9    Unknown tag {css} (on line 9)
[DEPRECATED] /opt/openvk/Web/Presenters/templates/Report/List.latte:2    Inside tag {var iterator = iterator_to_array($reports)} should be 'iterator' replaced with '$iterator' (on line 2)
[DEPRECATED] /opt/openvk/Web/Presenters/templates/Report/List.latte:3    Inside tag {var page     = $paginatorConf->page} should be 'page' replaced with '$page' (on line 3)
[DEPRECATED] /opt/openvk/Web/Presenters/templates/Report/List.latte:4    Inside tag {var table_body_id = "reports"} should be 'table_body_id' replaced with '$table_body_id' (on line 4)
[ERROR]      /opt/openvk/Web/Presenters/templates/Messenger/App.latte:62    Unknown tag {script} (on line 62)
[DEPRECATED] /opt/openvk/Web/Presenters/templates/Videos/View.latte:86    Inside tag {var canReport = true} should be 'canReport' replaced with '$canReport' (on line 86)
[ERROR]      /opt/openvk/Web/Presenters/templates/VKAPI/OAuthLogin.latte:149    Unknown tag {script} (on line 149)
[ERROR]      /opt/openvk/Web/Presenters/templates/User/View.latte:663    Unknown tag {presenter} (on line 663)
[ERROR]      /opt/openvk/Web/Presenters/templates/User/Settings.latte:443    Unknown tag {presenter} (on line 443)
[ERROR]      /opt/openvk/Web/Presenters/templates/Admin/@layout.latte:321    Unknown tag {script} (on line 321)
[ERROR]      /opt/openvk/Web/Presenters/templates/Poll/PollResults.latte:5    Unknown tag {script} (on line 5)
[ERROR]      /opt/openvk/Web/Presenters/templates/Poll/Poll.latte:5    Unknown tag {script} (on line 5)
Done.

@WerySkok
Copy link
Member Author

Если хочется проверить, смотрите эту ветку. Пока могу сказать, что прогресс неплохой, но у меня на пути встало использование переменной $GLOBALS, которое было запрещено в Latte. К сожалению, я не знаю, чем их можно заменить.

Scanning .
[ERROR]      ./extensions/available/openvk/Web/Presenters/templates/About/Tour.latte:414:66    Unexpected '</p></td>
' (on line 414 at column 66)
[ERROR]      ./extensions/available/openvk/Web/Presenters/templates/components/post/oldpost.latte:76:40    Forbidden variable $GLOBALS (on line 76 at column 40)
[ERROR]      ./extensions/available/openvk/Web/Presenters/templates/components/post/microblogpost.latte:79:40    Forbidden variable $GLOBALS (on line 79 at column 40)
[ERROR]      ./extensions/available/openvk/Web/Presenters/templates/components/attachment.latte:59:9    Forbidden variable $GLOBALS (on line 59 at column 9)
Done (checked 194 files, found errors in 4)   

@WerySkok
Copy link
Member Author

В это время прилетел Latte 3.1...
изображение

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.

2 participants