superbrave/partnerize-bundle
Symfony bundle that integrates the Partnerize affiliate network into your application. It wraps Partnerize API calls for click tracking, conversion reporting, and commission data, giving Symfony services a clean, configurable client for affiliate marketing workflows.
This package is centred on a Job model — v1.0.0 adds a status constant to it and ships documentation with a worked example. The docs example is the fastest path in; it is the only canonical usage pattern published so far, so read it end-to-end before writing your own wiring.
Minimal path:
Job model early. Confirm the fully-qualified class name and whether it collides with anything already in your app — most Laravel apps already have a jobs table (the queue driver's) and possibly their own Job/OrderJob domain models. Check the migration/table name the package expects before running anything.If the docs example references a publishable config or migration, run those steps before touching the model — php artisan vendor:publish output is the usual place gaps show up.
Use the constant as the single source of truth. Everywhere you would otherwise write 'pending' or 'completed', reference Job::STATUS_* instead. This is the main practical benefit of the v1.0.0 addition: one place to change if the stored value shifts. This matters most in:
where() clausesWrap status reads in scopes rather than repeating where calls. A scopePending() / scopeCompleted() pair on top of the constant keeps controllers and jobs readable and gives you one place to adapt when more statuses land in later releases.
Drive transitions through the model, not raw updates. If status changes happen via DB::table('jobs')->update(...) or a mass Model::where(...)->update(...), model events and observers are bypassed and your status values drift. Prefer $job->update(['status' => Job::STATUS_X]) or a dedicated markAs...() method so you can hang observers, events, and audit logging off the transition.
Integration points worth wiring deliberately:
ShouldQueue so a slow side effect never blocks the transition write.Testing. Assert against the constant (assertDatabaseHas(['status' => Job::STATUS_X])) rather than the literal string. It keeps tests green across a value change and documents intent.
casts() entry, a validation rule, or a DB enum/check constraint if you need real enforcement. Don't assume the constant gives you validation.jobs is a reserved-ish name in a Laravel app. If the package's table is also jobs, you will get confusing behaviour in queue-heavy apps. Verify the table name in the migration before you deploy, and be explicit in every query rather than relying on the default connection's intuition.where('status', $from)->update(...)) and check the affected-row count rather than read-then-write.Job before a worker changed its status, your in-memory copy is wrong. refresh() before branching on status in any job that waits.saving/updating observer overwriting it, (3) is the column's default in the migration what you expect, (4) is a queue worker running old code after a deploy.composer update doesn't strand you.How can I help you explore Laravel packages today?