https://github.com/jakzal/paramconverterbundle
This bundle provides additional param converters for Symfony.
https://github.com/jakzal/paramconverterbundle
bundle php symfony symfony-bundle
Last synced: 6 months ago
JSON representation
This bundle provides additional param converters for Symfony.
- Host: GitHub
- URL: https://github.com/jakzal/paramconverterbundle
- Owner: jakzal
- License: mit
- Archived: true
- Created: 2015-08-19T08:57:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-23T16:14:51.000Z (almost 9 years ago)
- Last Synced: 2025-07-28T16:44:01.977Z (8 months ago)
- Topics: bundle, php, symfony, symfony-bundle
- Language: PHP
- Size: 23.4 KB
- Stars: 16
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Param Converter Bundle
======================
This bundle provides additional param converters for Symfony.
[](https://scrutinizer-ci.com/g/jakzal/ParamConverterBundle/?branch=master)
[](https://travis-ci.org/jakzal/ParamConverterBundle)
**Since [argument resolvers](http://symfony.com/doc/current/controller/argument_value_resolver.html)
and [service arguments](http://symfony.com/doc/master//service_container/3.3-di-changes.html#controllers-are-registered-as-services)
were introduced in Symfony 3.3, the param converter provided by this bundle is redundant.
We can achieve pretty much the same by injecting services directly to controller actions.**
Installation
------------
This bundle requires:
* PHP ^7.0
* sensio/framework-extra-bundle ~3.0
The easiest way to install it is to use Composer:
```
$ composer require zalas/param-converter-bundle:^1.0
```
Service Param Converter
-----------------------
The service param converter calls a configured service to convert a request
attribute to an object.
Options:
* service - a service id
* method - a method name to be called on the service
* arguments - list of request attributes to be passed as method call arguments
Example:
```php
getName());
}
}
```