Skip to content

Commit

Permalink
merge from SpartnerNL/Laravel-Excel
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackardios committed Jan 31, 2024
2 parents ca164ce + 4161053 commit 6a63211
Show file tree
Hide file tree
Showing 116 changed files with 3,590 additions and 371 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ Filling out the template is required. Any pull request that does not include eno
- [ ] Take note of the contributing guidelines.
- [ ] Checked the pull requests to ensure that another person hasn't already submitted a fix.
- [ ] Added tests to ensure against regression.
- [ ] Updated the changelog

6️⃣ Thanks for contributing! 🙌
44 changes: 31 additions & 13 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,54 +23,72 @@ jobs:

strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1]
laravel: [9, 8, 7, 6, 5.8]
php: [7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [10, 9, 8, 7, 6, 5.8]
dependency-version: [prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 10
scout: 10.*
testbench: 8.*
- laravel: 9
scout: 9.*
testbench: 7.*
- laravel: 8
scout: 8.*
testbench: 6.*
- laravel: 7
scout: 7.2.*
testbench: 5.*
- laravel: 6
scout: 7.1.*
testbench: 4.*
- laravel: 5.8
scout: 7.1.*
testbench: 3.8.*
exclude:
- laravel: 9
- laravel: 10
php: 8.0
- laravel: 10
php: 7.4
- laravel: 9
php: 7.3
- laravel: 9
php: 7.2
- laravel: 8
php: 7.2
php: 7.4
- laravel: 7
php: 8.0
- laravel: 7
php: 8.1
- laravel: 7
php: 8.2
- laravel: 7
php: 8.3
- laravel: 6
php: 8.0
- laravel: 6
php: 8.1
- laravel: 6
php: 8.2
- laravel: 6
php: 8.3
- laravel: 5.8
php: 8.0
- laravel: 5.8
php: 8.1
- laravel: 5.8
php: 8.2
- laravel: 5.8
php: 8.3

name: PHP${{ matrix.php }} - L${{ matrix.laravel }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependency-cache-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -81,8 +99,8 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" "laravel/scout:${{ matrix.scout }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --no-interaction
- name: Install legacy factories
run: |
Expand Down
1 change: 1 addition & 0 deletions .phpunit.cache/test-results

Large diffs are not rendered by default.

72 changes: 69 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,60 @@

All notable changes to this project will be documented in this file.

## [Unreleased]
Please view https://github.com/SpartnerNL/Laravel-Excel/releases for the most recent changelog

## [3.1.47] - 2023-02-16

- Support Laravel 10

### Fixed

- Fix Bug Multiple drawings change the behavior of the startCell (#3865).
- Allow configuring read data only in chunks as well.

## [3.1.46] - 2023-01-27

- Support Laravel 10

## [3.1.45] - 2023-01-02

### Added
- Add support for ignoring PHP auto_detect_line_endings INI directive

### Fixed
- Fix the PSR simple cache dependency mess to maintain backwards compatability and support 3.0 of the interface.

## [3.1.44] - 2022-10-14

### Fixed

- Fix output of `WithFormatData` in combination with `SkipsEmptyRows` (#3760)

### Changed
- Cast empty headings to indexed integer (#3646)
- Adds `isEmptyWhen` to customize is row empty logic. (#3645)

### Fixed

- Fix temporary local files not being cleaned up when setting force_resync_remote config to true (#3623)
- Fix testing for multiple stored files by regex matching (#3631).
- Allow `required_unless` rule (#3660)

## [3.1.40] - 2022-05-02

- Fix testing for multiple stored files by regex matching (#3631).

### Changed

- Adds `WithDefaultStyles` concern to allow configuring the workbook default styles.
- Adds `WithBackgroundColor` concern to allow configuring the workbook default background color.
- Expose the ability to set custom response headers when exporting collections via Exportable

## [3.1.39] - 2022-04-23

### Fixed

- Fix PHP8.1 return type for Failure class (#3588)

## [3.1.38] - 2022-03-24

Expand All @@ -17,18 +70,22 @@ All notable changes to this project will be documented in this file.
## [3.1.37] - 2022-02-28

### Fixed

- Add `@mixin` docblock to all macroable classes to allow for IDE autocompletion of delegate classes
- Fix issue with `Excel::toArray` not allowing nullable reader types for uploaded files

### Changed

- Change default Csv Import to auto-detect the delimiter when not explicitly defined

## [3.1.36] - 2022-02-03

### Fixed

- Fix return type of `FromQuery::query()`

## Changed
### Changed

- Support Laravel 9
- Added a config setting to specify DB connection
- Added a config setting to specify CSV output encoding
Expand Down Expand Up @@ -217,7 +274,16 @@ All notable changes to this project will be documented in this file.
- Raw() method now also available on Exportable.
- Fix for breaking changes in PhpSpreadsheet with empty enclosures.

[Unreleased]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.38...HEAD
[Unreleased]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.47...HEAD
[3.1.47]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.46...3.1.47
[3.1.46]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.45...3.1.46
[3.1.45]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.44...3.1.45
[3.1.44]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.43...3.1.44
[3.1.43]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.42...3.1.43
[3.1.42]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.41...3.1.42
[3.1.41]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.40...3.1.41
[3.1.40]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.39...3.1.40
[3.1.39]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.38...3.1.39
[3.1.38]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.37...3.1.38
[3.1.37]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.36...3.1.37
[3.1.36]: https://github.com/Maatwebsite/Laravel-Excel/compare/3.1.35...3.1.36
Expand Down
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.PHONY: up down wait test coverage help

.DEFAULT_GOAL := help

## mysql config
MYSQL_VERSION ?= 8.0
MYSQL_CONTAINER_IMAGE := mysql:${MYSQL_VERSION}
MYSQL_CONTAINER_NAME := laravel-excel-mysql
MYSQL_HOST_PORT := 23306
MYSQL_DATABASE := test
MYSQL_USER := test
MYSQL_PASSWORD := test

up: ## Start containers
@printf "\033[93m→ Starting ${MYSQL_CONTAINER_NAME} container\033[0m\n"
@docker run --rm -d \
--name ${MYSQL_CONTAINER_NAME} \
-p ${MYSQL_HOST_PORT}:3306 \
-e MYSQL_RANDOM_ROOT_PASSWORD=yes \
-e MYSQL_DATABASE=${MYSQL_DATABASE} \
-e MYSQL_USER=${MYSQL_USER} \
-e MYSQL_PASSWORD=${MYSQL_PASSWORD} \
${MYSQL_CONTAINER_IMAGE} \
--default-authentication-plugin=mysql_native_password
@printf "\033[92m✔︎ ${MYSQL_CONTAINER_NAME} is started\033[0m\n"

down: ## Stop containers
@printf "\033[93m→ Stopping containers\033[0m\n"
@docker stop \
${MYSQL_CONTAINER_NAME}
@printf "\033[92m✔︎ Containers are stopped\033[0m\n"

wait: ## Wait until containers are ready
@printf "\033[93m→ Waiting for ${MYSQL_CONTAINER_NAME} container\033[0m\n"
@until docker exec ${MYSQL_CONTAINER_NAME} mysqladmin -u ${MYSQL_USER} -p${MYSQL_PASSWORD} -h 127.0.0.1 ping; do \
printf "\033[91m✘ ${MYSQL_CONTAINER_NAME} is not ready, waiting...\033[0m\n"; \
sleep 5; \
done
@printf "\033[92m✔︎ ${MYSQL_CONTAINER_NAME} is ready\033[0m\n"

test: ## Run tests
@printf "\033[93m→ Running tests\033[0m\n"
@vendor/bin/phpunit --testdox
@printf "\n\033[92m✔︎ Tests are completed\033[0m\n"

coverage: ## Run tests and generate the code coverage report
@printf "\033[93m→ Running tests and generating the code coverage report\033[0m\n"
@XDEBUG_MODE=coverage vendor/bin/phpunit --testdox --coverage-text
@printf "\n\033[92m✔︎ Tests are completed and the report is generated\033[0m\n"

help: ## Show help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Versions will be supported for a limited amount of time.
|---- |----|----|----|
| 2.1 | <=5.6 | <=7.0 | Unsupported since 15-5-2018 |
| 3.0 | ^5.5 | ^7.0 | Unsupported since 31-12-2018 |
| 3.1 | ^5.8\|^6.0\|^7.0\|^8.0 | ^7.2\|^8.0 | New features |
| 3.1 | >=5.8 \| <=10.x | ^7.2 \| ^8.0 | New features |
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
],
"require": {
"ext-json": "*",
"php": "^7.1|^8.0",
"php": "^8.0",
"phpoffice/phpspreadsheet": "^1.18",
"illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0"
"illuminate/support": "^10.0",
"psr/simple-cache": "^3.0",
"composer/semver": "^3.3"
},
"require-dev": {
"orchestra/testbench": "^6.0|^7.0",
"orchestra/testbench": "^8.0",
"predis/predis": "^1.1",
"laravel/legacy-factories": "^1.3"
"laravel/scout": "^10.0",
"laravel/legacy-factories": "^1.4"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 6a63211

Please sign in to comment.