diff --git a/composer.json b/composer.json index 84791aa18..65eda0624 100644 --- a/composer.json +++ b/composer.json @@ -95,7 +95,8 @@ "src/Tempest/Http/src/functions.php", "src/Tempest/Mapper/src/functions.php", "src/Tempest/Reflection/src/functions.php", - "src/Tempest/Support/src/functions.php" + "src/Tempest/Support/src/functions.php", + "src/Tempest/View/src/functions.php" ] }, "autoload-dev": { diff --git a/src/Tempest/Console/composer.json b/src/Tempest/Console/composer.json index 5d0512110..6f5d9e66a 100644 --- a/src/Tempest/Console/composer.json +++ b/src/Tempest/Console/composer.json @@ -7,6 +7,7 @@ "php": "^8.3", "tempest/core": "dev-main", "tempest/container": "dev-main", + "tempest/debug": "dev-main", "tempest/highlight": "^2.0", "tempest/log": "dev-main", "tempest/reflection": "dev-main", diff --git a/src/Tempest/Core/composer.json b/src/Tempest/Core/composer.json index 273078ec9..3e07d690f 100644 --- a/src/Tempest/Core/composer.json +++ b/src/Tempest/Core/composer.json @@ -6,6 +6,7 @@ "require": { "php": "^8.3", "tempest/container": "dev-main", + "tempest/event-bus": "dev-main", "vlucas/phpdotenv": "^5.6", "filp/whoops": "^2.15", "nunomaduro/collision": "^8.4" diff --git a/src/Tempest/Http/src/functions.php b/src/Tempest/Http/src/functions.php index ca28b961d..e2e5ba6cc 100644 --- a/src/Tempest/Http/src/functions.php +++ b/src/Tempest/Http/src/functions.php @@ -6,13 +6,6 @@ use Tempest\Http\Router; use Tempest\Reflection\MethodReflector; - use Tempest\View\GenericView; - use Tempest\View\View; - - function view(string $path, mixed ...$params): View - { - return (new GenericView($path))->data(...$params); - } function uri(array|string|MethodReflector $action, ...$params): string { diff --git a/src/Tempest/View/composer.json b/src/Tempest/View/composer.json index a575e9f18..c533b48a5 100644 --- a/src/Tempest/View/composer.json +++ b/src/Tempest/View/composer.json @@ -11,6 +11,9 @@ "tempest/validation": "dev-main" }, "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { "Tempest\\View\\": "src" } diff --git a/src/Tempest/View/src/functions.php b/src/Tempest/View/src/functions.php new file mode 100644 index 000000000..25cbf71b6 --- /dev/null +++ b/src/Tempest/View/src/functions.php @@ -0,0 +1,15 @@ +data(...$params); + } +}