Conversation
…uding php8.0 and php8.1, rewrote backend javascript functionality to typescript and webcomponents
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Yoast SEO for TYPO3 extension to version 12.0.0, adding TYPO3 v14 support while removing support for TYPO3 v11 and older PHP versions (8.0/8.1). The extension's frontend JavaScript architecture has been completely rewritten in TypeScript with web components, replacing the legacy React/Redux implementation.
Changes:
- Dropped TYPO3 v11 and PHP 8.0/8.1 support, now requires PHP 8.2+ and TYPO3 12.4.25+, 13.4+, or 14.1+
- Complete TypeScript rewrite of frontend JavaScript with new modular architecture and web components
- Added new social preview form elements (FacebookPreview, TwitterPreview) and service architecture for version compatibility
Reviewed changes
Copilot reviewed 278 out of 420 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Resources/Private/Language/*.xlf | Reformatted XML files with consistent indentation and updated product names |
| README.md | Updated badges and branch references from master to main |
| Documentation/* | Added new documentation for TypeScript/JavaScript development, Facebook/Twitter previews, and updated configuration references |
| Configuration/* | Added file headers, updated middleware configuration, removed deprecated AJAX routes and hooks |
| Classes/Service/* | New service architecture with interfaces for TYPO3 version compatibility (Frontend, HMAC, StandaloneView) |
| Classes/Form/Element/* | New social preview elements and refactored existing elements to use constructor DI |
| Classes/EventListener/* | Renamed AbstractListener to AbstractBuilderListener, added new cache and frontend request listeners |
| Build/typescript/* | New TypeScript source structure with modular components and type definitions |
| Build/resources/* | Updated dependencies and webpack configuration for web components |
| .ddev/* | Removed v11 installation commands, added v14 support, updated configuration |
| Build/extensions/sitepackage/* | Example extension updated with new TCA configuration and controllers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </trans-unit> | ||
| <file source-language="en" datatype="plaintext" | ||
| original="EXT:yoast_seo/Resources/Private/Language/BackendModuleOverview.xlf" date="2014-05-02T12:00:00Z" | ||
| product-name="yoast_seo"> |
There was a problem hiding this comment.
The product-name changed from 'yoastseo-overview' to 'yoast_seo'. While this change makes the naming consistent across files, verify that this doesn't break any existing translation workflows or tooling that might depend on the previous product-name identifier.
| product-name="yoast_seo"> | |
| product-name="yoastseo-overview"> |
| # t3templating = https://docs.typo3.org/m/typo3/tutorial-templating/main/en-us/ | ||
| # t3translate = https://docs.typo3.org/m/typo3/guide-frontendlocalization/main/en-us/ | ||
| t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/ | ||
| t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/13.4/en-us/ |
There was a problem hiding this comment.
The TSConfig reference link has been updated to version 13.4, but the extension now supports TYPO3 12.4, 13.4, and 14.1. Consider whether this should point to version 14 documentation instead, or provide version-specific links in the documentation itself to support all three supported TYPO3 versions.
| t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/13.4/en-us/ | |
| t3tsconfig = https://docs.typo3.org/m/typo3/reference-tsconfig/14.1/en-us/ |
| export default class Result<T> { | ||
| public result: T; | ||
| public data: object; | ||
| constructor( result: T, data: object) { |
There was a problem hiding this comment.
Inconsistent spacing: there's an extra space after the opening parenthesis in 'constructor( result: T'. The closing parenthesis at line 5 and 6 also show inconsistent spacing. This violates the Prettier configuration that should be enforcing consistent spacing.
| constructor( result: T, data: object) { | |
| constructor(result: T, data: object) { |
| private readonly _resolve: any; | ||
| private readonly _reject: any; | ||
| private readonly _data: {}; | ||
| constructor( resolve: any, reject: any, data = {} ) { |
There was a problem hiding this comment.
Using any types defeats the purpose of TypeScript's type safety. Consider defining proper types for resolve and reject functions, such as (value: object) => void and (reason?: any) => void, or use generic type parameters to properly type the Promise resolution.
| const getKeywordResearchArticleLink = (url) => { | ||
| const keywordsResearchLinkTranslation = sprintf( |
There was a problem hiding this comment.
The sprintf function is used but not imported. This will cause a runtime error. Import sprintf from the appropriate package (likely @wordpress/i18n) or use template literals instead.
Summary
This PR can be summarized in the following changelog entry:
Breaking
maxserv/frontend-requestfor handling frontend requestsModifyPreviewUrlEventevent - useModifyUrlEventfrommaxserv/frontend-requestinsteadPreviewHandlerAJAX handlerPreviewServiceand related content extractors (ContentParser,UrlContentFetcher,HttpOptionSetter,etc.)
SnippetPreviewUrlGenerator- replaced bySnippetPreviewRequestDataGeneratorJavascriptServiceandJsonConfigService- replaced byJsonTranslationsServiceYoastEnvironmentServiceBackendYoastConfighook - replaced byBackendYoastTranslationsUsePageCacheandAfterCacheableContentIsGeneratedListener- replaced by new event listenersPagesWithoutDescriptionDataProviderdashboard widget (use core TYPO3 widget instead)Added
Build/typescript/FacebookPreview- dedicated Facebook/Open Graph preview widgetTwitterPreview- dedicated Twitter card preview widgetAbstractSocialPreview- base class for social preview implementationsAbstractLabeledFormElement- base class for labeled form elementsFrontendServiceInterfacewithFrontendService(v13+) andLegacyFrontendService(v12)HmacGeneratorServiceInterfacewithHmacGeneratorService(v13+) andLegacyHmacGeneratorService(v12)StandaloneViewServiceInterfacewithStandaloneViewService(v13+) andLegacyStandaloneViewService(v12)FrontendRequestListenerevent listener for frontend request handlingPageCacheIdentifierListenerandPageCacheListenerfor cache handlingSnippetPreviewRequestDataGeneratorfor generating preview request dataSaveScoresServicefor handling score persistenceSiteServicefor site-related operationsRequestDataDTO for structured request data handlingPageParser/BodyParserandTitleConfigurationParserfor parsing page contentModifyPageLayoutContentListenerevent listener (replacing the removed backend class)Changed
EventListenernamespaceAbstractAbstractListenertoAbstractBuilderListenerext_localconf.php- removed IIFE wrapper, modernized hook registrationFixed
Removed
plugin.js,yoastModal.js,yoastModalEs6.js)Resources/Private/Layouts/Legacy.html)Resources/Private/Templates/Crawler/Legacy.html)PagesWithoutMetaDescriptionWidgettemplate (functionality moved to core TYPO3)Build/phpstan/phpstan.cms11.neon)Relevant technical choices:
@r2wc/react-to-web-componentTest instructions
This PR can be tested by following these steps:
Quality assurance