frankspress/sg-parser-bundle
Frankspress SG Parser Bundle packages SG parser functionality as a Symfony bundle. It provides service wiring so PHP applications can integrate the parser through standard Symfony configuration, reducing manual setup. Suitable for projects that need SG data parsing within a Symfony stack.
A fresh 1.0.0 means there's no upgrade path to worry about — you're adopting from zero, so the goal of the first hour is to confirm the package does what its README claims before you wire it into anything real.
composer require <vendor>/<package> and check composer.json in the package for extra.laravel.providers / aliases. If it's a modern package, you shouldn't need to touch config/app.php at all.README.md → the service provider in src/ → config/*.php → CHANGELOG.md. The service provider is the single best map of what the package registers (bindings, singletons, commands, routes, migrations, event listeners).php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider" and inspect the tags it exposes. Publish config first, assets/migrations second — you often don't want the migrations if the package loads them itself.php artisan tinker session or a single feature test is faster than integrating and debugging at the same time. Resolve the package's main class from the container and hit its simplest public method.First use case: whatever the package's headline feature is, exercise it once end-to-end (config → service → observable output) in a scratch test before you build anything on top of it.
Wrap it, don't scatter it. Resolve the package through constructor injection in one or two of your own service classes rather than calling it from controllers, jobs, and models. When 1.x shifts an API (and it will), you edit one adapter instead of a dozen call sites.
final class ShippingCalculator
{
public function __construct(private \Vendor\Package\Client $client) {}
public function quote(Order $order): Money
{
return $this->client->quote($order->toPackagePayload());
}
}
Config over code. Anything the package exposes in its published config should live in config/<package>.php with values coming from env(). Never edit files under vendor/ — they vanish on the next composer update.
Test double at the boundary. If the package ships a fake, contract, or swap()/fake() helper, use it in your feature tests so you're not hitting a real API in CI. If it doesn't, bind your own interface in a test service provider and fake that.
Async and side effects. If the package dispatches events, queues jobs, or fires webhooks, register listeners in your own EventServiceProvider rather than modifying package internals. That's the supported extension point and it survives upgrades.
Pin and lock. "<vendor>/<package>": "^1.0" in composer.json, and commit composer.lock. On a 1.0.0, minors may still carry behaviour changes; treat every composer update of this package as something to review, not something to batch.
php artisan config:clear (and route:clear, view:clear if relevant). "My env var isn't picked up" is almost always a stale cached config in bootstrap/cache/.composer.json → extra.laravel.dont-discover in your app, and run php artisan about to see what Laravel actually booted. composer dump-autoload after adding a package you installed manually.loadMigrationsFrom() vs. publishes(). Running vendor:publish on a package that already loads migrations gives you duplicate tables.vendor:publish with no arguments floods you with options, use --tag= — but the tag names are the package's choice; read the provider to find them rather than guessing.app()->bound(Foo::class) and app()->make(Foo::class) in tinker tell you instantly whether it's a registration problem or a usage problem.1.0.x entries before upgrading in production, and don't build deep assumptions on undocumented methods — prefer the public contract if one exists.Macroable), custom drivers/managers, published config, and events are the stable seams. Subclassing package internals is the seam that breaks.Log::debug() the payload — it's usually faster than stepping through vendor code to find out what shape the data is actually in.How can I help you explore Laravel packages today?