Download the PHP package nixphp/framework without Composer

On this page you can find all versions of the php package nixphp/framework. 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 framework

![Logo](https://nixphp.github.io/docs/assets/nixphp-logo-small-square.png) [![NixPHP Build & Test](https://github.com/nixphp/framework/actions/workflows/php.yml/badge.svg)](https://github.com/nixphp/framework/actions/workflows/php.yml)

NixPHP

"As simple as possible, as flexible as necessary."

NixPHP is a modern, lightweight PHP microframework designed for real-world projects:
fast, minimal, extendable, and now fully embracing modern PHP standards like PSR-3, PSR-4, PSR-7, PSR-11, and PSR-18.

It builds on native PHP features and lets you stay in control:
Use only what you need, and extend freely when you want.

🧩 NixPHP provides a minimal core with a clean plugin architecture.
Everything beyond routing and dispatching, such as sessions, views, forms, or database, is handled by optional plugins.
You get full control over what your app includes, and nothing more.


✨ Philosophy


Core Features


PSR Compliance Overview

PSR Description Status
PSR-3 Logger Interface ✅ Integrated
PSR-4 Autoloading Standard ✅ Native via Composer
PSR-7 HTTP Message Interface ✅ Integrated
PSR-11 Container Interface ✅ Integrated
PSR-18 HTTP Client Interface ✅ Integrated

❓ Why not just use Laravel or Symfony?

Frameworks like Laravel and Symfony are fantastic, but they often come with a heavy stack of features, conventions, and dependencies you may not always need.

NixPHP offers a different approach:

If you want full control without fighting against a "big framework" structure,
NixPHP might be the perfect starting point for you.


📢 Installation

Install via Composer

This installs the NixPHP core, a minimal routing and dispatch layer.
For additional features like views, forms, or sessions, just install the corresponding plugins.


Set up your project structure

NixPHP leaves the project organization completely up to you.
A typical structure could look like this:


Creating your App

You typically...

  1. Fill bootstrap.php

  2. Create a route

  3. Create a controller

  4. Create a view

  5. Access your page

Visit:

You should see:


🔧 Dependency Injection & Autowiring

NixPHP includes a PSR-11 compliant container with automatic dependency resolution built-in.
No configuration needed, it just works.

Registering Services

Register your core services (interfaces, databases, loggers) in the container:

Automatic Dependency Resolution

Controllers and services automatically receive their dependencies:

How It Works

NixPHP's autowiring follows these basic rules:

  1. Interfaces must be registered: tell the container which implementation to use
  2. Concrete classes are auto-built: no registration needed
  3. Dependencies are resolved recursively: the entire dependency tree is handled

Building Instances Manually

Sometimes you need to build instances directly (e.g., Commands):

Features

Best Practices

What to Register Why
Interfaces (e.g., LoggerInterface) Required for autowiring
Database connections Singleton configuration
Third-party services Complex initialization
Configuration objects Share across application
What NOT to Register Why
Controllers Auto-built by dispatcher
Simple services Auto-resolved on demand
Value objects Created as needed
Commands Built via make()

🔌 Plugin Support

NixPHP includes a clean plugin system that allows you to extend your app modularly — without configuration.

Just install a plugin via Composer (e.g. composer require vendor/my-plugin) and it is automatically detected if it uses the correct package type:

A typical plugin might look like this:

Layout conventions

Wherever a resource is looked up, both the app/ and the src/ spelling are accepted. Views may additionally live in a top-level views/ directory, which keeps template files out of your PSR-4 source root.

Which resources exist differs between a plugin and your application:

Resource In a plugin In your application
config.php app/, src/ app/, src/
routes.php app/, src/ app/, src/
plugins.php — app/, src/
functions.php app/, src/ —
view_helpers.php app/, src/ —
views src/views, views, app/views views, app/views
bootstrap.php package root only —

bootstrap.php is the one exception to the two spellings: it is always read from the package root, never from app/ or src/.

The first existing candidate wins and the rest are ignored, so a package should never ship two of them at once. Resources that do not exist are not registered at all — getViewPaths() and friends only ever return real paths.

Application view paths are resolved by nixphp/view and are configurable via view.paths; the other application resources are loaded by the core.

Plugin availability checks

Use app()->hasPlugin('vendor/name') to gate functionality on optional plugins. Version hints like vendor/name:>=0.1.2 or vendor/name:<0.2.0 are also supported — the constraint is compared against the plugin version that Composer registers when the plugin loads. This makes it easy to only enable code when a specific plugin version is present, without having to interrogate InstalledVersions manually.

You can build plugins exactly like you build an app, with full access to routing, events, and controllers.

For plugin examples, see the Plugin Documentation


License

MIT License.


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-pdo Version *
ext-json Version *
psr/log Version ^3.0
nyholm/psr7 Version ^1.8
nyholm/psr7-server Version ^1.1
psr/http-message Version ^2.0
psr/http-factory Version ^1.1
psr/container Version ^2.0
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 nixphp/framework contains the following files

Loading the files please wait ...