Skip to content

Commit 5655ea6

Browse files
committed
PHP 5.6 polyfill ruleset: bug fix / LDAP constants
The Symfony PHP 5.6 polyfill appears to also [backfill two LDAP constants](https://github.com/symfony/polyfill-php56/blob/d51ec491c8ddceae7dca8dd6c7e30428f543f37d/bootstrap.php#L19-L20). This is not mentioned in the readme documentation and may have been missed when the polyfill ruleset was originally pulled as those constants may not have been sniffed for by PHPCompatibility at that time. Either way, fixed now. Includes changelog entry in the readme.
1 parent d25f8af commit 5655ea6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

PHPCompatibilitySymfonyPolyfillPHP56/ruleset.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<!-- https://github.com/symfony/polyfill-php56/blob/master/bootstrap.php -->
77
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.hash_equalsFound"/>
88
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.ldap_escapeFound"/>
9+
<exclude name="PHPCompatibility.Constants.NewConstants.ldap_escape_filterFound"/>
10+
<exclude name="PHPCompatibility.Constants.NewConstants.ldap_escape_dnFound"/>
911
</rule>
1012

1113
</ruleset>

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ All code within the PHPCompatibility organisation is released under the GNU Less
117117

118118
## Changelog
119119

120+
### Unreleased
121+
* `PHPCompatibilitySymfonyPolyfillPHP56` ruleset: allow for two polyfilled LDAP constants (undocumented in the Polyfill docs)
122+
* Composer: The recommended version of the [Composer PHPCS plugin](https://github.com/Dealerdirect/phpcodesniffer-composer-installer/) has been upped to `^0.6.0`.
123+
120124
### 1.1.1 - 2019-08-30
121125

122126
* `PHPCompatibilitySymfonyPolyfillPHP72` ruleset: minor tweak to prevent false positive when the sniffs are run over the polyfill itself.

Test/SymfonyPolyfillPHP56Test.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
*/
55
$a = hash_equals();
66
$a = ldap_escape();
7+
8+
$var = LDAP_ESCAPE_FILTER + LDAP_ESCAPE_DN;

0 commit comments

Comments
 (0)