diff --git a/LICENSE b/LICENSE index 612b7e7..312d1e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Andreas Heigl +Copyright The ComposerDistributor-Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 50d10a7..3d709a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Single Phar Plugin +# Mediator This is a demo plugin that can be used to create your own Composer Plugin that installs a PHAR file instead of a sh*tload of sourcecode @@ -8,7 +8,7 @@ that installs a PHAR file instead of a sh*tload of sourcecode Create your own copy of this project by running ```bash -$ composer create-project org_heigl/single-phar-plugin /path/to/your/source/path +$ composer create-project phar-io/mediator /path/to/your/source/path ``` After that you should replace or adapt the following informations in these @@ -16,7 +16,7 @@ files: ### `src/Plugin.php` -* Line 11: replace `Org_Heigl\SinglePharPlugin` with a namespace for your Plugin +* Line 11: replace `PharIo\Mediator` with a namespace for your Plugin Note: We need this same namespace later in line 16 of the `compposer.json` again * Line 25: replace `JUnitDiff` with the name of your Package. diff --git a/composer.json b/composer.json index 9e878ce..258b145 100644 --- a/composer.json +++ b/composer.json @@ -1,29 +1,26 @@ { - "name": "org_heigl/single-phar-plugin", - "description": "Deploy single phars via composer", + "name": "phar-io/mediator", + "description": "Deploy phars via composer", "type": "composer-plugin", "license": "MIT", "authors": [ { "name": "Andreas Heigl", - "email": "andreas@heigl.org" + "email": "andreas@heigl.org", + "role": "Developer" } ], "require": { "php": "^7.4 || ~8.0.0", - "composer-plugin-api": "^1.1", - "phar-io/single-phar-plugin-base": "^0.1" + "composer-plugin-api": "^1.1||^2.0", + "phar-io/composer-distributor": "^0.2" }, "extra": { - "class": "Org_Heigl\\SinglePharPlugin\\Plugin" + "class": "PharIo\\Mediator\\Plugin" }, "autoload": { "psr-4": { - "Org_Heigl\\SinglePharPlugin\\": "src/" + "PharIo\\Mediator\\": "src/" } - }, - "repositories": [{ - "type": "vcs", - "url": "https://github.com/heiglandreas/singlePharPluginBase" - }] + } } diff --git a/src/Plugin.php b/src/Plugin.php index ab92a1c..c5d05a4 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -1,21 +1,19 @@ + * Copyright The ComposerDistributor-Team * * Licenses under the MIT-license. For details see the included file LICENSE.md */ -namespace Org_Heigl\SinglePharPlugin; +declare(strict_types=1); + +namespace PharIo\Mediator; use Composer\Installer\PackageEvent; -use PharIo\SinglePharPluginBase\File; -use PharIo\SinglePharPluginBase\FileList; -use PharIo\SinglePharPluginBase\PluginBase; -use PharIo\SinglePharPluginBase\Url; -use function var_dump; +use PharIo\ComposerDistributor\File; +use PharIo\ComposerDistributor\FileList; +use PharIo\ComposerDistributor\PluginBase; +use PharIo\ComposerDistributor\Url; class Plugin extends PluginBase {