Skip to content

Commit 214aece

Browse files
committed
4.0 dev upgrade guide: minor formatting tweaks
1 parent a8d62fc commit 214aece

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

wiki/Version-4.0-Developer-Upgrade-Guide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ There is a separate [[Upgrade Guide for Ruleset Maintainers and End-Users|Versio
5252
It is highly recommended to upgrade external standards and integrations as soon as you are able.
5353

5454
Once PHP_CodeSniffer 4.0 has been released, the PHP_CodeSniffer 3.x branch will no longer receive updates, with the exception of security fixes and runtime compatibility fixes for new PHP versions.
55-
This "limited support" will last a maximum of one year from the date of the PHP_Codesniffer 4.0.0 release.
55+
This "limited support" will last a maximum of one year from the date of the PHP_CodeSniffer 4.0.0 release.
5656

5757
> [!IMPORTANT]
5858
> This also means that support for new PHP syntaxes will only land in PHP_CodeSniffer 4.x and will **NOT** be backported to the 3.x branch.
@@ -519,7 +519,7 @@ The `protected` `getDeclarationNameWithNamespace()` and `getNamespaceOfScope()`
519519

520520
* `PHP_CodeSniffer\Ruleset::setSniffProperty()`: the BC-layer supporting the old array format for the `$settings` parameter for the method has been removed.
521521
The `$settings` parameter must be passed as an array with the following two keys: `'scope'` and `'value'`, with `'scope'` being set to either `'sniff'` or `'standard'`, and `'value'` containing the new property value.
522-
Also see https://github.com/squizlabs/PHP_CodeSniffer/pull/3629
522+
Also see [squizlabs/PHP_CodeSniffer#3629](https://github.com/squizlabs/PHP_CodeSniffer/pull/3629).
523523

524524
* Various class properties have been replaced with class constants. Where these were in the public API (= the below list), the properties still exist, but are now (soft) deprecated and will be removed in PHP_CodeSniffer 5.0.
525525
The visibility of the (deprecated) properties and their class constant replacements is the same.
@@ -544,9 +544,9 @@ The `protected` `getDeclarationNameWithNamespace()` and `getNamespaceOfScope()`
544544
| (`protected`) `PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowSizeFunctionsInLoopsSniff::$forbiddenFunctions` | `PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP\DisallowSizeFunctionsInLoopsSniff::FORBIDDEN_FUNCTIONS` | |
545545

546546
* The visibility of the following class constants has changed from `public` to `private`. If you used these in your own code, you will need to create your own constants instead:
547-
- `PHP_CodeSniffer\Generators\HTML::STYLESHEET`
548-
- `PHP_CodeSniffer\Util\Timing::MINUTE_IN_MS`
549-
- `PHP_CodeSniffer\Util\Timing::SECOND_IN_MS`
547+
* `PHP_CodeSniffer\Generators\HTML::STYLESHEET`
548+
* `PHP_CodeSniffer\Util\Timing::MINUTE_IN_MS`
549+
* `PHP_CodeSniffer\Util\Timing::SECOND_IN_MS`
550550

551551
* The `PHP_CodeSniffer\Util\Standards::printInstalledStandards()` method is deprecated and should no longer be used. Use `echo PHP_CodeSniffer\Util\Standards::prepareInstalledStandardsForDisplay()` instead once support for PHPCS 3.x is being dropped.
552552

@@ -578,7 +578,7 @@ If an external standard uses its own test framework, this section can be skipped
578578
* The test setup now supports PHPUnit 8, 9, 10 and 11, which is in line with the new minimum PHP version of 7.2.
579579
Please read the changelogs for PHPUnit itself for information about the changes.
580580
Most notable changes which will likely impact your tests:
581-
- The test suite may need a separate PHPUnit config file for PHPUnit < 10 and PHPUnit 10+.
581+
* The test suite may need a separate PHPUnit config file for PHPUnit < 10 and PHPUnit 10+.
582582
* The custom `TestSuite` setup has been removed from the framework as it is no longer needed since PEAR support was dropped and was incompatible with PHPUnit 10.
583583
* All abstract base test cases now use the `TestCase` class name suffix.
584584
| Old Name | New Name |
@@ -589,22 +589,22 @@ If an external standard uses its own test framework, this section can be skipped
589589
These methods now have `void` return type declarations.
590590
* The global `printPHPCodeSnifferTestOutput()` function, which printed a "# sniff test files generated # unique error codes; # were fixable (#%)" summary after the tests is no longer available.
591591
* The following properties which were previously available in the `AbstractSniffUnitTest` class have been removed:
592-
- `protected $backupGlobals`
593-
- `public $standardsDir`
594-
- `public $testsDir`
592+
* `protected $backupGlobals`
593+
* `public $standardsDir`
594+
* `public $testsDir`
595595
The first is (very) old-school PHPUnit and should not be used anyway.
596596
The last two were never intended to be overwritten by concrete test classes, so shouldn't have been public properties.
597597
* The following property which was previously available in the `AbstractMethodUnitTest` class has been removed:
598-
- `protected static $fileExtension`
598+
* `protected static $fileExtension`
599599
This property is redundant now support for JS/CSS files has been dropped.
600600
* The test framework no longer uses global variables. I.e. the following are no longer available:
601-
- `$GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS']`
602-
- `$GLOBALS['PHP_CODESNIFFER_TEST_DIRS']`
603-
- `$GLOBALS['PHP_CODESNIFFER_CONFIG']`
604-
- `$GLOBALS['PHP_CODESNIFFER_RULESETS']`
605-
- `$GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES']`
606-
- `$GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']`
607-
- `$GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']`
601+
* `$GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS']`
602+
* `$GLOBALS['PHP_CODESNIFFER_TEST_DIRS']`
603+
* `$GLOBALS['PHP_CODESNIFFER_CONFIG']`
604+
* `$GLOBALS['PHP_CODESNIFFER_RULESETS']`
605+
* `$GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES']`
606+
* `$GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']`
607+
* `$GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']`
608608
* Sniff tests which extend the `AbstractSniffTestCase` for which no test case files (`.inc` files) can be found, will now be marked as "incomplete".
609609
* Sniff tests which extend the `AbstractSniffTestCase` for which no `.fixed` files can be found, while the sniff would make fixes to the test case file, will now fail.
610610

0 commit comments

Comments
 (0)