This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
forked from azerothcore/WoWSimpleRegistration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df7c405
commit 3345f8d
Showing
216 changed files
with
12,627 additions
and
7,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"require": { | ||
"voku/anti-xss": "^4.1", | ||
"phpunit/php-timer": "^2.0", | ||
"rmccue/requests": "^1.7", | ||
"phpmailer/phpmailer": "^6.0", | ||
"gregwar/captcha": "^1.1", | ||
"catfan/medoo": "^1.6", | ||
"phpunit/php-timer": "^6.0", | ||
"rmccue/requests": "^2.0", | ||
"phpmailer/phpmailer": "^6.9", | ||
"gregwar/captcha": "^1.2", | ||
"catfan/medoo": "^2.1", | ||
"phpgangsta/googleauthenticator": "dev-master" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
open_collective: medoo | ||
custom: ["https://paypal.me/AngelaonLai"] |
16 changes: 10 additions & 6 deletions
16
application/vendor/catfan/medoo/.github/ISSUE_TEMPLATE/bug_report.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Information** | ||
- Version of Medoo: | ||
- Version of PHP: | ||
- Type of Database (MySQL, MSSQL, SQLite...): | ||
- System (Liunx\Windows\Mac): | ||
- System (Liunx|Windows|Mac): | ||
|
||
**Describe the Problem** | ||
A clear and concise description of what the problem is. | ||
|
||
**Detail Code** | ||
The detail code causes the problem. | ||
The detail code you are using causes the problem. | ||
```php | ||
// Write your PHP code here | ||
|
||
``` | ||
|
||
**Expected output** | ||
A clear and concise description of what output you expected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: ['7.3', '7.4', '8.2'] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/[email protected] | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run test suite | ||
run: composer run-script test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
$config = new PhpCsFixer\Config(); | ||
|
||
$config | ||
->setRules([ | ||
'@PSR2' => true, | ||
'@PSR12' => true, | ||
'array_syntax' => ['syntax' => 'short'] | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src') | ||
->in(__DIR__ . '/tests') | ||
) | ||
; | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,38 +3,39 @@ | |
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/catfan/Medoo/actions"><img alt="Build Status" src="https://github.com/catfan/Medoo/actions/workflows/php.yml/badge.svg"></a> | ||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="Total Downloads" src="https://poser.pugx.org/catfan/medoo/downloads"></a> | ||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="Latest Stable Version" src="https://poser.pugx.org/catfan/medoo/v/stable"></a> | ||
<a href="https://packagist.org/packages/catfan/medoo"><img alt="License" src="https://poser.pugx.org/catfan/medoo/license"></a> | ||
<a href="https://opencollective.com/medoo"><img alt="Backers on Open Collective" src="https://opencollective.com/Medoo/backers/badge.svg"></a> | ||
<a href="https://opencollective.com/medoo"><img alt="Sponsors on Open Collective" src="https://opencollective.com/Medoo/sponsors/badge.svg"> </a> | ||
</p> | ||
|
||
> The lightweight PHP database framework to accelerate development | ||
> The lightweight PHP database framework to accelerate development. | ||
## Features | ||
|
||
* **Lightweight** - Less than 100 KB, portable with only one file | ||
* **Lightweight** - Portable with only one file. | ||
|
||
* **Easy** - Extremely easy to learn and use, friendly construction | ||
* **Easy** - Easy to learn and use, with a friendly construction. | ||
|
||
* **Powerful** - Supports various common and complex SQL queries, data mapping, and prevent SQL injection | ||
* **Powerful** - Supports various common and complex SQL queries, data mapping and prevents SQL injection. | ||
|
||
* **Compatible** - Supports all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle and more | ||
* **Compatible** - Supports MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle, and more. | ||
|
||
* **Friendly** - Works well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension or composer | ||
* **Friendly** - Works well with every PHP framework, such as Laravel, Codeigniter, Yii, Slim, and frameworks that support singleton extension or composer. | ||
|
||
* **Free** - Under MIT license, you can use it anywhere whatever you want | ||
* **Free** - Under the MIT license, you can use it anywhere, for whatever purpose. | ||
|
||
## Requirement | ||
## Requirements | ||
|
||
PHP 5.4+ and PDO extension installed, recommend PHP 7.0+ | ||
PHP 7.3+ and installed PDO extension. | ||
|
||
## Get Started | ||
|
||
### Install via composer | ||
|
||
Add Medoo to composer.json configuration file. | ||
Add Medoo to the composer.json configuration file. | ||
``` | ||
$ composer require catfan/medoo | ||
``` | ||
|
@@ -45,22 +46,21 @@ $ composer update | |
``` | ||
|
||
```php | ||
// If you installed via composer, just use this code to require autoloader on the top of your projects. | ||
// Require Composer's autoloader. | ||
require 'vendor/autoload.php'; | ||
|
||
// Using Medoo namespace | ||
// Use the Medoo namespace. | ||
use Medoo\Medoo; | ||
|
||
// Initialize | ||
// Connect to the database. | ||
$database = new Medoo([ | ||
'database_type' => 'mysql', | ||
'database_name' => 'name', | ||
'server' => 'localhost', | ||
'type' => 'mysql', | ||
'host' => 'localhost', | ||
'database' => 'name', | ||
'username' => 'your_username', | ||
'password' => 'your_password' | ||
]); | ||
|
||
// Enjoy | ||
$database->insert('account', [ | ||
'user_name' => 'foo', | ||
'email' => '[email protected]' | ||
|
@@ -75,28 +75,37 @@ $data = $database->select('account', [ | |
|
||
echo json_encode($data); | ||
|
||
// [ | ||
// { | ||
// "user_name" : "foo", | ||
// "email" : "[email protected]", | ||
// } | ||
// ] | ||
// [{ | ||
// "user_name" : "foo", | ||
// "email" : "[email protected]", | ||
// }] | ||
``` | ||
|
||
## Contribution Guides | ||
|
||
For most of time, Medoo is using develop branch for adding feature and fixing bug, and the branch will be merged into master branch while releasing a public version. For contribution, submit your code to the develop branch, and start a pull request into it. | ||
Before starting a new pull request, please ensure compatibility with other databases and write unit tests whenever possible. | ||
|
||
On develop branch, each commits are started with `[fix]`, `[feature]` or `[update]` tag to indicate the change. | ||
Run `phpunit tests` for unit testing and `php-cs-fixer fix` to fix code style. | ||
|
||
Keep it simple and keep it clear. | ||
Each commit should start with a tag indicating the type of change: `[fix]`, `[feature]`, or `[update]`. | ||
|
||
Please keep it simple and keep it clear. | ||
|
||
## License | ||
|
||
Medoo is under the MIT license. | ||
Medoo is released under the MIT license. | ||
|
||
## Links | ||
|
||
* Official website: [https://medoo.in](https://medoo.in) | ||
|
||
* Documentation: [https://medoo.in/doc](https://medoo.in/doc) | ||
* Documentation: [https://medoo.in/doc](https://medoo.in/doc) | ||
|
||
* Twitter: [https://twitter.com/MedooPHP](https://twitter.com/MedooPHP) | ||
|
||
* Open Collective: [https://opencollective.com/medoo](https://opencollective.com/medoo) | ||
|
||
## Support Our Other Product | ||
[Gear Browser - Web Browser for Geek](https://gear4.app) | ||
|
||
[](https://gear4.app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheResultFile=".phpunit.cache/test-results" | ||
executionOrder="depends,defects" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
verbose="true"> | ||
<testsuites> | ||
<testsuite name="Medoo Test Suite"> | ||
<directory suffix="Test.php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage cacheDirectory=".phpunit.cache/code-coverage" | ||
processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
</phpunit> |
Oops, something went wrong.