-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add Laravel installation tests and update documentation - drop php8.0 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
…recated checks and enhance script usability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces automated Laravel installation testing for the egyjs/progressive-json-php package, updates CI configurations, tightens PHP requirements, and expands documentation around these tests.
- Add a Bash script (
scripts/test-laravel-installation.sh) to spin up fresh Laravel apps (v9–v12), install the package, and verify basic functionality. - Introduce a dedicated GitHub Actions workflow (
.github/workflows/laravel-installation-test.yml) to run the Laravel compatibility matrix on each push/PR and weekly. - Bump
composer.jsonto version 1.1.0, drop PHP 8.0 support (now>=8.1), update Symfony HttpFoundation constraint; update README and docs with installation test instructions.
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/test-laravel-installation.sh | New script automating Laravel project creation, package install, and tests |
| docs/LARAVEL_INSTALLATION_TESTS.md | Detailed documentation of the local/CI test script and workflow usage |
| composer.json | Version bump to 1.1.0; require PHP >= 8.1; extend symfony/http-foundation |
| README.md | Updated PHP badge, added Laravel installation test section |
| .github/workflows/php-tests.yml | Removed PHP 8.0 from the PHPUnit test matrix |
| .github/workflows/laravel-installation-test.yml | New workflow for running Laravel installation tests |
Comments suppressed due to low confidence (2)
docs/LARAVEL_INSTALLATION_TESTS.md:216
- Remove or replace this line since there is no 'Troubleshooting' section in this document, or add the missing section with relevant troubleshooting steps.
1. Check the troubleshooting section above
.github/workflows/laravel-installation-test.yml:59
- Ensure the target
testsdirectory exists before copying; consider addingmkdir -p testsbefore this command to avoid failures if the directory is missing.
cp -r ../../tests/* tests/
| php -r " | ||
| require_once 'vendor/autoload.php'; | ||
| if (class_exists('Egyjs\ProgressiveJson\ProgressiveJsonStreamer')) { | ||
| echo 'Autoloading: ✓' . PHP_EOL; |
Copilot
AI
Jun 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the existing print_success function for success messages to maintain consistent colored output formatting instead of raw echo.
| echo 'Autoloading: ✓' . PHP_EOL; | |
| echo "\033[0;32m[SUCCESS]\033[0m Autoloading: ✓" . PHP_EOL; |
| php -r " | ||
| require_once 'vendor/autoload.php'; | ||
| require_once 'bootstrap/app.php'; | ||
| \$streamer = new \Egyjs\ProgressiveJson\ProgressiveJsonStreamer(); | ||
| \$data = ['test' => 'Laravel ' . app()->version(), 'php' => PHP_VERSION]; | ||
| \$result = \$streamer->stream(\$data); | ||
| if (!empty(\$result)) { | ||
| echo 'Basic functionality: ✓' . PHP_EOL; | ||
| } else { | ||
| echo 'Basic functionality: ✗' . PHP_EOL; | ||
| exit(1); | ||
| } | ||
| " |
Copilot
AI
Jun 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, replace this raw echo with print_success to keep all success messages consistently formatted.
| php -r " | |
| require_once 'vendor/autoload.php'; | |
| require_once 'bootstrap/app.php'; | |
| \$streamer = new \Egyjs\ProgressiveJson\ProgressiveJsonStreamer(); | |
| \$data = ['test' => 'Laravel ' . app()->version(), 'php' => PHP_VERSION]; | |
| \$result = \$streamer->stream(\$data); | |
| if (!empty(\$result)) { | |
| echo 'Basic functionality: ✓' . PHP_EOL; | |
| } else { | |
| echo 'Basic functionality: ✗' . PHP_EOL; | |
| exit(1); | |
| } | |
| " | |
| php_output=$(php -r " | |
| require_once 'vendor/autoload.php'; | |
| require_once 'bootstrap/app.php'; | |
| \$streamer = new \Egyjs\ProgressiveJson\ProgressiveJsonStreamer(); | |
| \$data = ['test' => 'Laravel ' . app()->version(), 'php' => PHP_VERSION]; | |
| \$result = \$streamer->stream(\$data); | |
| if (!empty(\$result)) { | |
| echo 'SUCCESS: Basic functionality' . PHP_EOL; | |
| } else { | |
| echo 'Basic functionality: ✗' . PHP_EOL; | |
| exit(1); | |
| } | |
| ") | |
| if [[ $php_output == SUCCESS:* ]]; then | |
| print_success "${php_output#SUCCESS: }" | |
| else | |
| print_error "${php_output}" | |
| exit 1 | |
| fi |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📋 Description
This PR adds comprehensive Laravel installation testing capabilities to ensure the
egyjs/progressive-json-phppackage works correctly across multiple Laravel versions and PHP versions.What does this PR do?
Why is this change needed?
🔗 Related Issues
🧪 Type of Change
🧪 Testing
New Tests Added
Test Coverage
How to Test
.github/workflows/laravel-installation-test.yml./scripts/test-laravel-installation.shTest Code Example:
📖 Documentation
⚡ Performance Impact
Performance Notes:
The Laravel installation tests include performance monitoring to ensure the package maintains acceptable performance across different Laravel versions.
💥 Breaking Changes
Migration Guide:
symfony/http-foundation: ^5.4 || ^6.0 || ^7.0✅ Checklist
Code Quality
Testing & Documentation
Git & Process
Community Guidelines
📝 Additional Notes
Questions for Reviewers
Known Issues/Limitations
Future Improvements
📊 Test Matrix Added
*Laravel version requirements exclude certain PHP versions
/cc @egyjs