syjust/sf-db-cmd

Symfony DB command

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

pkg:composer/syjust/sf-db-cmd

1.1.1 2024-07-18 16:00 UTC

This package is auto-updated.

Last update: 2025-12-18 19:48:59 UTC


README

Description

A copy / adaptation of laravel/framework DbCommand

  • used to easily access your DB with a command line interface,
  • based on symfony/console, symfony/process & doctrine/orm libraries.

Installation

First, add the dependency in your project.

composer require syjust/sf-db-cmd

Then add the following line in your config/bundles.php file.

// ...
    Syjust\SfDbCmd\DbCommandBundle::class => ['all' => true],
// ...

Usage

# connecting interactively into the database
php bin/console db

Limitations

This command was only tested with pdo_mysql & pdo_sqlite at this time in interactive mode at this time.

Contributions

Known issues

If you get the following message:

TTY mode requires /dev/tty to be read/writable.
  1. Ensure /dev/tty is writable in shell mode (echo foobar >> /dev/tty).
  2. Ensure you are on unix based OS (/ is the directory separator).
  3. Ensure PHP is able to write in /dev/tty (<?php is_writable('/dev/tty') ?>) If the latest test fails: add ':/dev/tty' to the open_basedir config in your php.ini.