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
Preventgo Bundle

Preventgo Bundle Laravel Package

mpp/preventgo-bundle

mpp/preventgo-bundle is a Symfony bundle that packages PreventGo services for quick installation and configuration in Symfony applications, wiring up the required services and settings so you can add its functionality with minimal setup.

View on GitHub
Deep Wiki
Context7

Symfony Bundle to interact with PreventGo API

Frequently asked questions about Preventgo Bundle
Can I use mpp/preventgo-bundle in a Laravel application?
Not directly. mpp/preventgo-bundle is a Symfony bundle: it ships a Bundle class, a DependencyInjection extension, a Configuration tree, and a kernel request listener that Laravel's Illuminate foundation never boots. You have three options: instantiate the bundle's client classes manually inside a Laravel service provider, fork and refactor it into a framework-agnostic library with a thin Laravel provider on top, or rebuild a thin client against the PreventGo API docs using this repo as a reference. The fork-and-refactor path is the safest, because the other two depend on whether the HTTP client is container-coupled.
What does mpp/preventgo-bundle actually do?
It blocks navigation to configured routes until required conditions are met, which makes it useful for enforcing onboarding steps such as accepting terms, completing a profile, or verifying an account. Rules are declared in configuration, evaluated on every request by a kernel request listener, and users who fail a rule are redirected to a designated fallback route with optional flash messaging. Rule providers are extensible, so you can add custom conditions. In a Laravel app the same behaviour is usually a route middleware plus a gate or policy check.
How do I install mpp/preventgo-php or mpp/preventgo-bundle in Laravel with Composer?
composer require mpp/preventgo-bundle will install the files, but installation is not the problem: the bundle only registers itself through Symfony's kernel and DI container, which Laravel does not run. To make it usable you must bind the client and any request builders in a service provider, supply PSR-18 and PSR-17 implementations, and reimplement the navigation guard as middleware. Pin an exact version or commit SHA while you spike, since the project does not treat semver as a strict contract.
Which Laravel versions are compatible with the Symfony 7 support in v2.0.1?
Laravel 11 and 12 ship Symfony 7 components, while Laravel 10 ships Symfony 6.4, so the answer depends entirely on the one dependency constraint line in composer.json. If it reads ^6.4|^7.0 you keep Laravel 10 in scope; if it narrowed to ^7.0 you are pinned to Laravel 11 and 12. Read composer.json before anything else, because this single line determines your compatibility matrix and the feasibility of the whole integration spike.
Is mpp/preventgo-bundle actively maintained?
Maintenance is low and unverified. The repository has effectively one vendor as a single point of failure, no meaningful star or dependent count, and no external validation. The one positive signal is that PR #3 was merged and shipped in v2.0.1, which is the first evidence of responsiveness; treat the project as a first-party SDK built for one consumer rather than a community package, and vendor a fork you control.
How do I add a custom rule provider for onboarding conditions in a Laravel app?
The bundle exposes extensible rule providers that are wired into Symfony's container through service tagging. In Laravel you implement the same interface on your own class, bind it as a singleton in a service provider, and use the container's tag support to collect all providers. Then resolve the tagged set inside your middleware and evaluate each rule against the current request. Keep the rules framework-neutral so the same classes could be reused if you later fork the package.
What are the alternatives to mpp/preventgo-bundle for enforcing onboarding steps in Laravel?
For most Laravel applications a route middleware alias that checks a gate, policy, or a column on the user model is all you need, and it keeps configuration, tests, and versioning under your control. Reach for this bundle only if you are already committed to the PreventGo API and want its request builders and response DTOs as a reference implementation. If you do adopt it, wrap the external calls behind your own interface so the dependency stays swappable.
How do I handle redirection and flash messages when a user is blocked?
The bundle redirects blocked users to a configured fallback route and can attach an optional flash message. The Laravel equivalent is returning redirect()->route('onboarding')->with('status', 'Please complete your profile') from your middleware. To preserve where the user was heading, store the current URL in the session under url.intended and finish the flow with redirect()->intended() once the condition passes.
Is mpp/preventgo-bundle production-ready, and does it have tests or a security policy?
There is no observable test or coverage signal and no security disclosure channel, and handling of credentials, retries, and idempotency is undocumented. That combination is a real risk for production use, regardless of how clean the code looks. Pin an exact version or commit SHA, wrap the client in your own adapter, and add integration tests against a sandbox before trusting it with real user flows.
Is it safe to upgrade mpp/preventgo-bundle from 2.0.0 to 2.0.1 on a Laravel 10 project?
Treat it carefully. v2.0.1 shipped a Symfony compatibility change as a patch release, which is a semver smell: widening support to Symfony 7 is arguably a minor feature, and dropping Symfony 6 support is arguably a major change. Check composer.json first to see whether the constraint still allows ^6.4, then pin the exact version or commit and run a short Composer spike to confirm the client only depends on PSR-18 and PSR-17 rather than Symfony's HttpClient or container.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect