Skip to content
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

Add PHP 8.4 support and improve test coverage #47

Merged
merged 11 commits into from
Feb 1, 2025
Merged

Conversation

tvup
Copy link
Owner

@tvup tvup commented Feb 1, 2025

Description:

This pull request introduces support for PHP 8.4 and improves test coverage for Laravel Fejlvarp. It includes:

  • Support for PHP 8.4 in the GitHub Actions workflow.
  • Refactoring of the GeoIP lookup function to use Http::get() instead of file_get_contents(), ensuring better error handling and maintainability.
  • Content-Type fix for the GeoIP response, explicitly setting it to application/javascript.
  • Addition of new feature tests for API endpoints, increasing overall test coverage.
  • Fixture-based testing for incidents, improving consistency in tests.
  • Database configuration updates for SQLite in-memory testing.
  • Dependency updates, including guzzlehttp/guzzle and orchestra/testbench.
  • Allowing auto-merge for patch dependencies in renovate.json.

Key Changes:

How to Test:

  1. Run the updated test suite:
    composer test
  2. Verify that the GeoIP API endpoint correctly returns a Content-Type: application/javascript response.
  3. Ensure all feature tests pass, including incident creation and retrieval.

Checklist:

  • Verified compatibility with PHP 8.4.
  • Ensured all tests pass with SQLite in-memory configuration.
  • Improved code maintainability by refactoring GeoIP logic.
  • Updated dependencies without breaking compatibility.

Additional Notes:

This PR ensures forward compatibility with PHP 8.4 and strengthens test reliability by introducing fixtures and additional test cases. 🚀

@tvup tvup changed the base branch from master to develop February 1, 2025 03:45
@tvup tvup merged commit dc6d17b into develop Feb 1, 2025
42 checks passed
tvup added a commit that referenced this pull request Feb 1, 2025
* Migrate config renovate.json (#46)

* Add PHP 8.4 support and improve test coverage

* Fix content-type of geostackip-script

* Add Guzzle to require-dev for HTTP client testing

* Update orchestra/testbench to version constraint to ^9.1

* Refactor PHP extensions for streamlined setup

* Remove unused ext-pcntl dependency

* Add SQLite extension for testing environment

* Remove unused curl extension from dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant