Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Redash Laravel Package

igorsgm/laravel-redash

Laravel Redash is a lightweight integration for running Redash queries and fetching dashboards from your Laravel app. Configure Redash credentials, execute saved queries, and access results through a clean, familiar API.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require --dev vendor/package — it's a test-support package, so keep it in require-dev. On 1.2.0 you can pair it with Laravel 11 or 12 and Pest 3 or 4; the constraint set is what changed in this release.
  • Look first at phpunit.xml / tests/Pest.php. The package hooks in at the test-case level, so its behaviour is configured through your test bootstrap and a published config file rather than through application code.
  • Run php artisan vendor:publish --tag=package-config if you need to override defaults (timeouts, faked services, assertion verbosity). Most projects never publish it — start without it.
  • First use case: write a single feature test that exercises one HTTP endpoint and one queued job, then run it with ./vendor/bin/pest --filter=YourTest. This confirms the helper bootstraps cleanly before you refactor an existing suite onto it.
  • If you're upgrading from a pre-1.2 release, run the full suite once on Laravel 11 + Pest 3 before bumping either dependency, so you can attribute any failure to the right upgrade.

Implementation Patterns

  • Pest-first setup. Register the package's uses() target in tests/Pest.php so every test in a folder inherits the helpers. Keep the global uses() narrow (Feature only) and opt in inside Unit tests explicitly — the helpers assume a booted application container.
  • Dataset-driven assertions. Prefer Pest datasets over loops for permission matrices, validation rules, and API response shapes. The package's assertions are designed to be called per-case, and failures read far better with a named dataset key.
  • Custom expectations. Wrap repeated assertion chains (e.g. "this response is a paginated resource") into expect()->extend() calls in a dedicated tests/Expectations.php file loaded from Pest.php. This is the highest-leverage integration point — it keeps domain vocabulary in the tests instead of raw assertions.
  • CI matrix. Test against Laravel 11/Pest 3 and Laravel 12/Pest 4 as separate matrix legs. Version 1.2.0 is the first release supporting the latter pair, so running both legs is the only way to catch a helper that behaves differently under the new test-case lifecycle.
  • Parallel testing. Enable pest --parallel once the suite is green; ensure each parallel worker gets an isolated database (RefreshDatabase plus a per-process DB name, or a transaction-only strategy). Helpers that touch the container are the usual source of cross-worker bleed.
  • Arrange with factories, assert with the package. Keep model setup in factories and reserve the package for the act/assert half; mixing both leads to tests that are hard to port off the package later.

Gotchas and Tips

  • PHP floor moved. Pest 4 requires PHP 8.3 and Laravel 12 requires 8.2+; if your CI or local image is on 8.1 you cannot use 1.2.0 at all. Pin the package to ^1.1 until the runtime is bumped.
  • Mixed-version traps. composer update will happily give you Pest 4 for one leg of the matrix and Pest 3 for another if constraints are loose. Commit composer.lock for the dev dependencies or use --prefer-lowest/--prefer-stable explicitly in CI.
  • Config caching. php artisan config:cache in a deploy pipeline will bake in published config; if your test bootstrap relies on env overrides, clear the cache in the test job or the helpers will silently use stale values.
  • Container state between tests. If a helper registers a singleton, it survives RefreshDatabase. Anything that mutates global state should be reset in an afterEach hook rather than relying on a fresh application instance.
  • Debugging silently-passing assertions. A helper that returns early when the container isn't booted will make tests green for the wrong reason. Sanity-check by deliberately breaking an expectation once — if the suite still passes, the package isn't actually wired up.
  • Extension points before forking. Macros, custom expectations, and the published config cover most needs; vendor patches are a maintenance tax that compounds at every major Laravel release.
  • Upgrade checklist for 1.2.0: bump pestphp/pest to ^4, laravel/framework to ^12, PHP to 8.3, then run the suite twice (with and without --parallel) before merging.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin