Skip to content

Conversation

@mesilov
Copy link
Owner

@mesilov mesilov commented Aug 10, 2025

Q A
Bug fix? no
New feature? yes
Deprecations? yes/no
Issues Fix #42
License MIT

Функции для сущности
- Добавил билдер
- И тесты на репозиторий
- Дописал описание к методу validate для домена
- Юзанул cs-fixer
- Юзанул ректор
- Поправил сущность
- Поправил домен
- Написал UseCase на установку приложения
- Поправил handler для установки приложения
- Тест на установку (включающий в себя аккаунт битрикс 24)
-Тест на метод ChangePortalLicenseFamily
…ия / статус) из конструктора . Объявляем теперь при создании.
Добавил applicationToken в сущность установки
- Добавили setToken
- Поправили тест установки приложения
- Поправили обработчики после правок методов в аккаунте
-Написали тест к событию
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @mesilov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've implemented a new system for managing application installations, addressing issue #42. This involves introducing a dedicated ApplicationInstallation entity to track the status and details of each app installation. I've also created specific use cases for installing, handling post-installation events, and uninstalling applications, ensuring a robust lifecycle management. The existing Bitrix24Account entity has been updated to integrate with this new system, including new fields and refined methods for managing application tokens and statuses. Additionally, I've added new Doctrine mappings and a dedicated repository for the new installation entity, along with comprehensive unit and functional tests to ensure the reliability of these changes.

Highlights

  • New Application Installation Entity: I've introduced a new ApplicationInstallation entity to manage the lifecycle and state of each application installation, including its status (new, active, blocked, deleted), associated tokens, and links to contact persons and partners.
  • Comprehensive Application Lifecycle Management: I've implemented dedicated use cases for Install, OnAppInstall, and Uninstall to handle the full lifecycle of an application. The Install use case manages initial setup and reinstallation, OnAppInstall updates token and status post-UI installation, and Uninstall handles deactivation.
  • Enhanced Bitrix24Account Integration: I've updated the Bitrix24Account entity and its repository to integrate seamlessly with the new application installation logic. This includes adding isMasterAccount and comment fields, and refining how application tokens and statuses are managed during installation and uninstallation.
  • New Doctrine Mappings: I've added new Doctrine XML mappings for the ApplicationInstallation entity and the ApplicationStatus embeddable, ensuring proper persistence of the new data structures.
  • Dedicated Application Installation Repository: I've introduced a new ApplicationInstallationRepository to provide robust data access and management for the new ApplicationInstallation entities, complementing the existing Bitrix24AccountRepository.
  • Improved Domain Validation: I've updated the domain validation logic in Bitrix24Accounts\ValueObjects\Domain to be more flexible, supporting longer domain names and more labels, which improves compatibility with internationalized domains.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesilov mesilov requested a review from camaxtly August 10, 2025 13:48
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive application installation and uninstallation workflow. The changes are extensive, covering new entities, repositories, use cases, and tests. While the overall structure is sound, there are several critical and high-severity issues that need to be addressed. These include a potential null pointer exception, incorrect event data being dispatched, flawed validation logic, and bugs in the test builders. I've provided detailed comments and suggestions for each issue.

@mesilov mesilov merged commit c2f0e75 into main Aug 10, 2025
0 of 12 checks passed
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.

Add support for Application install entity

4 participants