- What is greenter/data used for in Laravel applications?
- This package provides pre-built invoice document models and entities specifically for testing Greenter integrations in Laravel. It’s designed to simulate real-world invoicing workflows, helping you validate API responses, database schemas, and business logic before deploying to production.
- Can I use greenter/data for generic document storage in Laravel?
- No, this package is tightly coupled to Greenter’s invoicing ecosystem. It lacks support for arbitrary file types, metadata, or access controls. For generic document storage, consider alternatives like spatie/laravel-medialibrary or Laravel’s built-in Storage facade combined with Eloquent.
- What Laravel versions does greenter/data support?
- The package was released in 2019 and likely targets Laravel 5.x–7.x. Compatibility with Laravel 8+ or 10.x is untested. You’ll need to manually verify dependencies and migrations, as Greenter’s core framework may not align with newer Laravel versions.
- Do I need greenter/core to use greenter/data?
- Yes, greenter/data depends on greenter/core, which isn’t available on Packagist. You’ll need to either fork the Greenter repository, include it as a submodule, or mock its classes if you’re only using the test data. Without greenter/core, the package’s functionality is severely limited.
- How do I install greenter/data in a Laravel project?
- Since greenter/core isn’t on Packagist, installation requires cloning the Greenter repository and including it as a dependency. Run `composer create-project` or manually add the repo to your `composer.json` under `repositories`. Then install with `composer require greenter/data`. Expect dependency conflicts or missing classes.
- Is greenter/data suitable for production use, or just testing?
- This package is explicitly designed for testing and development. It lacks production-grade features like error handling, security validations, or scalability optimizations. Use it only in staging or CI environments to validate Greenter integrations before building your own production-ready solution.
- How do I migrate greenter/data’s database schema to my Laravel app?
- Greenter/data assumes Greenter’s migrations, which include tables like `documents` with Greenter-specific foreign keys (e.g., `greenter_id`). To adapt it, you’ll need to manually map these to your schema or create a parallel database structure. Consider using Laravel’s schema builder to generate compatible tables.
- Are there alternatives to greenter/data for invoice-specific testing?
- If you’re testing invoicing workflows but not tied to Greenter, consider creating custom Eloquent models for invoices and documents. Packages like `laravel-invoices` or `spatie/laravel-billing` offer more flexibility. Greenter/data is only useful if you’re deeply integrated with Greenter’s ecosystem.
- How can I extend greenter/data to work with my existing Laravel models?
- To decouple from Greenter’s models, create adapter classes that map your entities (e.g., `Invoice`, `Document`) to Greenter’s structure. For example, write a `GreenterDocumentAdapter` that converts your `File` model to Greenter’s `Document` format. This reduces coupling but adds maintenance overhead.
- What are the risks of using greenter/data in a long-term project?
- The package appears abandoned (no updates since 2019) and is tightly coupled to Greenter’s internal architecture. Risks include breaking changes if Greenter’s core evolves, dependency conflicts with modern Laravel/PHP versions, and lack of community support. Evaluate whether the short-term convenience justifies long-term lock-in.