wundii/afterbuy-sdk-symfony-bundle
A Symfony bundle that integrates the Afterbuy SDK into your application, providing ready-to-use service configuration and dependency injection so you can access the Afterbuy e-commerce API with minimal setup.
composer require <vendor>/<package> and publish the config (php artisan vendor:publish --tag=<package>-config) if you need to point at custom schema locations. The package's value is validating XML against XSD, so the first thing to locate is the directory of .xsd files it ships and the config key that maps a document type to a schema path.Rule object so validation failures surface as normal 422s rather than exceptions bubbling out of a job.DOMDocument::loadXML is enough — reach for this package when you actually need structural/type conformance to a schema.Illuminate\Contracts\Validation\ValidationRule and delegate to the package, so validation composes with required, file, max: and the rest of the validator. Map library errors into $fail() messages with line numbers retained.failed() handler that quarantines the payload and notifies, rather than blocking a request cycle.tests/fixtures/xml/ directory with one valid document and one deliberately broken document per supported document type. These are also your regression harness for package upgrades — see the notes below on 1.0.2.'invoice.v2' => storage_path('schemas/invoice-v2.xsd')) rather than branching in code. Adding a version becomes a config change.targetNamespace from the shipped XSD. Consequence: documents that are namespace-qualified (i.e. most real-world documents — <inv:Invoice xmlns:inv="...">) may no longer validate against the shipped schema, while previously rejected unqualified documents now pass. This is a behavioural change in a patch release, which is unfortunate. If you upgraded, re-run your fixture suite immediately and pin the version in composer.json until you've confirmed which of the two shapes your upstream partners actually send.targetNamespace and elementFormDefault="qualified". That is also the cleaner long-term fix: don't depend on the package's bundled schema for a contract you care about.xs:import silently-ish — you get a validation failure on a valid document, not an obvious "schema not found". Test with a schema that has an import if you customise paths.LIBXML_NONET is set and external entity loading is disabled when parsing untrusted input. If the package wraps DOMDocument, check that it isn't calling loadXML on user input without those flags.libxml_use_internal_errors(true) and clear the buffer — leaked libxml error state between validations in the same request is a classic phantom-bug source.xs:alternative, validation will fail for reasons that have nothing to do with your document.How can I help you explore Laravel packages today?