This example covers all supported versions of Laravel. This implementation allows testing across all versions simultaneously.
This repository contains a full example for the laravel-chunk-upload package. You can either explore an example app or run tests against all supported versions of Laravel.
git clone [email protected]:pionl/laravel-chunk-upload-example.git --recurse-submodules
npm install
To install and run a specific version of Laravel, use the X.* version format.
node run.js "8.*"
Pass --ignore-example to ignore updating and building the example.
Pass --verbose for debug information.
The current version of laravel-chunk-upload is tested against:
Laravel | PHP | Run | Tests |
---|---|---|---|
10.* | 8.2-node-20, 8.2-node-20 | node run "11.*" |
node tests.js "11.*" |
10.* | 8.1-node-17, 8.2-node-18 | node run "10.*" |
node tests.js "10.*" |
9.* | 8.0-node-17, 8.1-node-17, 8.2-node-18 | node run "9.*" |
node tests.js "9.*" |
8.* | 7.4-node-17, 8.0-node-17, 8.1-node-17 | node run "8.*" |
node tests.js "8.*" |
7.* | 7.4-node-17 | node run "7.*" |
node tests.js "7.*" |
Pass --verbose for debug information.
Run tests on all Laravel versions (install them before using it) using docker
node tests.js
Run tests on a desired Laravel version
node tests.js "8.*"
php 7.\*/artisan serve --host=0.0.0.0 --port=8000
../node_modules/.bin/codeceptjs run --steps
.npm run test-debug
will show the browser while tests are running.IMAGE_VERSION
(PHP version) and LARAVEL_VERSION
.abort-on-container-exit
needs to be used to stop the Laravel server.IMAGE_VERSION=7.4 LARAVEL_VERSION=8.\* docker-compose -f docker-compose.yml -f docker-compose-tests.yml up --abort-on-container-exit
Do not commit your changes - use a pull request in the main repo.
laravel-chunk-upload
folder with your repository (clone your fork).pr.sh <your-github-username> <branch = default is master> <repository-name = laravel-chunk-upload>
node tests.js
to ensure backward compatibility.Do not commit your changes - use a pull request in the main repo.
versions.json
file.laravel-chunk-upload
folder.node tests.js "10.\*"
.node tests.js
to ensure backward compatibility.file_get_contents
), which would consume your memory.Example code found at ./example/src/Http/Controllers/UploadController.php.
node compile.js
to compile the changes and publish them to all versions (you can also pass the desired version).I did not find a way to install Laravel on master with the latest changes from the framework. Let me know if you know how.
laravel-chunk-upload-example was written by Martin Kluska and is released under the MIT License.
Copyright (c) 2017 and beyond Martin Kluska and all the contributors (Thank you ❤️)