Skip to content

Conversation

@pierredup
Copy link
Member

No description provided.

@pierredup pierredup added this to the 2.4.0 milestone Aug 10, 2025
@pierredup pierredup requested a review from Copilot August 10, 2025 11:42
@pierredup pierredup self-assigned this Aug 10, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the ability to delete a company from the system settings with a confirmation modal and proper safety checks.

  • Adds a "Danger Zone" section to the system settings with company deletion functionality
  • Implements proper CSRF protection and confirmation modal requiring company name input
  • Sets up proper cascading deletes to handle related entities when a company is removed

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/SettingsBundle/Twig/Components/Settings.php Adds icon mapping for different settings sections
src/SettingsBundle/Resources/views/Components/Settings.html.twig Adds danger zone UI with delete company modal and confirmation
src/CoreBundle/Traits/Entity/CompanyAware.php Updates relationship to include cascade remove
src/CoreBundle/Resources/config/routing.php Adds POST route for company deletion
src/CoreBundle/Repository/CompanyRepository.php Implements company deletion method
src/CoreBundle/Entity/Company.php Adds relationship mappings for orphan removal
src/CoreBundle/Action/DeleteCompany.php Implements company deletion controller with CSRF protection
assets/controllers/delete-company-controller.ts Adds frontend validation for company name confirmation

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 10, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This change set introduces company deletion functionality, including backend support for securely deleting a company and all related data, as well as frontend UI and UX for initiating and confirming this action. It adds a new controller, repository method, entity relationships, routing, Twig template logic, and updates to settings navigation icons. Test snapshots are also updated to reflect these UI changes.

Changes

Cohort / File(s) Change Summary
Frontend: Company Deletion UI & Modal
assets/controllers/delete-company-controller.ts, src/SettingsBundle/Resources/views/Components/Settings.html.twig
Adds a Stimulus controller for managing a company deletion modal, including input validation and modal control. The Twig template is updated to include a "Danger Zone" card with a delete button and modal for company deletion, wired to the controller.
Backend: Company Deletion Logic
src/CoreBundle/Action/DeleteCompany.php, src/CoreBundle/Repository/CompanyRepository.php, src/CoreBundle/Resources/config/routing.php
Adds a new Symfony controller action for deleting a company, a repository method to perform the deletion, and a new POST route for the deletion endpoint.
Entity Relationships
src/CoreBundle/Entity/Company.php
Adds multiple public properties to the Company entity, defining one-to-many relationships with related entities for cascading deletion.
Settings Sidebar Icons
src/SettingsBundle/Twig/Components/Settings.php, src/SettingsBundle/Resources/views/Components/Settings.html.twig
Introduces a mapping for section-specific icons and updates the sidebar to use context-appropriate icons instead of a generic cog.
Test Snapshots: UI Updates
src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__1.html, src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__2.html, src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html, src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testSaveOnDifferentSection__2.html
Updates test snapshots to reflect new sidebar icons, the addition of the Danger Zone card, the deletion modal, and minor HTML structure changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant StimulusController
    participant Backend (DeleteCompany action)
    participant CompanyRepository
    participant Database

    User->>Browser: Click "Delete Company"
    Browser->>StimulusController: Show modal
    User->>Browser: Type company name, confirm deletion
    StimulusController->>Browser: Enable confirm button if input matches
    User->>Browser: Submit deletion form
    Browser->>Backend (DeleteCompany action): POST /delete-company (with CSRF token)
    Backend (DeleteCompany action)->>CompanyRepository: deleteCompany(companyId)
    CompanyRepository->>Database: Remove company and related entities
    Backend (DeleteCompany action)->>Browser: Redirect to company selection with flash message
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e755a1 and 876745f.

