Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Phinx Bundle

Phinx Bundle Laravel Package

alexssssss/phinx-bundle

View on GitHub
Deep Wiki
Context7

alexssssss phinx bundle

Frequently asked questions about Phinx Bundle
Can I use this bundle to handle MySQL/PostgreSQL migrations in Laravel when Laravel’s native migrations only support SQLite?
Yes, this bundle integrates Phinx—a standalone migration tool—into Laravel, enabling support for MySQL, PostgreSQL, and other databases. While Laravel’s migrations are SQLite-focused, Phinx fills the gap for production-grade databases. You’ll need to configure it via Artisan commands or a custom facade, but the core functionality aligns perfectly with Laravel’s needs.
How do I install and configure this bundle in a Laravel project?
Install via Composer with `composer require alexssssss/phinx-bundle`. Since it’s Symfony-based, you’ll need to adapt its `phinx.yml` configuration to Laravel’s `config/` structure. Register Phinx as a service in `AppServiceProvider` and expose commands via Artisan (e.g., `php artisan phinx:migrate`). Documentation is Symfony-centric, so expect some manual setup for Laravel compatibility.
Will this bundle conflict with Laravel’s built-in migrations (e.g., duplicate migration tables)?
Yes, conflicts are likely since both Laravel and Phinx use migration tables (`migrations` vs. `phinxlog`). Mitigate this by either using Phinx exclusively (deprecating Laravel’s migrations) or implementing a hybrid approach where Phinx handles non-SQLite databases while Laravel manages SQLite/dev migrations. Custom logic in `AppServiceProvider` can route migrations dynamically.
Does this bundle support advanced migration features like rollbacks, data seeding, or custom SQL?
Absolutely. Phinx offers robust features like rollbacks, data seeding, and raw SQL execution—capabilities lacking in Laravel’s migrations. This bundle unlocks those features for Laravel projects, making it ideal for complex database evolutions or multi-database setups where Laravel’s migrations fall short.
How do I expose Phinx commands (e.g., `phinx:migrate`) via Laravel’s Artisan CLI?
Extend Laravel’s Artisan by creating custom commands in `app/Console/Commands/`. For example, a `PhinxMigrateCommand` can wrap Phinx’s CLI calls. Alternatively, use a facade to abstract Phinx’s methods. Ensure your commands are registered in `app/Console/Kernel.php` to appear as `php artisan phinx:migrate`.
Is this bundle actively maintained, and what’s the Laravel version support?
The bundle has minimal community traction (no stars/dependents), suggesting low maintenance. It’s Symfony-focused but can work with Laravel 8+ via custom integration. Test thoroughly in a staging environment, as compatibility isn’t officially guaranteed. For long-term use, consider forking or wrapping it in a Laravel-specific package.
Can I use this bundle alongside Eloquent models without breaking changes?
Yes, Phinx operates independently of Eloquent, so it won’t interfere with models. However, ensure your migrations don’t duplicate schema definitions (e.g., tables created in both Laravel and Phinx migrations). Use Phinx for database-agnostic changes and Laravel migrations for model-specific adjustments where needed.
What databases does this bundle support, and how does it handle environment-specific configurations?
Phinx supports MySQL, PostgreSQL, SQLite, SQL Server, and Oracle—ideal for multi-database Laravel apps. Environment-specific configs (e.g., `.env`) can be mapped to Phinx’s `phinx.yml` via Laravel’s `config()` helper or environment variables. For example, use `env('DB_CONNECTION')` to dynamically switch databases in migrations.
Are there performance concerns when using Phinx migrations in a large-scale Laravel app?
Phinx migrations are efficient for most use cases, but large-scale operations (e.g., 1000+ tables) may require optimization. Batch migrations, use transactions, and avoid raw SQL where possible. Monitor query caching (e.g., Doctrine cache) if Phinx interacts with Laravel’s query builder, as conflicts could arise. Test under production-like loads.
What alternatives exist for Laravel if this bundle isn’t a perfect fit?
For Laravel-specific solutions, consider Laravel’s native migrations (SQLite/MySQL) or third-party packages like `doctrine/dbal` for cross-database support. If you need Phinx’s advanced features, explore forking this bundle or wrapping it in a Laravel-compatible package. Alternatively, use FlySystem or custom scripts for database-agnostic migrations, though they lack Phinx’s robustness.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver