Skip to content

Commit b501fc2

Browse files
committed
modify namespace
1 parent 1b63304 commit b501fc2

8 files changed

+20
-20
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## install
55

66
```
7-
composer require reactphp-framework/orm -vvv
7+
composer require reactphp-x/orm -vvv
88
```
99

1010

@@ -13,8 +13,8 @@ composer require reactphp-framework/orm -vvv
1313
```
1414
require __DIR__.'/vendor/autoload.php';
1515
16-
use Reactphp\Framework\Orm\AsyncMysqlConnector;
17-
use Reactphp\Framework\Orm\AsyncMysqlConnection;
16+
use ReactphpX\Orm\AsyncMysqlConnector;
17+
use ReactphpX\Orm\AsyncMysqlConnection;
1818
use Illuminate\Container\Container;
1919
use Illuminate\Database\Capsule\Manager as DB;
2020
use Illuminate\Database\Connection;

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name":"reactphp-framework/orm",
2+
"name":"reactphp-x/orm",
33
"description": "A database OMR for ReactPHP based on illuminate/database and react/mysql packages",
44
"keywords": ["reactphp", "react", "mysql", "orm", "database", "illuminate"],
55
"license": "MIT",
@@ -11,13 +11,13 @@
1111
],
1212
"require": {
1313
"php": "^8.1",
14-
"reactphp-framework/mysql-pool": "^1.0",
14+
"reactphp-x/mysql-pool": "^1.0",
1515
"react/async": "^4 || ^3 || ^2",
1616
"illuminate/database": "^11.19"
1717
},
1818
"autoload": {
1919
"psr-4": {
20-
"Reactphp\\Framework\\Orm\\": "src"
20+
"ReactphpX\\Orm\\": "src"
2121
}
2222
}
2323
}

examples/base.php

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

33
require __DIR__.'/../vendor/autoload.php';
44

5-
use Reactphp\Framework\Orm\AsyncMysqlConnector;
6-
use Reactphp\Framework\Orm\AsyncMysqlConnection;
5+
use ReactphpX\Orm\AsyncMysqlConnector;
6+
use ReactphpX\Orm\AsyncMysqlConnection;
77
use Illuminate\Container\Container;
88
use Illuminate\Database\Capsule\Manager as DB;
99
use Illuminate\Database\Connection;

src/AsyncMysqlConnection.php

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

3-
namespace Reactphp\Framework\Orm;
3+
namespace ReactphpX\Orm;
44

55
use Illuminate\Database\Connection;
66
use Closure;
@@ -176,7 +176,7 @@ protected function prepared(PDOStatement $statement)
176176
* Get the PDO connection to use for a select query.
177177
*
178178
* @param bool $useReadPdo
179-
* @return \Reactphp\Framework\MySQL\Pool;
179+
* @return \ReactphpX\MySQL\Pool;
180180
*/
181181
protected function getPdoForSelect($useReadPdo = true)
182182
{
@@ -335,7 +335,7 @@ public function beginTransaction()
335335
throw new Exception("no connection");
336336
}
337337

338-
if (!($this->getPdo() instanceof \Reactphp\Framework\MySQL\Pool)) {
338+
if (!($this->getPdo() instanceof \ReactphpX\MySQL\Pool)) {
339339
throw new Exception("had in transaction");
340340
}
341341

@@ -351,7 +351,7 @@ public function beginTransaction()
351351

352352
public function commit()
353353
{
354-
if ($this->getPdo() && !($this->getPdo() instanceof \Reactphp\Framework\MySQL\Pool)) {
354+
if ($this->getPdo() && !($this->getPdo() instanceof \ReactphpX\MySQL\Pool)) {
355355
\React\Async\await($this->getPdo()->query('COMMIT'));
356356
DB::getPdo()->releaseConnection($this->getPdo());
357357
} else {
@@ -371,7 +371,7 @@ public function commit()
371371
*/
372372
public function rollBack($toLevel = null)
373373
{
374-
if ($this->getPdo() && !($this->getPdo() instanceof \Reactphp\Framework\MySQL\Pool)) {
374+
if ($this->getPdo() && !($this->getPdo() instanceof \ReactphpX\MySQL\Pool)) {
375375
\React\Async\await($this->getPdo()->query('ROLLBACK'));
376376
DB::getPdo()->releaseConnection($this->getPdo());
377377
} else {

src/AsyncMysqlConnector.php

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

3-
namespace Reactphp\Framework\Orm;
3+
namespace ReactphpX\Orm;
44

5-
use Reactphp\Framework\MySQL\Pool;
5+
use ReactphpX\MySQL\Pool;
66
use Illuminate\Database\Connectors\ConnectorInterface;
77

88
class AsyncMysqlConnector implements ConnectorInterface

src/Exception.php

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

3-
namespace Reactphp\Framework\Orm;
3+
namespace ReactphpX\Orm;
44

55
class Exception extends \Exception
66
{

src/MySqlProcessor.php

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

3-
namespace Reactphp\Framework\Orm;
3+
namespace ReactphpX\Orm;
44

55
use Illuminate\Database\Query\Processors\MySqlProcessor as BaseMySqlProcessor;
66
use Illuminate\Database\Query\Builder;

src/Providers/ServiceProvider.php

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

3-
namespace Reactphp\Framework\Orm\Providers;
3+
namespace ReactphpX\Orm\Providers;
44

55
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
66
use Illuminate\Database\Connection;
7-
use Reactphp\Framework\Orm\AsyncMysqlConnection;
8-
use Reactphp\Framework\Orm\AsyncMysqlConnector;
7+
use ReactphpX\Orm\AsyncMysqlConnection;
8+
use ReactphpX\Orm\AsyncMysqlConnector;
99

1010
class ServiceProvider extends BaseServiceProvider
1111
{

0 commit comments

Comments
 (0)