Download the PHP package oxhq/preview without Composer

On this page you can find all versions of the php package oxhq/preview. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package preview

Laravel Preview

Laravel Preview is a local-first Laravel package for reproducing real application flows. It captures inbound traffic, verifies provider context, replays requests, writes fixtures, generates Pest-compatible tests, previews named routes safely, and composes those pieces into reusable local scenarios.

It is not a tunnel product, a hosted request bin, or a Stripe-only webhook debugger. Tunnels get traffic to your machine. Laravel Preview starts once traffic reaches Laravel and turns that flow into local development assets.

Install

Check local readiness:

Five-minute capture to test

Create a synthetic local capture, turn it into a fixture, and generate the Pest-compatible test that replays the same request:

Replace {capture} with the capture ID printed by preview:capture. The generated fixture is the reusable artifact: it powers replay, generated tests, local scenarios, and later CI or cloud replay surfaces.

Published package install checks are covered by the Packagist smoke script:

What Ships

Providers

Provider Verifies signatures Re-signs replay Event source
Generic No No X-Preview-Event
Generic HMAC Yes Yes X-Preview-Event
Stripe Yes Yes payload type
GitHub Yes Yes X-GitHub-Event
Shopify Yes Yes X-Shopify-Topic

Stripe is a high-fidelity reference provider, not the product center. Provider-specific logic belongs inside provider adapters, not in the capture, replay, fixture, or test generation services.

Inspect registered providers without starting any live traffic:

preview:provider:doctor reports provider capabilities and whether built-in provider secrets still use placeholder values. It does not print secret values. preview:provider:make writes a local provider scaffold for application-specific or community provider adapters. It does not register the provider automatically. preview:provider:sample prints synthetic provider-shaped request data for local capture and fixture checks. It does not use or print live provider payloads. preview:provider:self-test signs and verifies synthetic in-memory provider requests without printing provider secrets.

Capture

Synthetic local capture:

Live tunnel capture requires explicit config and CLI opt-in:

Capture commands:

Raw captures stay local. Metadata and generated fixtures redact configured sensitive headers such as cookies and authorization values. preview:capture:bundle writes a safe capture bundle with hashes and byte counts by default. Raw payload and header files are copied only when --include-raw is explicit. preview:capture:doctor checks capture metadata, raw body files, raw header files, registered provider references, and redaction state without printing raw payloads or secret header values. preview:capture:verify re-runs provider verification against the stored raw body and raw headers, so redacted metadata cannot accidentally change the verification result. preview:capture:integrity reports raw file readability, byte counts, and SHA-256 hashes without printing payloads or raw headers. preview:capture:compare compares two captures by metadata, header keys, and file hashes without printing payloads or header values. preview:capture:stats summarizes the local capture inventory by provider, event type, verification state, and capture time range. preview:capture:timeline prints a chronological capture summary with byte counts and safe metadata only. preview:capture:export writes a redacted metadata-only export. It does not copy raw payloads, raw headers, or local secret-bearing files. Capture pruning requires an explicit date cutoff and only deletes directories resolved inside the configured capture storage root. Use --dry-run first when inspecting local state.

stripe-cli is an optional convenience transport. It starts stripe listen and forwards Stripe events to the local Preview Stripe capture endpoint. It still requires --live, preview.live_enabled=true, a runnable Stripe CLI binary, and normal Stripe CLI auth.

Inspect configured tunnel transports without opening a tunnel:

preview:transport:doctor checks configured transport binaries without opening tunnels or touching the network.

Generated fixture manifests can be listed without reading payload files:

preview:fixture:doctor validates fixture manifests and companion file references without reading payload bodies or generated header fixtures. preview:fixture:export copies generated fixture files for a capture and intentionally skips payload files marked local-only. preview:fixture:stats summarizes fixture manifest inventory by provider, signing mode, and local-only payload usage without reading payload bodies.

Route Preview

Route preview creates signed, time-limited links for named Laravel routes and proxies execution through Laravel Preview's signed route endpoint.

preview:route:list inspects named route metadata and flags write-method routes without creating signed links or executing route actions. preview:route:doctor reports route-preview readiness, configured path, named route counts, write-route warnings, supported fakes, and signing prerequisites without executing routes. preview:route:export writes safe named-route metadata to JSON without executing route actions.

Safety boundaries are explicit:

Scenarios

A scenario is a local PHP file under preview/scenarios by default, or the configured preview.scenario_path, that returns Oxhq\Preview\Scenario\Scenario.

Scenario commands:

