🐺 Lightweight and easy to use framework for building web apps.

Overview

Wolff logo
Wolff

Web development made just right.

Wolff is a ridiculously small and lightweight PHP framework, intended for those who want to build web applications without starting from scratch or dealing with complexity.

Wolff is the perfect solution for building small and medium-sized web applications.

Note: The core code of the framework is available at Wolff-framework.

Features

📓 Extremely easy: It's simple to use and no initial setup is required, it comes ready to be deployed, giving you the opportunity to learn it in just a single night (sleep included).

🚀 Ridiculously fast: Only the resources you need are loaded, the framework is able to handle hundreds of requests per second. It's very friendly with potato servers and works seamlessly.

🛠️ Comprenhensive: Wolff has features that cover everything you may ever need for building a web app, from a handy database abstraction to a powerful template engine.

What's included

And much more...

Requirements

  • PHP version 7.0 or higher

  • Composer

Install

Composer is required for installing Wolff, once you got it...

Run the following command in the folder where you want Wolff to be installed:

composer create-project usbac/wolff

This will download the whole project with everything ready to run.

More info about the installation process in the Docs - install page.

You can also download the last bundle here.

Example

app/controllers/home.php:

‹?php

namespace Controller;

use Wolff\Core\{Language, View};

class Home
{
    public function index($req, $res)
    {
        $data = Language::get('home');    
        View::render('home', $data);
    }
}

Testing

PHPUnit is required for the tests, once you got it.

Run the following command with high privileges (sudo) in your wolff project folder:

vendor/bin/phpunit

Running the command with high privileges is required since some files will be created during the testing process.

Documentation

First time using it? Read the Documentation.

Contributing

Any contribution or support to this project in the form of a pull request or message will be highly appreciated. ❤️

You can read more about the contribution process right here. Don't be shy. :)

License

Wolff is open-source software licensed under the MIT license.

Comments
  • Wrong folder name in Routes Creation from cli

    Wrong folder name in Routes Creation from cli

    I like your framework. It is small & fast. I would like to fix a cli command issue given below:

    $ php Wolffie mk route page pages/contact
    PHP Warning:  fopen(System/definitions/Routes.php): failed to open stream: No such file or directory in /var/www/html/samples/php/wolff/system/cli/Create.php on line 226
    

    On line 19 in system/cli/Create.php, folder System should be system.

    $this->routes_dir = 'System/definitions/Routes.php';
    

    to

    $this->routes_dir = 'system/definitions/Routes.php';
    
    opened by biswajitpaul01 6
  • Make appropriate Test on Production

    Make appropriate Test on Production

    I really do love this like this light framework and the improvements you make each day. I use it on many projects and when cloning a new version, working and uploading to production on an online server, some errors serious errors come making me frustrated since I have to wait for you to provide a solution.

    That is why I suggest you deploy the framework on production to test that everything works well, before releasing in on GitHub.

    Thank you

    opened by siteantipas 6
  • Website gone

    Website gone

    The Website https://www.getwolff.com/ http://www.getwolff.com/ https://getwolff.com/ http://getwolff.com/ is not reachable. The missing/broken links in the documentation makes it hard to read.

    I would like to compare wolff with SlimPHP. Has anyone already made and documented this comparison?

    opened by mw75 5
  • Can Middleware have $res? / Always add JSON content-type

    Can Middleware have $res? / Always add JSON content-type

    I'd like to achieve that every route within a given subdirectory should have

        $res->setHeader('Content-Type', 'application/json');
    

    Currently I need to use setHeader for every route.

    Something like this would be great; Alternatively, I am of course open for feedback how it would otherwise work.

    Middleware::before('/api', function($req, $next, $res) {
        $res->setHeader('Content-Type', 'application/json');
    });
    

    (Maybe it would also be an idea that writeJson() would add this header automatically, at least via a controllable parameter?)

    opened by sephentos 4
  • Extend Wolff Template Engine to be PHP and HTML compatible

    Extend Wolff Template Engine to be PHP and HTML compatible

    Good day Wolff team and it's always a pleasure writing to you.

    • This time around, I recommend you give users the option to also store their views files as .wlf, .htmland .php. I just had to change mine manually in the \Wolff\Core system to .html

    • The main reason behind this is because .wlf files unfortunately are not yet compatible with text editors like Sublime Text, VS Code, Brackets, Atom etc..and so coding can be tudious as the text editors don't color-format .wlffiles.

    • One solution to this could be to create an extension ( for intellisense) for text editors to understand .wlf files but I guess it's a whole project on its own for now.

    Thank you ;-)

    enhancement 
    opened by siteantipas 4
  • Installing via composer has no version

    Installing via composer has no version

    I wish to point out that on both version 1.x and 2.x installation pages, https://www.getwolff.com/doc/1.x/installation and https://www.getwolff.com/doc/2.x/installation

    The commands to install Wolff via composer are all the same composer create-project usbac/Wolff

    • The question is: how do we specify the version we wish to install in the composer command?

    • May be you could precise these different commands on both installation pages?

    • Maybe something like composer create-project usbac/Wolff -v 1.x and composer create-project usbac/Wolff -v 2.x

    Thank you

    opened by siteantipas 3
  • How to run on localhost

    How to run on localhost

    Hi,

    I've seen your simple but amazing Wolff framework and I would like to know how to run the project on my localhost. I'm able to use XAMPP or Vagrant Homestead for PHP projects. Remember to upgrade your documentation ;)

    Many thanks, Keep going with your framework!

    opened by surebro00 3
  • Make an auth API or functionality

    Make an auth API or functionality

    The framework is great! I remember back a few months when it started and I had to download the first version and use it for a project.

    I will like you to implement an auth functionality similar to php artisan make:auth https://laravel.com/docs/5.7/authentication to make the developing phase faster and sweeter ;-) for developers like me.

    Thanks

    opened by siteantipas 3
  • Internal Server Error on Linux (due to File Permission)

    Internal Server Error on Linux (due to File Permission)

    The Wolff project generates an Internal Server Error once installed on non-Windows servers which makes it impossible to use framework. After troubleshooting, I figured out the issue: /public/index.php" is writeable by group is the error thrown on linux hosting servers.

    • This happens because the above mentioned file in /public/index.php has a permission of 0777 and it looks like Linux servers don't support that for some reason

    • My suggestion is that you recursively change the file permission for each Wolff files (to say 0755) so this issue gets resolved in future releases.

    Thank you

    opened by siteantipas 2
  • Community libraries

    Community libraries

    Hello, and thanks for such a simple tool to work with.

    I was wondering, since main framework does not have any 3rd-party dependencies included, does it have to stay like that in future? I planned some PRs, so I am asking.

    Thanks 👍

    opened by beganovich 2
  • Model & Library NOT Found

    Model & Library NOT Found

    Hi @Usbac I no longer see the model folder and $this->load->model() and $this->load->library() are no longer valid. These are very important aspects of the framework which makes it ridiculously simple working with databases and external libraries. I checked on the documentation but couldn't find any help. Can you please elaborate more on that? Thank you.

    opened by siteantipas 2
