sbuerk / t3e-legacy-param-guard
TYPO3 Guard the handling of legacy params in FE PSR-7 request
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Language:Shell
Type:typo3-cms-extension
Requires
- php: ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3
- typo3/cms-core: ^11.5 || ^12.4 || ~11.5@dev || ~12.4@dev
- typo3/cms-frontend: ^11.5 || ^12.4 || ~11.5@dev || ~12.4@dev
Requires (Dev)
- bnf/phpstan-psr-container: ^1.0.1
- codeception/codeception: ^4.1.22 || ^5.0.10
- codeception/lib-asserts: ^1.13.2 || ^2.1.0
- codeception/module-asserts: ^1.3.1 || ^3.0.0
- codeception/module-cli: ^1.1 || ^2.0.1
- codeception/module-filesystem: ^1.0.3 || ^3.0.0
- codeception/module-webdriver: ^1.4.0 || ^4.0.0
- ergebnis/composer-normalize: ^2.28.3
- friendsofphp/php-cs-fixer: ^3.14.1
- friendsoftypo3/phpstan-typo3: ^0.9.0
- phpstan/phpstan: ^1.10.14
- phpstan/phpstan-phpunit: ^1.3.11
- phpunit/phpunit: ^9.6.7 || ^10.1
- typo3/cms-adminpanel: ~11.5@dev || ~12.4@dev
- typo3/cms-backend: ~11.5@dev || ~12.4@dev
- typo3/cms-belog: ~11.5@dev || ~12.4@dev
- typo3/cms-beuser: ~11.5@dev || ~12.4@dev
- typo3/cms-composer-installers: ^3 || 4.0.x@dev || ^5
- typo3/cms-core: ~11.5@dev || ~12.4@dev
- typo3/cms-dashboard: ~11.5@dev || ~12.4@dev
- typo3/cms-extbase: ~11.5@dev || ~12.4@dev
- typo3/cms-extensionmanager: ~11.5@dev || ~12.4@dev
- typo3/cms-felogin: ~11.5@dev || ~12.4@dev
- typo3/cms-filelist: ~11.5@dev || ~12.4@dev
- typo3/cms-fluid: ~11.5@dev || ~12.4@dev
- typo3/cms-fluid-styled-content: ~11.5@dev || ~12.4@dev
- typo3/cms-form: ~11.5@dev || ~12.4@dev
- typo3/cms-frontend: ~11.5@dev || ~12.4@dev
- typo3/cms-indexed-search: ~11.5@dev || ~12.4@dev
- typo3/cms-info: ~11.5@dev || ~12.4@dev
- typo3/cms-install: ~11.5@dev || ~12.4@dev
- typo3/cms-lowlevel: ~11.5@dev || ~12.4@dev
- typo3/cms-recycler: ~11.5@dev || ~12.4@dev
- typo3/cms-reports: ~11.5@dev || ~12.4@dev
- typo3/cms-scheduler: ~11.5@dev || ~12.4@dev
- typo3/cms-seo: ~11.5@dev || ~12.4@dev
- typo3/cms-setup: ~11.5@dev || ~12.4@dev
- typo3/cms-sys-note: ~11.5@dev || ~12.4@dev
- typo3/cms-tstemplate: ~11.5@dev || ~12.4@dev
- typo3/cms-workspaces: ~11.5@dev || ~12.4@dev
- typo3/testing-framework: ~7.0@dev
This package is auto-updated.
Last update: 2024-10-05 14:43:12 UTC
README
TYPO3 extension legacy_param_guard
Mission
TYPO3 used a couple of query parameters in the frontend to determine which pages should be shown. Since TYPO3 v9 speaking url has been integrated directly into the TYPO3 CMS keeping the old legacy parameters.
Technically, the legacy parameters
- id=<int>: page id
- L=<int>: language id
- type=<int>: typeNum (pageType)
are not really required anymore for page resolving and rendering. Using these parameters intentionally is a behaviour from old days not adopting newer techniques, which requires the core to still maintain and respect these parameters.
TYPO3 provides ways making the usage of them superfluous in projects and extensions. However, 3rd party services and pages are able to created links which bots (like googlebot) are crawling not having the speaking url in it.
This extension provides several ways to guard these legacy parameters:
- redirect to same url with removed legacy params
- block the request (simple body-less 404 page response)
- remove legacy params from request and let TYPO3 deal with it even if the browser has the url with the parameters
Caution!
Using this extension removes the ability to actively use any legacy parameter. Don't use it if required by your instance or extension.
Compatibility
TYPO3 Build/Scripts/runTests.sh
This extension contains the well known Build/Scripts/runTests.sh docker/docker-compose based script wrapping script.
Provided commands/test-suits:
- -s acceptance: Execute acceptance tests (not implemented yet)
- -s clean: Clean unnecessary files and folders
- -s cgl: Ensure code-style guideline rules.
- -s composerUpdate: Run composer update
- -s composerValidate: Validate composer.json
- -s functional: Execute functional tests
- -s lint: Lint *.php files for syntax errors
- -s phpstan: Execute static code analyzer PHPStan
- -s phpstanGenerateBaseline: Generate baseline for PHPStan. Can be used to manage temporarily unsolvable reports.