📒 Files selected for processing (2)
  • src/SettingsBundle/Resources/views/Components/Settings.html.twig (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/SettingsBundle/Resources/views/Components/Settings.html.twig
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testRenderComponent__1.html
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch delete-org

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (7)
src/SettingsBundle/Twig/Components/Settings.php (1)

41-52: Make settingIconMap readonly and manually verify your Font Awesome version

  • Apply this diff to prevent mutation and keep PHPStan happy:
-    /** @var array<string, string> */
-    public array $settingIconMap = [
+    /** @var array<string, string> */
+    public readonly array $settingIconMap = [
         'company' => 'building',
         'invoice' => 'file-invoice',
         'quote'   => 'file-text-o',
         'email'   => 'envelope',
         'payment' => 'credit-card',
         'tax'     => 'balance-scale',
         'system'  => 'cog',
     ];
  • We found multiple usages of file-text-o in your Twig templates—this is a Font Awesome 4 icon name. If your project uses FA 5+ (or newer), you’ll need to swap in the updated icon class (e.g., file-alt for file-text-o, scale-balanced or balance-scale depending on your FA version).
  • I wasn’t able to locate the FA package/version in composer.json, package.json, or lockfiles. Please confirm which Font Awesome version you’re shipping (check composer.lock, package-lock.json, webpack config, etc.) and update any legacy icon names accordingly.
src/CoreBundle/Repository/CompanyRepository.php (1)

57-71: Optional: avoid SELECT by using getReference when existence check isn’t required

Current approach loads the entity, then removes. If you don’t need to detect "not found" explicitly, using a reference avoids an extra query.

-        $company = $this->find($companyId);
-
-        if (! $company instanceof Company) {
-            return;
-        }
-
-        $this->getEntityManager()->remove($company);
+        $em = $this->getEntityManager();
+        $companyRef = $em->getReference(Company::class, $companyId);
+        $em->remove($companyRef);
         $this->getEntityManager()->flush();

Pros: fewer queries. Cons: you lose the explicit "not found" branch (DELETE will no-op if row doesn’t exist).

src/CoreBundle/Action/DeleteCompany.php (2)

47-47: Use a translatable flash key

Keep flash messages consistent with the rest of the app using translation keys.

-        $this->addFlash('success', 'Company deleted successfully.');
+        $this->addFlash('success', 'company.deleted.success');

49-50: Use 303 See Other for POST-redirect

303 is the recommended status for redirect-after-POST.

-        return $this->redirectToRoute('_select_company');
+        return $this->redirectToRoute('_select_company', [], Response::HTTP_SEE_OTHER);
assets/controllers/delete-company-controller.ts (1)

16-18: Nit: add disconnect() to clear references

Not required, but cleaning up helps avoid stale references.

     connect() {
         this.modal = $(this.modalTarget);
     }
+
+    disconnect() {
+        this.modal = null;
+    }
src/CoreBundle/Entity/Company.php (2)

95-96: Naming consistency: pluralize credit collection

For a OneToMany to Credit, consider $credits for clarity and consistency.


134-138: Optional: initialize new collections to avoid typed property access issues

If any of these collections are ever accessed, uninitialized typed properties will throw. Initialize them in the constructor.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ab563b and af1205d.

📒 Files selected for processing (8)
  • assets/controllers/delete-company-controller.ts (1 hunks)
  • src/CoreBundle/Action/DeleteCompany.php (1 hunks)
  • src/CoreBundle/Entity/Company.php (2 hunks)
  • src/CoreBundle/Repository/CompanyRepository.php (1 hunks)
  • src/CoreBundle/Resources/config/routing.php (2 hunks)
  • src/CoreBundle/Traits/Entity/CompanyAware.php (1 hunks)
  • src/SettingsBundle/Resources/views/Components/Settings.html.twig (2 hunks)
  • src/SettingsBundle/Twig/Components/Settings.php (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-01T18:20:04.058Z
Learnt from: pierredup
PR: SolidInvoice/SolidInvoice#1759
File: src/UserBundle/Resources/views/Layout/_partial/nav.html.twig:1-46
Timestamp: 2025-06-01T18:20:04.058Z
Learning: In SolidInvoice project, routes are defined in PHP routing configuration files like `src/UserBundle/Resources/config/routing.php`, not just in YAML files or PHP annotations.

Applied to files:

  • src/CoreBundle/Resources/config/routing.php
🧬 Code Graph Analysis (1)
src/CoreBundle/Entity/Company.php (6)
src/CoreBundle/Repository/CompanyRepository.php (1)
  • CompanyRepository (26-72)
src/ClientBundle/Entity/Address.php (1)
  • ORM (37-277)
src/ClientBundle/Entity/Credit.php (1)
  • ORM (29-92)
src/ClientBundle/Entity/AdditionalContactDetail.php (1)
  • ORM (34-161)
src/ClientBundle/Entity/ContactType.php (1)
  • ORM (30-161)
src/UserBundle/Entity/ApiToken.php (1)
  • ORM (30-133)
🪛 PHPMD (2.15.0)
src/CoreBundle/Entity/Company.php

75-75: Avoid unused private fields such as '$apiTokenHistories'. (Unused Code Rules)

(UnusedPrivateField)


78-78: Avoid unused private fields such as '$taxes'. (Unused Code Rules)

(UnusedPrivateField)


81-81: Avoid unused private fields such as '$additionalContactDetails'. (Unused Code Rules)

(UnusedPrivateField)


84-84: Avoid unused private fields such as '$addresses'. (Unused Code Rules)

(UnusedPrivateField)


87-87: Avoid unused private fields such as '$clients'. (Unused Code Rules)

(UnusedPrivateField)


90-90: Avoid unused private fields such as '$contacts'. (Unused Code Rules)

(UnusedPrivateField)


93-93: Avoid unused private fields such as '$contactTypes'. (Unused Code Rules)

(UnusedPrivateField)


96-96: Avoid unused private fields such as '$credit'. (Unused Code Rules)

(UnusedPrivateField)


99-99: Avoid unused private fields such as '$userInvitations'. (Unused Code Rules)

(UnusedPrivateField)


102-102: Avoid unused private fields such as '$apiTokens'. (Unused Code Rules)

(UnusedPrivateField)


105-105: Avoid unused private fields such as '$settings'. (Unused Code Rules)

(UnusedPrivateField)


108-108: Avoid unused private fields such as '$quotes'. (Unused Code Rules)

(UnusedPrivateField)


111-111: Avoid unused private fields such as '$quoteLines'. (Unused Code Rules)

(UnusedPrivateField)


114-114: Avoid unused private fields such as '$paymentMethods'. (Unused Code Rules)

(UnusedPrivateField)


117-117: Avoid unused private fields such as '$payments'. (Unused Code Rules)

(UnusedPrivateField)


120-120: Avoid unused private fields such as '$userNotifications'. (Unused Code Rules)

(UnusedPrivateField)


123-123: Avoid unused private fields such as '$transportSettings'. (Unused Code Rules)

(UnusedPrivateField)


126-126: Avoid unused private fields such as '$invoices'. (Unused Code Rules)

(UnusedPrivateField)


129-129: Avoid unused private fields such as '$recurringInvoices'. (Unused Code Rules)

(UnusedPrivateField)


132-132: Avoid unused private fields such as '$invoiceLines'. (Unused Code Rules)

(UnusedPrivateField)

🔇 Additional comments (2)
src/CoreBundle/Action/DeleteCompany.php (1)

34-41: Confirmation field not found – no server‐side validation needed

The deletion form in src/SettingsBundle/Resources/views/Components/Settings.html.twig only includes the CSRF token and _action hidden inputs—it does not post a confirm_name field. As a result, there’s no name to validate on the server:

  • Template lines 121–124 only define:
    • action="{{ path('_delete_company') }}"
    • <input name="_csrf_token">
    • <input name="_action" value="delete_company">
  • No <input name="confirm_name"> exists, so the suggested check in DeleteCompany.php cannot run.

If you decide to require users to type the company name to confirm deletion in the UI, add an <input name="confirm_name"> (e.g. in Settings.html.twig) and then mirror that check in DeleteCompany.php by comparing it against the actual company name and throwing on mismatch. Otherwise, no changes are needed here.

assets/controllers/delete-company-controller.ts (1)

16-18: jQuery-based modals are valid with Bootstrap 4.6.2
package.json specifies "bootstrap": "^4.6.2" and "jquery": "^3.7.1", so $(el).modal('show')/hide() is the correct API. No refactor is needed unless you upgrade to Bootstrap 5, in which case you’d switch to the bootstrap.Modal class.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (5)

15-15: Verify Font Awesome version and class prefixes for new icons

fa-file-invoice is not available in FA4 and in FA5+ typically uses fas fa-file-invoice. Ensure the project’s icon set matches these classes; otherwise the icon won’t render. Align all icons to the same FA version/prefix.

Also applies to: 21-21, 27-27


567-567: Non-standard class card-danger – use Bootstrap-supported variants

card-danger isn’t a standard class in Bootstrap 4/5. Prefer border-danger (and optionally text-danger/bg-*) for consistent styling across themes.

- <div class="card mb-3 card-danger">
+ <div class="card mb-3 border-danger">

586-586: Modal accessibility improvements

Add aria-modal="true" to the modal container and ensure initial focus is handled when opening (Stimulus can call focus() on the input target).

- <div class="modal fade" id="deleteCompanyModal" tabindex="-1" role="dialog" aria-labelledby="deleteCompanyModalLabel" aria-hidden="true" data-delete-company-target="modal">
+ <div class="modal fade" id="deleteCompanyModal" tabindex="-1" role="dialog" aria-labelledby="deleteCompanyModalLabel" aria-modal="true" aria-hidden="true" data-delete-company-target="modal">

Also consider aria-describedby referencing the warning text for additional context.

Also applies to: 590-592, 611-618


615-617: Confirm action must POST with CSRF and provide UX feedback

The confirm button is handled via Stimulus. Ensure it submits a POST to the delete route with a valid CSRF token and handles failures (disable button while submitting, show spinner, display error).

If not already present, consider a hidden form as a progressive enhancement:

<form id="delete-company-form" method="post" action="{{ path('_delete_company') }}" class="d-none">
  <input type="hidden" name="_token" value="{{ csrf_token('delete_company') }}">
</form>

Stimulus can document.getElementById('delete-company-form').submit() once validated.


570-579: Internationalization of new UI strings

New strings (“Danger Zone”, warnings, labels, buttons) should be translatable. Ensure the Twig template wraps them with the translator (e.g., {{ '...'|trans }}) and add catalog entries.

Also applies to: 591-596, 601-609, 612-617

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af1205d and 7f2af92.

📒 Files selected for processing (7)
  • src/CoreBundle/Action/DeleteCompany.php (1 hunks)
  • src/CoreBundle/Entity/Company.php (2 hunks)
  • src/SettingsBundle/Resources/views/Components/Settings.html.twig (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__1.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__2.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testSaveOnDifferentSection__2.html (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testChangeSection__2.html
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testSaveOnDifferentSection__2.html
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testChangeSection__1.html
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/SettingsBundle/Resources/views/Components/Settings.html.twig
  • src/CoreBundle/Action/DeleteCompany.php
  • src/CoreBundle/Entity/Company.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: DB (MariaDB pdo_mysql 11.0)
  • GitHub Check: DB (MariaDB pdo_mysql 10.5)
  • GitHub Check: DB (MariaDB pdo_mysql 10.6)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 17)
  • GitHub Check: DB (MariaDB pdo_mysql 11)
  • GitHub Check: DB (MySQL pdo_mysql 8.4)
  • GitHub Check: DB (MariaDB pdo_mysql 11.4)
  • GitHub Check: DB (MySQL pdo_mysql 8.3)
  • GitHub Check: DB (MySQL pdo_mysql 9)
  • GitHub Check: DB (MariaDB pdo_mysql 10.4)
  • GitHub Check: DB (MariaDB pdo_mysql 10.11)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 16)
  • GitHub Check: DB (MySQL pdo_mysql 5.7)
  • GitHub Check: DB (MySQL pdo_mysql 8.0)
  • GitHub Check: Lint
  • GitHub Check: Unit ( PHP 8.3 )
  • GitHub Check: Unit ( PHP 8.3 )
  • GitHub Check: PHPStan
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Unit ( PHP 8.4 )

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2)

599-601: Bootstrap 4 dismissal/close markup — LGTM

You reverted to .close and data-dismiss="modal" consistent with BS4. Good fix.

Also applies to: 620-622


587-587: Hardcoded company name — make dynamic and properly escaped

The confirmation attribute and label use a hardcoded name “SolidInvoice”. Use the actual company name from context, escaped for attribute/text.

Conceptual Twig changes:

- <div class="form-group" data-controller="delete-company" data-delete-company-company-name-value="SolidInvoice">
+ <div class="form-group"
+      data-controller="delete-company"
+      data-delete-company-company-name-value="{{ company.name|e('html_attr') }}">
@@
-     <p class="fw-bold text-danger">SolidInvoice</p>
+     <p class="font-weight-bold text-danger">{{ company.name|e }}</p>

Note: Update the template; snapshots will follow.

Also applies to: 611-611

🧹 Nitpick comments (2)
src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2)

616-616: Small UX hardening: disable browser assistance on confirmation field

Prevent autocomplete/capitalization/spellcheck from interfering with exact match validation.

-                                            <input type="text" class="form-control" id="companyNameConfirmation" name="company_name" form="deleteCompanyForm" data-delete-company-target="companyNameInput" data-action="input->delete-company#validateInput" placeholder="Enter company name to confirm">
+                                            <input type="text" class="form-control" id="companyNameConfirmation" name="company_name" form="deleteCompanyForm" data-delete-company-target="companyNameInput" data-action="input->delete-company#validateInput" placeholder="Enter company name to confirm" autocomplete="off" autocapitalize="off" spellcheck="false">

581-586: Consider marking user-facing strings for translation

Make Danger Zone copy, button labels, and warnings translatable to align with the rest of the app.

Example:

  • Replace literals with {{ 'settings.danger_zone.title'|trans }}, {{ 'settings.delete_company.button'|trans }}, etc.
  • I can propose keys and update the template + translations if helpful.

Also applies to: 603-610, 620-629

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f2af92 and 8d8653e.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__1.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testChangeSection__2.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2 hunks)
  • src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testSaveOnDifferentSection__2.html (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testChangeSection__2.html
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testSaveOnDifferentSection__2.html
  • src/SettingsBundle/Tests/Twig/Components/snapshots/SettingsTest__testChangeSection__1.html
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: PHPStan
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Lint
  • GitHub Check: DB (PostgreSQL pdo_pgsql 16)
  • GitHub Check: Unit ( PHP 8.4 )
  • GitHub Check: DB (MariaDB pdo_mysql 11)
  • GitHub Check: DB (MySQL pdo_mysql 9)
  • GitHub Check: DB (MySQL pdo_mysql 8.3)
  • GitHub Check: Unit ( PHP 8.3 )
  • GitHub Check: DB (MySQL pdo_mysql 5.7)
  • GitHub Check: DB (MariaDB pdo_mysql 11.4)
  • GitHub Check: DB (MariaDB pdo_mysql 10.11)
  • GitHub Check: DB (MariaDB pdo_mysql 10.4)
  • GitHub Check: DB (MySQL pdo_mysql 8.4)
  • GitHub Check: DB (MariaDB pdo_mysql 10.5)
  • GitHub Check: DB (MariaDB pdo_mysql 11.0)
🔇 Additional comments (2)
src/SettingsBundle/Tests/Twig/Components/__snapshots__/SettingsTest__testRenderComponent__1.html (2)

624-626: Avoid hardcoded URL and empty CSRF — use Symfony helpers

Use route generation and CSRF helpers to ensure correctness and security.

Conceptual Twig changes:

-                                        <form id="deleteCompanyForm" action="/delete-company" method="post">
-                                            <input type="hidden" name="_csrf_token" value="">
+                                        <form id="deleteCompanyForm" action="{{ path('_delete_company') }}" method="post">
+                                            <input type="hidden" name="_csrf_token" value="{{ csrf_token('delete_company') }}">

I can update the Twig and adjust snapshots accordingly if you want.

Likely an incorrect or invalid review comment.


15-15: Font Awesome setup supports both new and legacy classes—no icon change needed
package.json declares @fortawesome/fontawesome-free@^6.4.0 and your SCSS imports ~@fortawesome/fontawesome-free/scss/shims, enabling full support for FA6 icons (like fa-file-invoice) alongside legacy FA4 class names (such as fa-file-text-o). No replacement is necessary here.

Likely an incorrect or invalid review comment.

@pierredup pierredup merged commit 9594e40 into 2.4.x Aug 10, 2025
27 of 32 checks passed
@pierredup pierredup deleted the delete-org branch August 10, 2025 14:31
@coderabbitai coderabbitai bot mentioned this pull request Nov 22, 2025
This was referenced Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants