chore: Version 1.0.0.beta.19 mit Rexstan-Stabilisierung#12
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Stabilisierungs-Release für das REDAXO-Addon jsonld_manager mit Fokus auf robustere Typ-/JSON-Verarbeitung, konsistentere JSON-LD-Generierung (inkl. Dynamic-URL/Mapping) und verbesserte statische Analyse-Basis (Rexstan), ohne beabsichtigte BC-Brüche.
Changes:
- Version auf 1.0.0.beta.19 angehoben und Changelog für den Release ergänzt.
- Breite Typ- und Robustheitsanpassungen in Backend-Seiten sowie Kernklassen (Generator/Renderer/Mapping/Domain-/Language-Config).
- Defensivere JSON-(De)Serialisierung und stabilere Dynamic-URL-/LocalBusiness-Flows.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| update.php | Robustere Index-/Schema-Migrationslogik und Typisierung in Update-Flow. |
| pages/settings.php | Striktere Callback-Typen bei ID-Remapping/Filterung. |
| pages/settings_global.php | Verwendung von LanguageConfig via use und konsistentere Aufrufe. |
| pages/setting_legacy_meta_integration.php | Zusätzliche Absicherung für preg_split-Ergebnis. |
| pages/schemas.php | Typisierung/Docblocks und Umstellung auf LanguageConfig Import. |
| pages/global_website.php | Robustere Sprachermittlung, Typisierung und Preview-Fallbacks. |
| pages/global_localbusiness.php | Defensiveres JSON-Handling, Typisierung und stabilere Branch-/ContactPoint-Flows. |
| pages/dynamic_urls.php | Defensivere String-Casts bei Profil-Feldern. |
| pages/dynamic_urls_edit.php | Defensivere Config-/JSON-Behandlung und Vorberechnung von JSON für JS-Kontext. |
| pages/article.php | Typisierung, defensiveres JSON-Decode und konsistentere Casts. |
| pages/article_jsonld.php | Import-Nutzung, Typisierung und Anpassungen im Branch-/Output-UI-Flow. |
| package.yml | Version-Bump auf 1.0.0.beta.19. |
| lib/Url/RuleEngine.php | Typisierung/Imports, defensiveres JSON-Decode und API-Signaturen. |
| lib/template_functions.php | Typisierung/Imports, robustere Debug-/Helper-Funktionen. |
| lib/Mapping/DataSourceExtended.php | Typisierung, robustere Media-/Author-Auflösung und konsistentere Rückgaben. |
| lib/Mapping/DataSource.php | Typisierung, robustere Media-/Computed-Werte und neue Hilfsfunktionen. |
| lib/LanguageConfig.php | Typisierung/Imports und API auf rex_addon_interface erweitert. |
| lib/JsonLdGenerator.php | Typisierung, robustere Dynamic-URL- und Branch-Handling-Pfade, Debug-Logging. |
| lib/Frontend/Renderer.php | Typisierung/Imports, robustere Cache-/Debug-Pfade. |
| lib/DynamicJsonLd.php | Striktere Parameter, robustere Tabellen-/Mapping-Validierung und konsistente Payload-Erzeugung. |
| lib/DomainConfig.php | Typisierung/Imports, robustere Domain-Ermittlung (FE/BE) und URL-Hilfen. |
| lib/CustomJsonLdHelper.php | Typisierung und präzisere Exception-Typen für JSON-Sanitizing. |
| CHANGELOG.md | Neuer Release-Eintrag für v1.0.0.beta.19. |
| boot.php | Imports/Typisierung, robustere Navigation-Ausblendung und konsistentere Aufrufe. |
Comments suppressed due to low confidence (1)
lib/template_functions.php:193
- Im Debug-Overlay wird JSON mit JSON_UNESCAPED_SLASHES direkt in ein <script>-Tag geschrieben (var jsonldPayload=...). Ein Payload/Meta-Wert mit "</script>" kann dadurch den Script-Block vorzeitig schließen. Bitte beim json_encode für inline JavaScript mindestens JSON_HEX_TAG/AMP/APOS/QUOT verwenden (oder JSON_UNESCAPED_SLASHES entfernen), damit keine Script-Tag-Injection möglich ist.
if (empty($payload)) {
$payload = $payloadFallback;
}
$payloadJson = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$metaJson = json_encode($meta, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+405
to
+409
| $schemaPropertiesJson = json_encode($schemaProperties, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | ||
| $tableFieldsJson = json_encode(array_column($tableFields, 'Field'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | ||
| $sampleDataJson = json_encode($sampleData, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | ||
| $profileNamespaceJson = json_encode((string) ($profile['namespace'] ?? ''), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | ||
| $savedMappingsJson = json_encode($config['field_mappings'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ziel
Technischer Stabilitäts-Release ohne beabsichtigte BC-Brüche. Fokus auf statische Analyse, robuste Typ-/JSON-Verarbeitung und konsistente JSON-LD-Generierung.
Was wurde umgesetzt
1.0.0.beta.19angehoben.v1.0.0.beta.19ergänzt.json_encode-Fallbacks).Qualitätssicherung
php redaxo/bin/console rexstan:analyze redaxo/src/addons/jsonld_managerBC-Einschätzung
Für Oli: Rexstan auf macOS mit MAMP (CLI-basiert)
Wenn du lokal mit MAMP statt Docker arbeitest, kannst du Rexstan vollständig über die Shell ausführen.
1) In das Projekt wechseln
cd /Pfad/zu/deinem/redaxo/public2) Prüfen, welche PHP-Version MAMP nutzt
Falls dein MAMP-Pfad leicht anders ist, den Versionsordner unter
/Applications/MAMP/bin/php/prüfen.3) Composer-Autoloader optimieren (wichtig für Rexstan)
Wenn
composerlokal anders installiert ist, den korrekten Composer-Pfad einsetzen.4) Rexstan direkt starten
5) Optional: nur einzelne Datei prüfen
Typische Stolpersteine unter MAMP
public-Verzeichnis laufen.composer dump-autoload --optimizeausführen.php -mmit MAMP-Binary vergleichen.Wenn gewünscht, kann ich daraus zusätzlich eine kurze
docs/rexstan-mamp.mdim Repo machen.