Skip to content

Commit 0ff9958

Browse files
committed
Adds MotD and Message model as well as tests
This commit adds the MotD model for storing and retrieving messages-of-the-day. It also adds a model for messages. Messages have an author as well as a thread they belong to, the thread can be read by a specific number of authors. FUrthermore, the message model supports system messages. This commit introduces a number of needed changes: - Character is now implementing the CharacterInterface - MissingCharacter and SystemCharacter are supporting "pseudo-characters" - trait MockCharacter implements non-implemented methods for MissingCharacter and SytemCharacter - Characters are now soft-deletable. Models wanting to load soft-deleted characters need to fetch them eagerly. Closes #17
1 parent 53d8264 commit 0ff9958

37 files changed

+1662
-85
lines changed

bootstrap/bootstrap.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$autoloader = require __DIR__ . "/../vendor/autoload.php";
3+
$autoloader = require __DIR__ . "/../vendor/autoload.php";
4+
5+
\date_default_timezone_set("UTC");

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
},
88
"require": {
99
"monolog/monolog": "1.16.0",
10-
"doctrine/orm": "2.5.*"
10+
"doctrine/orm": "2.5.*",
11+
"gedmo/doctrine-extensions": "*"
1112
},
1213
"require-dev": {
1314
"phpunit/phpunit": "*",

composer.lock

+142-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Exceptions/ArgumentEmptyException.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/**
77
* Exception if a specific, required argument is missing
88
*/
9-
class ArgumentEmptyException extends CoreException {
9+
class ArgumentEmptyException extends ArgumentException
10+
{
1011

1112
}

src/Exceptions/ArgumentException.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace LotGD\Core\Exceptions;
5+
6+
/**
7+
* Exception if a specific, required argument is missing
8+
*/
9+
class ArgumentException extends CoreException
10+
{
11+
12+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace LotGD\Core\Exceptions;
5+
6+
/**
7+
* Exception if a specific combination of model values is invalid.
8+
*/
9+
class InvalidModelException extends CoreException
10+
{
11+
12+
}

src/Exceptions/IsNullException.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace LotGD\Core\Exceptions;
5+
6+
/**
7+
* Exception if a specific, required argument is missing
8+
*/
9+
class IsNullException extends CoreException {
10+
11+
}

0 commit comments

Comments
 (0)