Urgent.News

What's breaking now, across thousands of outlets.

Tech

Tanuki Framework, a PHP framework for people who actually like writing PHP

The problem I kept running into Every time I started a small PHP project, I had two bad options. Option one: grab a full framework. Get an ORM I have to learn a query language for, a template engine that's basically PHP-but-different, a service container, middleware pipelines, and a folder structure designed by a committee. Half my "learning" time goes to the framework's opinions, not my actual…

The Tanuki Framework is a lightweight PHP Model-View-Controller (MVC) framework designed for developers who prefer writing raw PHP over learning complex framework features. It addresses the dilemma many PHP developers face when deciding between using a full framework with unnecessary features or building everything from scratch. Tanuki offers a middle ground, providing a real MVC skeleton without the heavy weight.

Tanuki features a simple router that maps routes using basic arrays, a Model base class that wraps PDO for ORM-free database interactions, and views that are regular PHP files with inline templating syntax. This approach allows developers to have full control over their code while still benefiting from a structured MVC pattern if desired.

The framework aims to be minimalistic, covering only the essentials: routing, models, views, session handling, CSRF protection, and a basic internationalization system. Developers can add optional extensions, such as session-based authentication and an admin panel, without being forced to use them. Tanuki also prioritizes security by using prepared statements for all Model methods and implementing CSRF protection explicitly, rather than applying it globally, which could interfere with certain API endpoints.

With a focus on simplicity and developer freedom, Tanuki offers a straightforward request lifecycle and example code for a complete TODO list CRUD application, demonstrating real-world use cases like CSRF checks, form repopulation, and flash messages. The framework is designed to be easy to understand and extend, without any hidden complexities that might overwhelm new developers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

I Wrapped Disney, SeaWorld and Universal's Booking APIs in One Laravel Package

TL;DR: iabduul7/laravel-themepark-booking-adapters gives you drop-in Laravel adapters for Disney and SeaWorld (via Redeam) and Universal Orlando (via SmartOrder).

  • Three design principles guide the iabduul7/laravel-themepark-booking-adapters package
  • Separate support classes for Disney, SeaWorld, and Universal to handle compatibility
  • Prevent sensitive data leakage by excluding adapter reference from serialized DTO

More from Sunday 6 September →