From dc7fff632c09d9b71b0c7a48630934de806c85a5 Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Mon, 29 Jun 2026 21:27:17 +0800 Subject: [PATCH 1/3] Add Laravel 13 support Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/tests.yml | 6 +++++- composer.json | 7 +++---- packages/core/composer.json | 5 ++--- packages/core/src/Console/Commands/MigrateGetCandy.php | 4 +--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d667989d5c..a7d5a40c35 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,11 +10,13 @@ jobs: fail-fast: false matrix: php: [8.2, 8.3, 8.4] - laravel: [11.*, 12.*] + laravel: [11.*, 12.*, 13.*] dependency-version: [prefer-stable] testsuite: [core, admin, shipping, stripe, search] extend-models: ["true", "false"] include: + - laravel: 13.* + testbench: 11.* - laravel: 12.* testbench: 10.* - laravel: 11.* @@ -24,6 +26,8 @@ jobs: laravel: 11.* - php: 8.2 laravel: 12.* + - php: 8.2 + laravel: 13.* name: ${{ matrix.testsuite }} - PHP ${{ matrix.php }} - L${{ matrix.laravel }} ${{ matrix.dependency-version == 'prefer-lowest' && '↓' || '↑' }} ${{ matrix.extend-models == 'true' && 'E' || '' }} steps: - name: Checkout code diff --git a/composer.json b/composer.json index 290346940e..a25312bddc 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,6 @@ "awcodes/shout": "^2.0.4", "barryvdh/laravel-dompdf": "^3.0", "cartalyst/converter": "^9.0|^10", - "doctrine/dbal": "^3.6|^4.0", "dompdf/dompdf": "^3.1", "ext-bcmath": "*", "ext-exif": "*", @@ -22,8 +21,8 @@ "filament/spatie-laravel-media-library-plugin": "^3.3.4", "guzzlehttp/guzzle": "^7.3", "http-interop/http-factory-guzzle": "^1.2", - "kalnoy/nestedset": "^v6.0.5", - "laravel/framework": "^11.0|^12.0", + "kalnoy/nestedset": "^6.0.5|^7.0.0", + "laravel/framework": "^11.0|^12.0|^13.0", "laravel/scout": "^10.13.1", "leandrocfe/filament-apex-charts": "^3.2.0", "livewire/livewire": "^3.0", @@ -46,7 +45,7 @@ "larastan/larastan": "^2.9|^3.0", "laravel/pint": "1.17.0", "mockery/mockery": "^1.6.9", - "orchestra/testbench": "^8.0|^9.0|^10.0", + "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0", "pestphp/pest": "^2.0|^3.0", "pestphp/pest-plugin-laravel": "^2.0|^3.0", "symplify/monorepo-builder": "^10.0" diff --git a/packages/core/composer.json b/packages/core/composer.json index 126f5bdfc0..c5c9c4a85d 100644 --- a/packages/core/composer.json +++ b/packages/core/composer.json @@ -33,13 +33,12 @@ "ext-bcmath": "*", "ext-exif": "*", "ext-intl": "*", - "laravel/framework": "^11.0|^12.0", + "laravel/framework": "^11.0|^12.0|^13.0", "spatie/laravel-medialibrary": "^11.12.7", "spatie/laravel-activitylog": "^4.10.1", "laravel/scout": "^10.13.1", "cartalyst/converter": "^9.0|^10", - "kalnoy/nestedset": "^v6.0.5", - "doctrine/dbal": "^3.6", + "kalnoy/nestedset": "^6.0.5|^7.0.0", "lukascivil/treewalker": "0.9.1", "spatie/php-structure-discoverer": "^2.3.1", "spatie/laravel-blink": "^1.7.1" diff --git a/packages/core/src/Console/Commands/MigrateGetCandy.php b/packages/core/src/Console/Commands/MigrateGetCandy.php index 8b0aafc531..3c134d1746 100644 --- a/packages/core/src/Console/Commands/MigrateGetCandy.php +++ b/packages/core/src/Console/Commands/MigrateGetCandy.php @@ -29,9 +29,7 @@ class MigrateGetCandy extends Command */ public function handle() { - $tableNames = collect( - DB::connection()->getDoctrineSchemaManager()->listTableNames() - ); + $tableNames = collect(Schema::getTableListing()); $tables = $tableNames->filter(fn ($table) => str_contains($table, 'getcandy_')); From ef3d099c55e2537cf53107c5d14c68276fbc4fd0 Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:33:17 +0800 Subject: [PATCH 2/3] Replace cartalyst/converter with backported MeasurementConverter Backports Lunar\Utils\MeasurementConverter, the Lunar\Facades\Converter facade and its unit tests from upstream lunarphp/lunar 1.x (10b12109, 'Update to L13 #2436'), and removes the cartalyst/converter dependency from the root and core composer.json. Co-Authored-By: Claude Fable 5 --- composer.json | 1 - .../Pages/ManageProductShipping.php | 2 +- .../Resources/ProductVariantResource.php | 2 +- .../Pages/ManageVariantShipping.php | 2 +- packages/core/composer.json | 1 - packages/core/config/shipping.php | 4 +- .../core/src/Base/Traits/HasDimensions.php | 13 +- packages/core/src/Facades/Converter.php | 26 +++ packages/core/src/LunarServiceProvider.php | 7 +- .../core/src/Utils/MeasurementConverter.php | 126 ++++++++++++ tests/admin/TestCase.php | 2 - tests/core/TestCase.php | 2 - .../Unit/Utils/MeasurementConverterTest.php | 186 ++++++++++++++++++ tests/opayo/TestCase.php | 2 - tests/search/TestCase.php | 2 - tests/shipping/TestCase.php | 2 - tests/stripe/TestCase.php | 2 - 17 files changed, 356 insertions(+), 26 deletions(-) create mode 100644 packages/core/src/Facades/Converter.php create mode 100644 packages/core/src/Utils/MeasurementConverter.php create mode 100644 tests/core/Unit/Utils/MeasurementConverterTest.php diff --git a/composer.json b/composer.json index a25312bddc..391e6f1255 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ "awcodes/filament-badgeable-column": "^2.3.2", "awcodes/shout": "^2.0.4", "barryvdh/laravel-dompdf": "^3.0", - "cartalyst/converter": "^9.0|^10", "dompdf/dompdf": "^3.1", "ext-bcmath": "*", "ext-exif": "*", diff --git a/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductShipping.php b/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductShipping.php index 66a0742b02..5542a3f20a 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductShipping.php +++ b/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductShipping.php @@ -2,7 +2,6 @@ namespace Lunar\Admin\Filament\Resources\ProductResource\Pages; -use Cartalyst\Converter\Laravel\Facades\Converter; use Filament\Forms\Components\Section; use Filament\Forms\Components\Select; use Filament\Forms\Components\Toggle; @@ -14,6 +13,7 @@ use Lunar\Admin\Filament\Resources\ProductVariantResource\Pages\ManageVariantShipping; use Lunar\Admin\Support\Forms\Components\TextInputSelectAffix; use Lunar\Admin\Support\Pages\BaseEditRecord; +use Lunar\Facades\Converter; use Lunar\Models\Contracts\ProductVariant as ProductVariantContract; class ManageProductShipping extends BaseEditRecord diff --git a/packages/admin/src/Filament/Resources/ProductVariantResource.php b/packages/admin/src/Filament/Resources/ProductVariantResource.php index 1dd3146e31..6bd1fd5ba2 100644 --- a/packages/admin/src/Filament/Resources/ProductVariantResource.php +++ b/packages/admin/src/Filament/Resources/ProductVariantResource.php @@ -2,7 +2,6 @@ namespace Lunar\Admin\Filament\Resources; -use Cartalyst\Converter\Laravel\Facades\Converter; use Filament\Actions\Action; use Filament\Forms; use Filament\Forms\Components\Component; @@ -14,6 +13,7 @@ use Lunar\Admin\Support\Forms\Components\Attributes; use Lunar\Admin\Support\Forms\Components\TextInputSelectAffix; use Lunar\Admin\Support\Resources\BaseResource; +use Lunar\Facades\Converter; use Lunar\Models\Contracts\ProductVariant as ProductVariantContract; use Lunar\Models\TaxClass; diff --git a/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantShipping.php b/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantShipping.php index b5fa30a954..0ba01b32a9 100644 --- a/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantShipping.php +++ b/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantShipping.php @@ -2,7 +2,6 @@ namespace Lunar\Admin\Filament\Resources\ProductVariantResource\Pages; -use Cartalyst\Converter\Laravel\Facades\Converter; use Filament\Actions\Action; use Filament\Forms\Components\Section; use Filament\Forms\Form; @@ -12,6 +11,7 @@ use Lunar\Admin\Filament\Resources\ProductResource; use Lunar\Admin\Filament\Resources\ProductVariantResource; use Lunar\Admin\Support\Pages\BaseEditRecord; +use Lunar\Facades\Converter; class ManageVariantShipping extends BaseEditRecord { diff --git a/packages/core/composer.json b/packages/core/composer.json index c5c9c4a85d..52ae300bb3 100644 --- a/packages/core/composer.json +++ b/packages/core/composer.json @@ -37,7 +37,6 @@ "spatie/laravel-medialibrary": "^11.12.7", "spatie/laravel-activitylog": "^4.10.1", "laravel/scout": "^10.13.1", - "cartalyst/converter": "^9.0|^10", "kalnoy/nestedset": "^6.0.5|^7.0.0", "lukascivil/treewalker": "0.9.1", "spatie/php-structure-discoverer": "^2.3.1", diff --git a/packages/core/config/shipping.php b/packages/core/config/shipping.php index 951ff8bc46..f4dd203e4d 100644 --- a/packages/core/config/shipping.php +++ b/packages/core/config/shipping.php @@ -7,8 +7,8 @@ | Measurements |-------------------------------------------------------------------------- | - | You can use any measurements available at - | https://github.com/cartalyst/converter/edit/master/src/config/config.php + | Define the available measurements for shipping dimensions. + | Each unit has a format string and a conversion factor relative to the base unit (factor 1.0). | */ 'measurements' => [ diff --git a/packages/core/src/Base/Traits/HasDimensions.php b/packages/core/src/Base/Traits/HasDimensions.php index b01f152e3e..b456eaf160 100644 --- a/packages/core/src/Base/Traits/HasDimensions.php +++ b/packages/core/src/Base/Traits/HasDimensions.php @@ -2,7 +2,8 @@ namespace Lunar\Base\Traits; -use Cartalyst\Converter\Laravel\Facades\Converter; +use Lunar\Facades\Converter; +use Lunar\Utils\MeasurementConverter; trait HasDimensions { @@ -27,7 +28,7 @@ public static function bootHasDimensions() /** * Getter for the length attribute. * - * @return \Cartalyst\Converter\Converter + * @return MeasurementConverter */ public function getLengthAttribute() { @@ -39,7 +40,7 @@ public function getLengthAttribute() /** * Getter for the width attribute. * - * @return \Cartalyst\Converter\Converter + * @return MeasurementConverter */ public function getWidthAttribute() { @@ -51,7 +52,7 @@ public function getWidthAttribute() /** * Getter for height attribute. * - * @return \Cartalyst\Converter\Converter + * @return MeasurementConverter */ public function getHeightAttribute() { @@ -63,7 +64,7 @@ public function getHeightAttribute() /** * Getter for weight attribute. * - * @return \Cartalyst\Converter\Converter + * @return MeasurementConverter */ public function getWeightAttribute() { @@ -75,7 +76,7 @@ public function getWeightAttribute() /** * Getter for the volume attribute. * - * @return \Cartalyst\Converter\Converter + * @return MeasurementConverter */ public function getVolumeAttribute() { diff --git a/packages/core/src/Facades/Converter.php b/packages/core/src/Facades/Converter.php new file mode 100644 index 0000000000..431c708b3c --- /dev/null +++ b/packages/core/src/Facades/Converter.php @@ -0,0 +1,26 @@ +registerAddonManifest(); + $this->app->singleton(MeasurementConverter::class, function () { + return new MeasurementConverter; + }); + $this->app->singleton(CartModifiers::class, function () { return new CartModifiers; }); diff --git a/packages/core/src/Utils/MeasurementConverter.php b/packages/core/src/Utils/MeasurementConverter.php new file mode 100644 index 0000000000..02293dad3e --- /dev/null +++ b/packages/core/src/Utils/MeasurementConverter.php @@ -0,0 +1,126 @@ +measurements = $measurements; + } + + public function setMeasurements(array $measurements): void + { + $this->measurements = $measurements; + } + + public function getMeasurements(): array + { + return $this->measurements; + } + + public function from(string $measurement): static + { + $instance = clone $this; + $instance->fromMeasurement = $measurement; + + return $instance; + } + + public function to(string $measurement): static + { + $this->toMeasurement = $measurement; + + return $this; + } + + public function value(float $value): static + { + $this->value = $value; + + return $this; + } + + public function convert(): static + { + $fromFactor = $this->getFactor($this->fromMeasurement); + $toFactor = $this->getFactor($this->toMeasurement); + + $this->value = ($this->value / $fromFactor) * $toFactor; + + return $this; + } + + public function getValue(): float + { + return $this->value; + } + + public function format(?string $formatString = null): string + { + $measurement = $this->toMeasurement ?? $this->fromMeasurement; + + if (! $formatString && $measurement) { + [$type, $unit] = explode('.', $measurement, 2); + $formatString = $this->measurements[$type][$unit]['format'] ?? null; + } + + if (! $formatString) { + return (string) $this->value; + } + + $value = $this->value; + $negative = $value < 0; + + if ($negative) { + $value *= -1; + } + + // Match decimal and thousand separators from the format string. + // The format uses: comma for thousands, dot for decimal, exclamation for no-separator. + preg_match_all('/[,.!]/', $formatString, $separators); + + $thousand = $separators[0][0] ?? null; + + if ($thousand === '!') { + $thousand = ''; + } + + $decimal = $separators[0][1] ?? null; + + // Extract the numeric portion to determine decimal places. + preg_match('/([0-9].*|)[0-9]/', $formatString, $valFormat); + + $valFormat = $valFormat[0] ?? '0'; + $decimals = $decimal ? strlen(substr(strrchr($valFormat, $decimal), 1)) : 0; + + $formatted = number_format($value, $decimals, $decimal, $thousand); + + if ($negative) { + $formatted = '-'.$formatted; + } + + return preg_replace('/([0-9].*|)[0-9]/', $formatted, $formatString); + } + + protected function getFactor(string $measurement): float + { + [$type, $unit] = explode('.', $measurement, 2); + + if (! isset($this->measurements[$type][$unit]['unit'])) { + throw new InvalidArgumentException("Unknown measurement: {$measurement}"); + } + + return (float) $this->measurements[$type][$unit]['unit']; + } +} diff --git a/tests/admin/TestCase.php b/tests/admin/TestCase.php index ad6351837e..ae4f49d219 100644 --- a/tests/admin/TestCase.php +++ b/tests/admin/TestCase.php @@ -5,7 +5,6 @@ use Awcodes\Shout\ShoutServiceProvider; use BladeUI\Heroicons\BladeHeroiconsServiceProvider; use BladeUI\Icons\BladeIconsServiceProvider; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Filament\Actions\ActionsServiceProvider; use Filament\FilamentServiceProvider; use Filament\Forms\FormsServiceProvider; @@ -70,7 +69,6 @@ protected function getPackageProviders($app): array MediaLibraryServiceProvider::class, PermissionServiceProvider::class, ActivitylogServiceProvider::class, - ConverterServiceProvider::class, NestedSetServiceProvider::class, BlinkServiceProvider::class, diff --git a/tests/core/TestCase.php b/tests/core/TestCase.php index a497dc2df2..155c6c0bcf 100644 --- a/tests/core/TestCase.php +++ b/tests/core/TestCase.php @@ -2,7 +2,6 @@ namespace Lunar\Tests\Core; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Illuminate\Support\Facades\Config; use Kalnoy\Nestedset\NestedSetServiceProvider; use Lunar\Facades\Taxes; @@ -45,7 +44,6 @@ protected function getPackageProviders($app) LunarServiceProvider::class, MediaLibraryServiceProvider::class, ActivitylogServiceProvider::class, - ConverterServiceProvider::class, NestedSetServiceProvider::class, BlinkServiceProvider::class, ]; diff --git a/tests/core/Unit/Utils/MeasurementConverterTest.php b/tests/core/Unit/Utils/MeasurementConverterTest.php new file mode 100644 index 0000000000..d474df7461 --- /dev/null +++ b/tests/core/Unit/Utils/MeasurementConverterTest.php @@ -0,0 +1,186 @@ +converter = new MeasurementConverter([ + 'length' => [ + 'm' => ['format' => '1,0.000 m', 'unit' => 1.00], + 'mm' => ['format' => '1,0.000 mm', 'unit' => 1000], + 'cm' => ['format' => '1!0 cm', 'unit' => 100], + 'ft' => ['format' => '1,0.00 ft.', 'unit' => 3.28084], + 'in' => ['format' => '1,0.00 in.', 'unit' => 39.3701], + ], + 'weight' => [ + 'kg' => ['format' => '1,0.00 kg', 'unit' => 1.00], + 'g' => ['format' => '1,0.00 g', 'unit' => 1000.00], + 'lbs' => ['format' => '1,0.00 lbs', 'unit' => 2.20462], + ], + 'volume' => [ + 'l' => ['format' => '1,00.00l', 'unit' => 1], + 'ml' => ['format' => '1,00.000ml', 'unit' => 1000], + ], + ]); +}); + +test('can convert mm to cm', function () { + $result = $this->converter + ->from('length.mm') + ->value(100) + ->to('length.cm') + ->convert() + ->getValue(); + + expect($result)->toBe(10.0); +}); + +test('can convert cm to mm', function () { + $result = $this->converter + ->from('length.cm') + ->value(10) + ->to('length.mm') + ->convert() + ->getValue(); + + expect($result)->toBe(100.0); +}); + +test('can convert kg to g', function () { + $result = $this->converter + ->from('weight.kg') + ->value(2.5) + ->to('weight.g') + ->convert() + ->getValue(); + + expect($result)->toBe(2500.0); +}); + +test('can convert ml to l', function () { + $result = $this->converter + ->from('volume.ml') + ->value(1500) + ->to('volume.l') + ->convert() + ->getValue(); + + expect($result)->toBe(1.5); +}); + +test('from returns a new instance', function () { + $instance = $this->converter->from('length.mm'); + + expect($instance)->not->toBe($this->converter); + expect($instance)->toBeInstanceOf(MeasurementConverter::class); +}); + +test('value and from can be called in either order', function () { + $result1 = $this->converter + ->from('length.mm') + ->value(100) + ->to('length.cm') + ->convert() + ->getValue(); + + $result2 = $this->converter + ->value(100) + ->from('length.mm') + ->to('length.cm') + ->convert() + ->getValue(); + + expect($result1)->toBe($result2); +}); + +test('throws for unknown measurement', function () { + $this->converter + ->from('length.unknown') + ->value(100) + ->to('length.cm') + ->convert(); +})->throws(InvalidArgumentException::class, 'Unknown measurement: length.unknown'); + +test('can get and set measurements', function () { + $converter = new MeasurementConverter; + expect($converter->getMeasurements())->toBe([]); + + $measurements = ['length' => ['m' => ['unit' => 1]]]; + $converter->setMeasurements($measurements); + expect($converter->getMeasurements())->toBe($measurements); +}); + +test('can chain from value to convert for volume calculation', function () { + // Simulates the volume calculation in ManageVariantShipping: + // Convert 100mm x 50mm x 25mm to cm, then multiply, then convert ml to l + $length = $this->converter->value(100)->from('length.mm')->to('length.cm')->convert()->getValue(); + $width = $this->converter->value(50)->from('length.mm')->to('length.cm')->convert()->getValue(); + $height = $this->converter->value(25)->from('length.mm')->to('length.cm')->convert()->getValue(); + + $volumeInMl = $length * $width * $height; // 10 * 5 * 2.5 = 125 + $volumeInL = $this->converter->from('volume.ml')->to('volume.l')->value($volumeInMl)->convert()->getValue(); + + expect($length)->toBe(10.0); + expect($width)->toBe(5.0); + expect($height)->toBe(2.5); + expect($volumeInL)->toBe(0.125); +}); + +test('can format a value using the from measurement format', function () { + $result = $this->converter + ->from('length.cm') + ->value(50); + + expect($result->format())->toBe('50 cm'); +}); + +test('can format a value using the to measurement format', function () { + $result = $this->converter + ->from('length.mm') + ->value(500) + ->to('length.cm') + ->convert(); + + expect($result->format())->toBe('50 cm'); +}); + +test('can format with thousands separator', function () { + $result = $this->converter + ->from('length.mm') + ->value(1500000); + + expect($result->format())->toBe('1,500,000.000 mm'); +}); + +test('can format with custom format string', function () { + $result = $this->converter + ->from('length.cm') + ->value(1050.5); + + expect($result->format('1,0.00 centimeters'))->toBe('1,050.50 centimeters'); +}); + +test('can format weight values', function () { + $result = $this->converter + ->from('weight.kg') + ->value(2.5); + + expect($result->format())->toBe('2.50 kg'); +}); + +test('can format negative values', function () { + $result = $this->converter + ->from('weight.kg') + ->value(-2.5); + + expect($result->format())->toBe('-2.50 kg'); +}); + +test('format returns plain value when no format string available', function () { + $converter = new MeasurementConverter([ + 'length' => ['x' => ['unit' => 1]], + ]); + + $result = $converter->from('length.x')->value(42); + + expect($result->format())->toBe('42'); +}); diff --git a/tests/opayo/TestCase.php b/tests/opayo/TestCase.php index 4431dd977e..98ffed5886 100644 --- a/tests/opayo/TestCase.php +++ b/tests/opayo/TestCase.php @@ -2,7 +2,6 @@ namespace Lunar\Tests\Opayo; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Illuminate\Http\Client\Request; use Illuminate\Support\Facades\Http; use Kalnoy\Nestedset\NestedSetServiceProvider; @@ -52,7 +51,6 @@ protected function getPackageProviders($app) LivewireServiceProvider::class, MediaLibraryServiceProvider::class, ActivitylogServiceProvider::class, - ConverterServiceProvider::class, NestedSetServiceProvider::class, ShippingServiceProvider::class, BlinkServiceProvider::class, diff --git a/tests/search/TestCase.php b/tests/search/TestCase.php index 286254606e..8c9d7b0aa8 100644 --- a/tests/search/TestCase.php +++ b/tests/search/TestCase.php @@ -2,7 +2,6 @@ namespace Lunar\Tests\Search; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Illuminate\Support\Facades\Config; use Laravel\Scout\ScoutServiceProvider; use Lunar\LunarServiceProvider; @@ -31,7 +30,6 @@ protected function getPackageProviders($app) { return [ LunarServiceProvider::class, - ConverterServiceProvider::class, ActivitylogServiceProvider::class, LaravelDataServiceProvider::class, SearchServiceProvider::class, diff --git a/tests/shipping/TestCase.php b/tests/shipping/TestCase.php index a858076738..06f688bce0 100644 --- a/tests/shipping/TestCase.php +++ b/tests/shipping/TestCase.php @@ -2,7 +2,6 @@ namespace Lunar\Tests\Shipping; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Illuminate\Support\Facades\Config; use Kalnoy\Nestedset\NestedSetServiceProvider; use Lunar\LunarServiceProvider; @@ -31,7 +30,6 @@ protected function getPackageProviders($app) LunarServiceProvider::class, MediaLibraryServiceProvider::class, ActivitylogServiceProvider::class, - ConverterServiceProvider::class, NestedSetServiceProvider::class, ShippingServiceProvider::class, BlinkServiceProvider::class, diff --git a/tests/stripe/TestCase.php b/tests/stripe/TestCase.php index b9c0a34304..2413777764 100644 --- a/tests/stripe/TestCase.php +++ b/tests/stripe/TestCase.php @@ -2,7 +2,6 @@ namespace Lunar\Tests\Stripe; -use Cartalyst\Converter\Laravel\ConverterServiceProvider; use Illuminate\Support\Facades\Config; use Kalnoy\Nestedset\NestedSetServiceProvider; use Livewire\LivewireServiceProvider; @@ -39,7 +38,6 @@ protected function getPackageProviders($app) LivewireServiceProvider::class, MediaLibraryServiceProvider::class, ActivitylogServiceProvider::class, - ConverterServiceProvider::class, NestedSetServiceProvider::class, ]; } From 763dcdab9d8424c8694d665681dcdaf2a7dc1539 Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Sat, 4 Jul 2026 15:00:05 +0800 Subject: [PATCH 3/3] Allow pest 4 for Laravel 13 test matrix pest-plugin-laravel ^3 caps laravel/framework at ^12, so the L13 CI matrix cells could not resolve dependencies. Pest 4 / plugin 4 support Laravel 13 and the suites pass unchanged under PHPUnit 12. Co-Authored-By: Claude Fable 5 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 391e6f1255..ddadb5af2b 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ "laravel/pint": "1.17.0", "mockery/mockery": "^1.6.9", "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0", - "pestphp/pest": "^2.0|^3.0", - "pestphp/pest-plugin-laravel": "^2.0|^3.0", + "pestphp/pest": "^2.0|^3.0|^4.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0", "symplify/monorepo-builder": "^10.0" }, "autoload": {