Skip to content

fix(user, composer): removing martial status, dependencies (fixes #1587)#1590

Open
MrKrasnov wants to merge 13 commits into
OpenVK:masterfrom
MrKrasnov:dev-1587
Open

fix(user, composer): removing martial status, dependencies (fixes #1587)#1590
MrKrasnov wants to merge 13 commits into
OpenVK:masterfrom
MrKrasnov:dev-1587

Conversation

@MrKrasnov
Copy link
Copy Markdown

@MrKrasnov MrKrasnov commented May 17, 2026

feat(cli): generating users

og content

#1587

additional:
FIX incorrect php version for composer.json We use php 8.2
Added CLI command for generate test users
Changed placeholder for edit marital status

Copy link
Copy Markdown
Member

@veselcraft veselcraft left a comment

Choose a reason for hiding this comment

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

ощущение что это навайбкожено

Comment thread CLI/GenerateUsersCommand.php
Comment thread locales/by_lat.strings Outdated
"your_email_address" = "Adras Vašaj elektronaj pošty";
"your_page_address" = "Adras Vašaj staronki";
"page_address" = "Adras staronki";
"marital_status_user_id" = "ID karystálnika";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

не трогайте плиз локали на языках которых вы не разговариваете. этим занимаются переводчики

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Мне писать все в латиницу или вообще не писать ключи на другие strings ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Все языки фолбэчатся на русский или английский. Как следствие, русского и английского достаточно

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

исчерпывающий ответ @WerySkok

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Web/Presenters/UserPresenter.php
Comment on lines +128 to +129
<input type="text" placeholder="{_marital_status_user_id}" name="maritalstatus-user"
n:attr="value => $user->getMaritalStatusUser() ? ltrim($user->getMaritalStatusUser()->getURL(), '/') : ''" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

вместо того, чтобы городить костыли с ltrim, можно было создать в объекте User отдельную функцию для screenname

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

В корне не согласен. Для показа чего либо во вьюхе совсем не повод захломлять методами и без того большую модель. Модель в целом должна использоваться для возрата данных в данном случае а стилизация текста это задача самой вьюхи.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Исключением может быть yii2 😭

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Блин 1822 строчки, его бы декомпозировать как-то по хорошему
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Рефакторы только после тестов, пожалуйста

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

В корне не согласен. Для показа чего либо во вьюхе совсем не повод захломлять методами и без того большую модель. Модель в целом должна использоваться для возрата данных в данном случае а стилизация текста это задача самой вьюхи.

Остаюсь на своём - это костыли. В API используется (увы) один уже такой связанный со screen_name (он просто повторяет функцию, без /), и вот ещё один тут. Но вот для отдельной ф-ции я погорячился, можно прост добавить отдельный аргумент в getURL() с параметром типа nobackslash

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Это более рациональное решение, добавил b21d088

@veselcraft
Copy link
Copy Markdown
Member

алсо где использование Conventional Commits?

@MrKrasnov
Copy link
Copy Markdown
Author

MrKrasnov commented May 18, 2026

"алсо где использование Conventional Commits?"
В работе коммиты оформляю как и в этом ПР, дальнейщие коммиты могу оформлять в соотвествии с "Conventional Commits"

@MrKrasnov MrKrasnov requested a review from veselcraft May 18, 2026 17:14
@veselcraft
Copy link
Copy Markdown
Member

lint всё ещё не проходит и не поправлены те моменты, на которые я указал

@veselcraft veselcraft changed the title issues-1587 Fixed: Removing marital status user fix(user, cli, composer): removing martial status, cli for generating users May 18, 2026
@veselcraft veselcraft changed the title fix(user, cli, composer): removing martial status, cli for generating users fix(user, composer): removing martial status, cli for generating users (fixes #1587) May 18, 2026
@veselcraft veselcraft changed the title fix(user, composer): removing martial status, cli for generating users (fixes #1587) fix(user, composer): removing martial status, dependencies (fixes #1587) May 18, 2026
@MrKrasnov
Copy link
Copy Markdown
Author

@veselcraft дай ответ #1590 (comment) .
Линтер подправил.

По файлам Edit.latte
UserPresenter.php
дал свой фидбек почему такие изменения не вижу целесообразными.

Comment thread composer.json Outdated
},
"require": {
"php": "~7.3||~8.1",
"php": "~7.3||~8.2",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Не видел инстансов, где 7 пыха всё ещё используется, можно смело дропать, но это лучше оставить на другой ПР, ибо придётся тянуть изменения в доках

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

солидарен, лучше дропнуть отдельным PR. 7.3 и уж тем более 7.4 уже 4 года как EOL, дистры его не предоставляют в пакетах

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

вернул версию - revert(composer.json): revert php version

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Создал отдельный ПР - #1592

Copy link
Copy Markdown
Member

@veselcraft veselcraft left a comment

Choose a reason for hiding this comment

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

по поводу функции не согласен. всё остальное - ок, молодец!

Comment thread CLI/GenerateUsersCommand.php
Comment thread locales/by_lat.strings Outdated
"your_email_address" = "Adras Vašaj elektronaj pošty";
"your_page_address" = "Adras Vašaj staronki";
"page_address" = "Adras staronki";
"marital_status_user_id" = "ID karystálnika";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

исчерпывающий ответ @WerySkok

Comment on lines +128 to +129
<input type="text" placeholder="{_marital_status_user_id}" name="maritalstatus-user"
n:attr="value => $user->getMaritalStatusUser() ? ltrim($user->getMaritalStatusUser()->getURL(), '/') : ''" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

В корне не согласен. Для показа чего либо во вьюхе совсем не повод захломлять методами и без того большую модель. Модель в целом должна использоваться для возрата данных в данном случае а стилизация текста это задача самой вьюхи.

Остаюсь на своём - это костыли. В API используется (увы) один уже такой связанный со screen_name (он просто повторяет функцию, без /), и вот ещё один тут. Но вот для отдельной ф-ции я погорячился, можно прост добавить отдельный аргумент в getURL() с параметром типа nobackslash

@MrKrasnov MrKrasnov requested review from WerySkok and veselcraft May 23, 2026 15:30
@veselcraft
Copy link
Copy Markdown
Member

@WerySkok верикок проверьте пулл пожлауйтса

@WerySkok
Copy link
Copy Markdown
Member

не та ветка 😭

@MrKrasnov
Copy link
Copy Markdown
Author

MrKrasnov commented May 25, 2026

не та ветка 😭

да, я обосрался и откатил изменения 💩

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.

3 participants