mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
refactor(dynamic): enhance framework bindings with SSA receiver type checks, add tests for Laravel, Symfony, Rabbit, Kafka, and Pub/Sub
This commit is contained in:
parent
aaa1fd7ede
commit
17fa611b63
17 changed files with 1255 additions and 167 deletions
|
|
@ -2,7 +2,31 @@
|
|||
// Phase 16 — Symfony-style route via `#[Route]` attribute,
|
||||
// benign sanitised payload.
|
||||
|
||||
namespace App\Controller;
|
||||
namespace Symfony\Component\HttpFoundation {
|
||||
class Response
|
||||
{
|
||||
public function __construct(private string $content)
|
||||
{
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Symfony\Component\Routing\Annotation {
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION)]
|
||||
class Route
|
||||
{
|
||||
public function __construct(...$args)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace App\Controller {
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
|
@ -13,9 +37,12 @@ class UserController
|
|||
public function run($payload)
|
||||
{
|
||||
echo "__NYX_SINK_HIT__\n";
|
||||
$cmd = "echo hello " . escapeshellarg($payload);
|
||||
$cmd = "true " . escapeshellarg($payload);
|
||||
$out = shell_exec($cmd);
|
||||
echo $out;
|
||||
return new Response($out);
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['__nyx_controller'] = new UserController();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue