Merge branch 'develop' into feature/ci
This commit is contained in:
commit
96d3261f25
25 changed files with 74 additions and 77 deletions
|
@ -21,13 +21,13 @@ In order to read/write objects from a database table, you'll need to configure a
|
|||
// DriverFactory::factory() has the same arguments as PDO::__construct
|
||||
// You can also construct a driver directly, from a class in Drivers,
|
||||
// but for common databases DriverFactory::factory should pick the right class
|
||||
$driver = \Digraph\DriverFactory::factory(
|
||||
$driver = \Destructr\DriverFactory::factory(
|
||||
'mysql:host=127.0.0.1',
|
||||
'username',
|
||||
'password'
|
||||
);
|
||||
// Driver is then used to construct a Factory
|
||||
$factory = new \Digraph\Destructr\Factory(
|
||||
$factory = new \Destructr\Factory(
|
||||
$driver, //driver is used to manage connection and generate queries
|
||||
'dso_objects' //all of a Factory's data is stored in a single table
|
||||
);
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Digraph\\Destructr\\": "src/"
|
||||
"Destructr\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Digraph\\Destructr\\": "tests/"
|
||||
"Destructr\\": "tests/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
use \Digraph\FlatArray\FlatArray;
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr
|
||||
https://github.com/digraphcms/destructr
|
||||
MIT License
|
||||
Copyright (c) 2018 Joby Elliott <joby@byjoby.com> */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
interface DSOFactoryInterface
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
use Digraph\FlatArray\FlatArrayInterface;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
class DriverFactory
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\Drivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\Drivers;
|
||||
|
||||
use Digraph\Destructr\DSOInterface;
|
||||
use Digraph\Destructr\Search;
|
||||
use Destructr\DSOInterface;
|
||||
use Destructr\Search;
|
||||
|
||||
//TODO: Caching? It should happen somewhere in this class I think.
|
||||
abstract class AbstractDriver implements DSODriverInterface
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\Drivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\Drivers;
|
||||
|
||||
use Digraph\Destructr\DSOInterface;
|
||||
use Digraph\Destructr\Search;
|
||||
use Destructr\DSOInterface;
|
||||
use Destructr\Search;
|
||||
|
||||
interface DSODriverInterface
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\Drivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\Drivers;
|
||||
|
||||
/**
|
||||
* What this driver supports: MySQL and MariaDB databases new enough to support
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
use mofodojodino\ProfanityFilter\Check;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\LegacyDrivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\LegacyDrivers;
|
||||
|
||||
use Digraph\Destructr\Drivers\AbstractDriver;
|
||||
use Digraph\Destructr\DSOInterface;
|
||||
use Digraph\Destructr\Factory;
|
||||
use Digraph\Destructr\Search;
|
||||
use Destructr\Drivers\AbstractDriver;
|
||||
use Destructr\DSOInterface;
|
||||
use Destructr\Factory;
|
||||
use Destructr\Search;
|
||||
use Digraph\FlatArray\FlatArray;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\LegacyDrivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\LegacyDrivers;
|
||||
|
||||
/**
|
||||
* What this driver supports: MySQL 5.6, as long as you have permissions to
|
||||
|
|
|
@ -20,7 +20,7 @@ The things many of this sort of driver will *not* ever support:
|
|||
|
||||
### SQLite 3
|
||||
|
||||
**\Digraph\Destructr\LegacyDrivers\SQLiteDriver**
|
||||
**\Destructr\LegacyDrivers\SQLiteDriver**
|
||||
|
||||
**Overall support level: Highly functional, a touch slow**
|
||||
|
||||
|
@ -41,7 +41,7 @@ using SQLite if you don't have access to a fully supported database version.
|
|||
|
||||
### MySQL 5.6
|
||||
|
||||
**\Digraph\Destructr\LegacyDrivers\MySQL56Driver**
|
||||
**\Destructr\LegacyDrivers\MySQL56Driver**
|
||||
|
||||
**Overall support level: Decent performance, highly suspect accuracy**
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr\LegacyDrivers;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr\LegacyDrivers;
|
||||
|
||||
use Digraph\Destructr\DSOInterface;
|
||||
use Destructr\DSOInterface;
|
||||
use Digraph\FlatArray\FlatArray;
|
||||
use Digraph\Destructr\Factory;
|
||||
use Destructr\Factory;
|
||||
|
||||
/**
|
||||
* What this driver supports: Version of SQLite3 in PHP environments that allow
|
||||
|
@ -27,7 +27,7 @@ class SQLiteDriver extends AbstractLegacyDriver
|
|||
*/
|
||||
$this->pdo->sqliteCreateFunction(
|
||||
'DESTRUCTR_JSON_EXTRACT',
|
||||
'\\Digraph\\Destructr\\LegacyDrivers\\SQLiteDriver::JSON_EXTRACT',
|
||||
'\\Destructr\\LegacyDrivers\\SQLiteDriver::JSON_EXTRACT',
|
||||
2
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
use Digraph\Destructr\DSOFactoryInterface;
|
||||
use Digraph\Destructr\Drivers\DSODriverInterface;
|
||||
use Destructr\DSOFactoryInterface;
|
||||
use Destructr\Drivers\DSODriverInterface;
|
||||
|
||||
class Search implements \Serializable
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr;
|
||||
namespace Destructr;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\Drivers;
|
||||
namespace Destructr\Drivers;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\DbUnit\TestCaseTrait;
|
||||
use Digraph\Destructr\DSO;
|
||||
use Digraph\Destructr\Search;
|
||||
use Destructr\DSO;
|
||||
use Destructr\Search;
|
||||
|
||||
/**
|
||||
* This class tests a factory in isolation. In the name of simplicity it's a bit
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\Drivers\IntegrationTests;
|
||||
namespace Destructr\Drivers\IntegrationTests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\DbUnit\TestCaseTrait;
|
||||
use Digraph\Destructr\DSO;
|
||||
use Digraph\Destructr\Search;
|
||||
use Digraph\Destructr\Factory;
|
||||
use Destructr\DSO;
|
||||
use Destructr\Search;
|
||||
use Destructr\Factory;
|
||||
|
||||
abstract class AbstractDriverIntegrationTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\Drivers\IntegrationTests;
|
||||
namespace Destructr\Drivers\IntegrationTests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class MySQLDriverTest extends AbstractDriverIntegrationTest
|
||||
{
|
||||
const DRIVER_CLASS = \Digraph\Destructr\Drivers\MySQLDriver::class;
|
||||
const DRIVER_CLASS = \Destructr\Drivers\MySQLDriver::class;
|
||||
const DRIVER_DSN = 'mysql:host=127.0.0.1;dbname=phpunit';
|
||||
const DRIVER_USERNAME = 'travis';
|
||||
const DRIVER_PASSWORD = null;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\Drivers;
|
||||
namespace Destructr\Drivers;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr;
|
||||
namespace Destructr;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
namespace Digraph\Destructr;
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
namespace Destructr;
|
||||
|
||||
class HarnessDriver implements Drivers\DSODriverInterface
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\LegacyDrivers\IntegrationTests;
|
||||
namespace Destructr\LegacyDrivers\IntegrationTests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Digraph\Destructr\Drivers\IntegrationTests\AbstractDriverIntegrationTest;
|
||||
use Digraph\Destructr\LegacyDrivers\SQLiteDriver;
|
||||
use Destructr\Drivers\IntegrationTests\AbstractDriverIntegrationTest;
|
||||
use Destructr\LegacyDrivers\SQLiteDriver;
|
||||
|
||||
class MySQLDriverTest extends AbstractDriverIntegrationTest
|
||||
{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\LegacyDrivers;
|
||||
namespace Destructr\LegacyDrivers;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Digraph\Destructr\Drivers\AbstractDriverTest;
|
||||
use Destructr\Drivers\AbstractDriverTest;
|
||||
|
||||
class MySQL56DriverTest extends AbstractDriverTest
|
||||
{
|
||||
const DRIVER_CLASS = \Digraph\Destructr\LegacyDrivers\MySQL56Driver::class;
|
||||
const DRIVER_CLASS = \Destructr\LegacyDrivers\MySQL56Driver::class;
|
||||
const DRIVER_DSN = 'mysql:host=127.0.0.1;dbname=phpunit';
|
||||
const DRIVER_USERNAME = 'travis';
|
||||
const DRIVER_PASSWORD = null;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/* Digraph CMS: Destructr | https://github.com/digraphcms/destructr | MIT License */
|
||||
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
|
||||
declare(strict_types=1);
|
||||
namespace Digraph\Destructr\LegacyDrivers;
|
||||
namespace Destructr\LegacyDrivers;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Digraph\Destructr\Drivers\AbstractDriverTest;
|
||||
use Destructr\Drivers\AbstractDriverTest;
|
||||
|
||||
class SQLiteDriverTest extends AbstractDriverTest
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue