@@ -26,8 +26,8 @@ Composer.
26
26
27
27
The test suite may be executed with:
28
28
29
- ```
30
- $ vendor/bin/simple-phpunit
29
+ ``` console
30
+ $ composer run test
31
31
```
32
32
33
33
The ` phpunit.xml.dist ` file is used as the default configuration file for the
@@ -47,7 +47,7 @@ By default, the `simple-phpunit` binary chooses the correct PHPUnit version for
47
47
the PHP version you are running. To run tests against a specific PHPUnit
48
48
version, use the ` SYMFONY_PHPUNIT_VERSION ` environment variable:
49
49
50
- ```
50
+ ``` console
51
51
$ SYMFONY_PHPUNIT_VERSION=7.5 vendor/bin/simple-phpunit
52
52
```
53
53
@@ -108,55 +108,63 @@ The following environment variables are used for [CSFLE testing](https://github.
108
108
* ` KMS_TLS_CA_FILE `
109
109
* ` KMS_TLS_CERTIFICATE_KEY_FILE `
110
110
111
- ## Checking coding standards
111
+ ## Code quality
112
+
113
+ Before submitting a pull request, please ensure that your code adheres to the
114
+ coding standards and passes static analysis checks.
115
+
116
+ ``` console
117
+ $ composer run checks
118
+ ```
119
+
120
+ ### Coding standards
112
121
113
122
The library's code is checked using [ PHP_CodeSniffer] ( https://github.com/squizlabs/PHP_CodeSniffer ) ,
114
123
which is installed as a development dependency by Composer. To check the code
115
124
for style errors, run the ` phpcs ` binary:
116
125
117
-
118
- ```
126
+ ``` console
119
127
$ vendor/bin/phpcs
120
128
```
121
129
122
130
To automatically fix all fixable errors, use the ` phpcbf ` binary:
123
131
124
- ```
132
+ ``` console
125
133
$ vendor/bin/phpcbf
126
134
```
127
135
128
- ## Running static analysis
136
+ ### Static analysis
129
137
130
138
The library uses [ psalm] ( https://psalm.dev ) to run static analysis on the code
131
139
and ensure an additional level of type safety. New code is expected to adhere
132
140
to level 1, with a baseline covering existing issues. To run static analysis
133
141
checks, run the ` psalm ` binary:
134
142
135
- ```
143
+ ``` console
136
144
$ vendor/bin/psalm
137
145
```
138
146
139
147
To remove fixed errors from the baseline, you can use the ` update-baseline `
140
148
command-line argument:
141
149
142
- ```
150
+ ``` console
143
151
$ vendor/bin/psalm --update-baseline
144
152
```
145
153
146
154
Note that this will not add new errors to the baseline. New errors should be
147
155
fixed instead of being added to the technical debt, but in case this isn't
148
156
possible it can be added to the baseline using ` set-baseline ` :
149
157
150
- ```
158
+ ``` console
151
159
$ vendor/bin/psalm --set-baseline=psalm-baseline.xml
152
160
```
153
161
154
- ## Automatic code refactoring
162
+ ### Refactoring
155
163
156
164
The library uses [ rector] ( https://getrector.com/ ) to refactor the code for new features.
157
165
To run automatic refactoring, use the ` rector ` command:
158
166
159
- ```
167
+ ``` console
160
168
$ vendor/bin/rector
161
169
```
162
170
@@ -178,7 +186,7 @@ repository:
178
186
repository.
179
187
* Create and activate Python 2.7 virtual environment if necessary.
180
188
181
- ```
189
+ ``` console
182
190
$ virtualenv -p python2.7 venv
183
191
$ source venv/bin/activate
184
192
```
0 commit comments