jarenal/tiny-tasks-bundle

Tiny Tasks Bundle is a demonstrative tasks manager application for Symfony 3 and upper.

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

1.0.0 2016-08-25 01:24 UTC

This package is not auto-updated.

Last update: 2024-10-10 04:07:36 UTC


README

I've developed this bundle for testing and demonstration purposes.

Some of the main libraries used for to build this bundle were:

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

    $ composer require jarenal/tiny-tasks-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle and dependencies

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 Jarenal\TinyTasksBundle\JarenalTinyTasksBundle(),
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle(),
        );


        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
            // ...

            $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
        }
    }

    // ...
}

Step 3: Enable the routing

For to enable the routing add the next lines to your app/config/routing.yml file:

    jarenal_tiny_tasks_bundle:
        resource: "@JarenalTinyTasksBundle/Resources/config/routing.yml"

Step 4: FosRestBundle settings

In your app/config/config.yml file add the next lines for to set the default configuration for FosRestBundle:

    fos_rest:
        routing_loader:
            default_format: json

Step 5: Database setup

NOTICE: Please note that this bundle is for testing purposes, so be careful before to execute the next commands in your database.

First enter the parameters of your database if you have not done yet in your app/config/parameters.yml

Then create the database if doesn't exist:

    $ php bin/console doctrine:database:create

Update schema for to generate the tables:

    $ php bin/console doctrine:schema:update

Load the default fixtures for the status table:

    $ php bin/console doctrine:fixtures:load

Step 6: Publish assets

Publishing bundle assets:

    $ php bin/console assets:install --symlink

Step 7: Clearing cache and try it!

Clear Symfony cache:

    $ php bin/console cache:clear

And finally call to the bundle using the next url:

http://YOUR_SERVER/tiny-tasks