* Harden Stripe webhooks and server manager input
* Add `whsec` to cspell dictionary
Updates `cspell.json` to include `whsec` in the custom words list, preventing it from being flagged as a spelling error.
* Require Stripe webhook secret by mode
* Redo and migrate the Admin Group structure
* Update permisison checks to use groups
* Migrate admin group CRUD to Doctrine
* Remove legacy permission and group membership logic
* Replace legacy role logic
* Drop the admin.permissions column
* Only allow super admins to create/edit/delete groups, better guards
* Remove the redundant `admin.protected` column
* Clean group memberships when an admin is deleted
* Make the "Exclude cron user" filter work
* Improve labels
* Addressed code review comments
* Require an initial group
* Improved logger messages
* Replace role subtitle with email
* Bypass permission checks during update finalization to make sure it's accessible
* More sensible default groups
* Update seed content timestamps
* Fixed tests
* Cron login guard
* Addressed code review comments
* Change permission column type to JSON
* Addressed code review comments
* Migrate regular staff to a temporary group and disallow groupless staff management
* Look for Super Administrator or legacy `admin` role
* Fixed tests
* Changed test name to make cspell happy
* Grant required permissions to the groups
---------
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
* Migrate Email, Extension, Support modules to Doctrine ORM
* Add 'initialises' to cspell.json custom words
* Add patch76 and fix extension deactivation event
* Bump database patch version to 76
* Refactor Support APIs to mapped Doctrine flows
* Handle legacy email queue and ticket filters
* Migrate Support module to Doctrine ORM
* Refactor services to use typed repositories
* Route order ticket count and ticket messages through repositories
Drops the last two thin Support\Service wrappers, calling the
SupportTicketRepository and SupportTicketMessageRepository directly
from the cross-module callers.
* Rename email queue table and add patch
* Preserve unlimited email queue processing
* Preserve unlimited email queue processing
* Handle Stripe invoice.paid webhook and normalize currencies
* Handle Stripe webhooks asynchronously
* Update cspell.json
* Handle all Stripe webhook event types
* Handle Stripe invoice subscription changes
* Handle Stripe subscription race conditions
* Filter Stripe webhook noise
* Handle Stripe subscription races safely
* Improve Stripe subscription creation
* Add 4/5-year periods and new tx statuses
* Harden Stripe dedup for redirect/webhook races
* Address code review findings in Stripe webhook and IPN handler
- Fix: handlePaymentIntentFailedWebhook and handleSetupIntentFailedWebhook
now return true so error transactions are kept rather than written and
immediately deleted; processWebhookEvent guards against overwriting an
existing STATUS_ERROR with STATUS_PROCESSED
- Fix: processInitialSubscriptionPayment reloads the invoice from the DB
before the already-paid guard, consistent with applyOneTimePayment and
narrowing the TOCTOU race window
- Fix: handleInvoicePaymentSucceeded merges two sequential findOne queries
for the same invoice into one, using the result for both the already-paid
check and the billing_reason fallback
- Fix: ipn.php extracts $isJsonWebhook at first evaluation, removing the
duplicate str_contains() expression inside the try block
- Fix: handleSubscriptionCreated casts invoice_id to int, matching all
other handlers; test assertion updated from string '5' to int 5
* Fix double-processing and over-broad exception catch in Stripe adapter
- handleInvoicePaymentSucceeded: set txn_id to the Stripe invoice ID and
check for an existing PROCESSING/PROCESSED transaction with that key so
that when Stripe fires both invoice.payment_succeeded and invoice.paid
for the same payment, the second event is silently skipped rather than
double-crediting the client balance or generating a duplicate renewal
invoice
- processSetupIntent, handleSetupIntentSucceededWebhook: narrow the
ApiErrorException catch to idempotency_key_in_use only; rethrow all
other failures (card declined, auth errors, network issues) so they are
not silently swallowed and processed against an unrelated subscription
* Fix missing Transaction findOne mock in StripeTest fallback test
The handleInvoicePaymentSucceeded dedup check now queries for an
existing Transaction by Stripe invoice ID before processing. The
'falls back to treating unpaid original invoice as initial payment'
test only mocked the Invoice findOne, so the new Transaction query
had no handler and threw NoMatchingExpectationException in CI.
* Fix spellcheck: replace 'Dedup' with 'Duplicate-event' in comment
* Migrate the knowledge base to Doctrine
* Addressed code review comments
* Move incrementViews to the repo
* Knowledge base suggestions in support forms
* Improve the UI and make search actually search
* Make the knowledge base enabled on new installs by default
* Redid the kb index to list articles alongside categories
* Display articles in admin manage category
* Redirect authenticated users from guest ticket page to client ticket page
* Address code review comments
* Addressed code review comments
* Improved search accuracy by tokenizing queries
* Updated article layout and added CTAs
* Added a setting to toggle view count's visibility
* Removed contact button from the sidebar
* Migrate canned responses to Doctrine and improve admin UI
* Improved support settings canned dropdowns
* Added a flag to hide view count when serializing
* Improved search query matching
* Migrate SupportHelpdesk to Doctrine
* Fixed tests
* Update copyright headers
* Implemented suggestions (credit @admdly)
* Remove dead test
* Migrate product models; add `promo_redemption`
* Add DomainPricing & ProductOrder repositories
* Use Promo entity typehints and update tests
* Use DI logger, validate order config, update tests
* Replace `error_log` with logger; use stubs in tests
* Use attachOrderConfig and tighten service checks
* Clarify domain defaults and remove deprecated doc tag
* Add missing indexes to `promo_redemption` table
* Enrich promo API arrays and add redemption filters
* Various UI/JS fixes and template cleanups
* Log invoice issues as warnings; expose form_id
* Normalize spelling in UpdatePatcher comment
* Remove checkLimits production method and clean up stale test mocks
* Use getConfig() and add promo permission
* Use container logger directly, remove helpers
* Use defaults for optional Twig settings
* Import macro_functions into admin template
* Compensate promo redemptions on checkout failure
* 🐛 Fix product category and add-on availability handling
* Add AbstractApi::checkPermissions and patch71
* Bump last_patch setting to 71
* Add tests for AbstractApi::checkPermissions
* Handle subscription renewals and validate payments
* Add overpayments to cspell word list
* Treat null transaction amounts as 0
* Mark deposit invoices as paid; add unit test
* Test overpayment warnings in validatePaymentAmount
* Guard Activity index template against missing client/staff nested data
The activity log API at Activity/Api/Admin.php:38-49 only injects a
nested 'client' or 'staff' key when the corresponding *_id is set
(via isset() which returns false for null). System events and
client-only events therefore have no 'client' key, while staff-only
events have no 'client' key.
Under strict_variables, '{% if event.client %}' (line 191) throws
"Key 'client' ... does not exist" for any event without a client.
Switch the conditional to event.client_id / event.staff_id (always
present as SQL columns) and add '|default("")' to the nested
event.client.email / event.client.name / event.staff.email / event.staff.name
accesses so deleted-but-referenced records render gracefully.
* Guard Security iplookup template against empty country/asn data
When the GeoIP or ASN lookup fails (IncompleteRecord from MaxMind), the
Service catches and substitutes [] for the missing data. Under
strict_variables, the empty mapping at record.asn / record.country
causes line 48 to throw "sequence/mapping is empty".
Twig's |default filter on a GetAttrExpression compiles to a safe
is-defined check, so it correctly falls through to the placeholder
when the underlying array is empty or the key is missing.
Verified:
- /admin/security/iplookup?ip=192.168.1.1 (private IP, empty asn)
renders the row with 'Unknown' ASN cells.
- /admin/security/iplookup?ip=8.8.8.8 still renders
'15169' / 'GOOGLE' / 'United States'.
* Initialize notes/rel arrays in Support toApiArray so templates render without errors
Two related issues surfaced under strict_variables on the admin support
ticket page:
1. toApiArray only set $data['notes'] inside the foreach loop over
ticket notes. Tickets without any notes therefore had no 'notes' key
and 'ticket.notes|length' in mod_support_ticket.html.twig:42 threw
'Key "notes" does not exist'.
2. _getRelDetails returned [] (empty array) when a ticket has no
related entity. mod_support_ticket.html.twig sets {% set task =
ticket.rel %} and then accesses task.task, task.type, task.status
etc. on the next lines. Any access into an empty mapping throws
under strict_variables.
Fixes:
- Service::toApiArray: always initialize $data['notes'] = [] for admin
identity so the key is present even when empty.
- Service::_getRelDetails: always return the base structure with all
fields (id, type, task, new_value, status) set to null when there
is no related entity. Skip the DB lookups for the non-rel case.
Template hardening (defense-in-depth, in case other code paths return
a different shape):
- mod_support_ticket.html.twig:42: 'ticket.notes|length' -> 'is defined and
ticket.notes|length'.
- mod_support_ticket.html.twig:222: 'ticket.notes' -> 'ticket.notes|default([])'.
- mod_support_tickets.html.twig:238: same is defined guard.
Verified on dev:
- /admin/support/ticket/1 renders without errors.
- API now returns rel as {id: null, type: null, ...} and notes: [] for
tickets without related data.
- 1777 local tests pass, PHPStan clean.
* Harden tests and add Twig/ToApi linters
* Remove redundant setAccessible calls in tests
* Update cspell.json word list
* Add UrlAwarePermissiveContainer & trim errors
* Add geoip stub and fix ParserFactory usage
* Enforce and apply parentheses for new expressions
* Initial plan
* fix: add 'unsuspension' to cspell words list to fix Spellcheck CI
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Improve type safety, auth checks and PHPStan fixes (#3250)
* Improve type safety, auth checks and PHPStan fixes
* Remove @phpstan-ignore annotations
* Improve type safety, auth checks and PHPStan fixes
* Remove @phpstan-ignore annotations
* Remove redundant @phpstan-ignore comment
* Improve code robustness and reliability (#3248)
* Harden code against null/undefined values
* Update dependency lockfiles
* Sanitize ticket input and use IDs in email list
* Restructure tests and add test utilities
* Move E2E tests to `Library\E2E` namespace
* Update `php-build` action ref in workflows
* Switch tests to Pest and add test scaffolding
* Refactor E2E tests to Pest-style tests
m
Skip E2E tests when env not configured
* Refactor Unit tests and update test config
Add test datasets and refine test helpers
* Add DEBUG guard, fix API JSON decode, update tests
* Refactor tests: add types and Mockery expectations
* Adjust tests, phpstan config, and composer script
* Instantiate test APIs locally, remove beforeEach
* Refactor runtime checks, types & logging
* Apply PHP Code Styling Changes
m
* Add PHPStan ignores, test renames & small fixes
* Enable Pest tests in CI workflow
* Remove legacy tests; add new unit tests/config
* Avoid undefined index in fingerprint comparison
* Ignore properties absent in both fingerprints
* Remove public_ticket_create API method
* Add Fingerprint unit tests
* Remove em dash from fingerprint test name
* Switch to Pest; assorted bug fixes & refactors
* Prefer getDi() and guard DEBUG define
* Refactor tests: DBAL, Antispam rename, helpers
* Refactor email tests to use Doctrine entities
* Update tests, use DBAL mocks & improve Formbuilder admin
* Validate plan_id and update unit tests
* Replace error_log with DI logger and update tests
* Expect db->store in Invoice Service test
* Use DI logger instead of error_log; fix tests
* Fix typo in Hook Service test
* Fix Staff test spelling fixture
* Complete Pest test migration
* Fix Product test spelling fixtures
* Fix Product test spelling fixtures
* Run live tests with Pest and load helpers
* Migrate tests to ApiClient; remove legacy APIHelper
* Fix Email test spelling
* Remove unused PHPUnit bridge
* Organize Cypress end-to-end tests
* Document Pest test directory root
* Remove noisy Pest comments
* Add frontend core, editor adapter & API refactor
* Remove unused Twig macro import and legacy filter
* Move gateway assets to public/gateways
* Include frontend build and assets in Docker image
* Move branding assets to public and refactor build
* Refine update page UI text and styles
* Add 'miterlimit' to cspell word list
* Bump dependencies in composer.lock
* Add esbuild helpers and update imports
* ddev: Node 24, tighten /data & build checks
* Remove .qwen/settings.json
* Docs: expand frontend, build and dev setup
* Add 'docroot' to cspell word list
* Update dependency @dicebear/core to v10
* Add server-side avatars via DiceBear
* Initialize locale selector with saved/default
* Add 'dicebear' to cspell word list
* Fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Adjust admin alerts and installer warning
* Make dashboard cards full-height and align badges
* Split dashboard cards into partials and add AJAX
* Replace status badges with ribbon elements
* Revamp activity panel layout and responsiveness
* Adjust dashboard card spacing and styles
* Style dashboard links and adjust chart heights
* Back-to-top: update classes and styles
* Fix client admin UI labels and flags
* Improve API response parsing and errors
* Mark action columns no-sort, add table-hover
* Update table classes for hover and wrapping
* Refactor admin templates to card-header layout
* Update admin templates layout and semantics
* Tidy admin templates; remove tabs, update notice
* Standardize admin alert styles and messages
* Handle null/empty status in status_name macro
* Validate resolved renewal price before invoicing
* Keep IP actions inline in activity table
* Right-align activity pagination controls
* Align pagination and export buttons in admin lists
* Improve admin pagination & per-page defaults
* Extract record selector into partial
* Add tab deep-linking and URL hash persistence
* Refactor search controls & capitalize 'One Time'
* Refactor client search filters and toggle state
* Refactor activity filters UI and tomselect styling
* Redesign admin filters; capitalize 'On Hold'
* Revamp admin filter panels (Invoice & Support)
* Group search clause in Massmailer query
* Add filters and expanded search for pages/gateways
* Add filter panels, refine search logic, tests
* Add advanced search filters for activity modules
* Add structured filters, date/ip search & tests
* Add Email queue filters and admin tab
* Add collapsible filter panel to Staff settings
* Refactor badges to use shared macros
* Add massmailer statuses & boolean badges
* Add search icon and refine search input layout
* Update admin templates layout and markup
* Use modals for creating clients/groups
* Centralize tab header action buttons
* Centralize toolbar actions; add Order modal
* Bump Composer dependencies (lockfile)
* Capitalize 'One Time' payment label
* Return raw API body; use button for search
* Wrap search button in input-group-text
* Make search max width configurable
* Fix malformed aria-label Twig expression in layout_default.html.twig
Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/c8db6ba9-bda4-413a-989f-e4777e06bd12
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Fix XSS risk in updateExternalIP: append IP via createTextNode instead of innerHTML concat
Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/0c435e52-1784-4466-a8dc-c41e12443a6f
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Refactor New Client modal layout and styles
* Limit and style phone country code field
* Use `country_names` helper and `country_name` filter
* Use Symfony Intl for currencies & locales
* Use Symfony Intl for currencies; drop built-in country lists
* Refactor Currency module API, entity and service
* Remove system checkLimits usages from modules and tests
* Remove `currency.title` column and update APIs
* Add inputmode and maxlength to cspell dictionary
* Fix dropdown toggle accessibility: use button instead of anchor
Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/b7f9474b-1988-4c08-aec0-f8991edfea71
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Improve multi-currency handling and installer
* Log currency code when changing cart currency
* Use removeCurrency in Admin API and update tests
* Use Intl currency symbols and fraction digits
* Use currency filters in templates
* Rename currency title to name and update schema
* Remove deprecated Service::getLanguages
* Capitalize system permission labels and fix messages
* Use Symfony Countries and remove phone codes list
* Validate country codes; use country select
* Set fb_locale cookie and fix admin locale display
* Validate locales and add default locale selector
* Use Locales::getNames; tweak language selector CSS
* Tweak header spacing and make nav links icon-only
* Localize client login texts
* Add phone country-code attrs and styles
* Center .modal-dialog in two themes
* Add phone_codes API to list calling codes
* Make form the modal-content wrapper
* Move create forms to Bootstrap modals
* Convert new-item tabs to modals in admin UI
* Revamp admin UI, embed snippets & modal
* Revamp admin settings UI and templates
* Revamp Formbuilder & Redirect admin UIs
* Add 'Segoe' and 'minmax' to cspell dictionary
* Rename warning() to warn() in test logger
* Refactor admin templates to card-based layout
* Expose initAvatars globally and scoped init
* Add 'view' permissions and enforce checks
* Refactor Servicehosting admin UI and scripts
* Add staff permission checks and module permissions
* Refactor admin templates layout and forms
* Add staff permission checks and module perms
* Add staff permission checks and module perms
* Refactor admin Twig templates and UI
* Refactor client admin UI to use summary/form cards
* Refactor admin invoice/subscription/transaction templates
* Refactor Order admin UI; fix country labels
* Refactor admin templates and add IP country filter
* Add 'view' permissions and checks to admin APIs
* Use detail/related partials in admin templates
* Refactor admin product templates to use partials
* Add endembed to cspell ignoreWords to fix spellcheck CI failure
Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/e8973bef-7364-4b30-8dd8-13701ca15c5d
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Refactor admin templates to use common partials
* Validate order status, add permission checks
* Center form buttons and add horizontal padding
* Introduce createAdminApi and BBTestCaseContainer
* Refactor admin UI templates and forms
* Run intl compression after composer install
* Disable provenance in buildx outputs
* Revamp admin templates for UI and previews
* Refactor admin templates, pricing UI & styles
* Refactor admin invoice sidebar and SEO settings UI
* Use minor currency units, country list & API fixes
* Rename language selector class to locale-selector
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Introduce E2E tests using Cypress
* Removed unrelated submodule
* Add Cypress Cloud project ID
* Save Cypress runs to Cloud
* Pass commit information to the container
* Added admin smoke tests
* Redo Cypress workflow
* Increase shm size
* Run Cypress using Electron
* Add dedicated Docker network alias
* Fixed hostname
* Validate sessions via browser navigation
* Disable session fingerprinting during Cypress tests
* Adjust smoke test paths
* Move Cypress usage to npx
* Remove redundant assertions
* Added basic tests for the client area
* Make spellcheck happy
* Fix test cases
* Added client support lifecycle tests
* Separate tests by directories
* Account for the max subject length
* Fix an actual FOSSBilling error
* Getting around the subject character limit
* Restored the long subject
* Timing issues with Bootstrap modals
* Fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Only upload artifacts when recording is disabled
---------
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Replace Custom Twig components
Replace custom Twig components with native Twig components, remove unused custom Twig components, and move functionality to macros where appropriate.
m
Update partial_extensions.html.twig
* Update Twig components and migrate to FOSSBilling namespace
* Update Currency module...
* Refactor Twig environment config and loading
* Switch CSRF to cookie-based double-submit
* Add Api Twig extension and restore widget/svg helpers
* Cast language flags; improve JSON parsing
* Add markdown DI service and use in Admin API
* Refactor Twig extensions and markdown, simplify APIs
* Add sandboxed email Twig env, update render APIs
* Fix pagination URL usage and menu class
* Fix HTML markup in email templates
* Use macro for avatars and status badges
* Fix Twig spacing and pagination URL filter order
* Replace Custom Twig components
Replace custom Twig components with native Twig components, remove unused custom Twig components, and move functionality to macros where appropriate.
m
Update partial_extensions.html.twig
* Update Twig components and migrate to FOSSBilling namespace
* Refactor Twig environment config and loading
* Add Api Twig extension and restore widget/svg helpers
* Cast language flags; improve JSON parsing
* Add markdown DI service and use in Admin API
* Refactor Twig extensions and markdown, simplify APIs
* Fix pagination URL usage and menu class
* Fix Twig spacing and pagination URL filter order
* Use `current_theme` global and refactor `period_title`
* Allow markdown and date in email Twig sandbox
* Update email template examples
* Fix Twig URLs, quoting, and logo alt text
* Fix Twig templates: URLs, i18n, search params
* Use `templates/*` directories for module templates
* Tighten Twig sandbox and add tests
* Add Twig environment and template docs to `AGENTS.md`
* Use Symfony Filesystem/Finder and assorted fixes
* Fix ticket reply link fragment concatenation
* Close missing divs in dashboard template
* Use detailed `toApiArray` for client
* Fix module name resolution for email templates
* Regenerate `composer.lock`
* Use `markdown_to_html` filter in admin macro
* Handle null price/quantity and rename test method
* Use `Tools::isHTTPS()` for HTTPS checks
* Add 'area' param to `url` filter and update templates
* Use client area URLs in admin templates
* Use client area and guest API URLs in templates
* Remove client-side invoice delete feature
* Create Twig env via `TwigFactory` for PDF rendering
* Add embedded orderbutton JS and update render
* Add 'srclink' to cspell allowlist
* Use `renderEmailTplString` for email rendering
* Bump twig/markdown-extra to v3.24
* Use `markdown_to_html` for privacy policy
* Escape API JSON, handle null IP, client URLs
* Remove initial admin creation flow
* Handle HTTP failures and make tests robust
* Use `api_url` helper in admin templates
* Use `url` filter for footer link 5
* Add patch53 to remove legacy html templates
* Bump setting last_patch to 53
* Add patch54 to restore legacy email templates
* Use renderEmailTplString for email templating
* Remove redundant else/endif in order template
* Add file-hash cache buster for asset URLs
* Remove raw Twig filter and handle missing modules dir
* Return '-' for future timestamps
* Register and reuse TwigFactory and add CSRF cookie
* Adjust API URL helper and add Twig error handling
* Update composer.lock and package-lock.json
* Add twig_factory to ServiceTest DI
* Use url filter for link_page in template
* Composer - update deps and add markdown-extra
* Remove docblocks and inline comments in `TwigFactory`
* Add patches 53-55 and update `last_patch`
* Add `has_permission` Twig function; exclude `href`
* Remove duplicate network interface form
* Guard removal of legacy dirs; add network input
* Handle null category descriptions in template
* Add Twig adapter env and sandbox policy
* Add 'striptags' to cspell word list
* Update composer.lock (deps updated/removed)
* Sanitize custom payment adapter templates
* Remove redundant legacy API tests
* Bump `last_patch` setting to 56
* Coalesce null before `markdown_to_html`
* Move update patcher to system CLI command
* Remove stray `endif` from recaptcha macro
* Update composer.lock
* Fix extra closing brace in Api ServiceTest
* Fix test errors from main merge
- Remove testGetRequestCount tests (method moved to RateLimiter)
- Remove testGetDi from Staff and System GuestTest (protected method)
- Fix IP error message in testLoginCheckIpException
- Add rate_limiter mock to Staff GuestTest tests that need it
* Fix remaining Staff GuestTest issues
- Add extension service mock for captcha check
- Fix error message from 'User not found' to 'Admin not found'
* Fix Staff GuestTest: update query and add logger mock
* Fix Staff GuestTest: set admin status to active for password reset flow
* Fix stale API calls and inverted required condition
- Notification: replace removed system_string_render with direct output
- Antispam settings: replace |alink/|link with |url/|api_url filters
- build_form macro: fix inverted required condition for non-textarea inputs
* Sanitize JS/data URIs and disable buttons by permission
* Use client login/profile links in support emails
* Encode fb-api JSON and tighten URL sanitization
* Prefer session auth for API key methods
* Remove stray endif and fix template formatting
* Add CSRF token to CSV exports; fix template
* Remove stray endif in currency template
* Make invoice PDF generation return Response
* Fix Twig filters, templates, and form handling
* Remove readonly from anonymous class in test
* Inline DebugBar CSS/JS in renderHead
* Add Bootstrap Tab to global bootstrap
* Capitalize template UI strings
* Use CKEditor API for reply quotes
* Remove WYSIWYG module and move CKEditor to themes
* Bump `last_patch` in install SQL to 59
* Remove Spamchecker module
* Run domain management script only for active orders
* Standardize UI text capitalization & minor fixes
* Remove Spamchecker legacy tests; fix period test
* Rename Spamchecker tests to Antispam
* Restore antispam config in tests; remove fixture
* Refactor Antispam Guest tests for config checks
* Update theme build docs; remove Wysiwyg module
* Remove spamchecker from cspell and tweak comment
* Add spamchecker to cspell word list
* Capitalize 'Update Graphs' button label
* Apply suggested fix to tests/Modules/System/AdminTest.php from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Apply suggested fix to tests/Modules/System/AdminTest.php from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Apply suggested fix to tests/Modules/System/AdminTest.php from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* fix: add VERIFYPEER and VERIFYHOST to cspell ignoreWords
Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/c79bcd25-22d6-424f-b7cb-b17b6ef16246
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
* Remove manual unsetting of `BOXADMR` cookie
* Rename locale cookie `BBLANG` to `fb_locale`
* Rename session name to `fb_sid`
* Tidy comments in `config-sample.php`
* Remove legacy `bb-ipn.php` rewrite rule
* Remove legacy BB params and file migration check
* Remove header comments from `robots.txt`
* Update SQL dump header database name
* Use `FB_*` DB constants and add DB port
* Refactor database connection to use `DriverManagerFactory`
* Add Doctrine DBAL connection to DI container
Revert "Add Doctrine DBAL connection to DI container"
This reverts commit bc2f9f4901d8baee4b12cd2795b0ef76156849cf.
Reapply "Add Doctrine DBAL connection to DI container"
This reverts commit 48debb74bbfa6c8cebf27ee20c222c911d508ccb.
* Refactor database access to use Doctrine DBAL
* Refactor DB config to use 'driver' instead of 'type'
* Refactor database connection to use `DriverManagerFactory`
* Add Doctrine DBAL connection to DI container
Revert "Add Doctrine DBAL connection to DI container"
This reverts commit bc2f9f4901d8baee4b12cd2795b0ef76156849cf.
Reapply "Add Doctrine DBAL connection to DI container"
This reverts commit 48debb74bbfa6c8cebf27ee20c222c911d508ccb.
* Refactor database access to use Doctrine DBAL
* Refactor DB config to use 'driver' instead of 'type'
* Refactor tests to use `dbal` mocks
* Replace `getQueryBuilder` with `createQueryBuilder
* Fix handling of empty query results and cleanup exception comment
* Update Composer lock file
* Refactor PDO initialization in DI container
Updated the DI definition for 'pdo' to directly use the PDO instance returned by Doctrine's DriverManagerFactory, removing unnecessary object casting. Also added missing import for DriverManagerFactory. Updated PHPStan config to remove a redundant ctype_alnum rule.
* Refactor query execution and result fetching logic
Updated database query handling in Extension and System Service classes to separate query building from execution and fetching. This improves code clarity and ensures consistent use of fetchOne for single-value results.
* Fix SQL where clause syntax in Service.php
Corrects the syntax of the where clause in several queries by changing 'where('param', ':param')' to 'where('param = :param')' for proper parameter binding and query execution.
* Refactor Stats module to use Doctrine DBAL
* Refactor Custompages Service to use dbal instead of pdo
Replaced all direct PDO usage with dbal methods for database operations in the Custompages Service. This improves consistency, leverages dbal's abstraction, and prepares the codebase for better maintainability and future enhancements.
* Refactor DBAL usage and update test mocks
Refactored DBAL service definitions and query builder usage to improve clarity and consistency. Updated tests to use anonymous classes for DBAL and query builder mocks instead of PHPUnit mock objects, simplifying test setup and improving maintainability.
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor DB queries to use executeQuery and executeStatement
Replaced manual PDO prepare/execute calls with Doctrine DBAL's executeQuery and executeStatement methods in UpdatePatcher and ApiRequestTable. This improves code consistency and leverages DBAL features for query execution and result fetching.
* Add input validation for DB charset, table, and column names
Introduces strict validation for supported database charsets in DriverManagerFactory, allowed column names in Custompages Service, and allowed table names in Stats Service to prevent invalid or unsafe input. Also updates UpdatePatcher with default values for new config keys and adjusts a Stats Service test to use a valid table name.
* Add 'CHARSETS' to cspell custom words list
* Refactor query execution in patcher and product domain
Updated query builder usage in UpdatePatcher and ProductDomainTable to separate query building from execution, aligning with best practices. Removed unused fetchOne stubs from ServiceTest to reflect these changes.
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor `getProductSummary` to use Doctrine DBAL
* Fix parameter binding for category and hash in UpdatePatcher
Updated the insert statement in UpdatePatcher to bind the 'category' and 'hash' parameters explicitly, ensuring correct handling of null values during database insertion.
* Update MySQL charset handling in PDO setup
Removes redundant charset initialization statements for MySQL connections, relying on DBAL to handle connection charset via DSN. Now only sets the server default charset and session timeouts.
* Set default DB driver to `pdo_mysql` in `UpdatePatcher`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore: Remove jQuery dependencies and update build system
- Remove jQuery from theme dependencies
- Simplify build configuration
- Update documentation to reflect jQuery removal
- Apply PSR-12 code style formatting
- Replace jQuery with vanilla JS in ClientBalance adapter
* refactor: Complete JavaScript API rewrite with modern architecture
- Rewrite API.js with improved URL handling and CSRF management
- Add reusable utility functions in utils.js
- Remove deprecated jQuery-based bb object
- Update Tom Select integration
* feat: Add Twig API functions for declarative API interaction
- Add fb_api(), fb_api_form(), fb_api_link() Twig functions
- Add asset deduplication to prevent duplicate script/style loading
Note: Dashboard/Index module moved to separate refactor/index PR
* refactor: Integrate new API into theme layouts and core templates
- Update theme layouts to use new API functions
- Convert theme partials and macros
- Update core admin module templates (System, Theme, Wysiwyg, Staff)
* refactor: Update module templates to use new API functions
- Replace data-api-* attributes with fb_api_*() Twig functions
- Remove manual CSRF token handling
- Update all module templates for consistency
Note: Index module excluded (moved to refactor/index PR)
* Remove custom ignore rule from phpstan.neon
Deleted a specific ignore rule for ctype_alnum argument count in src/modules/Extension/Service.php, likely because it is no longer needed or the underlying issue has been resolved.
* Migrate asset build system from Webpack Encore to esbuild
Replaces Symfony Webpack Encore with esbuild for frontend asset compilation. Updates documentation, removes related dependencies and config files, and adds esbuild configuration for themes. This modernizes the build process for improved speed and maintainability.
* Remove redundant comments and spinner from build scripts
Cleaned up code by removing unnecessary comments and the spinner utility from esbuild scripts in admin_default and huraga themes. Also simplified logic in API handler, currency entity, currency service, and profile client validator by removing redundant comments and streamlining null/empty checks.
* Add new terms to cspell custom dictionary
Added 'Spriter', 'spriter', 'dataurl', and 'tomselect' to the cspell custom words list to prevent false spelling errors for these terms.
* Potential fix for code scanning alert no. 422: Shell command built from environment values
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Potential fix for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Potential fix for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Refactor theme build to use custom SASS and PostCSS pipeline
Replaces direct SCSS imports in JS with a custom esbuild pipeline for both admin_default and huraga themes. Adds SASS and PostCSS (autoprefixer) processing via esbuild plugins, improves tilde (~) import resolution, and ensures CSS is post-processed and source maps are handled. This change modernizes and unifies the asset build process, making it more maintainable and extensible.
* Update sass import and flag-icons path in themes
Changed sass import to use namespace import in both admin_default and huraga esbuild.mjs files for consistency. Set $flag-icons-path in huraga _flags.scss to ensure correct path resolution for flag-icons assets.
* Refactor theme CSS build to use vendor bundles
Introduces separate vendor.css files for both admin_default and huraga themes, consolidating third-party CSS imports. Updates esbuild scripts to build and include these vendor bundles, removes tilde (~) importers, and adjusts SCSS to use CSS variables instead of direct SCSS variable imports. Twig templates are updated to load the new vendor.css files, and Huraga's theme variables are migrated to CSS custom properties for better maintainability.
* Update `package-lock.json` with new CKEditor 5 packages
Added and updated multiple @ckeditor/ckeditor5-* packages to version 47.3.0 and related dependencies. This change likely prepares the project for enhanced or new CKEditor 5 features and plugins.
* Refactor theme build scripts and add shared utils
Introduces a new `@fossbilling/frontend-build-utils` package with shared helpers and esbuild plugins for theme builds. Refactors admin_default and huraga esbuild scripts to use these utilities, improving maintainability and reducing code duplication. Removes unused `sprite.js` and updates asset handling. Updates workspace configuration in `package.json` and `package-lock.json`.
* Refactor theme asset build paths and add svg sprite helper
Migrates theme asset outputs to 'assets/build' directories for both admin_default and huraga themes, updating all references and build scripts accordingly. Adds a Twig function for inlining SVG sprites. Updates SQL defaults and patcher for new asset paths. Removes direct jQuery imports from theme JS entrypoints and uses an esbuild inject shim for global jQuery. Also includes minor CSS and manifest adjustments.
* Potential fix for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Add PurgeCSS plugin and integrate with theme builds
Introduced a new PurgeCSS plugin in frontend-build-utils to remove unused CSS from bundled files. Updated package.json and package-lock.json to include PurgeCSS and its dependencies. Integrated the plugin into the esbuild scripts for admin_default and huraga themes to enable CSS purging in production builds.
* Set NODE_ENV=production for frontend build
Ensures the frontend assets are built with production optimizations by explicitly setting NODE_ENV=production during the build step in the release workflow.
* Fix static analysis warning in module directory scan
Updated the type check in the module directory scan to use a null coalescing operator, improving compatibility with static analysis tools like PHPStan.
* Update PHPStan baseline for ctype_alnum argument count
Added a new baseline entry to ignore an argument count warning for ctype_alnum in src/modules/Extension/Service.php.
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Dropped the "Paidsupport" module
* Patch to migrate existing orders and products to "custom"
* Dropped the "Servicemembership" module
* Update src/library/FOSSBilling/UpdatePatcher.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/library/FOSSBilling/UpdatePatcher.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Improve PHPStan compatibility and static analysis
Added a PHPStan ignore pattern for polyfilled ctype function parameter count errors. Updated Extension Service to explicitly check variable type before calling ctype_alnum, aiding static analysis tools like PHPStan.
* Remove polyfill-php72 and update dependencies
Removed 'symfony/polyfill-php72' from composer.json replace section. Updated composer.lock with new versions of league/csv, php-debugbar/php-debugbar, phpunit/php-code-coverage, and rector/rector.
* Update `last_patch` setting to version 47
Incremented the 'last_patch' value in the settings table from 46 to 47 to reflect the latest patch version.
---------
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Revise README for clarity and feature emphasis
Update `README.md` to enhance visibility of key features and use cases, and reorganise sections for clarity.
* Revise README for clarity and structure
* +Initial Doctrine EntityManager setup
* Doctrine support for Pagination
* Removed doctrine/migrations. Won't be using that yet.
* Reworked the News module using Doctrine
* Strict types
* A couple of fixes
* Add 'ONLYDIR' to cspell.json dictionary
* Removed the old Post model
* Typing
* Dev mode support
* +TimestampableInterface
* +Proxy settings
* Add missing `datetime` fields to `Post` entity
* Update Guest.php
* Add `doctrine/orm` and related dependencies
* Add Symfony serializer, property-access, and property-info
* Update Service.php
* Update cspell.json
* Adam's suggestions
* Update AGENTS.md to include Doctrine directives
* Reuse the post content
---------
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
* Update Code of Conduct
Update Code of Conduct to latest Contributor Covenant Code of Conduct (3.0).
* Add 'cooldown' to cspell custom words list
Updated cspell.json to include 'cooldown' in the list of recognized words to prevent false spelling errors.
* Move `CODE_OF_CONDUCT.md` to `.github` directory
* Update Contributor Covenant badge in README
* Update Code of Conduct
Update Code of Conduct to latest Contributor Covenant Code of Conduct (3.0).
* Add 'cooldown' to cspell custom words list
Updated cspell.json to include 'cooldown' in the list of recognized words to prevent false spelling errors.
* Move `CODE_OF_CONDUCT.md` to `.github` directory
* Update Contributor Covenant badge in README
* Fix Code of Conduct link in `CONTRIBUTING.md`