refactor: Cleanup git state - commit all staged changes

Major refactoring cleanup:
- Add new controller architecture (class-controller-*.php)
- Add new settings-v2 UI (views/settings-v2/)
- Add new CSS architecture (agentic-sidebar.css, tokens)
- Add esbuild build pipeline (scripts/build.js, package.json)
- Add composer dependencies (vendor/)
- Add frontend src directory (assets/js/src/index.jsx)
- Add documentation files
- Remove old/obsolete files (class-settings.php, old CSS)

This commits all pending changes from previous refactoring efforts.
This commit is contained in:
Dwindi Ramadhana
2026-06-17 05:27:58 +07:00
parent d3f142222c
commit 690991c526
7963 changed files with 941566 additions and 67372 deletions

View File

@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);
class AsymmetricAccessor
{
private(set) \Pizza $pizza;
}

View File

@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
class AsymmetricPropertyPromotion
{
public function __construct(
protected(set) Pizza $pizza,
) {}
}

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace PHP84;
interface HasId
{
public int $id { get; }
}
interface HasName
{
public string $name { get; set; }
}

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
class PropertyHook
{
private bool $modified = false;
/** @var string this is my property */
#[Property(new DateTimeImmutable())]
public string $example = 'default value' {
/** Not sure this works, but it gets */
#[Getter(new DateTimeImmutable())]
get {
if ($this->modified) {
return $this->foo . ' (modified)';
}
return $this->foo;
}
/** Not sure this works, but it sets */
#[Setter(new DateTimeImmutable())]
set(string|int $value) {
$this->foo = strtolower($value);
$this->modified = true;
}
}
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
class PropertyHook
{
private bool $modified = false;
/** @var string this is my property */
#[Property(new DateTimeImmutable())]
public private(set) string $example = 'default value' {
get {
if ($this->modified) {
return $this->foo . ' (modified)';
}
return $this->foo;
}
set(string|int $value) {
$this->foo = strtolower($value);
$this->modified = true;
}
}
}

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
class PropertyHook
{
private bool $modified = false;
/** @param string $example this is my property */
public function __construct(
/** @var string this is my property */
#[Property(new DateTimeImmutable())]
public string $example = 'default value' {
/** Not sure this works, but it gets */
#[Getter(new DateTimeImmutable())]
get {
if ($this->modified) {
return $this->foo . ' (modified)';
}
return $this->foo;
}
/** Not sure this works, but it sets */
#[Setter(new DateTimeImmutable())]
set(string|int $value) {
$this->foo = strtolower($value);
$this->modified = true;
}
}
)
{
}
}

View File

@@ -0,0 +1,60 @@
<?php
declare(strict_types=1);
class PropertyHookVirtual
{
/**
* A virtual property that composes a full name from first and last name
*/
public string $fullName {
// This is a virtual property with a getter
// It doesn't reference $this->fullName
get {
return $this->firstName . ' ' . $this->lastName;
}
}
/**
* A virtual property that decomposes a full name into first and last name
*/
public string $compositeName {
// This is a virtual property with a setter
// It doesn't reference $this->compositeName
set(string $value) {
[$this->firstName, $this->lastName] = explode(' ', $value, 2);
}
}
/**
* A virtual property with both getter and setter
*/
public string $completeFullName {
// Getter doesn't reference $this->completeFullName
get {
return $this->firstName . ' ' . $this->lastName;
}
// Setter doesn't reference $this->completeFullName
set(string $value) {
[$this->firstName, $this->lastName] = explode(' ', $value, 2);
}
}
/**
* A non-virtual property that references itself in its hook
*/
public string $nonVirtualName {
get {
return $this->nonVirtualName ?? $this->firstName;
}
set(string $value) {
$this->nonVirtualName = $value;
}
}
public function __construct(
private string $firstName = 'John',
private string $lastName = 'Doe'
) {
}
}