Skip to content

Commit

Permalink
Merge 0.6.1 updates to main (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored Oct 6, 2023
1 parent 11e7feb commit 7df5eaf
Show file tree
Hide file tree
Showing 25 changed files with 237 additions and 110 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default defineConfig({
]
},
{
text: '0.5',
text: '0.6',
items: [
{text: 'Changelog', link: '/core/upgrading'},
{text: 'Contributing', link: '/core/contributing'},
Expand Down
2 changes: 1 addition & 1 deletion docs/core/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Lunar uses a monorepo [lunarphp/lunar](https://github.com/lunarphp/lunar) approa

## Repository Branching

**Bug Fixes** should target the latest compatible branch version i.e `0.3`. The `main` branch should never have bug fix PR's unless they fix features that are in an upcoming release.
**Bug Fixes** should target the latest compatible branch version i.e `0.6`. The `main` branch should never have bug fix PR's unless they fix features that are in an upcoming release.

**Features** that bring new (or enhance current) functionality to Lunar should always target the `main` branch.

Expand Down
3 changes: 3 additions & 0 deletions packages/admin/config/customers.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Searchable meta fields.
Expand All @@ -13,5 +14,7 @@
|
*/
'searchable_meta' => [],

'impersonate' => null,

];
2 changes: 2 additions & 0 deletions packages/admin/config/database.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Disable migrations
Expand All @@ -11,4 +12,5 @@
|
*/
'disable_migrations' => false,

];
5 changes: 5 additions & 0 deletions packages/admin/config/products.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Disable product variants
Expand Down Expand Up @@ -38,16 +39,20 @@
'required' => true,
'unique' => true,
],

'gtin' => [
'required' => false,
'unique' => false,
],

'mpn' => [
'required' => false,
'unique' => false,
],

'ean' => [
'required' => false,
'unique' => false,
],

];
4 changes: 3 additions & 1 deletion packages/admin/config/storefront.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Define your model routes for viewing/previewing here.
Expand All @@ -13,6 +14,7 @@
|
*/
'model_routes' => [
\Lunar\Models\Product::class => null,
Lunar\Models\Product::class => null,
],

];
4 changes: 4 additions & 0 deletions packages/admin/config/system.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?php

return [

'enable' => true,

'path' => 'hub',

'middleware' => [
'web',
],

];
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function rules()
'attribute.searchable' => 'nullable|boolean',
'attribute.filterable' => 'nullable|boolean',
'attribute.configuration' => 'nullable|array',
'attribute.section' => 'string',
'attribute.section' => 'nullable|string',
'attribute.system' => 'boolean',
'attribute.type' => 'required',
'attribute.validation_rules' => 'nullable|string',
Expand Down
60 changes: 33 additions & 27 deletions packages/core/config/cart.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

use Lunar\Actions\Carts\GenerateFingerprint;

