Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: Upgrade neos/utility-files #698

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"monolog/monolog": "^2.9.1",
"myclabs/php-enum": "^1.8",
"neos/utility-files": "^3.0",
"neos/utility-files": "^7.3.10",
"padraic/phar-updater": "1.0.6",
"symfony/config": "^5.0",
"symfony/console": "^5.0",
Expand Down
76 changes: 63 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 11 additions & 18 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,27 @@
*/

use Rector\Config\RectorConfig;
use Rector\Core\Configuration\Option;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->parallel();
$rectorConfig->importNames();

// get parameters
$parameters = $rectorConfig->parameters();
$parameters->set(Option::PATHS, [
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$parameters->set(Option::SKIP, [
AddLiteralSeparatorToNumberRector::class
]);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_CODE_QUALITY);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_EXCEPTION);
$rectorConfig->import(PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER);
$rectorConfig->import(LevelSetList::UP_TO_PHP_74);

// get services (needed for register a single rule)
$services = $rectorConfig->services();
$rectorConfig->skip([
AddLiteralSeparatorToNumberRector::class,

// register a single rule
//$services->set(TypedPropertyRector::class);
//$services->set(AddVoidReturnTypeWhereNoReturnRector::class);
]);
$rectorConfig->sets([
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
PHPUnitSetList::PHPUNIT_EXCEPTION,
PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER,
LevelSetList::UP_TO_PHP_74,
]);
};
2 changes: 1 addition & 1 deletion src/Domain/Model/Deployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

namespace TYPO3\Surf\Domain\Model;

use Neos\Utility\Files;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Enum\DeploymentStatus;
use TYPO3\Surf\Exception as SurfException;
use UnexpectedValueException;
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Service/ShellCommandService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
namespace TYPO3\Surf\Domain\Service;

use Monolog\Logger;
use Neos\Utility\Files;
use Phar;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Symfony\Component\Process\Process;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
use TYPO3\Surf\Exception\TaskExecutionException;
Expand Down
2 changes: 1 addition & 1 deletion src/Integration/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Neos\Utility\Files;
use RuntimeException;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Filesystem\FilesystemInterface;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\FailedDeployment;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Composer/AbstractComposerTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace TYPO3\Surf\Task\Composer;

use Neos\Utility\Files;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/GitCheckoutTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace TYPO3\Surf\Task;

use Neos\Utility\Files;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
Expand Down
3 changes: 2 additions & 1 deletion src/Task/Laravel/AbstractCliTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use TYPO3\Surf\Domain\Model\Task;
use TYPO3\Surf\Domain\Service\ShellCommandServiceAwareInterface;
use TYPO3\Surf\Domain\Service\ShellCommandServiceAwareTrait;
use TYPO3\Surf\Exception\TaskExecutionException;

abstract class AbstractCliTask extends Task implements ShellCommandServiceAwareInterface
{
Expand All @@ -41,7 +42,7 @@ abstract class AbstractCliTask extends Task implements ShellCommandServiceAwareI
* @param Deployment $deployment
* @param array $options
* @return bool|mixed
* @throws \TYPO3\Surf\Exception\TaskExecutionException
* @throws TaskExecutionException
*/
protected function executeCliCommand(
array $cliArguments,
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Neos/Flow/CopyConfigurationTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace TYPO3\Surf\Task\Neos\Flow;

use Neos\Utility\Files;
use Phar;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Php/WebOpcacheResetCreateScriptTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace TYPO3\Surf\Task\Php;

use Neos\Utility\Files;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Filesystem\FilesystemInterface;
use TYPO3\Surf\Domain\Generator\RandomBytesGeneratorInterface;
use TYPO3\Surf\Domain\Model\Application;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/TYPO3/CMS/SymlinkDataTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace TYPO3\Surf\Task\TYPO3\CMS;

use Neos\Utility\Files;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Transfer/RsyncTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

namespace TYPO3\Surf\Task\Transfer;

use Neos\Utility\Files;
use Phar;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
use TYPO3\Surf\Domain\Model\Node;
Expand Down
2 changes: 1 addition & 1 deletion src/Task/Transfer/ScpTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace TYPO3\Surf\Task\Transfer;

use TYPO3\Flow\Utility\Files;
use Neos\Utility\Files;
use TYPO3\Surf\Domain\Enum\SimpleWorkflowStage;
use TYPO3\Surf\Domain\Model\Application;
use TYPO3\Surf\Domain\Model\Deployment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace TYPO3\Surf\Tests\Unit\Task\Php;

use Neos\Utility\Files;
use PHPUnit\Framework\MockObject\MockObject;
use TYPO3\Flow\Utility\Files;
use TYPO3\Surf\Domain\Filesystem\FilesystemInterface;
use TYPO3\Surf\Domain\Generator\RandomBytesGeneratorInterface;
use TYPO3\Surf\Exception\TaskExecutionException;
Expand Down