Releases(v4.1.0)
  • v4.1.0(Sep 14, 2021)

  • v4.0.3(Aug 3, 2021)

  • v4.0.2(Aug 2, 2021)

  • v4.0.1(May 11, 2021)

  • v4.0.0(May 1, 2021)

    Added

    • Add language tag to the template engine.

    • Add optional seconds parameter to the clear method of the Wolff\Core\Cache class.

    • Add getFilename method to the Wolff\Core\Cache class.

    • Add getCode and writeJson methods to the Wolff\Core\Http\Response class.

    • Add support for dot notation in the get method of the Wolff\Core\Config class.

    • Add support for dynamic redirections to the Route system.

    • Add optional whitelist parameter to the local function of the standard library.

    • Add better overall performance.

    Changed

    • Change the function parameter of the Wolff\Core\Route class to accept an array containing the class and method to call ('home@index' now is [ Controller\Home::class, 'index' ]).

    • Change the default language from english to en.

    • Make the Logging system non-static.

    • The credential array keys dbms, server and name has been replaced by the key dsn in the Wolff\Core\DB and Wolff\Utils\Auth constructors.

    • Change the Maintenance system whitelist from a file to a PHP iterable value.

    • Change the cache files extension to tmp.

    • Change the optional gmdate parameter of the getRemainingTime and getVarTime methods of the Wolff\Core\Session class to a string, containing the format for the time.

    Removed

    • Remove the automatic controller's routing.

    • Remove the getSchema method of the Wolff\Core\DB class.

    • Remove the toUtf8 method of the Wolff\Utils\Str class.

    • Remove the count method of the Wolff\Core\Session class.

    • Remove the wolffVersion and isBool functions of the standard library.

    Source code(tar.gz)
    Source code(zip)
    wolff-bundle.zip(2.20 MB)
  • v3.2.2(Oct 5, 2020)

  • v3.2.1(Sep 11, 2020)

    Changelog:

    • Fixed bug related to the init method of the Wolff\Core\Config class not throwing the right exception.
    • Fixed bug related to the getAllowedIPs and removeAllowedIP methods of the Wolff\Core\Maintenance class not throwing the right exception.
    Source code(tar.gz)
    Source code(zip)
    wolff-bundle.zip(3.70 MB)
  • v3.2.0(Aug 21, 2020)

  • v3.1.0(Jul 5, 2020)

  • v3.0.2(May 13, 2020)

  • v3.0.1(May 8, 2020)

  • v2.8.1(Apr 16, 2020)

  • v2.8(Mar 9, 2020)

    Changelog:

    • Added insert method to the Core\DB class.
    • Added code method to the Core\Route class.
    • Added isAssoc function to the standard library.
    Source code(tar.gz)
    Source code(zip)
  • v2.7(Mar 4, 2020)

    Changelog:

    • The URI now are case sensitive and the 'sanitizeUrl' method of the 'Utilities\Str' class doesn't put the given string lowercase.
    • New 'csv' and 'json' prefixes for the routes.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v2.6(Feb 10, 2020)

    Changelog:

    • Added tests (finally!).
    • New 'average' function in the standard library.
    • \Core\Route::add method works for any request method.
    • \Core\Controller::closure returns the result of the function.
    • Fixed 'local' function of the standard library.
    • \Core\Session::get and \Core\Request::{get, post, delete, patch, cookie} now doesn't perform any logging when the specified variable isn't set.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v2.5(Feb 7, 2020)

    Changelog:

    • Fixed the result of the 'isEmail', 'isAlphanumeric' and 'isAlpha' functions in the standard library.
    • Fixed bug in the 'getClientIp' function of the standard library when the server REMOTE_ADDR isn't set.
    • Renamed the 'system/log' folder to 'system/logs'.
    Source code(tar.gz)
    Source code(zip)
  • v2.4(Jan 15, 2020)

  • v2.3(Jan 11, 2020)

    Changelog:

    • Added a DI Container.
    • Added val and config functions to the standard library.
    • The interpolate method of the Utilities\Str class returns the given string instead of false if the given values array is empty.
    • The methods of the Core\Log class now takes a second parameter which is and array with values to interpolate in the string.
    • The redirect function of the standard library redirects to the home when no parameter is passed.
    • Fixed Core\DB fetch mode.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Jan 6, 2020)

    Changelog:

    • Fixed bugs in the 'moveRows' and 'runLastSql' methods from the Core\DB class.
    • Fixed bug in the 'file' method of the Utilities\Upload class.
    • The directory variable of the Utilities\Upload class is now relative to the server root directory.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v2.2(Jan 5, 2020)

    Changelog:

    • Fixed bug in the 'limit' method of the Utilities\Str class related to special characters.
    • Added 'concatPath' method to the Utilities\Str class.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v2.1(Dec 31, 2019)

  • v2.0(Dec 29, 2019)

  • v1.10(Nov 25, 2019)

    Changelog:

    • Added new token method to the Utilities\Str class.
    • Fixed bug in the first method of the Core\Query class when there are no rows.
    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Nov 15, 2019)

    Changelog:

    • Fixed bug in the Core\DB and Core\Query classes related to the get method.
    • Fixed bug in toUtf8 method from the Utilities\Str class.
    Source code(tar.gz)
    Source code(zip)
  • v1.9(Aug 27, 2019)

    Changelog:

    • New getRender method in the core\Loader class that returns a rendered view.
    • New swap method in the utilities\Str class that swaps two substrings in a string.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v1.8(Aug 13, 2019)

    Changelog:

    • Added isJson and toArray functions to the std library.
    • Fixed bug when using the import tags in included views.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v.1.7.2(Aug 11, 2019)

    Changelog:

    • The table and column names parameters are now escaped in the DB class.
    • No connection is made when the database name is empty in the config.php file.
    • Refactored code.
    Source code(tar.gz)
    Source code(zip)
  • v1.7(Aug 9, 2019)

  • v1.6.1(Jul 6, 2019)

    Changelog:

    • Added an url function to the stdlib that serves as a shorter alternative to getLocalUrl.
    • Moved the Utilities\Str class to wolff-framework.
    • Changed the logo from png to svg.
    • Minor changes in the default views.
    Source code(tar.gz)
    Source code(zip)
