Skip to content

Conversation

@pierredup
Copy link
Member

No description provided.

@pierredup pierredup added this to the 2.3.6 milestone May 26, 2025
@pierredup pierredup self-assigned this May 26, 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 integrates SaaS support into the SolidInvoice platform by:

  • Replacing the old CompanyFormHandler with a Symfony controller action (CreateCompany)
  • Extending Company to implement SubscribableInterface and adding a currency field
  • Adding SaaS bundle configuration, routes, HTTP client setup, and adjusting PHP requirements to 8.3

Reviewed Changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/CoreBundle/Form/Handler/CompanyFormHandler.php Removed the old form handler in favor of a controller-based approach
src/CoreBundle/Entity/Company.php Implemented SubscribableInterface, added currency property with validation
src/CoreBundle/Action/CreateCompany.php New controller extending AbstractController to handle company creation
src/AppRequirements.php Bumped PHP version requirement from 8.2 to 8.3 but left the version check incorrectly targeting 8.2
config/routes/webhook.yaml Added webhook routing for Lemon Squeezy
config/routes.php Imported SaaS bundle routes under /billing
config/packages/saas/solidworx_saas.php Configured SaaS subscription, payment, and Lemon Squeezy integration
config/packages/saas/http_client.php Defined a scoped HTTP client for the Lemon Squeezy API
config/bundles.php Loaded SaaS bundles conditionally based on environment
composer.json Updated PHP platform requirement to 8.3 and added SaaS dependencies
README.md Updated system requirements to PHP 8.3
.github/workflows/unit-tests.yml Extended CI matrix to include PHP 8.4
Comments suppressed due to low confidence (1)

src/AppRequirements.php:29

  • The version check still enforces PHP_VERSION_ID >= 80200 even though the messages require 8.3.0. Update this to PHP_VERSION_ID >= 80300 to match the new requirement.
PHP_VERSION_ID >= 80200,

@codecov
Copy link

codecov bot commented May 26, 2025

Bundle Report

Changes will decrease total bundle size by 408.3kB (-5.12%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
solidinvoice-webpack-bundle-array-push 7.57MB -408.3kB (-5.12%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: solidinvoice-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
app.*.css -555 bytes 1.36MB -0.04%
email.*.css -152.22kB 504.16kB -23.19%
pdf.*.css -152.22kB 445.21kB -25.48%
648.*.js (New) 376.53kB 376.53kB 100.0% 🚀
709.*.css (New) 285.35kB 285.35kB 100.0% 🚀
core.*.css 11.29kB 12.31kB 1104.5% ⚠️
core.*.js 53 bytes 3.1kB 1.74%
355.*.js (Deleted) -446.4kB 0 bytes -100.0% 🗑️
847.*.css (Deleted) -330.13kB 0 bytes -100.0% 🗑️

Files in app.*.css:

  • ./assets/scss/app.scss → Total Size: 50 bytes

@codecov
Copy link

codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 8.79121% with 166 lines in your changes missing coverage. Please review.

Project coverage is 48.87%. Comparing base (8663ddc) to head (1b48530).

Files with missing lines Patch % Lines
src/SaasBundle/EventSubscriber/RequestListener.php 0.00% 79 Missing ⚠️
src/CoreBundle/Action/CreateCompany.php 0.00% 21 Missing ⚠️
...sBundle/EventSubscriber/CompanyEventSubscriber.php 0.00% 18 Missing ⚠️
src/SaasBundle/Controller/BillingController.php 0.00% 12 Missing ⚠️
src/Kernel.php 0.00% 10 Missing ⚠️
src/SaasBundle/Menu/Builder.php 0.00% 9 Missing ⚠️
src/CoreBundle/Form/Type/CompanyType.php 0.00% 7 Missing ⚠️
src/CoreBundle/Repository/CompanyRepository.php 0.00% 3 Missing ⚠️
src/SaasBundle/Controller/PaymentSuccess.php 0.00% 3 Missing ⚠️
.../DependencyInjection/SolidInvoiceSaasExtension.php 0.00% 3 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##              2.3.x    #1739      +/-   ##
============================================
- Coverage     49.47%   48.87%   -0.61%     
- Complexity     2694     2732      +38     
============================================
  Files           494      501       +7     
  Lines          9751     9875     +124     
============================================
+ Hits           4824     4826       +2     
- Misses         4927     5049     +122     
Flag Coverage Δ
unittests 48.87% <8.79%> (-0.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pierredup pierredup merged commit 304faad into 2.3.x May 26, 2025
22 of 27 checks passed
@pierredup pierredup deleted the saas-bundle branch May 26, 2025 14:02
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