Skip to content

Commit

Permalink
Renamed library
Browse files Browse the repository at this point in the history
  • Loading branch information
CrochetFeve0251 committed Apr 8, 2023
1 parent 5b2807b commit 6d64f86
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 147 deletions.
24 changes: 13 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crochetfeve0251/rocket-launcher-uninstaller-take-off",
"description": "Uninstaller library for psr4 plugin",
"name": "wp-launchpad/uninstaller-take-off",
"description": "Uninstaller library for Launchpad framework",
"minimum-stability": "stable",
"license": "proprietary",
"type": "library",
Expand All @@ -11,31 +11,33 @@
}
],
"require": {
"crochetfeve0251/rocket-launcher-builder": "^1.0.0",
"crochetfeve0251/rocket-launcher-uninstaller": "^0.0.1",
"wp-launchpad/cli": "^1.0.0",
"wp-launchpad/uninstaller": "^0.0.2",
"ext-mbstring": "*",
"ext-json": "*",
"composer/composer": "^2.5"
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || ^8 || ^9",
"wp-media/phpunit": "^3.0"
},
"autoload": {
"psr-4": {
"RocketLauncherUninstallTakeOff\\": "inc/"
"LaunchpadUninstallTakeOff\\": "inc/"
}
},
"autoload-dev": {
"psr-4": {
"RocketLauncherUninstallTakeOff\\Tests\\": "tests/"
"LaunchpadUninstallTakeOff\\Tests\\": "tests/"
}
},
"extra": {
"rocket-launcher": {
"provider" : "RocketLauncherUninstallTakeOff\\ServiceProvider",
"launchpad": {
"provider" : "LaunchpadUninstallTakeOff\\ServiceProvider",
"command": "uninstaller:initialize",
"install": true
"install": true,
"libraries": {
"wp-launchpad/uninstaller": "^0.0.2"
}
}
}
}
19 changes: 5 additions & 14 deletions inc/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace RocketLauncherUninstallTakeOff\Commands;
namespace LaunchpadUninstallTakeOff\Commands;

use RocketLauncherBuilder\Commands\Command;
use RocketLauncherUninstallTakeOff\Services\AssetsManager;
use RocketLauncherUninstallTakeOff\Services\ProjectManager;
use LaunchpadCLI\Commands\Command;
use LaunchpadUninstallTakeOff\Services\AssetsManager;
use LaunchpadUninstallTakeOff\Services\ProjectManager;

class InstallCommand extends Command
{
Expand All @@ -13,15 +13,9 @@ class InstallCommand extends Command
*/
protected $assets_manager;

/**
* @var ProjectManager
*/
protected $project_manager;

public function __construct(AssetsManager $assets_manager, ProjectManager $project_manager)
public function __construct(AssetsManager $assets_manager)
{
$this->assets_manager = $assets_manager;
$this->project_manager = $project_manager;

parent::__construct('uninstaller:initialize', 'Initialize the uninstaller library');

Expand All @@ -35,8 +29,5 @@ public function __construct(AssetsManager $assets_manager, ProjectManager $proje

public function execute() {
$this->assets_manager->create_uninstall_file();
$this->project_manager->add_library();
$this->project_manager->cleanup();
$this->project_manager->reload();
}
}
19 changes: 9 additions & 10 deletions inc/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace RocketLauncherUninstallTakeOff;
namespace LaunchpadUninstallTakeOff;

use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use RocketLauncherBuilder\App;
use RocketLauncherBuilder\Entities\Configurations;
use RocketLauncherBuilder\ServiceProviders\ServiceProviderInterface;
use RocketLauncherBuilder\Templating\Renderer;
use RocketLauncherUninstallTakeOff\Commands\InstallCommand;
use RocketLauncherUninstallTakeOff\Services\AssetsManager;
use RocketLauncherUninstallTakeOff\Services\ProjectManager;
use LaunchpadCLI\App;
use LaunchpadCLI\Entities\Configurations;
use LaunchpadCLI\ServiceProviders\ServiceProviderInterface;
use LaunchpadCLI\Templating\Renderer;
use LaunchpadUninstallTakeOff\Commands\InstallCommand;
use LaunchpadUninstallTakeOff\Services\AssetsManager;
use LaunchpadUninstallTakeOff\Services\ProjectManager;

class ServiceProvider implements ServiceProviderInterface
{
Expand Down Expand Up @@ -61,8 +61,7 @@ public function attach_commands(App $app): App
{

$assets_manager = new AssetsManager($this->filesystem, $this->renderer, $this->configs);
$project_manager = new ProjectManager($this->filesystem);
$app->add(new InstallCommand($assets_manager, $project_manager));
$app->add(new InstallCommand($assets_manager));
return $app;
}
}
6 changes: 3 additions & 3 deletions inc/Services/AssetsManager.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace RocketLauncherUninstallTakeOff\Services;
namespace LaunchpadUninstallTakeOff\Services;

use League\Flysystem\Filesystem;
use RocketLauncherBuilder\Entities\Configurations;
use RocketLauncherBuilder\Templating\Renderer;
use LaunchpadCLI\Entities\Configurations;
use LaunchpadCLI\Templating\Renderer;

class AssetsManager
{
Expand Down
104 changes: 0 additions & 104 deletions inc/Services/ProjectManager.php

This file was deleted.

6 changes: 3 additions & 3 deletions tests/Integration/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace RocketLauncherUninstallTakeOff\Tests\Integration;
namespace LaunchpadUninstallTakeOff\Tests\Integration;

use ReflectionObject;
use RocketLauncherBuilder\AppBuilder;
use RocketLauncherUninstallTakeOff\ServiceProvider;
use LaunchpadCLI\AppBuilder;
use LaunchpadUninstallTakeOff\ServiceProvider;
use WPMedia\PHPUnit\Unit\VirtualFilesystemTestCase;

abstract class TestCase extends VirtualFilesystemTestCase
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/inc/Commands/InstallCommand/execute.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RocketLauncherUninstallTakeOff\Tests\Integration\inc\Commands\InstallCommand;
namespace LaunchpadUninstallTakeOff\Tests\Integration\inc\Commands\InstallCommand;

use RocketLauncherUninstallTakeOff\Tests\Integration\TestCase;
use LaunchpadUninstallTakeOff\Tests\Integration\TestCase;

class Test_Execute extends TestCase
{
Expand Down

0 comments on commit 6d64f86

Please sign in to comment.