Skip to content

Commit 730686c

Browse files
authored
Merge pull request #150 from mailerlite/feature/different-namespace
feat: different namespace
2 parents 3d87123 + 6c447c6 commit 730686c

22 files changed

+63
-78
lines changed

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The package's service provider will automatically register its service provider.
4444
Publish the configuration file:
4545

4646
```sh
47-
php artisan vendor:publish --provider="mailerlite\LaravelElasticsearch\ServiceProvider"
47+
php artisan vendor:publish --provider="Mailerlite\LaravelElasticsearch\ServiceProvider"
4848
```
4949

5050
##### Alternative configuration method via .env file
@@ -155,7 +155,7 @@ If you are using `php artisan config:cache`, you cannot have the Closure in your
155155
If you work with Lumen, please register the service provider and configuration in `bootstrap/app.php`:
156156

157157
```php
158-
$app->register(mailerlite\LaravelElasticsearch\ServiceProvider::class);
158+
$app->register(Mailerlite\LaravelElasticsearch\ServiceProvider::class);
159159
$app->configure('elasticsearch');
160160
```
161161

@@ -206,7 +206,7 @@ Lumen users who wish to use Facades can do so by editing the
206206
```php
207207
$app->withFacades(true, [
208208
...
209-
mailerlite\LaravelElasticsearch\Facade::class => 'Elasticsearch',
209+
Mailerlite\LaravelElasticsearch\Facade::class => 'Elasticsearch',
210210
...
211211
]);
212212
```
@@ -216,7 +216,7 @@ or the application container in order to get the ES service object:
216216