Owner
Alejandro
I'm used to build new things for me and the world.
Alejandro
StackSync is a simple, lightweight and native fullstack PHP mini-framework.

StackSync is a fullstack PHP mini framework, with an MVC structure, custom API system with a Middleware and JWT authentication, components based views, flexible routing, PSR4 autoloading. Essential files generation (migrations, seeders, controllers and models) and other operations can be executed through custom commands.

Khomsi Adam 3 Jul 24, 2022
ExEngine is an ultra lightweight micro-services framework for PHP 5.6+

ExEngine is an ultra lightweight micro-services framework for PHP 5.6+. Documentation Checkout the Wiki. Examples Click here to browse examples, also

linkfast.io 1 Nov 23, 2020
[DEPRECATED -- Use Symfony instead] The PHP micro-framework based on the Symfony Components

Silex, a simple Web Framework WARNING: Silex is in maintenance mode only. Ends of life is set to June 2018. Read more on Symfony's blog. Silex is a PH

Silex 3.6k Dec 22, 2022
TidyPHP is a micro php framework to build web applications

TidyPHP is a micro MVC PHP Framework made to understand how PHP Frameworks work behind the scense and build fast and tidy php web applications.

Amin 15 Jul 28, 2022
Larasymf - mini framework for medium sized projects based on laravel and symfony packages

