Skip to content

Commit

Permalink
Change namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwartpet committed Jan 24, 2020
1 parent e2e5bc4 commit b1a8a21
Show file tree
Hide file tree
Showing 28 changed files with 80 additions and 75 deletions.
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lordelph/php-certificate-toolbox",
"name": "zwartpet/php-certificate-toolbox",
"type": "library",
"description": "ACME v2 client for Let's Encrypt",
"keywords": [
Expand All @@ -8,9 +8,14 @@
"LE",
"Certificate"
],
"homepage": "https://github.com/lordelph/php-certificate-toolbox",
"homepage": "https://github.com/zwartpet/php-certificate-toolbox",
"license": "MIT",
"authors": [
{
"name": "John Zwarthoed",
"homepage": "https://github.com/zwartpet",
"role": "Developer"
},
{
"name": "Paul Dixon",
"email": "[email protected]",
Expand Down Expand Up @@ -38,12 +43,12 @@
},
"autoload": {
"psr-4": {
"Elphin\\PHPCertificateToolbox\\": "src"
"Zwartpet\\PHPCertificateToolbox\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Elphin\\PHPCertificateToolbox\\": "tests"
"Zwartpet\\PHPCertificateToolbox\\": "tests"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/CertificateStorageInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

/**
* Interface CertificateStorageInterface
Expand Down
6 changes: 3 additions & 3 deletions src/DNSValidator/DNSOverHTTPS.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
* SOFTWARE.
*/

namespace Elphin\PHPCertificateToolbox\DNSValidator;
namespace Zwartpet\PHPCertificateToolbox\DNSValidator;

use GuzzleHttp\Client;
use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use GuzzleHttp\Exception\BadResponseException;

/**
* DNSOverHTTPS implements DNSValidatorInterface using Google's DNS-over-HTTPS service
* @package Elphin\PHPCertificateToolbox\DNSValidator
* @package Zwartpet\PHPCertificateToolbox\DNSValidator
*/
class DNSOverHTTPS implements DNSValidatorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/DNSValidator/DNSValidatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Elphin\PHPCertificateToolbox\DNSValidator;
namespace Zwartpet\PHPCertificateToolbox\DNSValidator;

/**
* Interface DNSInterface provides a pluggable service for checking DNS challenges. Not only is
* this useful for testing, you can swap in alternative implementations like using DNS-over-HTTPS
*
* @package Elphin\PHPCertificateToolbox\DNSValidator
* @package Zwartpet\PHPCertificateToolbox\DNSValidator
*/
interface DNSValidatorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/DNSValidator/NativeDNS.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Elphin\PHPCertificateToolbox\DNSValidator;
namespace Zwartpet\PHPCertificateToolbox\DNSValidator;

/**
* NativeDNS implements DNSValidatorInterface using locally available DNS services
*
* @package Elphin\PHPCertificateToolbox
* @package Zwartpet\PHPCertificateToolbox
* @codeCoverageIgnore
*/
class NativeDNS implements DNSValidatorInterface
Expand Down
2 changes: 1 addition & 1 deletion src/DiagnosticLogger.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Psr\Log\AbstractLogger;

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/LEClientException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox\Exception;
namespace Zwartpet\PHPCertificateToolbox\Exception;

/**
* This is just a 'marker interface' that all exceptions thrown by LEClient will
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/LogicException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox\Exception;
namespace Zwartpet\PHPCertificateToolbox\Exception;

/**
* Class LogicException represents an integration problem - the code is being used incorrectly
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox\Exception;
namespace Zwartpet\PHPCertificateToolbox\Exception;

/**
* Class RuntimeException is fired for conditions which arise only at runtime, e.g. external services being down
Expand Down
6 changes: 3 additions & 3 deletions src/FilesystemCertificateStorage.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;

/**
* A default storage implementation which stores information in a local filesystem
* @package Elphin\PHPCertificateToolbox
* @package Zwartpet\PHPCertificateToolbox
*/
class FilesystemCertificateStorage implements CertificateStorageInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/LEAccount.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use Psr\Log\LoggerInterface;

/**
Expand Down
14 changes: 7 additions & 7 deletions src/LEAuthorization.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use Psr\Log\LoggerInterface;

/**
Expand All @@ -14,7 +14,7 @@
class LEAuthorization
{
private $connector;

public $authorizationURL;
public $identifier;
public $status;
Expand All @@ -23,7 +23,7 @@ class LEAuthorization

/** @var LoggerInterface */
private $log;

/**
* Initiates the LetsEncrypt Authorization class. Child of a LetsEncrypt Order instance.
*
Expand All @@ -49,11 +49,11 @@ public function __construct($connector, LoggerInterface $log, $authorizationURL)
//@codeCoverageIgnoreEnd
}
}

/**
* Updates the data associated with the current LetsEncrypt Authorization instance.
*/

public function updateData()
{
$get = $this->connector->get($this->authorizationURL);
Expand All @@ -68,7 +68,7 @@ public function updateData()
//@codeCoverageIgnoreEnd
}
}

/**
* Gets the challenge of the given $type for this LetsEncrypt Authorization instance.
* Throws a Runtime Exception if the given $type is not found in this LetsEncrypt Authorization instance.
Expand Down
10 changes: 5 additions & 5 deletions src/LEClient.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\DNSValidator\DNSOverHTTPS;
use Elphin\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Elphin\PHPCertificateToolbox\DNSValidator\NativeDNS;
use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\DNSValidator\DNSOverHTTPS;
use Zwartpet\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Zwartpet\PHPCertificateToolbox\DNSValidator\NativeDNS;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use Psr\Log\LoggerInterface;
Expand Down
8 changes: 4 additions & 4 deletions src/LEConnector.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Psr7\Request;
Expand Down Expand Up @@ -57,7 +57,7 @@ public function __construct(
$baseURL,
CertificateStorageInterface $storage
) {

$this->baseURL = $baseURL;
$this->storage = $storage;
$this->log = $log;
Expand Down
6 changes: 3 additions & 3 deletions src/LEFunctions.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;

/**
* LetsEncrypt Functions class, supplying the LetsEncrypt Client with supportive functions.
Expand Down
12 changes: 6 additions & 6 deletions src/LEOrder.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use Psr\Log\LoggerInterface;

/**
Expand Down Expand Up @@ -51,7 +51,7 @@ class LEOrder

/** @var int size of key (typically 2048 or 4096 for rsa, 256 or 384 for ec */
private $keySize;

/** @var LEConnector ACME API connection provided to constructor */
private $connector;

Expand Down Expand Up @@ -85,7 +85,7 @@ public function __construct(
DNSValidatorInterface $dns,
Sleep $sleep
) {

$this->connector = $connector;
$this->log = $log;
$this->dns = $dns;
Expand Down
2 changes: 1 addition & 1 deletion src/Sleep.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

/**
* In real world use, we want to sleep in between various actions. For testing, not so much.
Expand Down
2 changes: 1 addition & 1 deletion src/TestResponseGenerator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Psr\Http\Message\ResponseInterface;

Expand Down
4 changes: 2 additions & 2 deletions tests/DNSOverHTTPSTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\DNSValidator\DNSOverHTTPS;
use Zwartpet\PHPCertificateToolbox\DNSValidator\DNSOverHTTPS;
use PHPUnit\Framework\TestCase;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/DiagnosticLoggerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use PHPUnit\Framework\TestCase;

Expand Down
6 changes: 3 additions & 3 deletions tests/FilesystemCertificateStorageTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;

/**
* Tests FilesystemCertificateStorage
*
* @package Elphin\PHPCertificateToolbox
* @package Zwartpet\PHPCertificateToolbox
*/
class FilesystemCertificateStorageTest extends LETestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/LEAccountTest.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use Prophecy\Argument;
use Psr\Log\NullLogger;

/**
* Tests LEAccount - because this was retrofitted to a class not really designed for testing, this
* is a litle scrappy at present...
*
* @package Elphin\PHPCertificateToolbox
* @package Zwartpet\PHPCertificateToolbox
*/
class LEAccountTest extends LETestCase
{
Expand Down
8 changes: 4 additions & 4 deletions tests/LEClientTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\DNSValidator\DNSValidatorInterface;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\MockHandler;
Expand All @@ -15,7 +15,7 @@
* This is more of an integration test than a unit test - we mock the actual HTTP requests, but
* the client still interacts with other components
*
* @package Elphin\PHPCertificateToolbox
* @package Zwartpet\PHPCertificateToolbox
*/
class LEClientTest extends LETestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/LEConnectorTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Elphin\PHPCertificateToolbox;
namespace Zwartpet\PHPCertificateToolbox;

use Elphin\PHPCertificateToolbox\Exception\LogicException;
use Elphin\PHPCertificateToolbox\Exception\RuntimeException;
use Zwartpet\PHPCertificateToolbox\Exception\LogicException;
use Zwartpet\PHPCertificateToolbox\Exception\RuntimeException;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\TransferException;
Expand Down
Loading

0 comments on commit b1a8a21

Please sign in to comment.