Skip to content

twigfiddle.com provides a small development environment to develop, run, store and access Twig code online.

License

Notifications You must be signed in to change notification settings

ninsuo/twigfiddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Down right nwo

I need to change twigfiddle's hosting but have no time to correctly reinstall it yet.

It will be back within a couple of weeks (probably mid-june to be sure).

Your data have been backed up.

Cheers

Welcome

This is the project's repository, come here if you found a bug, if you want to request new features or if you want to contribute.

If you need help to use twigfiddle, please read the twigfiddle's help page.

Some words about the project

The project is made of 2 applications:

  • cli directory contains the fiddle runner, an application built using Symfony components to execute a fiddle.

  • web directory contains the web application, built using the Symfony framework

About the other directories:

  • resources directory contains specification documentations, logo source and original integrated design.

  • samples contains exported fiddles (see app/console custom commands)

  • environment is the default directory containing fiddles at runtime

  • debug is the default directory where crashed fiddles are stored

Installation

Here are instructions to get started with the application. Of course, replace paths to fit with your own environment.

# Clone the project
git clone https://github.com/ninsuo/twigfiddle.git twigfiddle
cd twigfiddle

# install Composer
php -r "readfile('https://getcomposer.org/installer');" | php
sudo mv composer.phar /usr/bin/composer
sudo chmod 755 /usr/bin/composer

# Install the fiddle runner and prepare all twig versions
cd cli
composer install
cd twig
sh prepare.sh
cd ../../

# Install the web application
# composer update will fail when trying to remove apc cache, that's normal at this step
cd web
composer install

# Install the database
# You should create it yourself, from mysql, type:
# CREATE DATABASE twigfiddle
# GRANT ALL PRIVILEGES ON twigfiddle.* To '<user>'@'127.0.0.1' IDENTIFIED BY '<password>';
php app/console doctrine:schema:drop --force
php app/console doctrine:schema:create
php app/console twigfiddle:import ../samples/*

# Check that everything is working properly
composer update
php app/check.php
phpunit tests

# Launch the application
php app/console server:start
open http://127.0.0.1:8000/hello

Automatically download, install and configure new Twig releases

Simply run the following command:

php cli/run-prod.php twigfiddle:release:watcher

Upgrade for installs before 01/11/2016

User provider have been refactored ( see #18 ), you need to run the following queries to upgrade twigfiddle schema.

alter table user add column nickname varchar(255) not null after username;
update user set nickname = username;
update user set username = concat('["', resource_owner, '","', resource_owner_id, '"]');

Configure external services

Don't panic, that's optional.

About

twigfiddle.com provides a small development environment to develop, run, store and access Twig code online.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published