Scenario replay runs the configured seeder through Laravel's normal seeder path, replays listed captures, dispatches captures when --send-to is provided, and executes listed routes through the same signed route-preview safety layer. Replay prints a summary of seed, capture, dispatch, and route counts, and failures include the failing dispatch or route when a partial result exists. Scenario fakes are forwarded to route preview; they do not provide broader isolation than the route-preview fake flags. preview:scenario:bundle writes a scenario bundle with scenario fields and safe summaries for referenced captures. It does not run seeders, execute routes, or replay captures. preview:scenario:stats summarizes the local scenario inventory without loading application state beyond scenario files and without executing seeds, routes, or captures. preview:scenario:export writes a safe JSON snapshot of a scenario definition without running seeders, executing routes, or replaying captures. preview:scenario:validate checks seed classes, capture references, named routes, route parameters, and route expectation references without running seeders, executing routes, or replaying traffic. Configured route expectations are enforced during replay, so a route that returns the wrong status or misses required response text fails the replay even if the response is otherwise a 2xx.

Fixture generation writes a manifest.json next to each generated fixture. The manifest contains capture metadata, signing mode, fixture context, payload locality, and safe headers only; it excludes raw bodies and sensitive header values.

Generated scenario tests are Pest-compatible and local-first. They are meant to fail clearly when the host app lacks required routes, models, provider secrets, seed data, or database state. Generated scenario tests call ScenarioRunner directly and assert the replay result object instead of only checking command text. When route expectations are configured, generated tests assert the expected route status and optional response text; otherwise they keep the default 2xx route-success assertion.

Proof Boundary

Current proof in this repository is package-local Testbench proof plus a recorded Laravel 12 Composer path-repository smoke for package discovery, synthetic generic capture, scenario creation, scenario replay, generated scenario test creation, and generated Pest execution in that consumer app. A repeatable composer smoke:consumer script now exists for that consumer-app proof path. composer smoke:provider-signatures adds package-local signed-provider proof for Stripe and GitHub without requiring live provider traffic. The package test suite covers capture, replay, fixture generation, provider contracts, route preview, scenario replay, route composition, fake propagation, and generated test syntax/structure. CI and release workflows are present in .github/workflows, but hosted CI/release proof exists only after those workflows run on GitHub for the target commit or tag.

This does not prove:

Run local verification:

Release and integration proof helpers:

composer smoke:consumer creates a disposable Laravel app, installs oxhq/preview through a Composer path repository, captures a generic request, generates a fixture and Pest test, runs the generated test, and deletes the disposable app unless the script is called with -KeepWorkDir. composer smoke:packagist-install performs the same basic capture/fixture/test smoke from the package visible on Packagist after a release. composer smoke:tunnel proves local tunnel startup and capture URL extraction only; it does not prove webhook delivery. composer smoke:cloudflared is the Cloudflare Tunnel-specific startup smoke. It uses the same tunnel smoke script with -Transport cloudflare, so passing -RequireDns also checks that the generated hostname resolves. composer smoke:ingress starts a local Testbench server, opens a Preview tunnel capture URL, sends a synthetic request through the public URL, and confirms Laravel Preview stored the capture locally. This proves public ingress from this machine, but it still does not prove live provider-originated traffic such as GitHub.com deliveries. composer smoke:provider-signatures generates signed Stripe, GitHub, and Shopify samples with process-local secrets, captures them, verifies them, builds exact and resign replay payloads, writes fixture and Pest files, lints the generated PHP, and deletes the temporary proof directory unless called with -KeepWorkDir. composer smoke:github-webhook creates a temporary GitHub repository webhook through gh, points it at a cloudflared Preview GitHub capture URL, requests a GitHub ping or push-test delivery, verifies that Laravel Preview stored signed and verified GitHub captures, and deletes the temporary webhook. Pull request proof is wait-only because it requires a real pull request action while the tunnel is open. composer smoke:shopify-webhook defaults to dry-run. Trigger mode uses Shopify CLI to send a signed sample webhook to a Preview capture URL. Subscription mode uses Shopify Admin GraphQL credentials to create and optionally keep a webhook subscription for a real dev-store action proof. Secrets are accepted through environment variables or parameters and are redacted from script output. composer smoke:stripe-cli is the real Stripe CLI proof path. It requires Stripe CLI auth, accepts -StripeBinary or PREVIEW_STRIPE_CLI_BINARY when stripe is not on PATH, can derive PREVIEW_STRIPE_ENDPOINT_SECRET with stripe listen --print-secret, and redacts endpoint secrets from output. Passing -StartServer starts a local Testbench HTTP server and verifies that the triggered Stripe event becomes a verified Preview capture. composer release:packagist-sync is optional when Packagist's GitHub webhook already updates the package. It registers or updates the package through the Packagist API when PACKAGIST_USERNAME and PACKAGIST_API_TOKEN are available, and it does not print either value.

License

MIT


All versions of preview with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.0
illuminate/filesystem Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
symfony/process Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oxhq/preview contains the following files

Loading the files please wait ...