Skip to content

Commit

Permalink
Rename to Mediator
Browse files Browse the repository at this point in the history
During a videosession Arne, Sebastian and myself decided to call this
template-project "Mediator".
  • Loading branch information
heiglandreas committed Nov 6, 2020
1 parent a0a0824 commit 47d83ef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright Andreas Heigl <andreas@heigl.org>
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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,15 +8,15 @@ 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
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.
Expand Down
21 changes: 9 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
}]
}
}
18 changes: 8 additions & 10 deletions src/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<?php

declare(strict_types=1);

/**
* Copyright Andrea Heigl <andreas@heigl.org>
* 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
{
Expand Down

0 comments on commit 47d83ef

Please sign in to comment.