Commit Graph
62 Commits
Author SHA1 Message Date
renovate[bot] 085b23f414 fix(deps): update dependency mattketmo/email-checker to v3 (#3215)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-27 07:22:42 +00:00
renovate[bot]andAdam Daley 064b89c15d fix(deps): update dependency php-debugbar/php-debugbar to v3 (#3141)
* fix(deps): update dependency php-debugbar/php-debugbar to v3

* Add `php-debugbar/twig-bridge` and update dependencies

Added `php-debugbar/twig-bridge` to `composer.json` and updated several dependencies to their latest versions, including doctrine/collections, doctrine/orm, dompdf/php-svg-lib, monolog/monolog, php-debugbar/php-debugbar, pimple/pimple, prinsfrank/standards, sabberworm/php-css-parser, symfony/* packages, and others. These updates improve compatibility, security, and feature support.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-01-13 09:31:26 +00:00
renovate[bot]andAdam Daley 2ae6d2ad42 chore(deps): update dependency phpunit/phpunit to v12 (#3128)
* chore(deps): update dependency phpunit/phpunit to v12

* Update PHPUnit and related dependencies

Upgraded PHPUnit and several related packages (such as php-code-coverage, php-file-iterator, php-invoker, php-text-template, php-timer, and various sebastian/* libraries) to their latest major versions, requiring PHP >=8.3. This ensures compatibility with the latest testing tools and brings in new features, improvements, and security updates.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-12-30 08:41:18 +00:00
Adam Daley 136480860b Raise minimum PHP version requirement to 8.3 (#3125)
* Raise minimum PHP version requirement to 8.3

Update all documentation, configuration, Composer requirements, and CI workflows to require PHP 8.3 or higher. Remove `symfony/polyfill-php83` and add `symfony/polyfill-php85`. Adjust installer and requirements checks accordingly.

* Update PHP version and dependencies

Remove PHP 8.5 from CI and workflows, standardizing on PHP 8.3 and 8.4. Update Composer dependencies in composer.json to latest compatible versions for both required and dev packages.
2025-12-30 08:13:04 +00:00
01612b9146 Dropped Paidsupport and Servicemembership (#3066)
* 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>
2025-12-27 22:42:37 +00:00
renovate[bot] 28947b010d fix(deps): update dependency stripe/stripe-php to v19 (#3033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-24 02:00:57 +00:00
Yağızhan Burak YakarandAdam Daley 58956422c7 Support module improvements (#2997)
* Use Monolog instead

* Method types

* Use Symfony's HTML Sanitizer to actually sanitize content

* Fixed tests

* Types and sanitization

* Make sanitizeContent a static method instead

* Updated composer.lock

* Update lockfiles

* Copilot suggestions

* Fixed method signatures

* Fixed tests

* Added basic sanitizeContent tests

* Fixed SQL query

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-12-14 18:52:58 +03:00
renovate[bot] d0b6086b6f fix(deps): update dependency stripe/stripe-php to v18 (#2935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-13 11:40:15 +00:00
renovate[bot] 9c7c3909cd fix(deps): update dependency phpmyadmin/motranslator to v6 (#3006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-02 11:32:16 +00:00
Yağızhan 11ef945341 Minor developer experience improvements (#2967)
Composer scripts
2025-10-14 11:06:11 +03:00
Adam Daley a9b903c222 Codebase modernisation, configuration cleanup, and improved type safety (#2957)
* Refactor tests to replace depreciated functions

* Update Rector config and dependencies

* Rector: Add explicit string casting for stricter type safety

* Rector: Add return type hints to methods across codebase

* Rector: Increase dead code level and refactor invoice item logic

* Remove unnecessary `willReturn` from test mocks

Eliminate redundant `willReturn(null)` and similar calls from PHPUnit mock setups in legacy module tests, leaving only method expectations. Also update some test values to use floats for consistency.

* Refactor API controller and email adapter return values

* Update formatting and guidelines in `AGENTS.md`
2025-10-11 23:39:44 +01:00
YağızhanandAdam Daley 06d2746017 Initial Doctrine setup and News rewrite (#2915)
* +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>
2025-10-09 15:58:31 +03:00
Yağızhan 48bb35386d Replace ramsey/uuid with symfony/uid (#2917)
* Replace ramsey/uuid with symfony/uid

* Use the imported class for class_exists
2025-09-18 00:42:41 +01:00
Adam DaleyandCopilot 315f9f3944 Refactor Filesystem and Path handling (#2836)
* Removed legacy files

* Refactor Filesystem and Path handling

* Removed `FOSSBilling\Tools` legacy functions

* Update live-tests to include file check for `php_error.log`

* Update Extension module tables to fix wrapping issue

* Apply suggestions from @Copilot

Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Extension module icon URL handling

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-09 21:50:11 +01:00
renovate[bot] 4257653f22 fix(deps): update dependency stripe/stripe-php to v17 (#2654)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-17 12:53:51 -07:00
Belle Aerni 6b300265c8 Replace maximebf/debugbar with php-debugbar/php-debugbar (#2647) 2025-03-23 12:24:21 -07:00
Adam Daley 43d1969f68 Refactor initial application loading (#2626)
* Refactor initial application loading

Refactor `load.php` to simplify loading, clarify loading, and to use available Symfony components. Additionally, update `index.php` as appropriate.

Add Symfony HttpFoundation as supporting dependency and for future functionality.

* Remove or disable problematic and unused functions

* Restore required FOSSBilling\Event function

* Remove / disable problematic unused functions

* Restore required FOSSBilling\Event function

* Refactor initial application loading

Refactor `load.php` to simplify loading, clarify loading, and to use available Symfony components. Additionally, update `index.php` as appropriate.

Add Symfony HttpFoundation as supporting dependency and for future functionality.

* Remove or disable problematic and unused functions

* Restore required FOSSBilling\Event function

* Remove / disable problematic unused functions

* Restore required FOSSBilling\Event function
2025-03-06 00:55:20 +00:00
renovate[bot] f25915fee5 fix(deps): update dependency maximebf/debugbar to v2 (#2590)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-31 10:33:22 -08:00
renovate[bot] d282491fea fix(deps): update symfony packages to v7 (major) (#2582)
fix(deps): update symfony packages to v7

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 13:12:47 -08:00
renovate[bot]andBelle Aerni 96fa36b3e3 chore(deps): update dependency rector/rector to v2 (#2545)
* chore(deps): update dependency rector/rector to v2

* Updated PHPStan and related deps

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2024-12-17 12:20:41 -08:00
Belle Aerni 45db4910a7 PHP 8.4 prep (#2464)
* Update CI for PHP 8.4

* Update composer deps for PHP 8.4

* Updates

* This is the default mode and this constant causes test failutes

* Explicily install the PDO extensions

* Temporarily downgrade the live tests to PHP 8.3

It would seem that there is some kind of problem with PHP 8.4 in regards to these tests. I believe it is outside of our control however as it installs fine for me with PHP 8.4 under DirectAdmin

* Update to address deprecations

* Make that nullable

* Fixed my typo

* Bump PHPunit to v11

* Also take care of two minor things

* Formatting fix
2024-11-21 23:16:29 -08:00
Belle Aerni a5d15c2a99 Upgrade GeoIP functionality & replace the databases (#2471)
* Replaced Maxmind's IP database

* Began rebuilding GeoIP reader functionality

The GeoIP2 package does not worth with DB's that aren't built by maxmind themselves, making it rather unhelpful for us.

Since my long-term goal is for someone to be able to bring in their own DB, making a custom implementation seems like the reasonable choice.

(Plus my aim is already to replace the MaxMind DB due to it's licencing)

* Created an IP address lookup page

* + ASN info

* Bump last patch

* Make PHPStan happy

* Very minor refactor + PHPDocs
2024-10-31 19:31:50 +01:00
renovate[bot] acdcdfca96 fix(deps): update dependency stripe/stripe-php to v16 (#2450)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-21 22:18:38 -07:00
Belle Aerni 32315e2ddb Remove additional hardcoded lists (#2346)
* Remove additional hardcoded lists (countries & phone codes)

Also fixed a few UI oddities I noticed

* Bugfixes

* Removed the old reference to the polyfill

* Fixed a typo
2024-07-12 00:46:03 +01:00
Yağızhan d1904145eb Introducing the FOSSBilling CLI (#1021)
+CLI

Die when accessed through a browser

Move the commands under the modules

Added system:version

Added system:releasenotes

Added theme:list

Styling
2024-07-03 05:02:28 +01:00
Belle Aerni 945a201572 Small Currency Improvements (#2311)
* Removed the hardcoded currencies list

Also streamlined the process of adding new currencies by allowing the title & exchange rate to automatically be determined.

* Use an existing translatable string

* Update the test workflows

* Dropped the legacy test, wrote two new ones

* Fixed a typo in my assert

* Whooooops
2024-06-27 09:48:37 -07:00
renovate[bot] e6555658af fix(deps): update dependency stripe/stripe-php to v15 (#2309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 19:35:57 -07:00
renovate[bot] 85c80b32f0 fix(deps): update dependency stripe/stripe-php to v14 (#2231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-14 21:33:59 -07:00
renovate[bot] 41694d7835 fix(deps): update dependency dompdf/dompdf to v3 (#2270)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-14 22:21:43 +01:00
Belle Aerni 35db2b9377 Reduce the final size of our vendor folder (#2227)
* Reduce the final size of our vendor folder

* Updated our lockfile
2024-04-10 15:14:26 -07:00
Belle Aerni 924a5d478b Be explicit about requiring PHP version polyfills (#2156) 2024-02-17 17:13:29 -08:00
Belle Aerni b5a4bd4d9e Various minor improvements (#2132)
- Removed unused twig extension, May a tiny bit of ram and reduce memory usage.
- Switch to the filesystem `touch` function VS PHP's native. Also corrected the time used for touch.
- Wrapped our call to monolog's `write` function in a try-catch. These don't need to be fatal. Instead logs to the PHP error log.
- Ensured the SSL redirect won't be triggered if needed headers weren't provided. Prevents logged errors
- Removed unused composer deps.
- Moved cURL to being a required extension in our composer.json file
- Replaced a a case where the death star version constraint was being used.
2024-02-10 21:39:25 -08:00
renovate[bot] e36f0ea8ca Update dependency rector/rector to v1 (#2124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 17:06:24 -08:00
renovate[bot] e3af8d98f3 Update dependency rector/rector to ^0.19.0 (#2056)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-09 07:34:40 -08:00
Adam Daley 948ac8e74c Bump lcharette/webpack-encore-twig to v1.2 (#1933)
Bump lcharette/webpack-encore-twig

Bump lcharette/webpack-encore-twig to ^1.2 and remove symfony/webpack-encore-bundle override as now fixed upstream.
2023-12-07 09:36:46 +00:00
renovate[bot] 510a1336dd Update dependency geoip2/geoip2 to v3 (#1921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 15:44:50 -08:00
Adam Daley 4bd81431a4 Bump symfony dependencies to v6.4 2023-11-29 14:43:37 +00:00
Belle Aerni ff05f672dc Upgrade symfony/webpack-encore-bundle to v2.1.1 (#1891) 2023-11-28 16:41:51 -08:00
Belle AerniandYağızhan 865b0b6159 Implemented PHP DebugBar (#1825)
* Brought in the debugbar extension

Co-Authored-By: Yağızhan <hi@yagiz.dev>

* Completely restructured

Redid the previous work to allow us to pass around a single instance of the debug bar, allowing us to leverage more types of data collection.

* Added some more time measurements

* Enabled HTML var dumper, added config collector

* Fix

---------

Co-authored-by: Yağızhan <hi@yagiz.dev>
2023-11-16 23:21:14 +00:00
Belle Aerni 50cc54ed4e Improved email validation & spam prevention (#1806)
* Improved email validation

* Fixed spelling & PHPDoc, updated module description

* Removed accidental leftovers from debugging

* Rremoved PHP 81 pollyfil, assume email valid if there's an error
2023-11-11 21:44:08 +02:00
Adam Daley 276df9a58e Update PHPUnit to version 10 (#1798)
* Update PHPUnit to version 10

Update composer and CI version of PHPUnit to 10, and migrate XML config to updated schema.

* Update tests for PHPUnit 10

Update tests to replace depreciated functions in PHPUnit 10. Also, remove risky tests which don't assert anything.
2023-11-09 10:43:30 +01:00
Adam Daley b0e10cd404 Update monolog/monolog to version 3 (#1801)
* Update monolog/monolog to version 3.5

* Update Monolog priority levels to use Level enum

Update Monolog library class to use Level enum for priority levels, as previous constants depreciated.
2023-11-08 15:27:23 +01:00
Adam DaleyandBelle Aerni b3321a8dd3 Update to Sentry v4 (#1780)
* Bump minimum PHP version to 8.1

* Missed these too

* Shit's broke and stupid as fuck

* Update SentryHelper.php

* Update package-lock.json

* I did the fixing

---------

Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-11-07 17:49:16 -08:00
Belle Aerni a4c32d70a7 Minor improvements to Sentry.io integration (#1769)
* Remove php-http/message-factory

* Don't report error reporting changes on preview builds

We don't have a way to reliably track / compare this, so the message would otherwise almost always be displayed.

Hiding the massage on preview builds resolves that

* Downgrade errors in the API controller

None of these are really errors, so let's convert them to InformationException so they aren't captured and sent to Sentry
2023-10-31 08:14:17 +01:00
Belle Aerni 602b537996 Opt-in error reporting via Sentry.io (#1732)
* Began implementing Sentry.io support

* Added to the installer

* Added the ID to the bug report template and UI

* Hook it into our error handler, added the ability to filter by error code

* Attempting to add the DSN via GH actions

* Spelling and making PHPstan happy

* Skip exceptions for various incomplete configurations

Also brings in some of the category suggestions made by @Anuril in #195

* Update tests to account for changes

* Added & renamed exception classes

* Fix tests

* Change a bunch of items to be InformationExceptions

* Use a lighter HTTP client, fixed API error reporting

* I guess that's not needed now?

Arighty then

* Improvements, additional info added

* Update SentryHelper.php

* Improved error logging, added instance ID to error page

Also made it so that errors are correctly sent to Sentry rather than exclusively exceptions

* Make the tests happy

* Added the link, improved wording

Also removed the "performance" part of the reporting as it needs to be added to the front-end and I'm not currently implementing that

* Began implementing UI alerts and info

* Added the ability to toggle, fixed tests, use path constants

* Added some useful info & links to the page

* These should be InformationException

* Fix the automated Sentry DSN entry

* Fix the install number text

* Minor cleanup, converted more to InformationException

* Replaced some direct config references with constants

We have the BB_DEBUG constant to indicate if we have debug mode enabled or not, so we shouldn't be directly referencing it in the config file unless we actually need to do so.

Using the constant means there's less locations to update the reference if the config structure is changed

* Bugfix

* Consistency & fixed a PHPDoc

* Corrections

* We actually do want exceptions thrown here

* Change how we get the instance ID

* Stability improvements

Having support for translatable error pages was proving to be problematic, so I had to remove it.

I also had to update the exception class to handle cases where the trans function wasn't setup yet (needed for the /run-patcher page if an error occurs)

* Missed this change on git

* Also fix the variable names...

* Re-added new deps after rebase

* This should also accept "Error" types

* Added more info to the bug report and removed a dug line

* This wasn't supposed to get renamed

* Updated some missed references to Box_Exception
2023-10-28 18:40:39 -07:00
dependabot[bot] 781fea47c4 Bump stripe/stripe-php from 12.7.0 to 13.0.0 (#1731)
Bumps [stripe/stripe-php](https://github.com/stripe/stripe-php) from 12.7.0 to 13.0.0.
- [Release notes](https://github.com/stripe/stripe-php/releases)
- [Changelog](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-php/compare/v12.7.0...v13.0.0)

---
updated-dependencies:
- dependency-name: stripe/stripe-php
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 20:42:21 -07:00
Belle Aerni 8c7729ccd3 Miscellaneous autoloader improvements (#1676)
* Miscellaneous autoloader improvements

* Spelling

* Fixed PHPDocs
2023-10-04 07:40:19 +03:00
dependabot[bot] 3039657694 Bump stripe/stripe-php from 11.0.0 to 12.2.0 (#1584)
Bumps [stripe/stripe-php](https://github.com/stripe/stripe-php) from 11.0.0 to 12.2.0.
- [Release notes](https://github.com/stripe/stripe-php/releases)
- [Changelog](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-php/compare/v11.0.0...v12.2.0)

---
updated-dependencies:
- dependency-name: stripe/stripe-php
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-09 09:25:39 -07:00
dependabot[bot] f00550f5ce Bump stripe/stripe-php from 10.21.0 to 11.0.0 (#1547)
Bumps [stripe/stripe-php](https://github.com/stripe/stripe-php) from 10.21.0 to 11.0.0.
- [Release notes](https://github.com/stripe/stripe-php/releases)
- [Changelog](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stripe/stripe-php/compare/v10.21.0...v11.0.0)

---
updated-dependencies:
- dependency-name: stripe/stripe-php
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-19 11:10:29 -07:00
dependabot[bot] b4276cfdd2 Bump rector/rector from 0.17.13 to 0.18.0 (#1549)
Bumps [rector/rector](https://github.com/rectorphp/rector) from 0.17.13 to 0.18.0.
- [Release notes](https://github.com/rectorphp/rector/releases)
- [Commits](https://github.com/rectorphp/rector/compare/0.17.13...0.18.0)

---
updated-dependencies:
- dependency-name: rector/rector
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-18 14:48:07 +02:00