- What is jonpurvis/faker-stripe used for?
- It is a FakerPHP provider that generates fake but structurally correct Stripe resource IDs, such as customer, charge, payment intent, and subscription identifiers. Use it in Laravel factories, seeders, and tests when you need realistic Stripe-style values without calling the Stripe API. It is intended as a dev/test utility, not a production Stripe emulator.
- How do I install jonpurvis/faker-stripe in Laravel?
- Install it as a Composer dev dependency, typically with composer require --dev jonpurvis/faker-stripe. Then register the provider with your Faker instance in test bootstrap, factories, or seeders as documented in the README. There are no migrations or runtime services to configure.
- Which Stripe resource IDs does jonpurvis/faker-stripe generate?
- It focuses on common Stripe object identifiers used in application tests, including customer (cus_), subscription (sub_), payment intent (pi_), and charge-style IDs. The exact provider methods and supported resource list should be checked in the package README for your installed version. Do not assume it emulates full Stripe API objects or behavior.
- Does jonpurvis/faker-stripe work with Laravel factories and seeders?
- Yes, it is designed to slot into the Laravel testing layer where FakerPHP is already used. You can call the provider from model factories and database seeders to replace hardcoded or UUID-based fake Stripe IDs. Keep it in require-dev and use it only for non-production fixture data.
- Which PHP, FakerPHP, and Laravel versions are supported by jonpurvis/faker-stripe?
- The package is a pure PHP FakerPHP provider, so compatibility depends on the constraints declared in its composer.json. Check those constraints against your application's PHP and Laravel matrix before adopting it. Pin it in require-dev and run CI across your supported versions to catch mismatches.
- Can I use jonpurvis/faker-stripe in production or staging?
- No, it should be treated as a dev-only dependency for tests and local seed data. Generated IDs are structurally plausible but are not valid Stripe objects, so live or staging Stripe API calls will reject them. Add review or CI checks to keep it out of non-dev dependencies and production flows.
- Does jonpurvis/faker-stripe replace Stripe test mode or HTTP mocking in tests?
- No, it complements rather than replaces Stripe test keys, HTTP client mocks, or contract tests. Use generated IDs when you only need fixture-quality identifiers, and keep real Stripe integration tests on Stripe test mode or mocked responses. This avoids false confidence that format-correct IDs prove API behavior.
- Does jonpurvis/faker-stripe support deterministic seeds for reproducible tests?
- It is a FakerPHP provider, so deterministic behavior follows Faker's seeding approach where the provider uses Faker's generators. Set a consistent seed in your test bootstrap if reproducibility matters. Verify the specific provider methods in your version because custom ID generation may not always be seed-stable.
- Is jonpurvis/faker-stripe actively maintained?
- It is a small, single-maintainer utility with modest adoption signals, so treat it as a tactical dev dependency rather than a strategic platform component. Monitor releases and pin a known-good version in your lockfile. If maintenance stalls, replacing it is low-risk because it only affects test fixtures.
- What are alternatives to jonpurvis/faker-stripe for fake Stripe IDs?
- Alternatives include hand-written factory helpers, hardcoded Stripe-style strings, UUIDs, or using Stripe test-mode API calls and HTTP mocking for more realistic integration tests. The right choice depends on whether you need simple fixture IDs or full Stripe API contract coverage. Many teams combine a small Faker provider with mocked Stripe HTTP clients.