EvolvePHP is a lightweight, component-based PHP framework created to support structured web application development without the overhead of a large framework.
It provides routing, reusable application components, model and view foundations, session handling, logging, exception management, configuration, and PHPUnit testing support.
EvolvePHP was developed from the ground up and has been used to build Africa Global Export Market, a live export marketplace serving more than 5,000 users.
EvolvePHP was created to explore and implement the core architectural concerns behind modern PHP frameworks:
- Application routing
- Component-based organisation
- Models and views
- Dependency loading
- Configuration management
- Session handling
- Logging and error reporting
- Exception handling
- Reusable helpers
- Automated testing
- PSR-4 autoloading with Composer
The project demonstrates framework design, backend architecture, and the process of building reusable application infrastructure from first principles.
- PHP 7.1 or later
- Composer
- Apache with
mod_rewrite, or another compatible web server - A supported relational database when using database-backed components
Clone the repository:
git clone https://github.com/josiahking/evolvephp.git
cd evolvephpInstall Composer dependencies:
composer installReview and update the application configuration files inside:
configs/
Start a local PHP development server:
php -S localhost:8800Then open:
http://localhost:8800
EvolvePHP was originally designed for Apache-based deployment. Depending on your local environment, you may need to configure the document root or URL rewriting before running the application.
evolvephp/
├── components/ # Application components and feature modules
├── configs/ # Framework and application configuration
├── core/ # Core framework classes
├── helpers/ # Reusable helper classes and functions
├── logs/ # Application log files
├── public/ # Public assets and web-accessible files
├── tasks/ # Application and maintenance tasks
├── tests/ # Automated tests
├── index.php # Application entry point
├── route.php # Route resolution and dispatch
└── composer.json # Dependencies and autoloading configuration
The core directory includes foundational classes for:
- Application behaviour
- Model operations
- View rendering
- Session management
- Class and component loading
- Logging
- Exception handling
- Error handling
Application functionality is organised into reusable modules inside the components directory.
Incoming requests are processed through route.php.
The router:
- Loads the required application configuration.
- Determines the current environment.
- Sanitises the requested route.
- Resolves the matching component or default controller.
- Dispatches the requested method.
- Sends unmatched routes to the error controller.
EvolvePHP uses Composer PSR-4 autoloading.
{
"autoload": {
"psr-4": {
"EvolvePhpCore\\": "core/",
"EvolvePhpComponent\\": "components/",
"EvolvePhpHelper\\": "helpers/"
}
}
}After adding or moving framework classes, regenerate the Composer autoloader:
composer dump-autoloadRun the PHPUnit test suite with:
composer testOr:
vendor/bin/phpunitEvolvePHP has been used as the foundation of Africa Global Export Market, a live business-to-business export platform serving more than 5,000 users.
This repository also demonstrates:
- Custom framework development
- Object-oriented PHP
- Backend architecture
- Modular application design
- Production system ownership
- Maintenance of applications built without a mainstream framework
EvolvePHP is an independently maintained framework and portfolio project.
It represents an earlier framework-design effort and may require modernisation before being adopted for a new production application. For new commercial projects, review the PHP version, dependencies, security requirements, and test coverage before use.
Potential improvements include:
- PHP 8.2+ support
- Improved routing syntax
- Dependency injection
- Environment-variable configuration
- Database migrations
- Request and response abstractions
- Middleware support
- Expanded automated tests
- Continuous integration
- Improved documentation and examples
Recommended composer.json description:
{
"description": "A lightweight component-based PHP framework for building structured web applications."
}Also correct any misspelled keyword such as:
elvovephp framework
to:
evolvephp framework
Josiah Gerald
Senior Backend Engineer specialising in PHP, Laravel, REST APIs, payment integrations, and production business platforms.
- GitHub: github.com/josiahking
- LinkedIn: linkedin.com/in/josiah-g-0919763b
EvolvePHP is available under the BSD 3-Clause License.