Skip to content

Commit

Permalink
[TASK] Support Flysystem version 3 (#4282)
Browse files Browse the repository at this point in the history
* [TASK] Support Flysystem version 3

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

---------

Co-authored-by: sabbelasichon <sabbelasichon@users.noreply.github.com>
  • Loading branch information
sabbelasichon and sabbelasichon authored Jun 27, 2024
1 parent a6f3c6a commit 5e6885e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"require": {
"php": "^7.4 || ^8.0",
"ext-json": "*",
"league/flysystem": "^2.0",
"league/flysystem-memory": "^2.0",
"league/flysystem": "^2.0 || ^3.0",
"league/flysystem-memory": "^2.0 || ^3.0",
"nette/utils": "^3.2.10 || ^4.0.4",
"nikic/php-parser": "^4.18.0",
"phpstan/phpstan": "^1.10.56",
Expand Down
1 change: 1 addition & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
if (! $cwd) {
throw new \Exception('could not find current working directory');
}

$adapter = new LocalFilesystemAdapter($cwd);
}

Expand Down
2 changes: 1 addition & 1 deletion rules/TYPO312/v0/RemoveUpdateRootlineDataRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getNodeTypes(): array
}

/**
* @param Node\Stmt\Expression $node
* @param Expression $node
*/
public function refactor(Node $node): ?int
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getNodeTypes(): array
}

/**
* @param Node\Expr\MethodCall $node
* @param MethodCall $node
*/
public function refactor(Node $node): ?Node
{
Expand Down
2 changes: 1 addition & 1 deletion rules/TYPO312/v0/ReplacePageRepoOverlayFunctionRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getNodeTypes(): array
}

/**
* @param Node\Expr\MethodCall $node
* @param MethodCall $node
*/
public function refactor(Node $node): ?Node
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Ssch\TYPO3Rector\TYPO312\v0;

use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Scalar\String_;
Expand Down Expand Up @@ -36,7 +37,7 @@ public function refactor(Node $node): ?Node
}

if ($node->args[0]->value->getType() === 'Expr_ClassConstFetch') {
/** @var Node\Expr\ClassConstFetch $firstArg */
/** @var ClassConstFetch $firstArg */
$firstArg = $node->args[0]->value;
/** @var Node\Identifier $identifier */
$identifier = $firstArg->name;
Expand Down
2 changes: 1 addition & 1 deletion rules/TYPO312/v3/MigrateMagicRepositoryMethodsRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getNodeTypes(): array
}

/**
* @param Node\Expr\MethodCall $node
* @param MethodCall $node
*/
public function refactorWithScope(Node $node, Scope $scope): ?Node
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getNodeTypes(): array
}

/**
* @param Node\Expr\MethodCall $node
* @param MethodCall $node
*/
public function refactor(Node $node)
{
Expand Down

0 comments on commit 5e6885e

Please sign in to comment.