update namespace

This commit is contained in:
2022-10-27 19:15:19 +02:00
parent fc87625a72
commit be37f608d0
23 changed files with 102 additions and 102 deletions

View File

@@ -30,9 +30,9 @@ This library requires *PHP* in `>=8.1` version.
Parsing configuration string: Parsing configuration string:
```php ```php
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Parser; use Envoyr\NginxConfigurator\Parser;
require 'vendor/autoload.php'; require 'vendor/autoload.php';
@@ -84,12 +84,12 @@ if (count($defaultServers) > 0) {
Generating configuration string: Generating configuration string:
```php ```php
use Madkom\NginxConfigurator\Factory; use Envoyr\NginxConfigurator\Factory;
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
@@ -170,12 +170,12 @@ server {
There are also methods to read and dump file: There are also methods to read and dump file:
```php ```php
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Parser; use Envoyr\NginxConfigurator\Parser;
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';

View File

@@ -16,12 +16,12 @@ if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
); );
} }
use Madkom\NginxConfigurator\Command\AddLocationCommand; use Envoyr\NginxConfigurator\Command\AddLocationCommand;
use Madkom\NginxConfigurator\Command\AddServerCommand; use Envoyr\NginxConfigurator\Command\AddServerCommand;
use Madkom\NginxConfigurator\Command\AddUpstreamServerCommand; use Envoyr\NginxConfigurator\Command\AddUpstreamServerCommand;
use Madkom\NginxConfigurator\Command\RemoveLocationCommand; use Envoyr\NginxConfigurator\Command\RemoveLocationCommand;
use Madkom\NginxConfigurator\Command\RemoveServerCommand; use Envoyr\NginxConfigurator\Command\RemoveServerCommand;
use Madkom\NginxConfigurator\Command\RemoveUpstreamServerCommand; use Envoyr\NginxConfigurator\Command\RemoveUpstreamServerCommand;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;

View File

@@ -1,11 +1,11 @@
<?php <?php
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Factory; use Envoyr\NginxConfigurator\Factory;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';

View File

@@ -1,9 +1,9 @@
<?php <?php
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Node\Node; use Envoyr\NginxConfigurator\Node\Node;
use Madkom\NginxConfigurator\Parser; use Envoyr\NginxConfigurator\Parser;
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';

View File