217217
```php
218218
// using injection:
219-
public function handle(\mailerlite\LaravelElasticsearch\Manager $elasticsearch)
219+
public function handle(\Mailerlite\LaravelElasticsearch\Manager $elasticsearch)
220220
{
221221
$elasticsearch->ping();
222222
}
@@ -354,6 +354,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute changes.
354354

355355
[laravel-elasticsearch](https://github.com/mailerlite/laravel-elasticsearch)
356356
was written thanks to [Colin Viebrock](http://viebrock.ca) and is released under the
357-
[MIT License](LICENSE.md). It is being maintained and developed by [MailerLite](https://www.mailerlite.com
357+
[MIT License](LICENSE.md). It is being maintained and developed by [MailerLite](https://www.mailerlite.com)
358358

359359
Copyright (c) 2023 MailerLite

Diff for: composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
},
3535
"autoload": {
3636
"psr-4": {
37-
"mailerlite\\LaravelElasticsearch\\": "src"
37+
"MailerLite\\LaravelElasticsearch\\": "src"
3838
}
3939
},
4040
"autoload-dev": {
4141
"psr-4": {
42-
"mailerlite\\LaravelElasticsearch\\Tests\\": "tests"
42+
"MailerLite\\LaravelElasticsearch\\Tests\\": "tests"
4343
}
4444
},
4545
"scripts": {
@@ -55,10 +55,10 @@
5555
"extra": {
5656
"laravel": {
5757
"providers": [
58-
"mailerlite\\LaravelElasticsearch\\ServiceProvider"
58+
"Mailerlite\\LaravelElasticsearch\\ServiceProvider"
5959
],
6060
"aliases": {
61-
"Elasticsearch": "mailerlite\\LaravelElasticsearch\\Facade"
61+
"Elasticsearch": "Mailerlite\\LaravelElasticsearch\\Facade"
6262
}
6363
}
6464
},
@@ -67,4 +67,4 @@
6767
"config": {
6868
"sort-packages": true
6969
}
70-
}
70+
}

Diff for: src/Console/Command/AliasCreateCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Throwable;
1010

11-
1211
final class AliasCreateCommand extends Command
1312
{
14-
1513
/**
1614
* @var string
1715
*/

Diff for: src/Console/Command/AliasRemoveIndexCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Throwable;
1010

11-
1211
final class AliasRemoveIndexCommand extends Command
1312
{
14-
1513
/**
1614
* @var string
1715
*/

Diff for: src/Console/Command/AliasSwitchIndexCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Throwable;
1010

11-
1211
final class AliasSwitchIndexCommand extends Command
1312
{
14-
1513
/**
1614
* @var string
1715
*/

Diff for: src/Console/Command/IndexCreateCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Throwable;
1010

11-
1211
final class IndexCreateCommand extends Command
1312
{
14-
1513
/**
1614
* @var string
1715
*/

Diff for: src/Console/Command/IndexCreateOrUpdateMappingCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Illuminate\Contracts\Filesystem\Filesystem;
1010
use Throwable;
1111

12-
1312
final class IndexCreateOrUpdateMappingCommand extends Command
1413
{
15-
1614
/**
1715
* @var string
1816
*/

Diff for: src/Console/Command/IndexDeleteCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99
use Throwable;
1010

11-
1211
final class IndexDeleteCommand extends Command
1312
{
14-
1513
/**
1614
* @var string
1715
*/

Diff for: src/Console/Command/IndexExistsCommand.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Console\Command;
66

77
use Elasticsearch\Client;
88
use Illuminate\Console\Command;
99

10-
1110
final class IndexExistsCommand extends Command
1211
{
13-
1412
/**
1513
* @var string
1614
*/

Diff for: src/Facade.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<?php namespace Cviebrock\LaravelElasticsearch;
1+
<?php
22

3-
use Illuminate\Support\Facades\Facade as BaseFacade;
3+
namespace MailerLite\LaravelElasticsearch;
44

5+
use Illuminate\Support\Facades\Facade as BaseFacade;
56

67
/**
78
* Class Facade
89
*
9-
* @package Cviebrock\LaravelElasticsearch
10+
* @package MailerLite\LaravelElasticsearch
1011
*/
1112
class Facade extends BaseFacade
1213
{
13-
1414
/**
1515
* @inheritdoc
1616
*/

Diff for: src/Factory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Cviebrock\LaravelElasticsearch;
3+
namespace MailerLite\LaravelElasticsearch;
44

55
use Elasticsearch\Client;
66
use Elasticsearch\ClientBuilder;
@@ -17,7 +17,6 @@
1717

1818
class Factory
1919
{
20-
2120
/**
2221
* Map configuration array keys with ES ClientBuilder setters
2322
*

Diff for: src/Manager.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<?php namespace Cviebrock\LaravelElasticsearch;
1+
<?php
2+
3+
namespace MailerLite\LaravelElasticsearch;
24

35
use Elasticsearch\Client;
46
use Illuminate\Contracts\Container\Container;
57
use Illuminate\Support\Arr;
68

7-
89
/**
910
* Class Manager
1011
*
11-
* @package Cviebrock\LaravelElasticsearch
12+
* @package MailerLite\LaravelElasticsearch
1213
*/
1314
class Manager
1415
{
15-
1616
/**
1717
* The application instance.
1818
*
@@ -23,7 +23,7 @@ class Manager
2323
/**
2424
* The Elasticsearch connection factory instance.
2525
*
26-
* @var \Cviebrock\LaravelElasticsearch\Factory
26+
* @var \MailerLite\LaravelElasticsearch\Factory
2727
*/
2828
protected $factory;
2929

@@ -36,7 +36,7 @@ class Manager
3636

3737
/**
3838
* @param \Illuminate\Contracts\Container\Container $app
39-
* @param \Cviebrock\LaravelElasticsearch\Factory $factory
39+
* @param \MailerLite\LaravelElasticsearch\Factory $factory
4040
*/
4141
public function __construct(Container $app, Factory $factory)
4242
{

Diff for: src/ServiceProvider.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
<?php namespace Cviebrock\LaravelElasticsearch;
1+
<?php
22

3-
use Cviebrock\LaravelElasticsearch\Console\Command\AliasCreateCommand;
4-
use Cviebrock\LaravelElasticsearch\Console\Command\AliasRemoveIndexCommand;
5-
use Cviebrock\LaravelElasticsearch\Console\Command\AliasSwitchIndexCommand;
6-
use Cviebrock\LaravelElasticsearch\Console\Command\IndexCreateCommand;
7-
use Cviebrock\LaravelElasticsearch\Console\Command\IndexCreateOrUpdateMappingCommand;
8-
use Cviebrock\LaravelElasticsearch\Console\Command\IndexDeleteCommand;
9-
use Cviebrock\LaravelElasticsearch\Console\Command\IndexExistsCommand;
3+
namespace MailerLite\LaravelElasticsearch;
4+
5+
use MailerLite\LaravelElasticsearch\Console\Command\AliasCreateCommand;
6+
use MailerLite\LaravelElasticsearch\Console\Command\AliasRemoveIndexCommand;
7+
use MailerLite\LaravelElasticsearch\Console\Command\AliasSwitchIndexCommand;
8+
use MailerLite\LaravelElasticsearch\Console\Command\IndexCreateCommand;
9+
use MailerLite\LaravelElasticsearch\Console\Command\IndexCreateOrUpdateMappingCommand;
10+
use MailerLite\LaravelElasticsearch\Console\Command\IndexDeleteCommand;
11+
use MailerLite\LaravelElasticsearch\Console\Command\IndexExistsCommand;
1012
use Elasticsearch\Client;
1113
use Illuminate\Container\Container;
1214
use Illuminate\Foundation\Application as LaravelApplication;
1315
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
1416
use Laravel\Lumen\Application as LumenApplication;
1517

16-
1718
/**
1819
* Class ServiceProvider
1920
*
20-
* @package Cviebrock\LaravelElasticsearch
21+
* @package MailerLite\LaravelElasticsearch
2122
*/
2223
class ServiceProvider extends BaseServiceProvider
2324
{
24-
2525
/**
2626
* Bootstrap the application services.
2727
*/

Diff for: tests/Console/Command/AliasCreateCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

Diff for: tests/Console/Command/AliasRemoveIndexCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

Diff for: tests/Console/Command/AliasSwitchIndexCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

Diff for: tests/Console/Command/IndexCreateCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

Diff for: tests/Console/Command/IndexCreateOrUpdateMappingCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

Diff for: tests/Console/Command/IndexDeleteCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Cviebrock\LaravelElasticsearch\Tests\Console\Command;
5+
namespace MailerLite\LaravelElasticsearch\Tests\Console\Command;
66

7-
use Cviebrock\LaravelElasticsearch\Tests\TestCase;
7+
use MailerLite\LaravelElasticsearch\Tests\TestCase;
88
use Elasticsearch\Client;
99
use Elasticsearch\Namespaces\IndicesNamespace;
1010
use Exception;

0 commit comments

Comments
 (0)