Commit 89b6d04a authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Have a FunctionalDeprecated test suite

With functional tests now failing on warnings and notices
and *showing* deprecations, the next step is to make sure
the functional test suite does not trigger deprecated
code anymore. The strategy is similar to "UnitDeprecated":
All functional tests that actively test deprecated code
are moved to a dedicated test suite that *does not* fail
on deprecations, while the main functional test suite
*does* fail on deprecations.

This helps to ensure core code does not call deprecated
functionality.

The patch:
* Adds a FunctionalDeprecated test suite as new home
  for tests that test deprecated subjects like the
  deprecated extbase ObjectManager.
* Moves and splits existing tests to FunctionalDeprecated,
  including fixtures as needed.
* Adds the test suite to runTests.sh and adapts the
  docker setup accordingly.
* Adds FunctionalDeprecated suite to gitlab-ci pre-merge
  and nightly in various php / dbms combinations.
* Enables convertDeprecationsToExceptions="true" for
  the main functional test suite and "false" for the
  new FunctionalDeprecated suite.

Change-Id: I74559efc5a3f95d105e3979669a7fda7f13c931a
Resolves: #95668
Related: #95659
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71832


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent ee15b5d4
......@@ -112,7 +112,8 @@ Options:
- composerTestDistribution: "composer update" in Build/composer to verify core dependencies
- composerValidate: "composer validate"
- fixCsvFixtures: fix broken functional test csv fixtures
- functional: functional tests
- functional: PHP functional tests
- functionalDeprecated: deprecated PHP functional tests
- lintPhp: PHP linting
- lintScss: SCSS linting
- lintTypescript: TS linting
......@@ -125,7 +126,7 @@ Options:
- unitRandom: PHP unit tests in random order, add -o <number> to use specific seed
-a <mysqli|pdo_mysql|sqlsrv|pdo_sqlsrv>
Only with -s functional
Only with -s functional|functionalDeprecated
Specifies to use another driver, following combinations are available:
- mysql
- mysqli (default)
......@@ -138,7 +139,7 @@ Options:
- pdo_sqlsrv
-d <mariadb|mysql|mssql|postgres|sqlite>
Only with -s functional|acceptance|acceptanceInstall
Only with -s functional|functionalDeprecated|acceptance|acceptanceInstall
Specifies on which DBMS tests are performed
- mariadb (default): use mariadb
- mysql: use MySQL server
......@@ -184,14 +185,14 @@ Options:
- 8.1: use PHP 8.1
-e "<phpunit options>"
Only with -s functional|unit|unitDeprecated|unitRandom|acceptance
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance
Additional options to send to phpunit (unit & functional tests) or codeception (acceptance
tests). For phpunit, options starting with "--" must be added after options starting with "-".
Example -e "-v --filter canRetrieveValueWithGP" to enable verbose output AND filter tests
named "canRetrieveValueWithGP"
-x
Only with -s functional|unit|unitDeprecated|unitRandom|acceptance|acceptanceInstall
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance|acceptanceInstall
Send information to host instance for test or system under test break points. This is especially
useful if a local PhpStorm instance is listening on default xdebug port 9003. A different port
can be selected with -y
......@@ -678,6 +679,51 @@ case ${TEST_SUITE} in
esac
docker-compose down
;;
functionalDeprecated)
handleDbmsAndDriverOptions
setUpDockerComposeDotEnv
case ${DBMS} in
mariadb)
echo "Using driver: ${DATABASE_DRIVER}"
docker-compose run prepare_functional_mariadb
docker-compose run functional_deprecated_mariadb
SUITE_EXIT_CODE=$?
;;
mysql)
echo "Using driver: ${DATABASE_DRIVER}"
docker-compose run prepare_functional_mysql
docker-compose run functional_deprecated_mysql
SUITE_EXIT_CODE=$?
;;
mssql)
echo "Using driver: ${DATABASE_DRIVER}"
docker-compose run prepare_functional_mssql2019latest
docker-compose run functional_deprecated_mssql2019latest
SUITE_EXIT_CODE=$?
;;
postgres)
docker-compose run prepare_functional_postgres
docker-compose run functional_deprecated_postgres
SUITE_EXIT_CODE=$?
;;
sqlite)
# sqlite has a tmpfs as typo3temp/var/tests/functional-sqlite-dbs/
# Since docker is executed as root (yay!), the path to this dir is owned by
# root if docker creates it. Thank you, docker. We create the path beforehand
# to avoid permission issues on host filesystem after execution.
mkdir -p ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/
docker-compose run prepare_functional_sqlite
docker-compose run functional_deprecated_sqlite
SUITE_EXIT_CODE=$?
;;
*)
echo "Deprecated functional tests don't run with DBMS ${DBMS}" >&2
echo >&2
echo "call \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
exit 1
esac
docker-compose down
;;
lintPhp)
setUpDockerComposeDotEnv
docker-compose run lint_php
......
......@@ -198,6 +198,7 @@ EOF;
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertDeprecationsToExceptions="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
......
functional deprecated mariadb 10.3 php 7.4 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.3 -p 7.4
functional deprecated mariadb 10.3 php 7.4 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.3 -p 7.4
functional deprecated mariadb 10.3 php 7.4 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.3 -p 7.4
functional deprecated mariadb 10.5 php 8.0 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 8.0
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0
functional deprecated mariadb 10.5 php 8.0 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 8.0
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0
functional deprecated mariadb 10.5 php 8.0 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 8.0
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.5 -p 8.0
functional deprecated mssql php 7.4 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mssql -p 7.4
functional deprecated mssql php 7.4 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mssql -p 7.4
functional deprecated mssql php 7.4 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mssql -p 7.4
functional deprecated mysql 5.5 php 7.4 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mysql -j 5.5 -p 7.4
functional deprecated mysql 5.5 php 7.4 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mysql -j 5.5 -p 7.4
functional deprecated mysql 5.5 php 7.4 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d mysql -j 5.5 -p 7.4
functional deprecated postgres 10 php 7.4 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d postgres -k 10 -p 7.4
functional deprecated postgres 10 php 7.4 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d postgres -k 10 -p 7.4
functional deprecated postgres 10 php 7.4 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d postgres -k 10 -p 7.4
functional deprecated sqlite php 7.4 locked:
stage: functional
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d sqlite -p 7.4
functional deprecated sqlite php 7.4 max:
stage: functional
only:
- schedules
cache:
key: master-composer-max
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMax -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d sqlite -p 7.4
functional deprecated sqlite php 7.4 min:
stage: functional
only:
- schedules
cache:
key: master-composer-min
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerInstallMin -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d sqlite -p 7.4
functional mariadb 10.3 php 7.4 locked:
stage: functional
only:
......
functional deprecated mariadb 10.3 php 8.0 pre-merge:
stage: main
except:
refs:
- schedules
- master
script:
- Build/Scripts/runTests.sh -s composerInstall -p 8.0
- Build/Scripts/runTests.sh -s functionalDeprecated -d mariadb -i 10.3 -p 8.0
functional deprecated postgres 10 php 7.4 pre-merge:
stage: main
except:
refs:
- schedules
- master
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s functionalDeprecated -d postgres -k 10 -p 7.4
functional mariadb 10.3 php 8.0 pre-merge:
stage: main
except:
......
......@@ -19,6 +19,7 @@
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertDeprecationsToExceptions="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
......
<!--
Functional test suite setup
Functional tests should extend \TYPO3\TestingFramework\Core\Tests\FunctionalTestCase,
take a look at this class for further documentation on how to run the suite.
TYPO3 CMS functional test suite also needs phpunit bootstrap code, the
file is located next to this .xml as FunctionalTestsBootstrap.php
The recommended way to execute the suite is "runTests.sh -s functional"
execute "Build/Scripts/runTests.sh -h" for more details.
-->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="true"
bootstrap="FunctionalTestsBootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertDeprecationsToExceptions="false"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
failOnRisky="true"
>
<testsuites>
<testsuite name="Core tests">
<directory>../../typo3/sysext/*/Tests/FunctionalDeprecated/</directory>
</testsuite>
</testsuites>
<php>
<const name="TYPO3_MODE" value="BE" />
<const name="TYPO3_TESTING_FUNCTIONAL_REMOVE_ERROR_HANDLER" value="true" />
<ini name="display_errors" value="1" />
<env name="TYPO3_CONTEXT" value="Testing" />
</php>
</phpunit>
......@@ -887,6 +887,40 @@ services:
$${COMMAND};
fi
"
functional_deprecated_mariadb:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
environment:
typo3DatabaseDriver: "${DATABASE_DRIVER}"
typo3DatabaseName: func_test
typo3DatabaseUsername: root
typo3DatabasePassword: funcp
typo3DatabaseHost: mariadb
typo3TestingRedisHost: redis4
typo3TestingMemcachedHost: memcached1-5
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
php -v | grep '^PHP'
COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE=\"off\" $${COMMAND};
else
DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
XDEBUG_MODE=\"debug,develop\" \
XDEBUG_TRIGGER=\"foo\" \
XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=$${DOCKER_HOST}\" \
$${COMMAND};
fi
"
prepare_functional_mysql:
image: alpine:3.8
......@@ -944,6 +978,40 @@ services:
$${COMMAND};
fi
"
functional_deprecated_mysql:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
environment:
typo3DatabaseDriver: "${DATABASE_DRIVER}"
typo3DatabaseName: func_test
typo3DatabaseUsername: root
typo3DatabasePassword: funcp
typo3DatabaseHost: mysql
typo3TestingRedisHost: redis4
typo3TestingMemcachedHost: memcached1-5
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
php -v | grep '^PHP'
COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} ${TEST_FILE}\"
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE=\"off\" $${COMMAND};
else
DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
XDEBUG_MODE=\"debug,develop\" \
XDEBUG_TRIGGER=\"foo\" \
XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=$${DOCKER_HOST}\" \
$${COMMAND};
fi
"
prepare_functional_mssql2019latest:
image: alpine:3.8
......@@ -1004,6 +1072,42 @@ services:
$${COMMAND};
fi
"
functional_deprecated_mssql2019latest:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
environment:
typo3DatabaseDriver: "${DATABASE_DRIVER}"
typo3DatabaseName: func
typo3DatabasePassword: "Test1234!"
typo3DatabaseUsername: SA
typo3DatabasePort: 1433
typo3DatabaseCharset: utf-8
typo3DatabaseHost: mssql2019latest
typo3TestingRedisHost: redis4
typo3TestingMemcachedHost: memcached1-5
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
php -v | grep '^PHP'
COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-mssql ${TEST_FILE}\"
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE=\"off\" $${COMMAND};
else
DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
XDEBUG_MODE=\"debug,develop\" \
XDEBUG_TRIGGER=\"foo\" \
XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=$${DOCKER_HOST}\" \
$${COMMAND};
fi
"
prepare_functional_postgres:
image: alpine:3.8
......@@ -1061,6 +1165,40 @@ services:
$${COMMAND};
fi
"
functional_deprecated_postgres:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
environment:
typo3DatabaseDriver: pdo_pgsql
typo3DatabaseName: bamboo
typo3DatabaseUsername: funcu
typo3DatabaseHost: postgres
typo3DatabasePassword: funcp
typo3TestingRedisHost: redis4
typo3TestingMemcachedHost: memcached1-5
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
php -v | grep '^PHP'
COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-postgres ${TEST_FILE}\"
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE=\"off\" $${COMMAND};
else
DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
XDEBUG_MODE=\"debug,develop\" \
XDEBUG_TRIGGER=\"foo\" \
XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=$${DOCKER_HOST}\" \
$${COMMAND};
fi
"
prepare_functional_sqlite:
image: alpine:3.8
......@@ -1108,6 +1246,38 @@ services:
$${COMMAND};
fi
"
functional_deprecated_sqlite:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
tmpfs:
- ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
environment:
typo3DatabaseDriver: pdo_sqlite
typo3TestingRedisHost: redis4
typo3TestingMemcachedHost: memcached1-5
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
php -v | grep '^PHP'
COMMAND=\"vendor/phpunit/phpunit/phpunit -c Build/phpunit/FunctionalTestsDeprecated.xml ${EXTRA_TEST_OPTIONS} --exclude-group not-sqlite ${TEST_FILE}\"
if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
XDEBUG_MODE=\"off\" $${COMMAND};
else
DOCKER_HOST=`route -n | awk '/^0.0.0.0/ { print $$2 }'`
XDEBUG_MODE=\"debug,develop\" \
XDEBUG_TRIGGER=\"foo\" \
XDEBUG_CONFIG=\"client_port=${PHP_XDEBUG_PORT} client_host=$${DOCKER_HOST}\" \
$${COMMAND};
fi
"
lint_php:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
......
......@@ -40,9 +40,6 @@ class ShortcutButtonTest extends FunctionalTestCase
{
self::assertFalse((new ShortcutButton())->isValid());
self::assertTrue((new ShortcutButton())->setRouteIdentifier('web_list')->isValid());
// @todo Remove below in v12
self::assertTrue((new ShortcutButton())->setArguments(['route' => 'web_list'])->isValid());
self::assertTrue((new ShortcutButton())->setModuleName('web_list')->isValid());
}
/**
......@@ -72,14 +69,6 @@ class ShortcutButtonTest extends FunctionalTestCase
->setDisplayName('Recordlist'),
'RecordListCopyToClipboard',
];
// @todo Below is deprecated functionality which only provides backwards compatibility for v11. Remove in v12!
yield 'Recordlist as route path' => [
(new ShortcutButton())
->setRouteIdentifier('/module/web/list')
->setDisplayName('Recordlist')
->setCopyUrlToClipboard(false),
'RecordList',
];
yield 'Recordlist - single table view' => [
(new ShortcutButton())
->setRouteIdentifier('web_list')
......@@ -155,22 +144,6 @@ class ShortcutButtonTest extends FunctionalTestCase
]),
'SpecialRouteIdentifierWithArgumentsCopyToClipboard',
];
// @todo Below is deprecated functionality which only provides backwards compatibility for v11. Remove in v12!
yield 'With special route path' => [
(new ShortcutButton())
->setRouteIdentifier('/record/edit')
->setDisplayName('Edit record')
->setCopyUrlToClipboard(false),
'SpecialRouteIdentifier',
];
// @todo Below is deprecated functionality which only provides backwards compatibility for v11. Remove in v12!
yield 'With special route path as Argument' => [
(new ShortcutButton())
->setArguments(['route' => '/record/edit'])
->setDisplayName('Edit record')
->setCopyUrlToClipboard(false),