Deprecation: #94193 - Public URLs with relative paths in FAL API
See forge#94193
Description
The public FAL API for accessing the public url of a FAL object,
for example
\TYPO3\
or
\TYPO3\
, previously allowed to
retrieve the relative path instead of the absolute path. This could
be achieved by setting
$relative
to
true
while calling
get
.
FAL is only able to build relative links for local drivers. Other drivers would still return the absolute URL, which has often led to unexpected side effects.
Since both, frontend (site handling) and backend (url routing) are meanwhile
fully capable of supporting absolute URLs,
$relative
is now deprecated and will be removed in TYPO3 v12.
This also affects the
is
method in the
Generate
event, as well as the
Online
.
Impact
Calling
get
on a FAL object, for example
\TYPO3\
or
\TYPO3\
, with
$relative
set to
true
will trigger a PHP
E_
error. The extension scanner
will detect such calls.
Accessing
is
on
Generate
will trigger a PHP
E_
error. The extension scanner will detect
such calls.
Manually calling
get
on an
Online
,
for example
Youtube
, will not trigger a PHP
E_
error, but the extension scanner will detect such calls.
Affected Installations
All installations which set
$relative
to
true
when calling
get
on a FAL object, for example
\TYPO3\
or
\TYPO3\
.
All installations which manually call
get
on an
\TYPO3\
,
for example
\TYPO3\
.
All installation which access
is
on the
\TYPO3\
event.
Migration
Remove the
$relative
parameter from all calls to
get
on FAL objects, for example
\TYPO3\
or
\TYPO3\
.
Remove the
$relative
parameter from all manual calls
to
get
on a
\TYPO3\
,
for example
\TYPO3\
.
Remove all calls to
\TYPO3\
.