return [

/*
|--------------------------------------------------------------------------
| Session Key
Expand All @@ -19,7 +22,7 @@
| Specify which class should be used when generating a cart fingerprint.
|
*/
'fingerprint_generator' => Lunar\Actions\Carts\GenerateFingerprint::class,
'fingerprint_generator' => GenerateFingerprint::class,

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -59,24 +62,21 @@
*/
'pipelines' => [
/*
|--------------------------------------------------------------------------
| Run these pipelines when the cart is calculating.
|--------------------------------------------------------------------------
*/
* Run these pipelines when the cart is calculating.
*/
'cart' => [
\Lunar\Pipelines\Cart\CalculateLines::class,
\Lunar\Pipelines\Cart\ApplyShipping::class,
\Lunar\Pipelines\Cart\ApplyDiscounts::class,
\Lunar\Pipelines\Cart\CalculateTax::class,
\Lunar\Pipelines\Cart\Calculate::class,
Lunar\Pipelines\Cart\CalculateLines::class,
Lunar\Pipelines\Cart\ApplyShipping::class,
Lunar\Pipelines\Cart\ApplyDiscounts::class,
Lunar\Pipelines\Cart\CalculateTax::class,
Lunar\Pipelines\Cart\Calculate::class,
],

/*
|--------------------------------------------------------------------------
| Run these pipelines when the cart lines are being calculated.
|--------------------------------------------------------------------------
*/
* Run these pipelines when the cart lines are being calculated.
*/
'cart_lines' => [
\Lunar\Pipelines\CartLine\GetUnitPrice::class,
Lunar\Pipelines\CartLine\GetUnitPrice::class,
],
],

Expand All @@ -89,14 +89,14 @@
| The default actions should be fine for most cases.
|
*/
'actions' => [
'add_to_cart' => \Lunar\Actions\Carts\AddOrUpdatePurchasable::class,
'get_existing_cart_line' => \Lunar\Actions\Carts\GetExistingCartLine::class,
'update_cart_line' => \Lunar\Actions\Carts\UpdateCartLine::class,
'remove_from_cart' => \Lunar\Actions\Carts\RemovePurchasable::class,
'add_address' => \Lunar\Actions\Carts\AddAddress::class,
'set_shipping_option' => \Lunar\Actions\Carts\SetShippingOption::class,
'order_create' => \Lunar\Actions\Carts\CreateOrder::class,
'actions' => [
'add_to_cart' => Lunar\Actions\Carts\AddOrUpdatePurchasable::class,
'get_existing_cart_line' => Lunar\Actions\Carts\GetExistingCartLine::class,
'update_cart_line' => Lunar\Actions\Carts\UpdateCartLine::class,
'remove_from_cart' => Lunar\Actions\Carts\RemovePurchasable::class,
'add_address' => Lunar\Actions\Carts\AddAddress::class,
'set_shipping_option' => Lunar\Actions\Carts\SetShippingOption::class,
'order_create' => Lunar\Actions\Carts\CreateOrder::class,
],

/*
Expand All @@ -109,19 +109,25 @@
|
*/
'validators' => [

'add_to_cart' => [
\Lunar\Validation\CartLine\CartLineQuantity::class,
Lunar\Validation\CartLine\CartLineQuantity::class,
],

'update_cart_line' => [
\Lunar\Validation\CartLine\CartLineQuantity::class,
Lunar\Validation\CartLine\CartLineQuantity::class,
],

'remove_from_cart' => [],

'set_shipping_option' => [
\Lunar\Validation\Cart\ShippingOptionValidator::class,
Lunar\Validation\Cart\ShippingOptionValidator::class,
],

'order_create' => [
\Lunar\Validation\Cart\ValidateCartForOrderCreation::class,
Lunar\Validation\Cart\ValidateCartForOrderCreation::class,
],

],

/*
Expand Down
2 changes: 2 additions & 0 deletions packages/core/config/database.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

'connection' => '',

'table_prefix' => 'lunar_',
Expand All @@ -26,4 +27,5 @@
|
*/
'disable_migrations' => false,

];
22 changes: 13 additions & 9 deletions packages/core/config/discounts.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<?php

use Lunar\Base\Validation\CouponValidator;

return [

/*
|--------------------------------------------------------------------------
| Coupon Validator
|--------------------------------------------------------------------------
|
| Here you can specify the class which validates coupons. This is useful if you
| want to have custom logic for what determines whether a coupon can be used.
|
*/
'coupon_validator' => \Lunar\Base\Validation\CouponValidator::class,
|--------------------------------------------------------------------------
| Coupon Validator
|--------------------------------------------------------------------------
|
| Here you can specify the class which validates coupons. This is useful if you
| want to have custom logic for what determines whether a coupon can be used.
|
*/
'coupon_validator' => CouponValidator::class,

];
3 changes: 3 additions & 0 deletions packages/core/config/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
use Lunar\Base\StandardMediaConversions;

return [

'conversions' => [
StandardMediaConversions::class,
],

'fallback' => [
'url' => env('FALLBACK_IMAGE_URL', null),
'path' => env('FALLBACK_IMAGE_PATH', null),
],

];
10 changes: 10 additions & 0 deletions packages/core/config/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Lunar\Base\OrderReferenceGenerator;

return [

/*
|--------------------------------------------------------------------------
| Order Reference Generator
Expand All @@ -13,6 +14,7 @@
|
*/
'reference_generator' => OrderReferenceGenerator::class,

/*
|--------------------------------------------------------------------------
| Draft Status
Expand All @@ -24,31 +26,38 @@
|
*/
'draft_status' => 'awaiting-payment',

'statuses' => [

'awaiting-payment' => [
'label' => 'Awaiting Payment',
'color' => '#848a8c',
'mailers' => [],
'notifications' => [],
],

'payment-offline' => [
'label' => 'Payment Offline',
'color' => '#0A81D7',
'mailers' => [],
'notifications' => [],
],

'payment-received' => [
'label' => 'Payment Received',
'color' => '#6a67ce',
'mailers' => [],
'notifications' => [],
],

'dispatched' => [
'label' => 'Dispatched',
'mailers' => [],
'notifications' => [],
],

],

/*
|--------------------------------------------------------------------------
| Order Pipelines
Expand All @@ -71,4 +80,5 @@
Lunar\Pipelines\Order\Creation\MapDiscountBreakdown::class,
],
],

];
2 changes: 2 additions & 0 deletions packages/core/config/payments.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [

'default' => env('PAYMENTS_TYPE', 'cash-in-hand'),

'types' => [
Expand All @@ -9,4 +10,5 @@
'authorized' => 'payment-offline',
],
],

];
8 changes: 6 additions & 2 deletions packages/core/config/pricing.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

use Lunar\Pricing\DefaultPriceFormatter;

return [

/*
|--------------------------------------------------------------------------
| Pricing Stored Inclusive of Tax
Expand All @@ -19,7 +22,7 @@
| Specify which class to use when formatting price data types
|
*/
'formatter' => \Lunar\Pricing\DefaultPriceFormatter::class,
'formatter' => DefaultPriceFormatter::class,

/*
|--------------------------------------------------------------------------
Expand All @@ -32,6 +35,7 @@
|
*/
'pipelines' => [
//
// App\Pipelines\Pricing\Example::class,
],

];
Loading

0 comments on commit 7df5eaf

Please sign in to comment.