Skip to content

Commit

Permalink
Added Laravel 11 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Mar 13, 2024
1 parent 0e7059e commit f6e77cd
Show file tree
Hide file tree
Showing 53 changed files with 145 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
- Dropped Laravel 9 Support
- Dropped Enum v3 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Changed minimal Enum requirement to v4.2
- Upgraded to Konekt Address, Customer and User modules to v3
- Upgraded to Laravel Media Library v11
- Removed the Vanilo v2 `Framework` namespace compatibility layer
- Removed the throwing of `CartUpdated` event when destroying a cart (`CartDeleting` and `CartDeleted` remains)
- Removed the deprecated `BuyableImageSpatieV7` and `BuyableImageSpatieV8` traits
- Added the `currency` field to the orders table
- Added the following fields to the Channel model/table:
- `currency`
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"ext-json": "*",
"ext-pdo": "*",
"doctrine/dbal": "^3.5.1",
"laravel/framework": "^10.38.2",
"laravel/framework": "^10.38.2|^11.0",
"konekt/enum": "^4.2",
"konekt/concord": "^1.13",
"spatie/laravel-medialibrary": "^10.0",
"spatie/laravel-medialibrary": "^11.0",
"cviebrock/eloquent-sluggable": "^10.0|^11.0",
"konekt/laravel-migration-compatibility": "^1.6",
"konekt/address": "^3.1",
Expand Down Expand Up @@ -58,7 +58,7 @@
]
},
"require-dev": {
"orchestra/testbench": "^8.0",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit" : "^10.0",
"laravel/legacy-factories": "^1.0.4"
},
Expand Down
113 changes: 51 additions & 62 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,64 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Contract Tests">
<directory>src/Contracts/Tests</directory>
</testsuite>
<testsuite name="Support Tests">
<directory>src/Support/Tests</directory>
</testsuite>
<testsuite name="Product Tests">
<directory>src/Product/Tests</directory>
</testsuite>
<testsuite name="Master Product Tests">
<directory>src/MasterProduct/Tests</directory>
</testsuite>
<testsuite name="Properties Tests">
<directory>src/Properties/Tests</directory>
</testsuite>
<testsuite name="Category Tests">
<directory>src/Category/Tests</directory>
</testsuite>
<testsuite name="Links Tests">
<directory>src/Links/Tests</directory>
</testsuite>
<testsuite name="Channel Tests">
<directory>src/Channel/Tests</directory>
</testsuite>
<testsuite name="Cart Tests">
<directory>src/Cart/Tests</directory>
</testsuite>
<testsuite name="Checkout Tests">
<directory>src/Checkout/Tests</directory>
</testsuite>
<testsuite name="Order Tests">
<directory>src/Order/Tests</directory>
</testsuite>
<testsuite name="Payment Tests">
<directory>src/Payment/Tests</directory>
</testsuite>
<testsuite name="Shipment Tests">
<directory>src/Shipment/Tests</directory>
</testsuite>
<testsuite name="Adjustments Tests">
<directory>src/Adjustments/Tests</directory>
</testsuite>
<testsuite name="Taxes Tests">
<directory>src/Taxes/Tests</directory>
</testsuite>
<testsuite name="Foundation Tests">
<directory>src/Foundation/Tests</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Contract Tests">
<directory>src/Contracts/Tests</directory>
</testsuite>
<testsuite name="Support Tests">
<directory>src/Support/Tests</directory>
</testsuite>
<testsuite name="Product Tests">
<directory>src/Product/Tests</directory>
</testsuite>
<testsuite name="Master Product Tests">
<directory>src/MasterProduct/Tests</directory>
</testsuite>
<testsuite name="Properties Tests">
<directory>src/Properties/Tests</directory>
</testsuite>
<testsuite name="Category Tests">
<directory>src/Category/Tests</directory>
</testsuite>
<testsuite name="Links Tests">
<directory>src/Links/Tests</directory>
</testsuite>
<testsuite name="Channel Tests">
<directory>src/Channel/Tests</directory>
</testsuite>
<testsuite name="Cart Tests">
<directory>src/Cart/Tests</directory>
</testsuite>
<testsuite name="Checkout Tests">
<directory>src/Checkout/Tests</directory>
</testsuite>
<testsuite name="Order Tests">
<directory>src/Order/Tests</directory>
</testsuite>
<testsuite name="Payment Tests">
<directory>src/Payment/Tests</directory>
</testsuite>
<testsuite name="Shipment Tests">
<directory>src/Shipment/Tests</directory>
</testsuite>
<testsuite name="Adjustments Tests">
<directory>src/Adjustments/Tests</directory>
</testsuite>
<testsuite name="Taxes Tests">
<directory>src/Taxes/Tests</directory>
</testsuite>
<testsuite name="Foundation Tests">
<directory>src/Foundation/Tests</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion src/Adjustments/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Adjustments/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Dropped Laravel 9 Support
- Dropped Enum v3 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Changed minimal Enum requirement to v4.2
- Added the `AdjusterAliases` class that for decoupling FQCNs from the database
Expand Down
6 changes: 3 additions & 3 deletions src/Adjustments/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"konekt/concord": "^1.13",
"konekt/enum": "^4.2",
"konekt/enum-eloquent": "^1.9",
"laravel/framework": "^10.38.2"
"laravel/framework": "^10.38.2|^11.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^8.0"
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0"
},
"autoload": {
"psr-4": { "Vanilo\\Adjustments\\": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Cart/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Cart/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Dropped Laravel 9 Support
- Dropped Enum v3 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Changed minimal Enum requirement to v4.2
- Removed the throwing of `CartUpdated` event when destroying a cart (`CartDeleting` and `CartDeleted` remains)
Expand Down
6 changes: 3 additions & 3 deletions src/Cart/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"php": "^8.2",
"konekt/concord": "^1.13",
"konekt/enum": "^4.2",
"laravel/framework": "^10.38.2",
"laravel/framework": "^10.38.2|^11.0",
"vanilo/contracts": "^4.0",
"vanilo/support": "^4.0"
},
"require-dev": {
"ext-sqlite3": "*",
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"laravel/legacy-factories": "^1.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Category/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Category/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Dropped PHP 8.0 & PHP 8.1 Support
- Dropped Laravel 9 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2

## 3.x Series
Expand Down
8 changes: 4 additions & 4 deletions src/Category/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"require": {
"php": "^8.2",
"konekt/concord": "^1.13",
"cviebrock/eloquent-sluggable": "^10.0",
"laravel/framework": "^10.38.2"
"cviebrock/eloquent-sluggable": "^10.0|^10.0",
"laravel/framework": "^10.38.2|^11.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^8.0"
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0"
},
"autoload": {
"psr-4": { "Vanilo\\Category\\": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Channel/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Channel/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Dropped PHP 8.0 & PHP 8.1 Support
- Dropped Laravel 9 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Added the following fields to the Channel model/table:
- `currency`
Expand Down
6 changes: 3 additions & 3 deletions src/Channel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"php": "^8.2",
"konekt/concord": "^1.13",
"cviebrock/eloquent-sluggable": "^10.0",
"laravel/framework": "^10.38.2"
"laravel/framework": "^10.38.2|^11.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"laravel/legacy-factories": "^1.0"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function down(): void
$table->dropColumn('language');
});
Schema::table('channels', function (Blueprint $table) {
$table->dropUnique('channels_domain_unique');
$table->dropColumn('domain');
});
Schema::table('channels', function (Blueprint $table) {
Expand Down
2 changes: 1 addition & 1 deletion src/Checkout/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Checkout/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Dropped Laravel 9 Support
- Dropped Enum v3 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Changed minimal Enum requirement to v4.2
- Added the `BillpayerChanged` event
Expand Down
8 changes: 4 additions & 4 deletions src/Checkout/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"php": "^8.2",
"konekt/concord": "^1.13",
"konekt/enum": "^4.2",
"laravel/framework": "^10.38.2",
"laravel/framework": "^10.38.2|^11.0",
"vanilo/support": "^4.0",
"vanilo/contracts": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^8.0",
"konekt/address": "^2.8"
"phpunit/phpunit": "^10.0",
"orchestra/testbench": "^8.0|^9.0",
"konekt/address": "^3.0"
},
"autoload": {
"psr-4": { "Vanilo\\Checkout\\": "" }
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions src/Contracts/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Dropped PHP 8.0 & PHP 8.1 Support
- Dropped Laravel 9 Support
- Added PHP 8.3 Support
- Added Laravel 11 Support
- Changed minimum Laravel version to v10.38.2
- Added the `Stockable` interface
- Added the `Merchant` interface
Expand Down
4 changes: 2 additions & 2 deletions src/Contracts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
],
"require": {
"php": "^8.2",
"illuminate/support": "^10.38.2",
"illuminate/support": "^10.38.2|^11.0",
"nette/schema": "^1.2.5"
},
"require-dev": {
"phpunit/phpunit" : "^9.0"
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": { "Vanilo\\Contracts\\": "" }
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Traits/LoadsMediaConversionsFromConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Vanilo\Foundation\Traits;

use Spatie\Image\Manipulations;
use Spatie\Image\Enums\Fit;

trait LoadsMediaConversionsFromConfig
{
Expand All @@ -30,7 +30,7 @@ public function loadConversionsFromVaniloConfig(): void
foreach ($variants as $name => $settings) {
$conversion = $this->addMediaConversion($name)
->fit(
$settings['fit'] ?? Manipulations::FIT_CONTAIN,
Fit::from($settings['fit'] ?? Fit::Contain->value),
$settings['width'] ?? 250,
$settings['height'] ?? 250
);
Expand Down
2 changes: 1 addition & 1 deletion src/Links/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.38', '10.46']
laravel: ['10.38', '10.48', '11.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
Loading

0 comments on commit f6e77cd

Please sign in to comment.