Updated Rector to commit c119bba7b1d7332fa79859d66b51f9b4f287dc6d

c119bba7b1 [Visibility] Does not turn abstraction into static from implicit public abstractions in ExplicitPublicClassMethodRector (#7483) (#2930)
This commit is contained in:
Tomas Votruba 2022-09-16 18:01:57 +00:00
parent 13dd0ad755
commit 39cbc1f731
10 changed files with 68 additions and 34 deletions

View File

@ -30,6 +30,17 @@ final class VisibilityManipulator
{
$this->addVisibilityFlag($node, Visibility::STATIC);
}
/**
* @api
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property $node
*/
public function makeNonStatic($node) : void
{
if (!$node->isStatic()) {
return;
}
$node->flags -= Class_::MODIFIER_STATIC;
}
/**
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Class_ $node
*/
@ -41,12 +52,12 @@ final class VisibilityManipulator
* @api
* @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property $node
*/
public function makeNonStatic($node) : void
public function makeNonAbstract($node) : void
{
if (!$node->isStatic()) {
if (!$node instanceof ClassMethod || !$node->isAbstract()) {
return;
}
$node->flags -= Class_::MODIFIER_STATIC;
$node->flags -= Class_::MODIFIER_ABSTRACT;
}
/**
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\ClassConst $node
@ -77,6 +88,7 @@ final class VisibilityManipulator
return;
}
if ($node->isPublic()) {
$node->flags |= Class_::MODIFIER_PUBLIC;
$node->flags -= Class_::MODIFIER_PUBLIC;
}
if ($node->isProtected()) {

View File

@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'cec7701e79be8f1384b3dbef67665b8151b7e2af';
public const PACKAGE_VERSION = 'c119bba7b1d7332fa79859d66b51f9b4f287dc6d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-09-15 16:02:37';
public const RELEASE_DATE = '2022-09-16 19:57:25';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103::getLoader();
return ComposerAutoloaderInitaddd94f80f7d62eec0469dd7b2684861::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103
class ComposerAutoloaderInitaddd94f80f7d62eec0469dd7b2684861
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitaddd94f80f7d62eec0469dd7b2684861', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitaddd94f80f7d62eec0469dd7b2684861', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire19d6ae0dc9d6c45aba0c42f09f22e103($fileIdentifier, $file);
composerRequireaddd94f80f7d62eec0469dd7b2684861($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInit19d6ae0dc9d6c45aba0c42f09f22e103
* @param string $file
* @return void
*/
function composerRequire19d6ae0dc9d6c45aba0c42f09f22e103($fileIdentifier, $file)
function composerRequireaddd94f80f7d62eec0469dd7b2684861($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103
class ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3094,9 +3094,9 @@ class ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit19d6ae0dc9d6c45aba0c42f09f22e103::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitaddd94f80f7d62eec0469dd7b2684861::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1143,17 +1143,17 @@
},
{
"name": "react\/child-process",
"version": "v0.6.4",
"version_normalized": "0.6.4.0",
"version": "v0.6.5",
"version_normalized": "0.6.5.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/reactphp\/child-process.git",
"reference": "a778f3fb828d68caf8a9ab6567fd8342a86f12fe"
"reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/reactphp\/child-process\/zipball\/a778f3fb828d68caf8a9ab6567fd8342a86f12fe",
"reference": "a778f3fb828d68caf8a9ab6567fd8342a86f12fe",
"url": "https:\/\/api.github.com\/repos\/reactphp\/child-process\/zipball\/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43",
"reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43",
"shasum": ""
},
"require": {
@ -1167,7 +1167,7 @@
"react\/socket": "^1.8",
"sebastian\/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0"
},
"time": "2021-10-12T10:37:07+00:00",
"time": "2022-09-16T13:41:56+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -1209,7 +1209,7 @@
],
"support": {
"issues": "https:\/\/github.com\/reactphp\/child-process\/issues",
"source": "https:\/\/github.com\/reactphp\/child-process\/tree\/v0.6.4"
"source": "https:\/\/github.com\/reactphp\/child-process\/tree\/v0.6.5"
},
"funding": [
{

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,19 @@
# Changelog
## 0.6.5 (2022-09-16)
* Feature: Full support for PHP 8.1 and PHP 8.2 release.
(#91 by @SimonFrings and #99 by @WyriHaximus)
* Feature / Fix: Improve error reporting when custom error handler is used.
(#94 by @clue)
* Minor documentation improvements.
(#92 by @SimonFrings and #95 by @nhedger)
* Improve test suite, skip failing tests on bugged versions and fix legacy HHVM build.
(#96 and #98 by @clue and #93 by @SimonFrings)
## 0.6.4 (2021-10-12)
* Feature / Fix: Skip sigchild check if `phpinfo()` has been disabled.

View File

@ -1,6 +1,7 @@
# ChildProcess
[![CI status](https://github.com/reactphp/child-process/workflows/CI/badge.svg)](https://github.com/reactphp/child-process/actions)
[![CI status](https://github.com/reactphp/child-process/actions/workflows/ci.yml/badge.svg)](https://github.com/reactphp/child-process/actions)
[![installs on Packagist](https://img.shields.io/packagist/dt/react/child-process?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/react/child-process)
Event-driven library for executing child processes with
[ReactPHP](https://reactphp.org/).
@ -581,36 +582,36 @@ $process->start();
## Install
The recommended way to install this library is [through Composer](https://getcomposer.org).
The recommended way to install this library is [through Composer](https://getcomposer.org/).
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
This will install the latest supported version:
```bash
$ composer require react/child-process:^0.6.4
composer require react/child-process:^0.6.5
```
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
This project aims to run on any platform and thus does not require any PHP
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM.
It's *highly recommended to use PHP 7+* for this project.
It's *highly recommended to use the latest supported PHP version* for this project.
See above note for limited [Windows Compatibility](#windows-compatibility).
## Tests
To run the test suite, you first need to clone this repo and then install all
dependencies [through Composer](https://getcomposer.org):
dependencies [through Composer](https://getcomposer.org/):
```bash
$ composer install
composer install
```
To run the test suite, go to the project root and run:
```bash
$ php vendor/bin/phpunit
vendor/bin/phpunit
```
## License

View File

@ -180,10 +180,17 @@ class Process extends EventEmitter
$options['bypass_shell'] = \true;
$options['suppress_errors'] = \true;
}
$errstr = '';
\set_error_handler(function ($_, $error) use(&$errstr) {
// Match errstr from PHP's warning message.
// proc_open(/dev/does-not-exist): Failed to open stream: No such file or directory
$errstr = $error;
});
$pipes = array();
$this->process = @\proc_open($cmd, $fdSpec, $pipes, $this->cwd, $this->env, $options);
\restore_error_handler();
if (!\is_resource($this->process)) {
$error = \error_get_last();
throw new \RuntimeException('Unable to launch a new process: ' . $error['message']);
throw new \RuntimeException('Unable to launch a new process: ' . $errstr);
}
// count open process pipes and await close event for each to drain buffers before detecting exit
$that = $this;