Larasymf, PHP Framework Larasymf, as its says is a mini framework for medium sized projects based on laravel and symfony packages We have not yet writ

Claude Fassinou 6 Jul 3, 2022
The Laravel Lumen Framework.

Lumen PHP Framework Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe d

The Laravel Framework 7.6k Jan 7, 2023
Slim Framework 4 Skeleton Application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Slim Framework 1.5k Dec 29, 2022
A resource-oriented micro PHP framework

Bullet Bullet is a resource-oriented micro PHP framework built around HTTP URIs. Bullet takes a unique functional-style approach to URL routing by par

Vance Lucas 415 Dec 27, 2022
Silly CLI micro-framework based on Symfony Console

currentMenu home Silly CLI micro-framework based on Symfony Console. Professional support for Silly is available via Tidelift Video introduction in fr

Matthieu Napoli 862 Dec 23, 2022
Lemon is php micro framework built for simple applications.

Lemon is simple micro framework that provides routing, etc.

Lemon 20 Dec 16, 2022
PHP微服务框架即Micro Service Framework For PHP

Micro Service Framework For PHP PHP微服务框架即“Micro Service Framework For PHP”,是Camera360社区服务器端团队基于Swoole自主研发现代化的PHP协程服务框架,简称msf或者php-msf,是Swoole的工程级企业应用框

Camera360 1.8k Jan 5, 2023
Frankie - A frankenstein micro-framework for PHP

Frankie - A frankenstein micro-framework for PHP Features Frankie is a micro-framework focused on annotation. The goal is to use annotation in order t

null 19 Dec 10, 2020
REST-like PHP micro-framework.

Phprest Description REST-like PHP micro-framework. It's based on the Proton (StackPhp compatible) micro-framework. Phprest gives you only the very bas

Phprest 312 Dec 30, 2022
⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.

Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP. ?? Files and functions as first-class citi

Leo Cavalcante 1.1k Dec 30, 2022
A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery.

PHP Netflix Eureka Client A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery. Installation You can install this package

Hamid Mohayeji 72 Aug 21, 2022
Someline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern PHP design pattern foundation.

Someline Starter PHP Framework Tested and used in production by Someline Inc. Someline Starter is a PHP framework for quick building Web Apps and Rest

Someline 844 Nov 17, 2022
EBook-Apps - The eBook Apps is a web application that helps you browse ebooks from anywhere using your smartphone and laptop.

⚡️ eBook Apps The eBook Apps is a web application that helps you browse ebooks from anywhere using your smartphone and laptop. ?? Getting Started To s

Ahmad Fauzy 32 Nov 14, 2022
Woski is a fast and simple lightweight PHP Framework for building applications in the realm of the web.

Woski is a simple fast PHP framework for the Realm The Project Installation Clone the repository $ composer create-project clintonnzedimma/woski myApp

Clinton Nzedimma 19 Aug 15, 2022
TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs.

TrailLamp Introduction TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs. Installatio

Etorojah Okon 14 Jun 10, 2022
Live Helper Chat - live support for your website. Featuring web and mobile apps, Voice & Video & ScreenShare. Supports Telegram, Twilio (whatsapp), Facebook messenger including building a bot.

Live helper chat It's an open-source powered application, which brings simplicity and usability in one place. With live helper chat you can bring live

Live Helper Chat 1.7k Dec 29, 2022