chrisdahl/star-wars-names-bundle

Generates random Star Wars names

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 1

Type:symfony-bundle

1.0.0 2016-10-17 12:44 UTC

This package is not auto-updated.

Last update: 2025-06-11 23:49:08 UTC


README

Download and install the below listed programs/tools/scripts

Symfony Bundle Installation

Step 1a: Install the bundle via composer

composer require chrisdahl/star-wars-names-bundle

Step 1b: Install the project using Docker

  • Build the attached Dockerfile for an image containing everything

    docker build Dockerfile

  • Run the image with interactive terminal and continue with the next step (vim is pre-installed)

    docker run -it

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Chrisdahl\StarWarsNamesBundle\ChrisdahlStarWarsNamesBundle(),
        );
        // ...
    }	
    // ...
}

Run

Open a console and change to your Symfony project root directory and then execute one of the following commands:

Get all the names:

php bin/console starwarsnames:all

Get a random name:

php bin/console starwarsnames:random	

Get three random names:

php bin/console starwarsnames:random 3

Testing

phpunit vendor/chrisdahl/star-wars-names-bundle/Tests/