# Pimple

> Small dependency injection container for PHP

Source: https://talira.ai/catalog/pimple-ws39w9n2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / dependency injection](https://talira.ai/categories/libraries/dependency-injection), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Fabien Potencier](https://talira.ai/orgs/fabien-potencier.md)

Pimple is a small dependency injection container for PHP. It holds services, defined as anonymous functions and created lazily on first use, and parameters; services can be shared or factories, protected closures stay callables, and definitions can be extended or grouped in service providers. Pimple is closed for changes: its maintainers accept only compatibility with newer PHP versions and security fixes.

## Links

- GitHub: https://github.com/silexphp/Pimple

## Problems it solves

- add a lightweight dependency injection container to a small PHP app
- wire up PHP services lazily without a full framework
- share one database connection object across a PHP application

## Features

- services defined as anonymous functions and created lazily
- shared services and factory services
- parameters and protected closures
- extending existing service definitions
- service providers to group definitions

## Limitations

- Closed for changes: no new features, only compatibility with newer PHP versions and security fixes.[^1]

## Trust

Overall: 0.38 out of 1.
Signals: maintenance 0.27, adoption 0.69, momentum 0.34, community 0.68, backing 0.30, extensibility 0.00.

- 2.7k GitHub stars
- 50 contributors
- backed by Fabien Potencier

Warnings:

- last commit 9 months ago

## Alternatives

- [PHP-DI](https://talira.ai/catalog/php-di-gbzc2k11.md): The dependency injection container for humans
- [laminas-servicemanager](https://talira.ai/catalog/laminas-servicemanager-cc833v26.md): A factory-driven dependency injection container for PHP from the Laminas Project

## Sources

[^1]: https://github.com/silexphp/Pimple/blob/main/README.rst (checked 28 Nov 2026)
[^2]: https://github.com/silexphp/Pimple/blob/main/LICENSE (checked 28 Nov 2026)
