-
Notifications
You must be signed in to change notification settings - Fork 3
ship 0.5.0 #95
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
Draft
mesilov
wants to merge
13
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
ship 0.5.0 #95
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3190b32
Add MCP server configuration and documentation: introduce `.mcp.json`…
mesilov 0c207e9
Update developer documentation for onboarding and AI/CLI tooling: add…
mesilov 83ad55a
Refactor `Install` and `OnAppInstall` use cases to support single-ste…
mesilov dde3b53
Refactor `Install` and `OnAppInstall` use cases: fix premature status…
mesilov 13fe39a
Refactor `Install` and `OnAppInstall` use cases: fix `new`-status han…
mesilov 1555d04
Refactor `Install` and `OnAppInstall` use cases: enhance `new`-status…
mesilov 573985a
Refactor `Install` and `OnAppInstall` use cases: consolidate updated …
mesilov e5b52d3
Refactor tests and helpers for `Install` and `OnAppInstall` use cases…
mesilov b36baf1
Merge pull request #91 from mesilov/bugfix/90-fix-app-install
mesilov 7a5ce13
Merge branch 'main' into dev
mesilov 6f29bfa
Normalize Doctrine table names: add `b24lib_` prefix, enforce plural …
mesilov 3e9b335
Normalize Doctrine schema object names: update table names, indexes, …
mesilov 82c849e
Merge pull request #96 from mesilov/feature/93-fix-table-prefix
mesilov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "mcpServers": { | ||
| "bitrix24-dev": { | ||
| "type": "http", | ||
| "url": "https://mcp-dev.bitrix24.tech/mcp" | ||
| } | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| ## План по issue #93: нормализация Doctrine-таблиц (`b24lib_` + plural) | ||
|
|
||
| ### Summary | ||
| Нужно унифицировать имена всех Doctrine-таблиц библиотеки и явно именованных schema-объектов, чтобы они: | ||
| - имели префикс `b24lib_` | ||
| - использовали множественное число для таблиц сущностей | ||
|
|
||
| Целевое переименование: | ||
| - `application_installation` -> `b24lib_application_installations` | ||
| - `application_settings` -> `b24lib_application_settings` | ||
| - `bitrix24account` -> `b24lib_bitrix24_accounts` | ||
| - `contact_person` -> `b24lib_contact_persons` | ||
|
|
||
| Работа ограничивается обновлением маппингов, тестов и документации внутри библиотеки. Встроенная миграция существующих БД в самой библиотеке в scope не входит, но upgrade path должен быть явно описан в `CHANGELOG.md` как breaking change. | ||
|
|
||
| ### Important Interface Changes | ||
| Публичные PHP API, сигнатуры классов и repository-интерфейсы не меняются. | ||
|
|
||
| Меняются только инфраструктурные имена Doctrine schema-объектов: | ||
| - XML mapping `table="..."` | ||
| - имена `indexes`, `unique-constraints` и других явно именованных DB-объектов в mappings | ||
| - ожидания в functional/tests и schema assertions | ||
| - документация и changelog, где старые таблицы названы явно | ||
|
|
||
| ### Implementation Changes | ||
| 1. Обновить Doctrine XML mappings в `config/xml`, заменив имена таблиц на новые `b24lib_*`. | ||
| 2. Не менять имена колонок, foreign key columns, embedded mappings и доменные имена сущностей. | ||
| 3. Переименовать все явно заданные schema-объекты в mappings так, чтобы они были консистентны с новой схемой и использовали `b24lib_`-нейминг: | ||
| - `unique_app_setting_scope` -> `b24lib_application_settings_unique_scope` | ||
| - `idx_application_installation_id` -> `b24lib_application_settings_idx_application_installation_id` | ||
| - `idx_b24_user_id` -> `b24lib_application_settings_idx_b24_user_id` | ||
| - `idx_b24_department_id` -> `b24lib_application_settings_idx_b24_department_id` | ||
| - `idx_key` -> `b24lib_application_settings_idx_key` | ||
| - `idx_status` -> `b24lib_application_settings_idx_status` | ||
| - если в затронутых mappings обнаружатся другие явно именованные schema-объекты, их привести к тому же правилу: `b24lib_<table>_<object-purpose>` | ||
| 4. Не добавлять migration runner, console command или встроенный SQL helper: breaking change сопровождается документированным ручным апгрейдом через `CHANGELOG.md`, а не автоматическим апгрейдом внутри библиотеки. | ||
| 5. Обновить тесты, которые опираются на фактическую схему Doctrine/PostgreSQL: | ||
| - проверки через `schema-tool:create` / `schema-tool:update --dump-sql` | ||
| - любые assertions или fixture-логика, где фигурируют старые table names | ||
| - при наличии явных schema assertions добавить проверку новых имен таблиц и явно именованных индексов/constraints | ||
| - smoke на introspection/truncate, чтобы работа со схемой не зависела от старых имен | ||
| 6. Обновить документацию: | ||
| - `CHANGELOG.md` в секции `Unreleased 0.5.0` добавить отдельный `BC`/`Breaking Changes` блок с upgrade note для существующих установок | ||
| - в upgrade note перечислить все переименования `old -> new` для таблиц и явно именованных schema-объектов и явно указать, что перед обновлением потребитель должен переименовать существующие объекты схемы вручную | ||
| - `src/ApplicationSettings/Docs/application-settings.md` и другие места, где таблицы названы текстом | ||
| 7. Не трогать строки исключений и доменные сообщения вида `bitrix24account not found`, если они описывают сущность, а не SQL-таблицу. | ||
|
|
||
| ### Test Cases and Scenarios | ||
| 1. `make test-functional` | ||
| - схема успешно дропается и создается через Doctrine с новыми table names | ||
| - `orm:schema-tool:update --dump-sql` не предлагает лишних изменений после `create` | ||
| - functional test suite остается зеленым | ||
|
|
||
| 2. `make test-unit` | ||
| - unit suite остается зеленым как регрессия после изменения mapping metadata и docs-сопровождения | ||
|
|
||
| 3. Ручная schema-проверка в рамках functional bootstrap | ||
| - в БД присутствуют только новые таблицы `b24lib_*` | ||
| - явно именованные индексы и unique constraints используют новый `b24lib_*`-нейминг | ||
| - старые имена не появляются в generated schema | ||
|
|
||
| 4. Документационная проверка | ||
| - в `CHANGELOG.md` есть отдельный `BC`/upgrade note с полным списком переименований таблиц и явно именованных schema-объектов | ||
| - в пользовательской документации не осталось старых таблиц как актуальных | ||
|
|
||
| ### Assumptions and Defaults | ||
| - Источник истины по схеме: Doctrine XML mappings в `config/xml`. | ||
| - Scope изменения: меняются table names и явно именованные schema-объекты; column names и семантика связей не переименовываются. | ||
| - Breaking change допустим для milestone `0.5.0` и должен быть явно отмечен в changelog. | ||
| - Для существующих установок библиотека не поставляет автоматический migration path; потребитель выполняет ручное переименование таблиц и других затронутых schema-объектов по инструкции из `CHANGELOG.md`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # AGENTS | ||
|
|
||
| ## MCP Servers | ||
|
|
||
| This repository includes project-level MCP server configuration in `.mcp.json`. | ||
|
|
||
| Developers and agents working with this project must verify the MCP configuration before starting work. | ||
|
|
||
| Configured servers: | ||
|
|
||
| - `bitrix24-dev` - HTTP MCP server at `https://mcp-dev.bitrix24.tech/mcp` | ||
|
|
||
| Checks before work starts: | ||
|
|
||
| - ensure `.mcp.json` is present and contains the expected server list | ||
| - restart the client after pulling changes to `.mcp.json` | ||
| - verify that the configured MCP servers are available in the current client | ||
|
|
||
| ## Tests And Linters | ||
|
|
||
| Agents working in this repository must run linters and tests only through `Makefile` entrypoints. | ||
|
|
||
| Do not call tool binaries directly when an equivalent `make` target exists. | ||
|
|
||
| Use: | ||
|
|
||
| - `make lint-all` for the full linter pass | ||
| - `make test-unit` for the unit test suite | ||
| - `make test-functional` for the functional test suite | ||
| - `make lint-cs-fixer-fix` and `make lint-rector-fix` only when an autofix pass is needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Committing configuration files with hardcoded URLs, especially for development environments like
mcp-dev.bitrix24.tech, can be problematic. It couples the codebase to a specific environment and might expose internal infrastructure details. Consider using a template file (e.g.,.mcp.json.dist) and environment variables to manage environment-specific configurations. This would allow developers to set up their local environments without modifying version-controlled files.