Skip to content

Commit

Permalink
Rename project to ComposerDistributor
Browse files Browse the repository at this point in the history
We decided to call the project ComposerDistributor during a video-session with
Arne, Sebastian and myself before moving it over to phar.io
  • Loading branch information
heiglandreas committed Nov 6, 2020
1 parent 720a9b7 commit bfbca6e
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 103 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 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
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ this base-code and distribute your PHAR file via composer.
Create your own Composer-Plugin via

```bash
composer create-project org_heigl/single-phar-plugin /path/to/your/directory/
composer create-project phario/mediator /path/to/your/directory/
```

Then you can replace the placeholders within `src/Plugin.php` as well as in the
Expand Down
17 changes: 13 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phar-io/single-phar-plugin-base",
"description": "Base Code for a composer plugin that installs a single PHAR-file",
"name": "phar-io/composer-distributor",
"description": "Base Code for a composer plugin that installs PHAR-files",
"type": "library",
"license": "MIT",
"authors": [
Expand All @@ -10,14 +10,23 @@
"role": "Developer"
}
],
"keywords": ["phar","composer","binary","bin","distribute","phive"],
"homepage": "https://phar.io",
"support": {
"issues": "https://github.com/phar-io/composer-distributor/issues"
},
"funding": [{
"type": "other",
"url": "https://phar.io"
}],
"autoload": {
"psr-4": {
"PharIo\\SinglePharPluginBase\\": "src/"
"PharIo\\ComposerDistributor\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PharIo\\SinglePharPluginBaseTest\\": "tests/"
"PharIo\\ComposerDistributorTest\\": "tests/"
}
},
"require": {
Expand Down
9 changes: 4 additions & 5 deletions src/File.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

final class File
{
Expand Down
9 changes: 4 additions & 5 deletions src/FileList.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use Iterator;

Expand Down
6 changes: 4 additions & 2 deletions src/IteratorImplementation.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use function current;
use function key;
Expand Down
9 changes: 4 additions & 5 deletions src/KeyDirectory.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use DirectoryIterator;
use Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Exception;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use RuntimeException;

Expand Down
9 changes: 6 additions & 3 deletions src/PackageVersion.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
/**
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

declare(strict_types=1);

Expand All @@ -8,14 +13,12 @@
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
namespace PharIo\ComposerDistributor;

use Composer\DependencyResolver\GenericRule;
use Composer\Installer\PackageEvent;
use Composer\Package\CompletePackage;
use Composer\Semver\Constraint\MultiConstraint;
use Composer\Semver\Semver;
use PharIo\SinglePharPluginBase\Exception\SomebodyElsesProblem;
use Throwable;

final class PackageVersion
Expand Down
11 changes: 5 additions & 6 deletions src/PluginBase.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use Composer\Composer;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\Installer\PackageEvent;
use Composer\Installer\PackageEvents;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
use PharIo\SinglePharPluginBase\Service\Installer;
use PharIo\ComposerDistributor\Service\Installer;
use SplFileInfo;

abstract class PluginBase implements PluginInterface, EventSubscriberInterface
Expand Down
10 changes: 4 additions & 6 deletions src/SemanticVersion.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use PharIo\SinglePharPluginBase\Exception\NoSemanticVersioning;
use function explode;
use function is_numeric;

Expand Down
11 changes: 5 additions & 6 deletions src/Service/Download.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Service;
declare(strict_types=1);

namespace PharIo\ComposerDistributor\Service;

use PharIo\SinglePharPluginBase\Url;
use PharIo\ComposerDistributor\Url;
use SplFileInfo;
use function feof;
use function fwrite;
Expand Down
21 changes: 10 additions & 11 deletions src/Service/Installer.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Service;
declare(strict_types=1);

namespace PharIo\ComposerDistributor\Service;

use Composer\Installer\PackageEvent;
use Composer\IO\IOInterface;
use PharIo\FileSystem\Directory;
use PharIo\GnuPG\Factory;
use PharIo\SinglePharPluginBase\Exception\SomebodyElsesProblem;
use PharIo\SinglePharPluginBase\File;
use PharIo\SinglePharPluginBase\FileList;
use PharIo\SinglePharPluginBase\KeyDirectory;
use PharIo\SinglePharPluginBase\PackageVersion;
use PharIo\SinglePharPluginBase\Url;
use PharIo\ComposerDistributor\SomebodyElsesProblem;
use PharIo\ComposerDistributor\File;
use PharIo\ComposerDistributor\FileList;
use PharIo\ComposerDistributor\KeyDirectory;
use PharIo\ComposerDistributor\PackageVersion;
use PharIo\ComposerDistributor\Url;
use RuntimeException;
use SplFileInfo;
use function chmod;
Expand Down
11 changes: 5 additions & 6 deletions src/Service/Verify.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Service;
declare(strict_types=1);

namespace PharIo\ComposerDistributor\Service;

use GnuPG;
use PharIo\SinglePharPluginBase\KeyDirectory;
use PharIo\ComposerDistributor\KeyDirectory;
use SplFileInfo;
use function array_filter;
use function count;
Expand Down
11 changes: 5 additions & 6 deletions src/Service/VersionConstraintReplacer.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Service;
declare(strict_types=1);

namespace PharIo\ComposerDistributor\Service;

use PharIo\SinglePharPluginBase\PackageVersion;
use PharIo\ComposerDistributor\PackageVersion;

final class VersionConstraintReplacer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase\Exception;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use RuntimeException;

Expand Down
9 changes: 4 additions & 5 deletions src/Url.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

namespace PharIo\SinglePharPluginBase;
declare(strict_types=1);

namespace PharIo\ComposerDistributor;

use RuntimeException;
use function parse_url;
Expand Down
7 changes: 3 additions & 4 deletions tests/GnuPG.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?php

declare(strict_types=1);

/**
* Copyright Andreas Heigl <[email protected]>
* Copyright by the ComposerDistributor-Team
*
* Licenses under the MIT-license. For details see the included file LICENSE.md
*/

declare(strict_types=1);

if (! class_exists(\GnuPG::class)) {


Expand Down
Loading

0 comments on commit bfbca6e

Please sign in to comment.