Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.x #90

Merged
merged 2 commits into from
Apr 30, 2024
Merged

V4.x #90

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
operating-system: [ 'ubuntu-latest', 'ubuntu-20.04', 'ubuntu-22.04' ]
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
Expand All @@ -28,4 +28,4 @@ jobs:
- name: Install dependencies
run: composer install --no-dev --ignore-platform-reqs --no-progress --prefer-dist --optimize-autoloader
#- name: Test PHP Package Database
# run: php ./sample/test/test.php
# run: php ./sample/test/test.php
96 changes: 48 additions & 48 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"name": "nguyenanhung/database",
"type": "library",
"description": "Database Wrapper - Base Model",
"keywords": [
"database",
"sql",
"mysql",
"mysqli",
"pdo",
"active record",
"query buillder"
],
"homepage": "https://github.com/nguyenanhung/database",
"license": "GPL-3.0",
"authors": [
{
"name": "Nguyen An Hung",
"email": "[email protected]",
"homepage": "https://nguyenanhung.com",
"role": "Developer"
}
],
"require": {
"php": "^8.0 || ^7.0",
"ext-json": "*",
"ext-pdo": "*",
"ext-mysqli": "*",
"nguyenanhung/my-debug": "^4.0 || ^3.0",
"nguyenanhung/pdo": "^3.0",
"nguyenanhung/mysqli": "^3.0",
"nguyenanhung/database-helper": "^2.0",
"illuminate/events": "^11.0 || ^10.0 || ^9.0 || ^8.61",
"illuminate/database": "^11.0 || ^10.0 || ^9.0 || ^8.61"
},
"require-dev": {
"kint-php/kint": ">=3.0"
},
"autoload": {
"psr-4": {
"nguyenanhung\\MyDatabase\\": "src/"
}
},
"suggest": {
"ext-json": "Needed to support JSON",
"ext-pdo": "Needed to support PDO",
"ext-mysqli": "Needed to support MySQLi",
"sentry/sdk": "Need support for Logging with Sentry"
}
"name": "nguyenanhung/database",
"type": "library",
"description": "Database Wrapper - Base Model",
"keywords": [
"database",
"sql",
"mysql",
"mysqli",
"pdo",
"active record",
"query buillder"
],
"homepage": "https://github.com/nguyenanhung/database",
"license": "GPL-3.0",
"authors": [
{
"name": "Nguyen An Hung",
"email": "[email protected]",
"homepage": "https://nguyenanhung.com",
"role": "Developer"
}
],
"require": {
"php": "^8.0 || ^7.0",
"ext-json": "*",
"ext-pdo": "*",
"ext-mysqli": "*",
"nguyenanhung/my-debug": "^4.0 || ^3.0",
"nguyenanhung/pdo": "^3.0",
"nguyenanhung/mysqli": "^3.0",
"nguyenanhung/database-helper": "^2.0",
"illuminate/events": "^11.0 || ^10.0 || ^9.0 || ^8.61",
"illuminate/database": "^11.0 || ^10.0 || ^9.0 || ^8.61"
},
"require-dev": {
"kint-php/kint": ">=3.0"
},
"autoload": {
"psr-4": {
"nguyenanhung\\MyDatabase\\": "src/"
}
},
"suggest": {
"ext-json": "Needed to support JSON",
"ext-pdo": "Needed to support PDO",
"ext-mysqli": "Needed to support MySQLi",
"sentry/sdk": "Need support for Logging with Sentry"
}
}
36 changes: 18 additions & 18 deletions sample/config/example_backup_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
* Time: 00:23
*/
return [
'development' => [
'type' => 'mysql',
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'pass' => '',
'database' => 'my_database_development',
'singleTransaction' => false
],
'production' => [
'type' => 'mysql',
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'pass' => '',
'database' => 'my_database_production',
'singleTransaction' => false
],
'development' => [
'type' => 'mysql',
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'pass' => '',
'database' => 'my_database_development',
'singleTransaction' => false
],
'production' => [
'type' => 'mysql',
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'pass' => '',
'database' => 'my_database_production',
'singleTransaction' => false
],
];
112 changes: 56 additions & 56 deletions sample/config/example_backup_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,60 @@
* Time: 00:23
*/
return [
'local' => [
'type' => 'Local',
'root' => testBackupPath()
],
's3' => [
'type' => 'AwsS3',
'key' => '',
'secret' => '',
'region' => 'us-east-1',
'version' => 'latest',
'bucket' => '',
'root' => '',
],
'gcs' => [
'type' => 'Gcs',
'key' => '',
'secret' => '',
'version' => 'latest',
'bucket' => '',
'root' => '',
],
'rackspace' => [
'type' => 'Rackspace',
'username' => '',
'password' => '',
'container' => '',
],
'dropbox' => [
'type' => 'Dropbox',
'token' => '',
'key' => '',
'secret' => '',
'app' => '',
'root' => '',
],
'ftp' => [
'type' => 'Ftp',
'host' => '',
'username' => '',
'password' => '',
'root' => '',
'port' => 21,
'passive' => true,
'ssl' => true,
'timeout' => 30,
],
'sftp' => [
'type' => 'Sftp',
'host' => '',
'username' => '',
'password' => '',
'root' => '',
'port' => 21,
'timeout' => 10,
'privateKey' => '',
],
'local' => [
'type' => 'Local',
'root' => testBackupPath()
],
's3' => [
'type' => 'AwsS3',
'key' => '',
'secret' => '',
'region' => 'us-east-1',
'version' => 'latest',
'bucket' => '',
'root' => '',
],
'gcs' => [
'type' => 'Gcs',
'key' => '',
'secret' => '',
'version' => 'latest',
'bucket' => '',
'root' => '',
],
'rackspace' => [
'type' => 'Rackspace',
'username' => '',
'password' => '',
'container' => '',
],
'dropbox' => [
'type' => 'Dropbox',
'token' => '',
'key' => '',
'secret' => '',
'app' => '',
'root' => '',
],
'ftp' => [
'type' => 'Ftp',
'host' => '',
'username' => '',
'password' => '',
'root' => '',
'port' => 21,
'passive' => true,
'ssl' => true,
'timeout' => 30,
],
'sftp' => [
'type' => 'Sftp',
'host' => '',
'username' => '',
'password' => '',
'root' => '',
'port' => 21,
'timeout' => 10,
'privateKey' => '',
],
];
16 changes: 8 additions & 8 deletions sample/config/example_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* Time: 00:23
*/
return [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
];
38 changes: 19 additions & 19 deletions sample/config/example_db_codeigniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
* Time: 00:23
*/
return [
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'my_password',
'database' => 'my_database',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => false,
'db_debug' => true,
'cache_on' => false,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => false,
'compress' => false,
'stricton' => false,
'failover' => array(),
'save_queries' => true
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'my_password',
'database' => 'my_database',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => false,
'db_debug' => true,
'cache_on' => false,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => false,
'compress' => false,
'stricton' => false,
'failover' => array(),
'save_queries' => true
];
14 changes: 7 additions & 7 deletions sample/config/example_db_mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* Time: 00:23
*/
return [
'host' => 'host',
'port' => 3306,
'username' => 'username',
'password' => 'password',
'db' => 'databaseName',
'prefix' => 'my_',
'charset' => 'utf8'
'host' => 'host',
'port' => 3306,
'username' => 'username',
'password' => 'password',
'db' => 'databaseName',
'prefix' => 'my_',
'charset' => 'utf8'
];
16 changes: 8 additions & 8 deletions sample/test/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
use nguyenanhung\MyDatabase\Model\BaseModel;

$database = [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'test_database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'test_database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
];

$model = new BaseModel();
Expand Down
Loading
Loading