Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stoakes/routing-converter
Routing.yml to annotations converter for Symfony
https://github.com/stoakes/routing-converter
Last synced: 3 months ago
JSON representation
Routing.yml to annotations converter for Symfony
- Host: GitHub
- URL: https://github.com/stoakes/routing-converter
- Owner: Stoakes
- Created: 2017-03-08T19:03:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T20:00:16.000Z (about 6 years ago)
- Last Synced: 2024-07-21T01:42:42.712Z (6 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 5
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Routing Converter
Converts your routing.yml files to annotations.
## Example
**Before**
````yaml
#app/config/routing.ymlapp_homepage:
path: /home/{id}
defaults: { _controller: AppBundle:Home:index}
requirements:
id: \d+
methods: [GET, HEAD]
````
**After**````php
getEnvironment(), array('dev', 'test'))) {
$bundles[] =
new Stoakes\RoutingConverterBundle\StoakesRoutingConverterBundle();
}
````Use it : `php bin/console stoakes:convert_yml PATH_TO_A_ROUTING.YML_FILE [PREFIX]`
`php bin/console stoakes:convert_yml ./src/AppBundle/Resources/config/routing.yml /fr
`## How does it works
That bundle provides a convertion command that uses symfony core components (routing, http kernel) and redaktilo to modify your Controllers.
## Tests
You : " - Hey that bundle is untested !!"
Me : " - I am working it. However I have created it in 2 evenings to convert routing in one of my app, and it works quite well"