@@ -8,14 +8,14 @@
namespace Envoyr\NginxConfigurator; namespace Envoyr\NginxConfigurator;
use Countable; use Countable;
use Madkom\Collection\CustomTypedCollection; use Envoyr\Collection\CustomTypedCollection;
use Madkom\NginxConfigurator\Node\Node; use Envoyr\NginxConfigurator\Node\Node;
use Madkom\NginxConfigurator\Node\RootNode; use Envoyr\NginxConfigurator\Node\RootNode;
use Traversable; use Traversable;
/** /**
* Class Builder * Class Builder
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Builder implements Countable class Builder implements Countable

View File

@@ -7,12 +7,12 @@
*/ */
namespace Envoyr\NginxConfigurator\Config; namespace Envoyr\NginxConfigurator\Config;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
/** /**
* Class Events * Class Events
* @package Madkom\NginxConfigurator\Config * @package Envoyr\NginxConfigurator\Config
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Events extends Context class Events extends Context

View File

@@ -7,12 +7,12 @@
*/ */
namespace Envoyr\NginxConfigurator\Config; namespace Envoyr\NginxConfigurator\Config;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
/** /**
* Class Http * Class Http
* @package Madkom\NginxConfigurator\Config * @package Envoyr\NginxConfigurator\Config
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Http extends Context class Http extends Context

View File

@@ -7,13 +7,13 @@
*/ */
namespace Envoyr\NginxConfigurator\Config; namespace Envoyr\NginxConfigurator\Config;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
/** /**
* Class Location * Class Location
* @package Madkom\NginxConfigurator\Config * @package Envoyr\NginxConfigurator\Config
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Location extends Context class Location extends Context

View File

@@ -7,11 +7,11 @@
*/ */
namespace Envoyr\NginxConfigurator\Config; namespace Envoyr\NginxConfigurator\Config;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
/** /**
* Class Server * Class Server
* @package Madkom\NginxConfigurator\Config * @package Envoyr\NginxConfigurator\Config
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Server extends Context class Server extends Context

View File

@@ -7,13 +7,13 @@
*/ */
namespace Envoyr\NginxConfigurator\Config; namespace Envoyr\NginxConfigurator\Config;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
/** /**
* Class Upstream * Class Upstream
* @package Madkom\NginxConfigurator\Config * @package Envoyr\NginxConfigurator\Config
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Upstream extends Context class Upstream extends Context

View File

@@ -11,7 +11,7 @@ use Exception;
/** /**
* Class GrammarException * Class GrammarException
* @package Madkom\NginxConfigurator\Exception * @package Envoyr\NginxConfigurator\Exception
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class GrammarException extends Exception class GrammarException extends Exception

View File

@@ -11,7 +11,7 @@ use Exception;
/** /**
* Class UnrecognizedContextException * Class UnrecognizedContextException
* @package Madkom\NginxConfigurator\Exception * @package Envoyr\NginxConfigurator\Exception
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class UnrecognizedContextException extends Exception class UnrecognizedContextException extends Exception

View File

@@ -7,14 +7,14 @@
*/ */
namespace Envoyr\NginxConfigurator; namespace Envoyr\NginxConfigurator;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
/** /**
* Class Factory * Class Factory
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Factory class Factory

View File

@@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node;
/** /**
* Class Context * Class Context
* @package Madkom\NginxConfigurator\Node * @package Envoyr\NginxConfigurator\Node
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
abstract class Context extends Node abstract class Context extends Node

View File

@@ -7,12 +7,12 @@
*/ */
namespace Envoyr\NginxConfigurator\Node; namespace Envoyr\NginxConfigurator\Node;
use Madkom\Collection\CustomTypedCollection; use Envoyr\Collection\CustomTypedCollection;
use Traversable; use Traversable;
/** /**
* Class Directive * Class Directive
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Directive extends Node class Directive extends Node

View File

@@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node;
/** /**
* Class Literal * Class Literal
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Literal extends Param class Literal extends Param

View File

@@ -9,12 +9,12 @@ namespace Envoyr\NginxConfigurator\Node;
use Countable; use Countable;
use IteratorAggregate; use IteratorAggregate;
use Madkom\Collection\CustomTypedCollection; use Envoyr\Collection\CustomTypedCollection;
use Traversable; use Traversable;
/** /**
* Class Node * Class Node
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
abstract class Node implements Countable, IteratorAggregate abstract class Node implements Countable, IteratorAggregate

View File

@@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node;
/** /**
* Class Param * Class Param
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Param class Param

View File

@@ -9,7 +9,7 @@ namespace Envoyr\NginxConfigurator\Node;
/** /**
* Class RootNode * Class RootNode
* @package Madkom\NginxConfigurator\node * @package Envoyr\NginxConfigurator\node
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class RootNode extends Node class RootNode extends Node

View File

@@ -15,22 +15,22 @@ use Ferno\Loco\LazyAltParser;
use Ferno\Loco\ParseFailureException; use Ferno\Loco\ParseFailureException;
use Ferno\Loco\RegexParser; use Ferno\Loco\RegexParser;
use Ferno\Loco\StringParser; use Ferno\Loco\StringParser;
use Madkom\NginxConfigurator\Config\Events; use Envoyr\NginxConfigurator\Config\Events;
use Madkom\NginxConfigurator\Config\Http; use Envoyr\NginxConfigurator\Config\Http;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Config\Upstream; use Envoyr\NginxConfigurator\Config\Upstream;
use Madkom\NginxConfigurator\Exception\GrammarException; use Envoyr\NginxConfigurator\Exception\GrammarException;
use Madkom\NginxConfigurator\Exception\UnrecognizedContextException; use Envoyr\NginxConfigurator\Exception\UnrecognizedContextException;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
use Madkom\NginxConfigurator\Node\RootNode; use Envoyr\NginxConfigurator\Node\RootNode;
/** /**
* Class Parser * Class Parser
* @package Madkom\NginxConfigurator * @package Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
*/ */
class Parser extends Grammar class Parser extends Grammar

