Forms gained steps, conditions, image choices, number fields with units and a summary step; the DEEG price finder uses all of it. Plugins are manifest plus Twig: blocks, settings, containers, routes, presets and theme packs, switched per installation. The review backlog is done: archive pages render through the normal page pipeline, forms and post lists work inside areas and sections, repeated sections get their own ids, breakpoints and colours come from the palette, backup and update work on MySQL and lock each other out. The task worker no longer shortens a process that has no time limit: set_time_limit() sets the limit instead of extending it, which turned an unlimited CLI run into eighty seconds and killed the full test suite far away from the scheduler. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
1.5 KiB
PHP
37 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Plugin\PluginRegistry;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
|
|
/**
|
|
* Liefert Stylesheets, Skripte und Bilder eines aktiven Plugins aus.
|
|
*
|
|
* Plugins liegen außerhalb von public/, damit ein Ordner plugins/ nichts ausliefert, was nicht
|
|
* im Manifest steht. Der Weg hierher ist derselbe Ursprung wie die Seite, deshalb reicht der
|
|
* Richtlinie das 'self', das sie ohnehin erlaubt. Die Adresse trägt die Fassung des Plugins,
|
|
* also darf der Browser die Datei lange behalten.
|
|
*/
|
|
final class PluginAssetController extends AbstractController
|
|
{
|
|
public function __construct(private PluginRegistry $plugins)
|
|
{
|
|
}
|
|
|
|
#[Route('/plugin-assets/{plugin}/{path}', name: 'plugin_asset', requirements: ['plugin' => '[a-z][a-z0-9]{1,30}', 'path' => 'assets/.+'], methods: ['GET'])]
|
|
public function asset(string $plugin, string $path): Response
|
|
{
|
|
$file = $this->plugins->assetFile($plugin, $path) ?? throw $this->createNotFoundException('Datei nicht gefunden.');
|
|
$response = new BinaryFileResponse($file, 200, [], false);
|
|
$response->headers->set('Content-Type', PluginRegistry::ASSET_TYPES[strtolower(pathinfo($file, PATHINFO_EXTENSION))]);
|
|
$response->headers->set('Cache-Control', 'public, max-age=31536000, immutable');
|
|
$response->headers->set('X-Content-Type-Options', 'nosniff');
|
|
|
|
return $response;
|
|
}
|
|
}
|