Skip to content

Add contact persons use case#80

Open
KarlsonComplete wants to merge 31 commits intomesilov:devfrom
KarlsonComplete:add-contact-persons-use-case
Open

Add contact persons use case#80
KarlsonComplete wants to merge 31 commits intomesilov:devfrom
KarlsonComplete:add-contact-persons-use-case

Conversation

@KarlsonComplete
Copy link
Collaborator

.

@gemini-code-assist
Copy link

Summary of Changes

Hello @KarlsonComplete, 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!

This pull request introduces a new 'Contact Persons' domain into the application, providing a structured and robust way to manage individual contact information. It establishes a comprehensive data model for contact persons, complete with lifecycle management (creation, updates, deletion, status changes, verification) and integrates it with the existing application installation logic. The changes are supported by new Doctrine mappings, dedicated repositories, and a set of well-defined use cases, ensuring maintainability and testability.

Highlights

  • New ContactPerson Entity: Introduces a new ContactPerson aggregate root with properties like ID, status, full name, email, mobile phone, comment, external ID, Bitrix24 user/partner IDs, and user agent information. This entity is designed for robust management of individual contact data.
  • Doctrine Integration: Provides comprehensive Doctrine XML mappings for the ContactPerson, FullName, and UserAgentInfo entities, along with a dedicated ContactPersonRepository for efficient data access and persistence. Custom Doctrine types for phone numbers and IP addresses are also registered.
  • Comprehensive Use Cases: Implements a suite of use cases for managing contact persons, including creation (Install), deletion (Uninstall), data modification (UpdateData), and verification of email and mobile phone numbers. Each use case is supported by dedicated commands and handlers.
  • New Dependencies: Integrates odolbeau/phone-number-bundle and darsyn/ip-doctrine to provide robust and standardized handling of phone numbers and IP addresses within the application, particularly for Doctrine entities. Additionally, symfony/var-exporter is added.
  • Extensive Testing: Includes a full suite of functional tests for the ContactPersonRepository and all new use case handlers, ensuring the reliability, correctness, and maintainability of the newly introduced contact persons feature.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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.

@camaxtly camaxtly changed the base branch from add-contact-person-use-case to dev December 14, 2025 14:06
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 significant new feature, the "Contact Persons" use case, including entities, repositories, use cases, and tests. The overall structure is good and follows the existing architecture. However, I've found several issues related to correctness, consistency, and robustness that need to be addressed. These include potential null pointer exceptions, inconsistent behavior in entities, bugs in repositories and handlers, and some issues in the new tests. Please review the detailed comments below.

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

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

14-12-2025

…` and `unlinkBitrix24PartnerContactPerson` methods.
Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

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

18-01-2026

…ecks, improve logging, and update validation logic across ContactPerson use cases.
… checks, enhance validation logic, and update email/phone verification handling across ContactPerson use cases.
Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

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

25-01-2026

…se cases; add data providers, streamline test logic, and improve contact person creation methods.
…mail validation logic, and enhance coverage for `ChangeProfile` and verification use cases.
Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

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

01-02-2026

…MobilePhoneAsVerified` command classes; refactor `InstallContactPerson` and `MarkEmailAsVerified` tests with data providers, improve validation logic, and update PHP version constraint in `composer.json`.
…sertions in `HandlerTest`, adopt uniform naming in `CommandTest`, and override method in `ContactPersonTest`.
…command and `ContactPerson` entity; prevent empty email values and reset verification status consistently.
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