-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathREADME.tpl
105 lines (74 loc) · 3.29 KB
/
README.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<h3 align="center">
<a href="https://github.com/umpirsky">
<img src="https://farm2.staticflickr.com/1709/25098526884_ae4d50465f_o_d.png" />
</a>
</h3>
<p align="center">
<b>symfony upgrade fixer</b> •
<a href="https://github.com/umpirsky/Twig-Gettext-Extractor">twig gettext extractor</a> •
<a href="https://github.com/umpirsky/wisdom">wisdom</a> •
<a href="https://github.com/umpirsky/centipede">centipede</a> •
<a href="https://github.com/umpirsky/PermissionsHandler">permissions handler</a> •
<a href="https://github.com/umpirsky/Extraload">extraload</a> •
<a href="https://github.com/umpirsky/Gravatar">gravatar</a> •
<a href="https://github.com/umpirsky/locurro">locurro</a> •
<a href="https://github.com/umpirsky/country-list">country list</a> •
<a href="https://github.com/umpirsky/Transliterator">transliterator</a>
</p>
# Symfony Upgrade Fixer [![Build Status](https://travis-ci.org/umpirsky/Symfony-Upgrade-Fixer.svg)](https://travis-ci.org/umpirsky/Symfony-Upgrade-Fixer)
Analyzes your Symfony project and tries to make it compatible with the new version of Symfony framework.
## Installation
### Manual
#### Local
Download the ``symfony-upgrade-fixer.phar`` file and store it somewhere on your computer.
#### Global
You can run these commands to easily access ``symfony-upgrade-fixer`` from anywhere on
your system:
```bash
$ sudo wget https://github.com/umpirsky/Symfony-Upgrade-Fixer/releases/download/v%s/symfony-upgrade-fixer.phar -O /usr/local/bin/symfony-upgrade-fixer
$ sudo chmod a+x /usr/local/bin/symfony-upgrade-fixer
```
Then, just run ``symfony-upgrade-fixer``.
### Composer
#### Local
```bash
$ composer require umpirsky/symfony-upgrade-fixer
```
#### Global
```bash
$ composer global require umpirsky/symfony-upgrade-fixer
```
Make sure you have ``~/.composer/vendor/bin`` in your ``PATH`` and
you're good to go:
```bash
$ export PATH="$PATH:$HOME/.composer/vendor/bin"
```
Don't forget to add this line in your `.bashrc` file if you want to keep this change after reboot.
## Usage
The ``fix`` command tries to fix as much upgrade issues as possible on a given file or directory:
```bash
$ symfony-upgrade-fixer fix /path/to/dir
$ symfony-upgrade-fixer fix /path/to/file
```
The ``--dry-run`` option displays the files that need to be fixed but without actually modifying them:
```bash
$ symfony-upgrade-fixer fix /path/to/code --dry-run
```
The ``--no-use-reorder`` option prevents the fixer from re-ordering USE statements:
```bash
$ symfony-upgrade-fixer fix /path/to/code --no-use-reorder
```
## Fixers available
| Name | Description |
| ---- | ----------- |%s
## Real Life Examples
It is tested against few cool Symfony projects:
* [Sylius](https://github.com/Sylius/Sylius/pull/3571)
* [OroPlatform](https://github.com/orocrm/platform/pull/345)
* [Akeneo PIM](https://github.com/akeneo/pim-community-dev/pull/3571)
## Contribute
The tool is based on PHP Coding Standards Fixer and the [contributing process](https://github.com/FriendsOfPhp/php-cs-fixer/blob/master/CONTRIBUTING.md) is very similar. I see no sense in re-doing it so far.
If you want to contribute to README, please don't edit `README.md` directly - it is autogenerated. Edit `README.tpl` instead and run:
```bash
$ symfony-upgrade-fixer readme > README.md
```