Skip to content

Instantly share code, notes, and snippets.

@jrfnl
Last active July 15, 2026 22:04
Show Gist options
  • Select an option

  • Save jrfnl/e540ce964e348d5ab6ebf07937763173 to your computer and use it in GitHub Desktop.

Select an option

Save jrfnl/e540ce964e348d5ab6ebf07937763173 to your computer and use it in GitHub Desktop.
Impact analysis proposed PHP 8.6 deprecation of let as identifier on Packagist top 4000
<?xml version="1.0"?>
<ruleset name="Impact check for https://wiki.php.net/rfc/deprecations_php_8_6">
<!-- This ruleset should only be used in conjunction with PHPCompatibility at commit
https://github.com/PHPCompatibility/PHPCompatibility/commit/cc67a3824dda9612896f5892c2d6d9408fa20d77 -->
<file>sources</file>
<arg name="extensions" value="php"/>
<arg value="ps"/>
<arg name="basepath" value="./sources/"/>
<arg name="parallel" value="8"/>
<arg name="no-colors"/>
<arg name="ignore-annotations"/>
<arg name="report" value="code,summary,source"/>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- We are specifically and only checking for the PHP 8.6 deprecation(s). -->
<config name="testVersion" value="8.6"/>
<rule ref="PHPCompatibility.Keywords.ForbiddenClassAlias.letFound"/>
<rule ref="PHPCompatibility.Keywords.ForbiddenNames.letFound"/>
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
<rule ref="Internal.LineEndings.Mixed">
<severity>0</severity>
</rule>
</ruleset>
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
SOURCE COUNT
----------------------------------------------------------------------
PHPCompatibility.Keywords.ForbiddenNames.letFound 3
----------------------------------------------------------------------
A TOTAL OF 3 SNIFF VIOLATIONS WERE FOUND IN 1 SOURCE
----------------------------------------------------------------------
PHP CODE SNIFFER REPORT SUMMARY
------------------------------------------------------------------------------------------
FILE ERRORS WARNINGS
------------------------------------------------------------------------------------------
phpspec\phpspec--9.0.0-beta\src\PhpSpec\functions.php 1 0
widmogrod\php-functional--7.0.1\src\Monad\Control\Doo\actions.php 1 0
widmogrod\php-functional--7.0.1\src\Monad\Control\Doo\Algebra\Let.php 1 0
------------------------------------------------------------------------------------------
A TOTAL OF 3 ERRORS AND 0 WARNINGS WERE FOUND IN 3 FILES
------------------------------------------------------------------------------------------
FILE: phpspec\phpspec--9.0.0-beta\src\PhpSpec\functions.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 132: ERROR Function name, class name, namespace name or constant name can not be reserved keyword 'let' (since version 8.6)
(PHPCompatibility.Keywords.ForbiddenNames.letFound)
------------------------------------------------------------------------------------------------------------------------------------------------------
130: * @param Closure|null $setter value factory when first arg is a property name
131: */
>> 132: function let(string|Closure $propertyOrSetter, ?Closure $setter = null): void
133: {
134: $scope = DispatcherRegistry::dispatcher()->currentScope();
------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: widmogrod\php-functional--7.0.1\src\Monad\Control\Doo\actions.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 12: ERROR Function name, class name, namespace name or constant name can not be reserved keyword 'let' (since version 8.6)
(PHPCompatibility.Keywords.ForbiddenNames.letFound)
------------------------------------------------------------------------------------------------------------------------------------------------------
10: use function Widmogrod\Monad\Free\liftF;
11:
>> 12: function let(string $name, Monad $m): MonadFree
13: {
14: return $m instanceof MonadFree
------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: widmogrod\php-functional--7.0.1\src\Monad\Control\Doo\Algebra\Let.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 11: ERROR Function name, class name, namespace name or constant name can not be reserved keyword 'let' (since version 8.6)
(PHPCompatibility.Keywords.ForbiddenNames.letFound)
------------------------------------------------------------------------------------------------------------------------------------------------------
9: use Widmogrod\Monad\Free\MonadFree;
10:
>> 11: class Let implements DooF
12: {
13: private $name;
------------------------------------------------------------------------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment