despark / kohana
Kohana project template
Requires
- php: >=5.3.7
- ircmaxell/password-compat: ~1.0.3
- kohana/auth: ~3.3.1
- kohana/cache: ~3.3.1
- kohana/core: ~3.3.1
- kohana/database: ~3.3.1
- kohana/image: ~3.3.1
- openbuildings/jam: ~0.4.46
- openbuildings/jam-auth: ~0.2.3
- robmorgan/phinx: ~0.3.0
- symfony/console: ~2.4.0
Suggests
- openbuildings/functest: Functional Test for Kohana with PHPUnit and Spiderling
- openbuildings/jam-closuretable: Closuretable implementation for Jam ORM
- openbuildings/jam-freezable: Freeze dynamic values in the database using Jam
- openbuildings/jam-generated-feed: generate xml files based on a jam collection with a minion task
- openbuildings/jam-locations: Countries and Regions based on Jam and Closuretable
- openbuildings/jam-monetary: A Jam Field to transparently use 'monetary' as a Jam field, and have currency exchange arithmetic out of the box
- openbuildings/jam-resource: Resources for Jam ORM. Resources act as a bridge between routes, models and requests.
- openbuildings/jam-tart: Jam Admin Builder
- openbuildings/jam-taxonomy: Taxonomy terms and vocabularies for Jam
- openbuildings/monetary: Useful tool for formatting and converting currencies
- openbuildings/postmark: Postmark transport for Swift Mailer
- openbuildings/services-manager: Kohana Manager for external Services
- openbuildings/site-versions: Different versions of a Kohana website on different domains
- openbuildings/swiftmailer-css-inliner: Swift Mailer plugin to inline the CSS
- openbuildings/swiftmailer-filter: Swift Mailer plugin to whitelist/blacklist emails/domains
- openbuildings/swiftmailer-google-campaign: Swift Mailer plugin to automatically append Google campaign parameters to all email links
- phpunit/phpunit: The PHP unit testing framework
- swiftmailer/swiftmailer: Comprehensive mailing tools for PHP
This package is not auto-updated.
Last update: 2020-07-03 19:37:14 UTC
README
Kohana project template for Composer
This is how we bootstrap a Kohana project.
Creating a new project
To create a project foobar
run:
composer create-project despark/kohana foobar
That's it! You now have a Kohana project with some important modules installed, CLI tools, permissions set up and more!
What is installed
- Kohana core
- Official Kohana modules:
- Other Kohana modules:
- Phinx migrations (see Migrations)
- Password compatbility (see Password hashing)
Installing additional libraries
You could run:
composer require <vendor>/<library>:<version_constraint>
This would update the require
section in composer.json
, install the library and update the composer.lock
file.
See the suggest
section in composer.json
for a useful list of Kohana modules and other libraries.
Bootstrap
The bootstrap file for Kohana is filled with a lot of goodies. You should check it out here: bootstrap.php
.
Password hashing
The password hashing in the Auth module defaults to PHP 5.5 password_hash
.
Compatibility for PHP <5.5.0 is achieved using Anthony Ferrara's password_compat.
Database configuration
Kohana Database module is configured based on environments. The database name defaults to the project name.
Migrations
Migrations are done via phinx. Configuration is in phinx.yml. The database name defaults to the project name.
Under the hood
If you are curious how your project is actually built you should check out:
- Composer
create-project
command composer.json
Here is a summary:
- First it clones this repo in a folder with the name you've provided.
- Then it finds all dependencies listed in the
require
andrequire-dev
sections incomposer.json
and their dependencies as well. - Downloads them and put them in either
vendor/
ormodules/
. - Then it runs the scripts from the
post-create-project-cmd
section incomposer.json
:- Creates
application/classes/Model
,application/migrations
andapplication/views
. chmod
with 755application/migrations
- Generates a random string and sets
Cookie::$salt
with it. - Replace
{{DATABASE_NAME}}
inphinx.yml
andapplication/config/database.php
with the name of the project.
- Creates