Skip to content

Commit

Permalink
Updates for Laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
bfinlay committed Jun 9, 2022
1 parent 73b8e09 commit d05a2ea
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,30 @@ jobs:
matrix:
php: ${{ fromJson(needs.provide_php_versions_json.outputs.matrix) }}
laravel: [^5.8, ^6.0, ^7.0, ^8.0, ^9.0]
dbal: [^2.6, ^3.0]
exclude:
- php: 7.2
laravel: [^8.0, ^9.0]
laravel: ^8.0
- php: 7.2
laravel: ^9.0
- php: 7.3
laravel: ^9.0
- php: 7.4
laravel: ^9.0
- php: 8.0
laravel: ^5.8
- php: 8.1
laravel: ^5.8
- php: 8.1
laravel: ^6.0
- php: 8.1
laravel: ^7.0
- laravel: ^5.8
dbal: ^3.0
- laravel: ^6.0
dbal: ^3.0
- laravel: ^7.0
dbal: ^3.0

runs-on: ubuntu-latest

Expand All @@ -58,6 +77,6 @@ jobs:
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "--with laravel/framework:${{ matrix.laravel }}"
composer-options: "--with laravel/framework:${{ matrix.laravel }} --with doctrine/dbal:${{ matrix.dbal }}"

- run: vendor/bin/phpunit tests --cache-result-file=.phpunit.result.cache
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,40 @@ This package is tested against the following Laravel versions
- [Changes](#changes)

## Installation
### Laravel 8.x, 9.x
- Require this package directly by `composer require --dev bfinlay/laravel-excel-seeder`
- Or add this package in your composer.json and run `composer update`

```
"require-dev": {
...
"bfinlay/laravel-excel-seeder": "^3.0",
...
}
```
"bfinlay/laravel-excel-seeder": "^2.0"
```
### Laravel 5.8, 6.x, 7.x
Laravel 5.8, 6.x, and 7.x require DBAL 2.x. Because DBAL is a `require-dev` dependency of laravel, its version
constraint will not be resolved by composer when installing a child package. However, this is easy to solve by specifying DBAL 2.x as
an additional dependency.
Note that Laravel 5.8 and 7.x are EOL, and Laravel 6 will become EOL on Sep 6, 2022. See https://laravelversions.com/en.
These versions will continue to be supported by this package for now.
To install for Laravel 5.8, 6.x, and 7.x:
- Require this package directly by `composer require --dev bfinlay/laravel-excel-seeder`
- Require the dbal package directly by `composer require --dev doctrine/dbal:^2.6`
- Or add these packages in your composer.json and run `composer update`
```
"require-dev": {
...
"bfinlay/laravel-excel-seeder": "^3.0",
"doctrine/dbal": "^2.6"
...
}
```
## Simplest Usage
In the simplest form, you can use the `bfinlay\SpreadsheetSeeder\SpreadsheetSeeder`
as is and it will process all XLSX files in `/database/seeds/*.xlsx` and `/database/seeders/*.xlsx` (relative to Laravel project base path).
Expand Down Expand Up @@ -943,6 +971,10 @@ This can be used after seeding to further process tables - for example to reset
Laravel Excel Seeder is open-sourced software licensed under the MIT license.

## Changes
#### 3.0.0
- update composer.json to add support for Laravel 9.x and `doctrine\dbal` 3.x
- See [Installation](#installation) for new instructions to require DBAL 2.x package for Laravel 5.8, 6.x, 7.x legacy versions.
- Updated to 3.0.0 because DBAL update breaks backward compatibility.
#### 2.3.1
- fix bug #10 (contributed by @tezu35)
- add date time test cases pertaining to #10
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"php": ">=7.1.3",
"laravel/framework": ">=5.8",
"phpoffice/phpspreadsheet": "~1.7",
"doctrine/dbal": "^2.9"
"doctrine/dbal": "^2.6|^3.0"
},
"repositories-disabled": [
{
Expand Down

0 comments on commit d05a2ea

Please sign in to comment.