Skip to content

Commit

Permalink
Updated Rector to commit 6b7aac835934de48c034aa8b2bad886616566e06
Browse files Browse the repository at this point in the history
rectorphp/rector-src@6b7aac8 [Php81] Remove IntersectionTypesRector as rely on docblock (#4784)
  • Loading branch information
TomasVotruba committed Aug 14, 2023
1 parent 480a54b commit 867dc44
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 158 deletions.
3 changes: 1 addition & 2 deletions config/set/php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
use Rector\Php81\Rector\ClassConst\FinalizePublicClassConstantRector;
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Php81\Rector\FunctionLike\IntersectionTypesRector;
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
use Rector\Php81\Rector\MethodCall\SpatieEnumMethodCallToEnumConstRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->rules([ReturnNeverTypeRector::class, MyCLabsClassToEnumRector::class, MyCLabsMethodCallToEnumConstRector::class, FinalizePublicClassConstantRector::class, ReadOnlyPropertyRector::class, SpatieEnumClassToEnumRector::class, SpatieEnumMethodCallToEnumConstRector::class, NewInInitializerRector::class, IntersectionTypesRector::class, NullToStrictStringFuncCallArgRector::class, FirstClassCallableRector::class]);
$rectorConfig->rules([ReturnNeverTypeRector::class, MyCLabsClassToEnumRector::class, MyCLabsMethodCallToEnumConstRector::class, FinalizePublicClassConstantRector::class, ReadOnlyPropertyRector::class, SpatieEnumClassToEnumRector::class, SpatieEnumMethodCallToEnumConstRector::class, NewInInitializerRector::class, NullToStrictStringFuncCallArgRector::class, FirstClassCallableRector::class]);
};
25 changes: 2 additions & 23 deletions docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 355 Rules Overview
# 354 Rules Overview

<br>

Expand Down Expand Up @@ -40,7 +40,7 @@

- [Php80](#php80) (16)

- [Php81](#php81) (10)
- [Php81](#php81) (9)

- [Php82](#php82) (4)

Expand Down Expand Up @@ -5070,27 +5070,6 @@ Upgrade array callable to first class callable

<br>

### IntersectionTypesRector

Change docs to intersection types, where possible (properties are covered by TypedPropertyRector (@todo))

- class: [`Rector\Php81\Rector\FunctionLike\IntersectionTypesRector`](../rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php)

```diff
final class SomeClass
{
- /**
- * @param Foo&Bar $types
- */
- public function process($types)
+ public function process(Foo&Bar $types)
{
}
}
```

<br>

### MyCLabsClassToEnumRector

Refactor MyCLabs enum class to native Enum
Expand Down
119 changes: 0 additions & 119 deletions rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'b0105f24cf32cfe12438e85c5033aa79bce9a1a4';
public const PACKAGE_VERSION = '6b7aac835934de48c034aa8b2bad886616566e06';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-14 07:36:31';
public const RELEASE_DATE = '2023-08-14 07:36:48';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit4e479c6ca392702f962040c7fa54d1aa::getLoader();
return ComposerAutoloaderInitd0491821a1f961d1d51360ac6370685e::getLoader();
1 change: 0 additions & 1 deletion vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,6 @@
'Rector\\Php81\\Rector\\Class_\\MyCLabsClassToEnumRector' => $baseDir . '/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php',
'Rector\\Php81\\Rector\\Class_\\SpatieEnumClassToEnumRector' => $baseDir . '/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php',
'Rector\\Php81\\Rector\\FuncCall\\NullToStrictStringFuncCallArgRector' => $baseDir . '/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php',
'Rector\\Php81\\Rector\\FunctionLike\\IntersectionTypesRector' => $baseDir . '/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php',
'Rector\\Php81\\Rector\\MethodCall\\MyCLabsMethodCallToEnumConstRector' => $baseDir . '/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php',
'Rector\\Php81\\Rector\\MethodCall\\SpatieEnumMethodCallToEnumConstRector' => $baseDir . '/rules/Php81/Rector/MethodCall/SpatieEnumMethodCallToEnumConstRector.php',
'Rector\\Php81\\Rector\\Property\\ReadOnlyPropertyRector' => $baseDir . '/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php',
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit4e479c6ca392702f962040c7fa54d1aa
class ComposerAutoloaderInitd0491821a1f961d1d51360ac6370685e
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit4e479c6ca392702f962040c7fa54d1aa', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd0491821a1f961d1d51360ac6370685e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit4e479c6ca392702f962040c7fa54d1aa', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd0491821a1f961d1d51360ac6370685e', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd0491821a1f961d1d51360ac6370685e::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitd0491821a1f961d1d51360ac6370685e::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
9 changes: 4 additions & 5 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa
class ComposerStaticInitd0491821a1f961d1d51360ac6370685e
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -2470,7 +2470,6 @@ class ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa
'Rector\\Php81\\Rector\\Class_\\MyCLabsClassToEnumRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php',
'Rector\\Php81\\Rector\\Class_\\SpatieEnumClassToEnumRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php',
'Rector\\Php81\\Rector\\FuncCall\\NullToStrictStringFuncCallArgRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php',
'Rector\\Php81\\Rector\\FunctionLike\\IntersectionTypesRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php',
'Rector\\Php81\\Rector\\MethodCall\\MyCLabsMethodCallToEnumConstRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php',
'Rector\\Php81\\Rector\\MethodCall\\SpatieEnumMethodCallToEnumConstRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/MethodCall/SpatieEnumMethodCallToEnumConstRector.php',
'Rector\\Php81\\Rector\\Property\\ReadOnlyPropertyRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php',
Expand Down Expand Up @@ -2959,9 +2958,9 @@ class ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4e479c6ca392702f962040c7fa54d1aa::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitd0491821a1f961d1d51360ac6370685e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd0491821a1f961d1d51360ac6370685e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd0491821a1f961d1d51360ac6370685e::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 867dc44

Please sign in to comment.