From da8b1801b0d3f6ac720846182948b4b0f054f84c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 1 Mar 2023 22:23:24 +0000 Subject: [PATCH] Updated Rector to commit 4bd93ba93ddde14444c7635b77007ee523a760f3 https://github.com/rectorphp/rector-src/commit/4bd93ba93ddde14444c7635b77007ee523a760f3 Handle missing token on Rector CI workflow on forks (#3433) --- src/Application/VersionResolver.php | 4 ++-- templates/rector-github-action-check.yaml | 10 +++++++++- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 25c1c5e30b3..19eba649d06 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'a2cd7283fbf2d6b2904016c51e3f4a545caa0256'; + public const PACKAGE_VERSION = '4bd93ba93ddde14444c7635b77007ee523a760f3'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-03-01 12:55:50'; + public const RELEASE_DATE = '2023-03-01 22:17:15'; /** * @var int */ diff --git a/templates/rector-github-action-check.yaml b/templates/rector-github-action-check.yaml index 3e965a38b3d..7a5be60d35c 100644 --- a/templates/rector-github-action-check.yaml +++ b/templates/rector-github-action-check.yaml @@ -10,12 +10,20 @@ jobs: if: github.repository == '__CURRENT_REPOSITORY__' runs-on: ubuntu-latest steps: + # workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298 + # see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4 - + if: github.event.pull_request.head.repo.full_name == github.repository uses: actions/checkout@v3 with: - # needed to trigger workflow after push + # Must be used to trigger workflow after push token: ${{ secrets.ACCESS_TOKEN }} + # in forks, the token is not available - so we cannot use it + - + if: github.event.pull_request.head.repo.full_name != github.repository + uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 with: diff --git a/vendor/autoload.php b/vendor/autoload.php index a6c5baf2071..75d062b264d 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit0e6da6cf4f26530f17a5ba7ff7c63f9b::getLoader(); +return ComposerAutoloaderInit26ad315690cbd9f44d8bb798dcd0359e::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 340e7fb22a6..9daabe515fb 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0e6da6cf4f26530f17a5ba7ff7c63f9b +class ComposerAutoloaderInit26ad315690cbd9f44d8bb798dcd0359e { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit0e6da6cf4f26530f17a5ba7ff7c63f9b return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit0e6da6cf4f26530f17a5ba7ff7c63f9b', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit26ad315690cbd9f44d8bb798dcd0359e', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit0e6da6cf4f26530f17a5ba7ff7c63f9b', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit26ad315690cbd9f44d8bb798dcd0359e', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4f2a8135c88..f423577d3dc 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b +class ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3126,9 +3126,9 @@ class ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit0e6da6cf4f26530f17a5ba7ff7c63f9b::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit26ad315690cbd9f44d8bb798dcd0359e::$classMap; }, null, ClassLoader::class); }