Skip to content

Commit 5d71652

Browse files
committed
refactor!: rename namespace from hisorange to Pataar
BREAKING CHANGE: The root namespace has changed from `hisorange\BrowserDetect` to `Pataar\BrowserDetect`. Update all `use` statements, service provider references, and `vendor:publish` commands. - Rename namespace in all source and test files - Update PSR-4 autoload mappings in composer.json - Update Laravel auto-discovery provider and alias - Update code examples in README - Replace "hisorange" keyword with "pataar" in composer.json - Keep original author attribution in composer.json, README credits, and historical GitHub issue links
1 parent 6746327 commit 5d71652

26 files changed

Lines changed: 76 additions & 76 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if (Browser::isAndroid()) {
7474
### Standalone (without Laravel)
7575

7676
```php
77-
use hisorange\BrowserDetect\Parser as Browser;
77+
use Pataar\BrowserDetect\Parser as Browser;
7878

7979
if (Browser::isLinux()) {
8080
// Works without Laravel!
@@ -144,13 +144,13 @@ Results are cached in memory for the current request and optionally persisted vi
144144
In Laravel, publish the config file:
145145

146146
```sh
147-
php artisan vendor:publish --provider="hisorange\BrowserDetect\ServiceProvider"
147+
php artisan vendor:publish --provider="Pataar\BrowserDetect\ServiceProvider"
148148
```
149149

150150
In standalone mode, pass a custom config array:
151151

152152
```php
153-
use hisorange\BrowserDetect\Parser;
153+
use Pataar\BrowserDetect\Parser;
154154

155155
$browser = new Parser(null, null, [
156156
'cache' => [

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"tablet",
1111
"user agent",
1212
"analyse",
13-
"hisorange"
13+
"pataar"
1414
],
1515
"homepage": "https://github.com/pataar/browser-detect",
1616
"license": "MIT",
@@ -37,22 +37,22 @@
3737
},
3838
"autoload": {
3939
"psr-4": {
40-
"hisorange\\BrowserDetect\\": "src/"
40+
"Pataar\\BrowserDetect\\": "src/"
4141
}
4242
},
4343
"autoload-dev": {
4444
"psr-4": {
45-
"hisorange\\BrowserDetect\\Test\\": "tests/"
45+
"Pataar\\BrowserDetect\\Test\\": "tests/"
4646
}
4747
},
4848
"minimum-stability": "stable",
4949
"extra": {
5050
"laravel": {
5151
"providers": [
52-
"hisorange\\BrowserDetect\\ServiceProvider"
52+
"Pataar\\BrowserDetect\\ServiceProvider"
5353
],
5454
"aliases": {
55-
"Browser": "hisorange\\BrowserDetect\\Facade"
55+
"Browser": "Pataar\\BrowserDetect\\Facade"
5656
}
5757
}
5858
},

src/Contracts/ParserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Contracts;
3+
namespace Pataar\BrowserDetect\Contracts;
44

55
/**
66
* Interface ParserInterface

src/Contracts/PayloadInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Contracts;
3+
namespace Pataar\BrowserDetect\Contracts;
44

55
interface PayloadInterface
66
{

src/Contracts/ResultInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Contracts;
3+
namespace Pataar\BrowserDetect\Contracts;
44

55
use JsonSerializable;
66

src/Contracts/StageInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Contracts;
3+
namespace Pataar\BrowserDetect\Contracts;
44

55
interface StageInterface
66
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Exceptions;
3+
namespace Pataar\BrowserDetect\Exceptions;
44

55
class BadMethodCallException extends Exception {}

src/Exceptions/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect\Exceptions;
3+
namespace Pataar\BrowserDetect\Exceptions;
44

55
class Exception extends \Exception {}

src/Facade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect;
3+
namespace Pataar\BrowserDetect;
44

55
use Illuminate\Support\Facades\Facade as BaseFacade;
66

src/Parser.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace hisorange\BrowserDetect;
3+
namespace Pataar\BrowserDetect;
44

5-
use hisorange\BrowserDetect\Contracts\ParserInterface;
6-
use hisorange\BrowserDetect\Contracts\ResultInterface;
7-
use hisorange\BrowserDetect\Contracts\StageInterface;
8-
use hisorange\BrowserDetect\Exceptions\BadMethodCallException;
5+
use Pataar\BrowserDetect\Contracts\ParserInterface;
6+
use Pataar\BrowserDetect\Contracts\ResultInterface;
7+
use Pataar\BrowserDetect\Contracts\StageInterface;
8+
use Pataar\BrowserDetect\Exceptions\BadMethodCallException;
99
use Illuminate\Cache\CacheManager;
1010
use Illuminate\Http\Request;
1111

0 commit comments

Comments
 (0)