Skip to content

Commit

Permalink
Upgrade to php 8.2 and fix migration id #4
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Jan 1, 2025
1 parent 4318328 commit b30e1b9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 39 deletions.
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
{
"name": "chokeslam",
"email": "[email protected]"
},
{
"name": "Simon Asika",
"email": "[email protected]"
}
],
"minimum-stability": "beta",
"require": {
"myclabs/php-enum": "^1.8",
"lyrasoft/luna": "^1.0||^2.0"
"php": ">=8.2",
"lyrasoft/luna": "^2.0"
},
"extra": {
"windwalker": {
Expand Down
9 changes: 5 additions & 4 deletions src/Entity/Faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Lyrasoft\Faq\Entity;

use Windwalker\Core\DateTime\ServerTimeCast;
use Windwalker\ORM\Attributes\AutoIncrement;
use Unicorn\Enum\BasicState;
use Windwalker\ORM\Attributes\Cast;
Expand Down Expand Up @@ -62,7 +63,7 @@ class Faq implements EntityInterface
protected int $ordering = 0;

#[Column('created')]
#[CastNullable(Chronos::class)]
#[CastNullable(ServerTimeCast::class)]
#[CreatedTime]
protected ?Chronos $created = null;

Expand All @@ -71,7 +72,7 @@ class Faq implements EntityInterface
protected int $createdBy = 0;

#[Column('modified')]
#[CastNullable(Chronos::class)]
#[CastNullable(ServerTimeCast::class)]
#[CurrentTime]
protected ?Chronos $modified = null;

Expand Down Expand Up @@ -180,7 +181,7 @@ public function getCreated(): ?Chronos

public function setCreated(\DateTimeInterface|string|null $created): static
{
$this->created = Chronos::wrapOrNull($created);
$this->created = Chronos::tryWrap($created);

return $this;
}
Expand All @@ -204,7 +205,7 @@ public function getModified(): ?Chronos

public function setModified(\DateTimeInterface|string|null $modified): static
{
$this->modified = Chronos::wrapOrNull($modified);
$this->modified = Chronos::tryWrap($modified);

return $this;
}
Expand Down
17 changes: 0 additions & 17 deletions src/Module/Admin/Faq/assets/faq-edit.js

This file was deleted.

10 changes: 10 additions & 0 deletions src/Module/Admin/Faq/assets/faq-edit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import u from '@main';

u.$ui.bootstrap.tooltip();

const formId = '#admin-form';

u.formValidation()
.then(() => u.$ui.disableOnSubmit(formId));
u.form(formId).initComponent();
u.$ui.keepAlive(location.href);
16 changes: 0 additions & 16 deletions src/Module/Admin/Faq/assets/faq-list.js

This file was deleted.

9 changes: 9 additions & 0 deletions src/Module/Admin/Faq/assets/faq-list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import u from '@main';

u.$ui.bootstrap.tooltip();

const formId = '#admin-form';

u.grid(formId).initComponent();
u.$ui.disableOnSubmit(formId);
u.$ui.checkboxesMultiSelect(formId);
File renamed without changes.

0 comments on commit b30e1b9

Please sign in to comment.