Skip to content

Commit 7e6eb7e

Browse files
authored
Merge pull request #18 from codeigniter4/namespace
Namespace
2 parents 43230fa + aa353fe commit 7e6eb7e

File tree

12 files changed

+17
-15
lines changed

12 files changed

+17
-15
lines changed

UPGRADING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
## Version 1 to 2
44
***
55

6+
* The namespace has been migrated from `Sparks\Settings` to `CodeIgniter\Settings`; any references will need to be updated.
67
* Due to the addition of contexts the `BaseHandler` abstract class was changed. Update any handlers that extend this class to include the new and changed methods.
8+
* The main library (`Settings`) now requires a Settings config for the constructor (this is supplied by the Service); update any direct calls to the library constructor.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"autoload": {
3535
"psr-4": {
36-
"Sparks\\Settings\\": "src"
36+
"CodeIgniter\\Settings\\": "src"
3737
},
3838
"exclude-from-classmap": [
3939
"**/Database/Migrations/**"

src/Config/Services.php

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

3-
namespace Sparks\Settings\Config;
3+
namespace CodeIgniter\Settings\Config;
44

55
use CodeIgniter\Config\BaseService;
6-
use Sparks\Settings\Config\Settings as SettingsConfig;
7-
use Sparks\Settings\Settings;
6+
use CodeIgniter\Settings\Config\Settings as SettingsConfig;
7+
use CodeIgniter\Settings\Settings;
88

99
/**
1010
* Services Configuration file.

src/Config/Settings.php

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

3-
namespace Sparks\Settings\Config;
3+
namespace CodeIgniter\Settings\Config;
44

5-
use Sparks\Settings\Handlers\DatabaseHandler;
5+
use CodeIgniter\Settings\Handlers\DatabaseHandler;
66

77
class Settings
88
{

src/Database/Migrations/2021-07-04-041948_CreateSettingsTable.php

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

3-
namespace Sparks\Settings\Database\Migrations;
3+
namespace CodeIgniter\Settings\Database\Migrations;
44

55
use CodeIgniter\Database\Migration;
66

src/Database/Migrations/2021-11-14-143905_AddContextColumn.php

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

3-
namespace Sparks\Settings\Database\Migrations;
3+
namespace CodeIgniter\Settings\Database\Migrations;
44

55
use CodeIgniter\Database\Migration;
66

src/Handlers/BaseHandler.php

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

3-
namespace Sparks\Settings\Handlers;
3+
namespace CodeIgniter\Settings\Handlers;
44

55
use RuntimeException;
66

src/Handlers/DatabaseHandler.php

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

3-
namespace Sparks\Settings\Handlers;
3+
namespace CodeIgniter\Settings\Handlers;
44

55
use CodeIgniter\I18n\Time;
66
use RuntimeException;

src/Settings.php

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

3-
namespace Sparks\Settings;
3+
namespace CodeIgniter\Settings;
44

5+
use CodeIgniter\Settings\Config\Settings as SettingsConfig;
56
use InvalidArgumentException;
67
use RuntimeException;
7-
use Sparks\Settings\Config\Settings as SettingsConfig;
88

99
/**
1010
* Allows developers a single location to store and

tests/HelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace CodeIgniter4\Tests;
44

55
use CodeIgniter\I18n\Time;
6+
use CodeIgniter\Settings\Settings;
67
use CodeIgniter\Test\DatabaseTestTrait;
7-
use Sparks\Settings\Settings;
88
use Tests\Support\TestCase;
99

1010
/**

0 commit comments

Comments
 (0)