You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development.md
+30-3
Original file line number
Diff line number
Diff line change
@@ -117,13 +117,40 @@ make phpstan
117
117
```
118
118
119
119
## Phpinsights PHP quality checks
120
-
PHP Insights was carefully crafted to simplify the analysis of your code directly from your terminal, and is the perfect starting point to analyze the code quality of your PHP projects.
120
+
PHP Insights was carefully crafted to simplify the analysis of your code directly from your terminal, and is the perfect starting point to analyze the code quality of your PHP projects.
121
121
122
122
Phpinsights is available for dev/test environment using next local shell command:
123
123
```bash
124
124
make phpinsights
125
125
```
126
126
127
+
## Metrics
128
+
This environment contains [PhpMetrics](https://github.com/phpmetrics/phpmetrics) to make some code analysis.
129
+
Use next local shell command in order to run it:
130
+
```bash
131
+
make phpmetrics
132
+
```
133
+
Note: You need run tests before this local shell command.
134
+
135
+
After execution above local shell command please open `reports/phpmetrics/index.html` with your browser.
136
+
137
+
## Rector
138
+
Rector instantly upgrades and refactors the PHP code of your application. It can help you in 2 major areas:
139
+
- Instant upgrades
140
+
- Automated refactoring
141
+
142
+
Rector now supports upgrades of your code from PHP 5.3 to 8.1 or upgrades your code for new framework version. This tool supports major open-source projects like Symfony, PHPUnit, Nette, Laravel, CakePHP and Doctrine.
143
+
You can find live demo [here](https://symfonycasts.com/screencast/symfony6-upgrade/rector) or more info [here](https://packagist.org/packages/rector/rector).
144
+
145
+
Rector is available for test/dev environment. If you need to run this tool, please use next local shell command in order to enter inside php container shell and then run rector:
146
+
```bash
147
+
make ssh
148
+
```
149
+
```bash
150
+
vendor/bin/rector process src/your_folder_with_code_for_refactoring
151
+
```
152
+
Note: You can process rector without specifying folder, in such case it will process src and tests folder.
153
+
127
154
128
155
## Database changes
129
156
Doctrine migrations it is functionality for versioning your database schema and easily deploying changes to it.
@@ -143,6 +170,6 @@ Please use next workflow for migrations:
143
170
144
171
Above commands you can run in symfony container shell using next: `./bin/console doctrine:migrations:<command>`.
145
172
146
-
Using above workflow allow you make database changes on your application.
147
-
Also you do not need to make any migrations files by hand (Doctrine will handle it).
173
+
Using above workflow allow you make database changes on your application.
174
+
Also you do not need to make any migrations files by hand (Doctrine will handle it).
148
175
Please always check generated migration files to make sure that those doesn't contain anything that you really don't want.
0 commit comments