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

Switch from MySQL to MySQLi #5

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Composer directory
vendor/

# $_ENV config overloading
.env

# This is a library
composer.lock
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,35 @@
Ohanzee is a set of PHP components that are dependency free, PSR compatible, and well documented. The design is guided by SOLID, DRY, and KISS (the SDK) philosophies.

Many were originally part of the Kohana PHP Framework.

# Testing

```
composer install --dev
phpunit --bootstrap=vendor/autoload.php tests
```

The default database connection details are:

- hostname: localhost
- database: ohanzee
- username: ohanzee
- password: (empty)

These values can be modified by creating a `.env` file in the root of the project:

```ini
PHPUNIT_TEST_HOSTNAME=server
PHPUNIT_TEST_DATABASE=testing
PHPUNIT_TEST_USERNAME=jane
PHPUNIT_TEST_PASSWORD=likesblue
```

The `.env` file is a standard ini file and will be loaded using [dotenv](https://github.com/vlucas/phpdotenv).

Any of the parameters can also be passed directly on the commandline:

```
PHPUNIT_TEST_USERNAME=joe PHPUNIT_TEST_PASSWORD=likesgreen \
phpunit --bootstrap=vendor/autoload.php tests
```
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@
},
"autoload": {
"psr-0": { "": "src/" }
},
"require-dev": {
"phpunit/phpunit": "4.2.*",
"vlucas/phpdotenv": "~1.0"
}
}
2 changes: 1 addition & 1 deletion config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(
'default' => array
(
'type' => 'MySQL',
'type' => 'MySQLi',
'connection' => array(
/**
* The following options are available for MySQL:
Expand Down
98 changes: 0 additions & 98 deletions src/Database/MySQL/Result.php

This file was deleted.

Loading