Download the PHP package friendsofcake/app-template without Composer

On this page you can find all versions of the php package friendsofcake/app-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package app-template

App Template Build Status

An empty CakePHP project for use with composer

Requirements

PHP 5.4 and above.

Installation

composer -sdev create-project friendsofcake/app-template ProjectName

This will create a new project, with dependencies, based on this repository. Be sure to point the webserver at the webroot folder and ensure that URL rewriting is configured correctly.

Sane-default Configuration

By default, the following has been enabled:

You may change any of these at your leisure.

Application Configuration

This template is setup to configure the application via environment variables and data source names (DSN).

What is an Environment variable?

Defining configuration settings via environment variables allows clear separation between the code, and the config it is running. To remove any complexity, this repository includes josegonzalez/php-dotenv, which automatically configures the environment if it's not already defined.

What is a DSN?

A DSN is a string which defines how to connect to a service. Since it's a string, it's portable, not language or implementation dependent and anything capable of parsing it can know how to connect to the service it points at.

OK but why use Env variables and DSNs?

Using environment variables makes it very easy to separate install-specific config settings from the code itself; and possible to change the application config without modifying the source files. There is only one file containing install-specific settings in the template and that file is only used at all if the environment isn't already configured.

The intention is that in a production system the environment is configured not an application - and the application just reads that information.

Ok I'm sold, how do I use this?

In a development scenario, copy the file Config/.env.default to Config/.env and edit it.

In a production scenario - configure the environment however you wish (via webserver config for example) and remove the use of php-dotenv.

In neither case is it necessary/desirable to modify any php files to configure the application temporarily or permanently.

Yeah.. that's not for me.

If you don't want to use Env variables and DSNs - change it =).

Heroku Compatibility

This application template is compatible with the official Heroku PHP buildpack. To use, simply configure your buildpack:

heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
heroku config:set LOG_PATH=/app/vendor/php/var/log/
heroku config:set SECURITY_SALT=SOME_ALPHANUMERIC_SALT_HERE
heroku config:set SECURITY_CIPHER_SEED=SOME_NUMERIC_SEED_HERE

To setup a production MySQL database setup a ClearDB MySQL add-on in Heroku.

heroku addons:create cleardb

By default its config variable will be set under the key CLEARDB_DATABASE_URL. For our app-template we want this configured at DATABASE_URL.

old_db_url=`heroku config:get CLEARDB_DATABASE_URL`
heroku config:set DATABASE_URL="$old_db_url"
heroku config:unset CLEARDB_DATABASE_URL

We recommend using Redis for caching on Heroku. If doing so, remember to add the following to the require key in your composer.json:

You can use the RedisCloud add-on in Heroku for a redis datastore:

Note about dependencies

FriendsOfCake encourages the use of composer and it's best not to mix composer with git submodules for dependency management. If you need to use submodules you might notice /vendor and /Plugin folders are ignored by git. Composer creates those directories when installing vendors and plugins.

There a few ways to solve this:

Included packages

The application template comes with some dependencies already included in the composer file. These are designed to help you get up and running quickly.

To find out how to make the most of these packages, please read their respective readme files.


All versions of app-template with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
composer/installers Version ~1.0
cakephp/cakephp Version 2.*
friendsofcake/crud Version 3.*
josegonzalez/dotenv Version 1.*
ad7six/dsn Version 0.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package friendsofcake/app-template contains the following files

Loading the files please wait ....