PHPackages                             devco/europaphp - 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. [Templating &amp; Views](/categories/templating)
4. /
5. devco/europaphp

ActiveLibrary[Templating &amp; Views](/categories/templating)

devco/europaphp
===============

A feather-weight, extremely-fast, diverse, scalable and productive PHP 5.4 View Controller framework.

1.4.6(9y ago)21.3k2MITPHPPHP &gt;=5.4.0, &lt;6.0.0

Since Jul 9Pushed 9y ago2 watchersCompare

[ Source](https://github.com/devco/europaphp)[ Packagist](https://packagist.org/packages/devco/europaphp)[ Docs](http://github.com/treshugart/EuropaPHP)[ RSS](/packages/devco-europaphp/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (2)Versions (7)Used By (0)

EuropaPHP
=========

[](#europaphp)

[![Build Status](https://camo.githubusercontent.com/b03bcfbfe31545b7c9742de5b2b0647b7182886d9b428bf746b76c1d2509f413/68747470733a2f2f7472617669732d63692e6f72672f646576636f2f6575726f70617068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/devco/europaphp)

EuropaPHP is an extremely fast, flexible and lightweight MVC Framework designed for PHP 5.4+.

Why Another PHP Framework?
--------------------------

[](#why-another-php-framework)

EuropaPHP is the manifestation of the shortcomings of other PHP frameworks with a strong focus on scalability, standards, the view/controller relationship and dependency injection. It is specifically designed to be paired with your favourite libraries and it will seamlessly integrate with anything.

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

[](#installation)

There are a couple ways to install Europa.

### Source

[](#source)

Download from Github and extract it to where you want it.

### Composer

[](#composer)

```
composer create-project devco/europaphp [installation path] [branch or tag]

```

If you want to use it as a composer package, just add `devco/europaphp` to your `composer.json` file.

Getting Started
---------------

[](#getting-started)

Everything is already all set up for you in a sample module called `main`. To get an overview of how everything fits together, the default conventions and how to customize your app, see the readme in the `Europa\App` component directory.

Documentation
-------------

[](#documentation)

To check out the documentation, just go into the `src` directory. Each directory has a `readme` that corresponds to it. To update the documentation, fork, pull-request, rinse, repeat.

Key Features
------------

[](#key-features)

There's a lot of new stuff. For a more in depth look, check out each component's readme.

### SRP and API Design

[](#srp-and-api-design)

EuropaPHP 2's major difference to previous releases is it's focus on how the Single Responsibility Principle is applied in a PHP context. As a result of this design, a lot of class functionality can be exposed through a single method. When this was the case, in order to maximise flexibility and eliminate unnecessary complexity, the class would expose that functionality using `__invoke()`. This makes the class itself interchangeable with anything that `is_callable()`. By utilising PHP 5.4, type-hints have been placed where appropriate to use `callable` so that you can use a callable class or closure to do what you need.

### Service Containers

[](#service-containers)

Another major difference is how service containers are configured. Service containers take configurations via a `configure()` method. The configuration can be anything that is `callable`, however, there is a `Europa\Di\ConfigurationAbstract` class that you can extend to organise your configurations into classes. A benefit to using these classes is that you can define interfaces for these configurations and then check the container if they provide that configuration or configuration interface.

### Controllers

[](#controllers)

Controllers can now simply be closures, or anything that is `callable`. This way, you can have very lightweight controllers that don't require any other fucntionality, or you can extend the `Europa\Controller\ControllerAbstract` class to give you access to named arguments and filters.

### Configuration

[](#configuration)

An emphasis has also been placed on passing configurations into class constructors where appropriate. This is the case for routes as well as certain views and the main application component. In doing this, a `Europa\Config\Config` class was created to make using configurations easier. The configuration component ships with a few adapters to solve most of your needs: `Europa\Config\Adapter\Ini`, `Europa\Config\Adapter\Json` and `Europa\Config\Adapter\Php`. The config class allows for dot-notation to be used for option names as well as referencing other opiton values within another option value.

### Event Management

[](#event-management)

An `Event` component now exists to allow your application to create hooks at any point in it's lifecycle. As with many other parts, events can be anything that is `callable`.

### Reflection

[](#reflection)

The reflection component now contains a `FunctionReflector` for reflecting closures as well as normal functions.

### Easier Routing

[](#easier-routing)

The router has been completely overhauled to make it easier to define your application's structure. Since routes are passed a configuration we can use the `Config` component to read route configurations and directly pass it on to the route. As a result, all of the types of configuration files that are supported by the `Config` component are available to the router as well.

### Effortless Content Negotiation

[](#effortless-content-negotiation)

The `View` component now ships with a `Negotiator` that will return - based on the request that is passed in - a certain view class appropriate to handle the given request. The negotiator is configurable to a point and is `callable`, so substituting your own is very easy.

### Application Abstraction

[](#application-abstraction)

The `App` component was added to provide a way of eliminating as much boilerplate code as possible while still giving you as much flexibility as possible. It takes a single service container that it uses to grab it's dependencies from. This service container must provide `Europa\App\AppConfigurationInterface` or be configured with `Europa\App\AppConfiguration`. This means that you can substitute dependencies into it's container if need be to alter it in any way shape or form. It comes with good defaults so you probably won't have to do anything. Additionally, it accepts configuration options in its constructor to control smaller things like paths and naming conventions.

Running Tests
-------------

[](#running-tests)

From the install directory:

```
php www/index.php test

```

Command Line Usage
------------------

[](#command-line-usage)

To checkout available commands, run:

```
php www/index.php ?

```

Contributing
------------

[](#contributing)

To contirbute, just fork and submit pull-requests. Each request will be reviewed and ideally will include corresponding tests and possibly a place in the documentation.

License
-------

[](#license)

Copyright (c) 2005-2011 Trey Shugart

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~195 days

Recently: every ~235 days

Total

6

Last Release

3351d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7beb21e6dc705244007d2a1ac4f7344a098ab40136297e5a2ecd88d6b8c8b660?d=identicon)[devco](/maintainers/devco)

---

Top Contributors

[![treshugart](https://avatars.githubusercontent.com/u/136556?v=4)](https://github.com/treshugart "treshugart (776 commits)")[![Maxwell2022](https://avatars.githubusercontent.com/u/670701?v=4)](https://github.com/Maxwell2022 "Maxwell2022 (9 commits)")[![russholio](https://avatars.githubusercontent.com/u/1484057?v=4)](https://github.com/russholio "russholio (7 commits)")[![bc-luke](https://avatars.githubusercontent.com/u/2160087?v=4)](https://github.com/bc-luke "bc-luke (2 commits)")[![oodgaard](https://avatars.githubusercontent.com/u/2391693?v=4)](https://github.com/oodgaard "oodgaard (2 commits)")

---

Tags

Simplemvcviewfastcontrollerscalable

### Embed Badge

![Health badge](/badges/devco-europaphp/health.svg)

```
[![Health](https://phpackages.com/badges/devco-europaphp/health.svg)](https://phpackages.com/packages/devco-europaphp)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
