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: wiki/Version-4.0-Developer-Upgrade-Guide.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ Type casting for sniff property values set from within a ruleset has been made m
120
120
121
121
**Upgrading**
122
122
123
-
Search for sniff which have `public` properties which can be changed from within a ruleset.
123
+
Search for sniffs which have `public` properties which can be changed from within a ruleset.
124
124
125
125
* If the sniff has workarounds in place to handle non-lowercase string `'true'` or `'false'` values for boolean properties, those workarounds can be removed.
126
126
* If the sniff has workarounds in place to handle (any case) string `'null'` values, those workarounds can be removed.
@@ -174,7 +174,7 @@ For "properties" declared in enums, which is still not allowed in PHP, the metho
174
174
175
175
##### Upgrading
176
176
177
-
The above is significant change in behaviour and how it needs to be handled will depend on the sniff calling the method.
177
+
The above is a significant change in behaviour and how it needs to be handled will depend on the sniff calling the method.
178
178
179
179
It is recommended to search your codebase for all uses of the `File::getMemberProperties()` method and to review whether the code needs updating.
180
180
@@ -194,7 +194,7 @@ Also, in all cases, the sniff may need to start taking PHP 8.4 properties on int
194
194
195
195
... and the associated `private Config::$overriddenDefaults` property is also no longer static.
196
196
197
-
In practice, this means that two consecutively created `Config` objects without the same process will now contain the same settings. Previously, settings overridden in the first Config instance, could not be set for the second Config instance.
197
+
In practice, this means that two consecutively created `Config` objects in the same process will now contain the same settings. Previously, settings overridden in the first Config instance, could not be set for the second Config instance.
198
198
199
199
Typically, this may impact projects which call `new Config` consecutive times programmatically, whether it is for a custom integration or for a custom test suite.
200
200
@@ -403,7 +403,7 @@ doSomething();
403
403
404
404
The `AbstractPatternSniff::__construct()` method no longer takes any arguments. The `$ignoreComments` parameter was deprecated in PHPCS 1.4.0.
405
405
406
-
Since PHPCS 1.4.0, the AbstractPatternSniff sets the `ignoreComments` option using a `public` var rather than through the constructor.
406
+
Since PHPCS 1.4.0, the AbstractPatternSniff sets the `ignoreComments` option using a `public` var rather than through the constructor.
407
407
This allows the setting to be overwritten in `ruleset.xml` files.
408
408
409
409
**Upgrading**
@@ -462,7 +462,7 @@ The `protected` `getDeclarationNameWithNamespace()` and `getNamespaceOfScope()`
462
462
463
463
* The signature of the `DummyFile::setErrorCounts()` method has changed and now expects the following parameters: `$errorCount, $warningCount, $fixableErrorCount, $fixableWarningCount, $fixedErrorCount, $fixedWarningCount`.
464
464
465
-
* The abstract `PHP_CodeSniffer\Filters\ExactMatch::getBlacklist()` and `PHP_CodeSniffer\Filters\ExactMatch::getWhitelist()` methods have been replaced with abstract `PHP_CodeSniffer\ExactMatch::getDisallowedFiles()` and `PHP_CodeSniffer\ExactMatch::getAllowedFiles()` methods.
465
+
* The abstract `PHP_CodeSniffer\Filters\ExactMatch::getBlacklist()` and `PHP_CodeSniffer\Filters\ExactMatch::getWhitelist()` methods have been replaced with abstract `PHP_CodeSniffer\Filters\ExactMatch::getDisallowedFiles()` and `PHP_CodeSniffer\Filters\ExactMatch::getAllowedFiles()` methods.
466
466
If you have custom classes which extend the `ExactMatch` class, implement the new `getDisallowedFiles()` and `getAllowedFiles()` methods instead.
467
467
Note: this is a name change only. The functionality remains the same.
468
468
@@ -537,7 +537,7 @@ The Ruleset class now respects sniff selection via `--sniffs=...`, even when in
537
537
538
538
If your own test framework contained workarounds to get round the previous restriction, it should now be safe to remove those workarounds and to use the `--sniffs=...` argument when initiating the `Config` class.
539
539
540
-
Typically, these type of workarounds can be found by searching for calls to the `Ruleset::registerSniffs()` method.
540
+
Typically, these types of workarounds can be found by searching for calls to the `Ruleset::registerSniffs()` method.
541
541
542
542
<palign="right"><ahref="#table-of-contents">back to top</a></p>
0 commit comments