Download the PHP package skwi/project-base-bundle without Composer
On this page you can find all versions of the php package skwi/project-base-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skwi/project-base-bundle
More information about skwi/project-base-bundle
Files in skwi/project-base-bundle
Package project-base-bundle
Short Description Bundle with base code for projects
License MIT
Homepage http://github.com/skwi/SkwiProjectBaseBundle
Informations about the package project-base-bundle
Deprecated Alert
This bundle is not maintained anylonger because it violates several SOLID principles.
SkwiProjectBaseBundle
This is a bundle with some basic code I often use in my projects. Feel free to use it or enhance it.
Compatibility
The current version of the bundle is only compatible with Symfony 2.5+ Version 1.0 provides compatibility with older versions of Symfony
Setup
Install SkwiProjectBaseBundle
Simply run assuming you have installed composer (composer.phar or composer binary) :
Configuration
Register the bundle in app/AppKernel.php
:
In your app/config.yml file, you may need to set up several parameters
Usage
Base Manager
This abstract class provides methods for object managed by Doctrine ORM or Doctrine ODM and MongoDb.
Philosophy
The idea is to extends this class to manage a specific entity. Other entities can be managed by an single manager but the $objectName
and $repository
property will be used for a default managed entity.
Project setup
It's recommended for a manager extend the class and to be injected as a service.
Methods
The method provided by the base manager are described in the class API documentation.
Password encoder
The password encoder class provides an implementation of Symfony's PasswordEncoderInterface using the algorithm defined in the app/config.yml file
It's available as a service in the container.
Text helper
The text helper is a static class.
Note : The slug method is quite basic at the moment, it might be enhance in a future update. Make sure to use 1.* version for compatibility.
Base view
A base twig view is provided y the bundle.
It loads the libraries for :
Note : The libraries are loaded form the CDN, with a local fallback for IE version inferior to IE9.
Form templates
The bundle also provide preset form templates for Bootstrap 3.
Twig extensions
TextExtension
The TextExtension provides the following Twig filters
Testing
Unit tests are written using atoum. You will get atoum, among other dependencies, when
running composer install
. To run tests, you will need to run the following command :
API Documentation
API documentation is generated with PHPDoc and phpdoc-md
To generate it, you will need to run the following commands :
ToDo
- Remove or enhance the data format helper
- Enhance the slug method in text helper
- Remove twig encoder extension not very usefull
- See with last version of PHP for password encoding
- Update to symfony 2.5 with the property accessor
Known issues
Versioning
As of version 2.0.0, version tags are formated in a semantic way :
MAJOR.MINOR.PATCH.
- MAJOR version for incompatible API changes, likely breaking backward compatibility ;
- MINOR version for new functionality (backwards-compatible) ;
- PATCH version for backward compatible bug fixes.
All versions of project-base-bundle with dependencies
symfony/framework-bundle Version >=2.1
doctrine/common Version >=2.1
pagerfanta/pagerfanta Version 1.0.*@dev