This repository contains a library of optional middleware for your Slim Framework application

Overview

Slim Framework Middleware

This repository contains a library of optional middleware for your Slim Framework application.

How to Install

Update your composer.json manifest to require the slim/middleware package (see below). Run composer install or composer update to update your local vendor folder.

{
    "require": {
        "slim/middleware": "*"
    }
}

How to Contribute

Pull Requests

  1. Fork this repository
  2. Create a new branch for each feature or improvement
  3. Send a pull request from your feature branch to this repository's master branch

It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually.

Style Guide

All pull requests must adhere to the PSR-2 standard.

Author

The Slim Framework is created and maintained by Josh Lockhart. Josh is a senior web developer at New Media Campaigns. Josh also created and maintains PHP: The Right Way, a popular movement in the PHP community to introduce new PHP programmers to best practices and good information.

License

All code in this repository is released under the MIT public license.

http://www.slimframework.com/license

Comments
  • Added improved implementation of CSRF guard with ajax protection

    Added improved implementation of CSRF guard with ajax protection

    Added CSRF guard with request header check, compatible with AngularJS cookie & header names by default.

    Added configuration options including action on token check fail to address issues like this: http://help.slimframework.com/discussions/questions/912-catch-csrf-error

    Added helpers for Twig to ease template updates and jQuery configuration

    opened by siberex 2
  • Migrated StrongAuth middleware from Slim-Extras

    Migrated StrongAuth middleware from Slim-Extras

    This simply takes the StrongAuth middleware from Slim-Extras and ports it to the new slim middleware repo. This allows for StrongAuth to be used without having to include Slim-Extras which may cause problems with also using Slim-Views.

    opened by grantlucas 4
  • How start phpunit?

    How start phpunit?

    Hi, I have a problem with phpunit. I downloaded the project and init with "composer install". Then I started: "phpunit", but seems to have some problems. Can you help me? :D

    vagrant@vagrant:/tmp/Slim-Middleware-master$ phpunit PHPUnit 4.0.17 by Sebastian Bergmann.

    You have installed PHPUnit via PEAR. This installation method is no longer supported and http://pear.phpunit.de/ will be shut down no later than December, 31 2014.

    Please read http://phpunit.de/manual/current/en/installation.html and learn how to use PHPUnit from a PHAR or install it via Composer.

    Configuration read from /tmp/Slim-Middleware-master/phpunit.xml.dist

    FF

    Time: 43 ms, Memory: 3.75Mb

    There were 2 failures:

    1. ContentNegotiationTest::testBestFormatIsSet Failed asserting that null is not null.

    /tmp/Slim-Middleware-master/tests/ContentNegotiationTest.php:64

    1. ContentNegotiationTest::testBestFormatWithPriorities Failed asserting that null is not null.

    /tmp/Slim-Middleware-master/tests/ContentNegotiationTest.php:82

    FAILURES!
    Tests: 2, Assertions: 2, Failures: 2.

    opened by hachreak 0
  • [Proposal] add respondTo or respondWith

    [Proposal] add respondTo or respondWith

    I just come to read that http://help.slimframework.com/discussions/questions/65-content-types What do you think of adding that to the content negotiation middleware ? I can make a pr in this way if you are ok.

    opened by lalop 0
  • ParseRequestBody: like ContentTypes, but without breaking getBody()

    ParseRequestBody: like ContentTypes, but without breaking getBody()

    supplementing https://github.com/codeguy/Slim-Middleware/pull/2

    This feature branch would contain the variant where ContentTypes is deprecated and replaced by ParseRequestBody.

    This solution is not pretty, a programmer would need to write $env = $app->environment(); $env['slim.input_parsed']

    On the other hand, sneaking a method into the request object, so it would be possible to $app->request->getBodyParsed() would result in complex code more likely to contain bugs, and will sure enough cause some other programmer considerable headache sometime in the future. That's why I left it that way.

    In the end, it MAY be best to just do nothing and discard both of my pull requests. But first I wanted to discuss the matter with you.

    regards,

    Max

    opened by qyanu 0
Owner
Slim Framework
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
Slim Framework
Fast PHP framework made with very loose optional components.

