Download the PHP package majermi4/friendly-config without Composer
On this page you can find all versions of the php package majermi4/friendly-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download majermi4/friendly-config
More information about majermi4/friendly-config
Files in majermi4/friendly-config
Package friendly-config
Short Description Provides a friendlier way to define Symfony configuration using plain old PHP objects.
License MIT
Informations about the package friendly-config
:seedling: Friendly Config (Easy way to write Symfony Configuration)
Provides a friendlier way to define Symfony configuration using plain old PHP objects.
We love the Symfony configuration component! :heart: It provides schema, validation, documentation and many more features to our bundle configs. However, many of us don't like defining it ... The goal of this project is to change that.
Documentation
- Motivation
- Code duplication
- Writing config definition manually is hard
- Negative impact on development and refactoring speed
- Usage
- Basics
- Simple types
- Nested types
- Other inferred configuration options
- Required
- Default value
- Info
- Limitations
Installation
This is installable via Composer as majermi4/friendly-config:
composer require majermi4/friendly-config
Basic usage:
Instead of having to write configuration such as this:
Write plain old PHP objects such as:
The following few lines will convert your pure PHP objects into valid Symfony configuration that defines schema of your bundle configuration. On top of that, the processed configuration values are used to initialize your pure PHP objects, so you can easily access the processed values.
You can register the initialised config objects as services which will allow you to easily access the initialised config objects anywhere in your application.
All versions of friendly-config with dependencies
symfony/dependency-injection Version ^5.0|^6.0
php Version ^7.4|^8.0
nette/utils Version ^3.2
phpstan/phpdoc-parser Version ^1.2.0