Overview

The Pop PHP Framework is a lightweight, yet robust PHP framework that can be used for rapid application development. The framework itself has a base set of core components as well as numerous other additional components to facilitate many of the common features needed for a PHP application.

The two main concepts behind the Pop PHP Framework have always been:

  1. To be lightweight and easy to use
  2. To promote standards in development while maintaining a manageable learning curve

The goal is so that anyone from an advanced programmer to a novice developer can install and start using the Pop PHP Framework quickly and effectively.


Requirements

The Pop PHP Framework has been built for and tested with PHP 8.1+ (PHP 7.4 is no longer supported.)

For more on the various additional recommended server components, settings and extensions, please review the documentation.


Installation

The Pop PHP Framework provides a number of options to install as much or as little as a developer requires. It can be installed in a few of different ways:


Full Installation:

A developer can install or download the full framework, which includes the core components plus all of the additional components to serve as a toolkit for application development. The full version can either be downloaded from one of the links on this website, or installed via Composer like this:

composer create-project popphp/popphp-framework project-folder

Or, the repo can be cloned like this:

git clone https://github.com/popphp/popphp-framework.git popphp
cd popphp
composer install

Or, it can be added to a project like this:

composer require popphp/popphp-framework

Or, it can be added to a project's composer.json file like this:

{
    "require": {
        "popphp/popphp-framework": "^5.4.0"
    }
}

[ Top ]


Kettle Installation:

Kettle is a CLI helper script that comes with Pop. It should be installed in the main project folder if you create a new project or clone the repo. However, if choose to install the framework in a way that the pop-kettle CLI-helper script is not available in the main project folder, you can place a copy of the script from the vendor/popphp/pop-kettle/kettle location in the main project folder (adjacent to the vendor folder):

cp vendor/popphp/pop-kettle/kettle .
cp vendor/popphp/pop-kettle/kettle.inc.php .

Once you've copied the scripts over, you have to change the reference to the script's config file from:

$app = new Pop\Application(
    $autoloader, include __DIR__ . '/config/app.console.php'
);

to

$app = new Pop\Application(
    $autoloader, include __DIR__ . '/vendor/popphp/pop-kettle/config/app.console.php'
);

and make sure the newly copied kettle script is set to execute (755)

chmod 755 kettle

[ Top ]


Barebones Installation:

A developer can opt to only install the barebones core components that make up the foundation of the application stack. This includes:

  • The Application Object
  • The Router
  • The Service Locator
  • The Event Manager
  • The Module Manager
  • The Base Controller Class
  • The Base Model Class

The barebones version can be installed using one of the methods above, but by swapping out the framework repository for the core repository like this:

{
    "require": {
        "popphp/popphp": "^4.3.0"
    }
}

[ Top ]


Popcorn Installation:

A developer can also choose to install Popcorn, which is a web-based, micro-framework layer that can be utilized to build REST applications and APIs. It installs the same core components from the barebones installation, plus the popphp/pop-http, popphp/pop-session and popphp/pop-view web components.

Popcorn can be installed using one of the methods above, but by using the Popcorn repository like this:

{
    "require": {
        "popphp/popcorn": "^4.1.1"
    }
}

[ Top ]


CLI Applications:

Installing the popphp/pop-console package along with the main popphp/popphp package will provide the tools needed to build and run an application on the command line, with support for CLI commands, output and colors.

{
    "require": {
        "popphp/popphp": "^4.3.0",
        "popphp/pop-console": "^4.2.2"
    }
}

[ Top ]


Installing Individual Components:

And finally, if a developer has chosen a different framework or application stack in which to build an application, the individual components of the Pop PHP Framework play nicely with others. Please refer to the individual documentation of whichever components are required to be added to your project to get the name of the repository for those components.

[ Top ]