Nimble is a super fast mini-framework for PHP built on top of optional loose components. Installation Clone the repository $ git clone [email protected]:

Neo 53 Dec 22, 2022
Juliangut Slim Framework Doctrine handler middleware

Juliangut Slim Framework Doctrine handler middleware Doctrine handler middleware for Slim Framework. Slim3 version Doctrine integration service for Sl

Julián Gutiérrez 6 Mar 23, 2021
Access control middleware for Slim framework

Slim Access Access control middleware for Slim framework. Supported formats IPv4 and IPv6 addresses CIDR notation all keyword Installation composer re

Alexandre Bouvier 7 Oct 22, 2019
Redis cache middleware for Slim framework

RedisCache Redis cache middleware for Slim framework. Installation composer require abouvier/slim-redis-cache Usage Cache every successful HTTP respo

Alexandre Bouvier 16 Sep 20, 2021
Slim Framework HTTP cache middleware and service provider

Slim Framework HTTP Cache This repository contains a Slim Framework HTTP cache middleware and service provider. Install Via Composer $ composer requir

Slim Framework 107 Dec 15, 2022
CORS Middleware for PHP Slim Framework

CorsSlim Cross-origin resource sharing (CORS) Middleware for PHP Slim Framework. Usage Composer Autoloader Install with Composer Update your composer.

Palani Kumanan 92 Nov 30, 2021
PHP slim framework middleware to minify HTML output

slim-minify Slim middleware to minify HTML output generated by the slim PHP framework. It removes whitespaces, empty lines, tabs beetween html-tags an

Christian Klisch 35 Oct 31, 2021
Slim Framework CSRF protection middleware

Slim Framework CSRF Protection This repository contains a Slim Framework CSRF protection PSR-15 middleware. CSRF protection applies to all unsafe HTTP

Slim Framework 302 Dec 11, 2022
This repository contains custom View classes for the template frameworks

Slim Views This repository contains custom View classes for the template frameworks listed below. You can use any of these custom View classes by eith

Slim Framework 308 Nov 7, 2022
The package contains a bootstrap for running Yii3 web application.

Yii Web Runner The package contains a bootstrap for running Yii3 web application. Requirements PHP 8.0 or higher. Installation The package could be in

Yii Software 4 Oct 15, 2022
🚀 This is a utility library that contains tools you may use everywhere.

Utilities Someday I will write documentation for this library, but for now, you can use it and see how it works. Introduction Some documentation will

Utilities for PHP 6 Sep 16, 2022
Slim Framework skeleton application with MVC Schema

Slim Framework skeleton application with MVC Schema

JingwenTian 9 Apr 29, 2021
Slim Framework 3 Skeleton Application + PagSeguro Lib

Slim Framework 3 Skeleton Application + PagSeguro Lib Aplicação simples para geração do Token para pagamentos no PagSeguro (método transparente) e env

Raí Siqueira 1 Feb 26, 2018
This package provides some basic methods to implement a self updating functionality for your Laravel application. Already bundled are some methods to provide a self-update mechanism via Github or some private repository via http.

This package provides some basic methods to implement a self updating functionality for your Laravel 5 application. Already bundled are some methods to provide a self-update mechanism via Github.

Holger Lösken 311 Dec 31, 2022
🍸A Slim Web Application Template

Gracili What is Gracili? Gracili is a PHP Application Template to quickly create a new Project. Using this template can save you a lot of time. With t

Björn Pfoster 1 May 12, 2021
Parses YAML files and adds them to Slim's config application instance method.

Slim Config - YAML Parses YAML files and adds them into Slim's config singleton. Uses Symfony's YAML Component to parse files (http://github.com/symfo

Bill Rex 4 Mar 10, 2022
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Slim Framework Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Installation It's recommended

Slim Framework 11.5k Jan 4, 2023
Slim Framework - Prerequisite Checker

Slim Framework - Server Configuration Checker Upload the file check.php to your webserver Browse to the file: https://example.com/check.php Check the

Daniel Opitz 6 Aug 30, 2022
REST APIs using Slim framework. Implemented all CRUD operations on the MySql database

PHP REST API using slim framework and CRUD operations ?? Hi there, this is a simple REST API built using the Slim framework. And this is for the folks

Hanoak 2 Jun 1, 2022