PHPackages                             rancoud/application - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. rancoud/application

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rancoud/application
===================

Application package

6.0.3(1mo ago)09.8k↓25%MITPHPPHP &gt;=8.4.0CI passing

Since Aug 15Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rancoud/Application)[ Packagist](https://packagist.org/packages/rancoud/application)[ RSS](/packages/rancoud-application/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (34)Used By (0)

Application Package
===================

[](#application-package)

[![Packagist PHP Version Support](https://camo.githubusercontent.com/2e3360601fc4eb6f9f24136b759895b6b0b35e574b006e41a62012755811d473/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72616e636f75642f6170706c69636174696f6e)](https://camo.githubusercontent.com/2e3360601fc4eb6f9f24136b759895b6b0b35e574b006e41a62012755811d473/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72616e636f75642f6170706c69636174696f6e)[![Packagist Version](https://camo.githubusercontent.com/edce7fd7dfed2f4477624ebc3d67655d473f4558c47349dfa89c5938701c2572/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616e636f75642f6170706c69636174696f6e)](https://packagist.org/packages/rancoud/application)[![Packagist Downloads](https://camo.githubusercontent.com/2f2fcdae7555d09d0939f556607d8f133fa96881a211fc845f3e987ab8453892/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616e636f75642f6170706c69636174696f6e)](https://packagist.org/packages/rancoud/application)[![Composer dependencies](https://camo.githubusercontent.com/d00e8a424122ffcc1035dc35432e7244ef1c8d939604f33a09cec792e8df0662/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d322d627269676874677265656e)](https://github.com/rancoud/application/blob/master/composer.json)[![Test workflow](https://camo.githubusercontent.com/a890085483757520a1c29e8c05aff31403750f3014207b704b394d7b99288448/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72616e636f75642f6170706c69636174696f6e2f746573742e796d6c3f6272616e63683d6d6173746572)](https://github.com/rancoud/application/actions/workflows/test.yml)[![Codecov](https://camo.githubusercontent.com/efd86091a099369b1aad16d1490e01f90bb30df3458fecdbc2539e5a82f5e88e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f72616e636f75642f6170706c69636174696f6e3f6c6f676f3d636f6465636f76)](https://codecov.io/gh/rancoud/application)

Application skeleton with strict minimum Router and Environment.

Dependencies
------------

[](#dependencies)

Environment package:
Router package:

Installation
------------

[](#installation)

```
composer require rancoud/application
```

How to use it?
--------------

[](#how-to-use-it)

### General

[](#general)

#### Requirements

[](#requirements)

You need `.env` file and route file called for example `routes.php`
Content of default `.env` (all values are optionals, you can use an empty `.env` file if you want)

```
# setup timezone, by default use UTC (valid timezones are checked against DateTimeZone::listIdentifiers())
TIMEZONE=null

# file names that contain route configurations, if null it will load all files in current folder provided to the Application constructor
ROUTES=null

# to enable all DEBUG_* parameters
DEBUG=false

# enable error_reporting: show php errors
DEBUG_PHP=false

# save PSR-7 request object for Application->getDebugInfos()
DEBUG_REQUEST=false

# save PSR-7 response object for Application->getDebugInfos()
DEBUG_RESPONSE=false

# save queries for Application->getDebugInfos()
DEBUG_DATABASE=false

# add all values of Session object to Application->getDebugInfos()
DEBUG_SESSION=false

# add memory usage/limit/percentage to Application->getDebugInfos()
DEBUG_MEMORY=false

# save elapsed time of each call of Application->run() for Application->getDebugInfos()
DEBUG_RUN_ELAPSED_TIMES=false

# add all included files included to Application->getDebugInfos()
DEBUG_INCLUDED_FILES=false
```

`DEBUG_*` infos are available with `Application->getDebugInfos();` (except `DEBUG_PHP`)
Content of `routes.php`

```
