conserto/pomm-cli
Fork of Pomm’s CLI component for inspecting PostgreSQL databases and generating PHP classes. Configure via a simple bootstrap file returning a Pomm instance, then use commands like pomm:inspect:database/schema/relation to explore schemas, relations, and columns.
Purpose Alignment (Updated for 4.0.2):
conserto/pomm-cli package remains aligned for PostgreSQL-specific CLI operations in Laravel, but Symfony 8 compatibility (added in 4.0.2) introduces nuanced implications:
symfony/console, symfony/dependency-injection), this release ensures smoother integration. However, Laravel’s core does not tightly couple with Symfony 8 by default, so this may be irrelevant unless:
VACUUM, bulk SQL) remains unchanged. The Symfony update is a backbone upgrade rather than a feature addition.Complementarity (Reaffirmed):
Anti-Patterns (Unchanged):
PHP/Laravel Compatibility (Updated):
composer why symfony/console symfony/dependency-injection
to confirm no conflicts with Laravel’s Symfony components (e.g., illuminate/console).pdo_pgsql/ext-pgsql).symfony/console:^6.4 vs. Laravel’s ^5.4).CLI Integration (Unchanged):
| Risk Area | Updated Mitigation Strategy |
|---|---|
| Symfony Version Skew | If using Laravel 10+, test for Symfony component conflicts (e.g., symfony/console). |
| Dependency Bloat | Audit for Symfony dependencies with: |
composer why symfony/*
Remove unused Symfony packages if this is a standalone CLI tool. |
| CLI/Laravel State | Isolate Pomm CLI from Laravel’s container if using Symfony services (e.g., avoid injecting App bindings). |
| Error Handling | Log Symfony/Pomm errors separately to avoid masking Laravel-specific issues. |
| Long-Running Tasks | Use Laravel queues or Symfony’s Process component for background tasks. |
Symfony/Laravel Stack:
Dependency Strategy:
composer vendor:publish) to avoid Symfony conflicts in shared environments?PostgreSQL-Specific:
Primary Use Case (Reaffirmed):
Alternatives Considered (Unchanged):
Assessment Phase (Updated):
grep -r "symfony/" ./vendor
Proof of Concept (Updated):
php artisan --version # Check Symfony console version
composer require conserto/pomm-cli:^4.0
php artisan pomm:query "SELECT version()"
composer why-not symfony/console
Phased Rollout (Unchanged):
Laravel-Specific (Updated):
CommandBus), leverage this release to:
// app/Providers/PommServiceProvider.php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
public function register() {
$container = new ContainerConfigurator();
$container->services()->set('pomm.logger', \Symfony\Component\Console\Logger\ConsoleLogger::class)
->arg('$output', fn() => $this->app['log']->driver('single')->getLogger());
}
.env or POMM_DSN).PostgreSQL-Specific (Unchanged):
Pre-requisites (Updated):
Implementation Steps (Updated):
composer.json with version pinning:
"conserto/pomm-cli": "^4.0"
php artisan vendor:publish --tag=pomm-cli --force
Validation (Updated):
Pros (Updated):
Cons (Updated):
services.yaml) align with Laravel’s DI container.Mitigations (Updated):
SYMFONY_INTEGRATION.md for team onboarding.composer.json for CLI tools if Symfony conflicts arise.Team Skills (Updated):
Error Handling (Updated):
try {
$command = new \Conserto\PommCli\Command\QueryCommand();
$command->run(new \Symfony\Component\Console\Input\ArrayInput([]), new \Symfony\Component\Console\Output\ConsoleOutput());
} catch (\Symfony\Component\Console\Exception\CommandException $e) {
\Log::error("Pomm CLI failed: " . $e->getMessage());
}
Process or Messenger for background tasks.Messenger:
use Symfony\Component\Messenger
How can I help you explore Laravel packages today?