View File

@@ -1,15 +1,15 @@
<?php <?php
namespace spec\Madkom\NginxConfigurator; namespace spec\Envoyr\NginxConfigurator;
use Madkom\NginxConfigurator\Builder; use Envoyr\NginxConfigurator\Builder;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Config\Upstream; use Envoyr\NginxConfigurator\Config\Upstream;
use PhpSpec\ObjectBehavior; use PhpSpec\ObjectBehavior;
use Prophecy\Argument; use Prophecy\Argument;
/** /**
* Class BuilderSpec * Class BuilderSpec
* @package spec\Madkom\NginxConfigurator * @package spec\Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
* @mixin Builder * @mixin Builder
*/ */

View File

@@ -1,15 +1,15 @@
<?php <?php
namespace spec\Madkom\NginxConfigurator; namespace spec\Envoyr\NginxConfigurator;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Factory; use Envoyr\NginxConfigurator\Factory;
use PhpSpec\ObjectBehavior; use PhpSpec\ObjectBehavior;
use Prophecy\Argument; use Prophecy\Argument;
/** /**
* Class FactorySpec * Class FactorySpec
* @package spec\Madkom\NginxConfigurator * @package spec\Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
* @mixin Factory * @mixin Factory
*/ */

View File

@@ -1,19 +1,19 @@
<?php <?php
namespace spec\Madkom\NginxConfigurator; namespace spec\Envoyr\NginxConfigurator;
use Ferno\Loco\ParseFailureException; use Ferno\Loco\ParseFailureException;
use Madkom\NginxConfigurator\Config\Http; use Envoyr\NginxConfigurator\Config\Http;
use Madkom\NginxConfigurator\Config\Location; use Envoyr\NginxConfigurator\Config\Location;
use Madkom\NginxConfigurator\Config\Server; use Envoyr\NginxConfigurator\Config\Server;
use Madkom\NginxConfigurator\Config\Upstream; use Envoyr\NginxConfigurator\Config\Upstream;
use Madkom\NginxConfigurator\Node\Context; use Envoyr\NginxConfigurator\Node\Context;
use Madkom\NginxConfigurator\Node\Directive; use Envoyr\NginxConfigurator\Node\Directive;
use Madkom\NginxConfigurator\Node\Literal; use Envoyr\NginxConfigurator\Node\Literal;
use Madkom\NginxConfigurator\Node\Node; use Envoyr\NginxConfigurator\Node\Node;
use Madkom\NginxConfigurator\Node\Param; use Envoyr\NginxConfigurator\Node\Param;
use Madkom\NginxConfigurator\Node\RootNode; use Envoyr\NginxConfigurator\Node\RootNode;
use Madkom\NginxConfigurator\Parser; use Envoyr\NginxConfigurator\Parser;
use PhpSpec\ObjectBehavior; use PhpSpec\ObjectBehavior;
use PHPUnit_Framework_Assert as Assert; use PHPUnit_Framework_Assert as Assert;
use Prophecy\Argument; use Prophecy\Argument;
@@ -21,7 +21,7 @@ use Traversable;
/** /**
* Class ParserSpec * Class ParserSpec
* @package spec\Madkom\NginxConfigurator * @package spec\Envoyr\NginxConfigurator
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl> * @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
* @mixin Parser * @mixin Parser
*/ */