-
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.
Merge pull request #9 from verbanent/feature/custom-column-name
Allowed custom column name for primary key
- Loading branch information
Showing
40 changed files
with
495 additions
and
133 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,2 +1,5 @@ | ||
FROM php:fpm-buster | ||
RUN pecl install xdebug && docker-php-ext-enable xdebug | ||
FROM php:8-cli-alpine | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\ | ||
php composer-setup.php &&\ | ||
php -r "unlink('composer-setup.php');" &&\ | ||
mv composer.phar /usr/local/bin/composer |
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,9 +1,9 @@ | ||
version: "3.3" | ||
services: | ||
php: | ||
ebu_php: | ||
build: . | ||
container_name: php | ||
container_name: ebu_php | ||
restart: unless-stopped | ||
tty: true | ||
volumes: | ||
- .:/var/www/html | ||
- ./docker/xdebug-local.ini:/usr/local/etc/php/conf.d/xdebug-local.ini |
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ | |
|
||
class AccessedUnsetUuidPropertyException extends \RuntimeException | ||
{ | ||
// | ||
} |
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
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
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 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example; | ||
|
||
use Verbanent\Uuid\AbstractModel; | ||
|
||
/** | ||
* Example class for traits tests. | ||
*/ | ||
class AbstractExampleUuidModel extends AbstractModel | ||
{ | ||
/** | ||
* Table name. | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'model_test_uuid'; | ||
|
||
/** | ||
* Create rows in table without timestamps. | ||
* | ||
* @var bool | ||
*/ | ||
public $timestamps = false; | ||
|
||
/** | ||
* Column name for primary key. | ||
* | ||
* @var string | ||
*/ | ||
protected $primaryKey = 'uuid'; | ||
|
||
/** | ||
* Allow to fill UUID column. | ||
* | ||
* @var array | ||
*/ | ||
protected $fillable = ['uuid']; | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\Binary; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleUuidModel; | ||
|
||
/** | ||
* Cat model. | ||
*/ | ||
class CatUuidModel extends AbstractExampleUuidModel | ||
{ | ||
// | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\Binary; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleUuidModel; | ||
|
||
/** | ||
* Cow model. | ||
*/ | ||
class CowUuidModel extends AbstractExampleUuidModel | ||
{ | ||
// | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\Binary; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleUuidModel; | ||
|
||
/** | ||
* Dog model. | ||
*/ | ||
class DogUuidModel extends AbstractExampleUuidModel | ||
{ | ||
// | ||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\Binary; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleUuidModel; | ||
|
||
/** | ||
* Horse model. | ||
*/ | ||
class HorseUuidModel extends AbstractExampleUuidModel | ||
{ | ||
// | ||
} |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\BinaryId; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleIdModel; | ||
|
||
/** | ||
* Cat model. | ||
*/ | ||
class CatIdModel extends AbstractExampleIdModel | ||
{ | ||
// | ||
} |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\BinaryId; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleIdModel; | ||
|
||
/** | ||
* Cow model. | ||
*/ | ||
class CowIdModel extends AbstractExampleIdModel | ||
{ | ||
protected $fillable = ['id']; | ||
} |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\BinaryId; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleIdModel; | ||
|
||
/** | ||
* Dog model. | ||
*/ | ||
class DogIdModel extends AbstractExampleIdModel | ||
{ | ||
// | ||
} |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Verbanent\Uuid\Test\Example\BinaryId; | ||
|
||
use Verbanent\Uuid\Test\Example\AbstractExampleIdModel; | ||
|
||
/** | ||
* Horse model. | ||
*/ | ||
class HorseIdModel extends AbstractExampleIdModel | ||
{ | ||
// | ||
} |
Oops, something went wrong.