2017 © Pedro Peláez
 

application slim-skeleton

A skeleton for Slim framework

image

oanhnn/slim-skeleton

A skeleton for Slim framework

  • Thursday, May 18, 2017
  • by oanhnn
  • Repository
  • 3 Watchers
  • 17 Stars
  • 217 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

Slim Skeleton

Build Status Latest Stable Version Total Downloads License, (*1)

Join the chat at https://gitter.im/oanhnn/slim-skeleton, (*2)

A skeleton for Slim Framework v3 following MVC pattern., (*3)

Main features

  • [x] Support logging follow PSR-3 with Monolog
  • [x] Support template engines: PHP view, Twig (default PHP view)
  • [x] Support database accessing with Doctrine DBAL, CakePHP Database (support MySql, Postgresql, SQLite, ...)
  • [x] Support middlewares: Basic & Digest Authentication
  • [x] Support providers, easy to integrate with slim/http-cache, slim/csrf, slim/flash
  • [x] Support making database test and integration test with PHPUnit
  • [x] Support coding style check with PHPCS
  • [x] Support auto deploy with Deployer
  • [x] Support using Gulp task to compile SASS, ES6, CoffeeScript, ...

Directories structure

path/to/project
|-- app
|   |-- assets
|   |-- config
|   |-- lang
|   `-- templates
|-- public
|-- src
|-- tests
|-- tmp
|   |-- cache
|   `-- logs
`-- vendor

Requirements

  • PHP 5.5+
  • Composer[compoer]
  • npm (If using gulp to build assets)

Usage

Create project

Using composer to create new project:, (*4)

$ composer create-project oanhnn/slim-skeleton path/to/project --prefer-dist

Run PHP built-in server

Run a built-in server on 0.0.0.0:8888, (*5)

$ php -S 0.0.0.0:8888 -t public public/index.php

Open web browser with address http://localhost:8888, (*6)

Check coding style and test

$ ./vendor/bin/phpcs
$ ./vendor/bin/phpunit

Build assets with gulp, npm

You can use Gulp to compile SASS, ES6, CoffeeScript, ..., (*7)

$ npm install
$ npm run-script build

Run a task with gulp

$ node_modules/.bin/gulp <task>

Deploy project

You can use Deployer to deploy project.
Copy and edit server's information from deploy.php.dist file to deploy.php file.
After that, you can run:, (*8)

$ composer require deployer/deployer:^3.3.0 --dev
$ ./vendor/bin/dep <stage>

See an example in here., (*9)

Changelog

See all change logs in CHANGELOG.md, (*10)

Contributing

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code., (*11)

Fork the project, create a feature branch, and send a pull request., (*12)

To ensure a consistent code base, you should make sure the code follows the PSR-2., (*13)

If you would like to help take a look at the list of issues., (*14)

License

This project is released under the MIT License.
Copyright © 2013-2016 Oanh Nguyen.
Please see License File for more information., (*15)

The Versions