Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Cleanup removed TYPO3 v11 support #383

Merged
merged 16 commits into from
Dec 11, 2024
Merged

[TASK] Cleanup removed TYPO3 v11 support #383

merged 16 commits into from
Dec 11, 2024

Conversation

sbuerk
Copy link
Contributor

@sbuerk sbuerk commented Dec 11, 2024

  • [TASK] Remove last traces for PHPUnit 9.x support
    Dual PHPUnit 9.x and 10.x support with typo3/testing-framework v7
    has been used in previous versions to allow testing for the full
    TYPO3 version range.

    Due to dropped TYPO3 v11 support, we can use PHPUnit 10.x completly,
    which has been prepared with the next major version preparation.

    This change removes the last dual version support switches, removes
    the PHPUnit 9.x configuration files and normalizes this to a single
    PHPUnit version usage.

  • [TASK] Remove php version guard for lintTypoScript in Build/Scripts/runTests.sh
    Due to some issues of the TypoScript linter a PHPVersion
    guard has been added in Build/Scripts/runTests.sh.

    Minimum PHP version has been raised while preparing for
    the next major version and made the aforementioned check
    obsolete and is now removed.

  • [TASK] Add native typing for Build/Scripts/validateRstFiles.php

  • [TASK] Ensure correct ext_emconf.php for test_services_override
    This change ensures correct ext_emconf.php for the
    test fixture extension test_services_override.

  • [TASK] Use camelcase extension key for extbase LocalizationUtility calls
    Extbase LocalizationUtility expectes the extension key in
    camelcase typing and converts to the lower cased extension
    key with underscores automatically.

    Use camelcase writing now in for LocalizationUtility calls.

  • [TASK] Avoid deprecated Doctrine DBAL methods
    After dropping TYPO3 v11 support, we can safely
    assume the new Doctrine DBAL methods, having at
    least Doctrine DBAL 3.x on board.

    Use fetchAssociative() instead of deprecated
    method fetch() to retrieve a single record.

  • [TASK] Remove cruser_id configuration support
    With TYPO3 12.0 the cruser_id TCA configuration
    feature has been removed completly. That has been
    covered for dual TYPO3 v11/v12 support previously
    within the TCA and TCAOverride files connected to
    Typo3Version->getMajorVersion() checks.

    Not having to support TYPO3 v11 anymore, this change
    removes the configuration completly.

  • [TASK] Align TCA configuration for required column option
    TYPO3 12.0 deprecated the old way to define a column
    as required as part of the eval [1] and introduced
    a new option as replacement [2].

    Until now this has been handled within the corresponding
    TCA Override file to keep support for TYPO3 v11 next to
    TYPO3 v12.

    This change removes the override and uses the new option
    in the TCA file directly.

    [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97035-RequiredOptionInEvalKeyword.html
    [2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.html

  • [TASK] Remove dual TCA option for DateTime columns
    With TYPO3 v12 a new TCA type=datetime has been introduced, which
    has been handled conditional for TYPO3 v11 and v12. [1][2]

    This change removes the TYPO3 v11 conditional handling of
    these configurations.

    [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97232-NewTCATypeDatetime.html
    [2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97358-RemovedEvalintFromTCATypeDatetime.html

  • [TASK] Use acciciative array keys for TCA items
    TYPO3 v12 changed some TCA definitions. Basically,
    these are covered for now by the provided TCA auto
    migration. That triggers E_USER_DEPREACTED errors
    which will fail in tests.

    TCA automigration and the E_USER_DEPRECATED notice
    has been mitigated with some version based switches
    within the TCA configuration to avoid failing tests.

    This change removes the version based configuration
    in favour of TYPO3 v12 only configuration.

    [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Deprecation-99739-IndexedArrayKeysForTCAItems.html
    [2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Feature-99739-AssociativeArrayKeysForTCAItems.html

  • [TASK] Remove obsolete ExtensionManagementUtility::allowTableOnStandardPages calls
    The ext_tables.php contains two calls to the deprecated
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages
    method called for no longer existing extension tables.

    Instead of migrating the calls to TCA Override configuration
    and creating broken tables, these calls are now removed due
    to beeing obsolete already since 2.x.

  • [TASK] Use UNIX-timestamp as exception codes in abstract testcase

  • [TASK] Add some method return type declarations
    This change adds some obvoius method
    return type declarations.

  • [TASK] Avoid deprecated TypoScriptFrontendController->doWorkspacePreview()
    With TYPO3 v12 some TypoScriptFrontendController methods
    has been deprecated in favour of the context class [1].

    This change replaces the method call following the recommended
    migration path noted in the TYPO3 changelog entry [1].

    [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97531-ContextRelatedMethodsWithinTSFE.html

  • [TASK] Migrate deprecated flash message constants
    TYPO3 v12 deprecated the use of the flash message
    constants (integer value) as message severitys in
    favour on a new native enum class [1].

    This change replaces usages of these constants
    with the enum as no TYPO3 v11 support is needed
    anymore and prepares for adding TYPO3 v13 support.

    Following UsageService methods are now marked as
    internal to make it clear:

    • determineSeverity()
    • determineSeverityForSystemInformation()

    [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97787-SeveritiesOfFlashMessagesAndReportsDeprecated.html

  • [TASK] Use PHPUnit attributes instead of annotations
    This change modifies the tests to use the php
    attributes provided by PHPUnit instead of the
    old php doc-block annotations.

    Used command(s):

    Build/Scripts/runTests.sh -t 12 -p 8.1 -s phpstanGenerateBaseline

Dual PHPUnit 9.x and 10.x support with `typo3/testing-framework` v7
has been used in previous versions to allow testing for the full
TYPO3 version range.

Due to dropped TYPO3 v11 support, we can use PHPUnit 10.x completly,
which has been prepared with the next major version preparation.

This change removes the last dual version support switches, removes
the PHPUnit 9.x configuration files and normalizes this to a single
PHPUnit version usage.
…runTests.sh`

Due to some issues of the TypoScript linter a PHPVersion
guard has been added in `Build/Scripts/runTests.sh`.

Minimum PHP version has been raised while preparing for
the next major version and made the aforementioned check
obsolete and is now removed.
This change ensures correct `ext_emconf.php` for the
test fixture extension `test_services_override`.
…calls

Extbase `LocalizationUtility` expectes the extension key in
camelcase typing and converts to the lower cased extension
key with underscores automatically.

Use camelcase writing now in for `LocalizationUtility` calls.
After dropping TYPO3 v11 support, we can safely
assume the new Doctrine DBAL methods, having at
least Doctrine DBAL 3.x on board.

Use `fetchAssociative()` instead of deprecated
method `fetch()` to retrieve a single record.
With TYPO3 12.0 the `cruser_id` TCA configuration
feature has been removed completly. That has been
covered for dual TYPO3 v11/v12 support previously
within the TCA and TCAOverride files connected to
`Typo3Version->getMajorVersion()` checks.

Not having to support TYPO3 v11 anymore, this change
removes the configuration completly.

* https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98024-TCA-option-cruserid-removed.html
TYPO3 12.0 deprecated the old way to define a column
as required as part of the `eval` [1] and introduced
a new option as replacement [2].

Until now this has been handled within the corresponding
TCA Override file to keep support for TYPO3 v11 next to
TYPO3 v12.

This change removes the override and uses the new option
in the TCA file directly.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97035-RequiredOptionInEvalKeyword.html
[2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97035-UtilizeRequiredDirectlyInTCAFieldConfiguration.html
With TYPO3 v12 a new TCA type=datetime has been introduced, which
has been handled conditional for TYPO3 v11 and v12. [1][2]

This change removes the TYPO3 v11 conditional handling of
these configurations.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97232-NewTCATypeDatetime.html
[2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-97358-RemovedEvalintFromTCATypeDatetime.html
TYPO3 v12 changed some TCA definitions. Basically,
these are covered for now by the provided TCA auto
migration. That triggers `E_USER_DEPREACTED` errors
which will fail in tests.

TCA automigration and the `E_USER_DEPRECATED` notice
has been mitigated with some version based switches
within the TCA configuration to avoid failing tests.

This change removes the version based configuration
in favour of TYPO3 v12 only configuration.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Deprecation-99739-IndexedArrayKeysForTCAItems.html
[2] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Feature-99739-AssociativeArrayKeysForTCAItems.html
…ardPages` calls

The `ext_tables.php` contains two calls to the deprecated
`\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages`
method called for no longer existing extension tables.

Instead of migrating the calls to TCA Override configuration
and creating broken tables, these calls are now removed due
to beeing obsolete already since 2.x.
This change adds some obvoius method
return type declarations.
…view()`

With TYPO3 v12 some `TypoScriptFrontendController` methods
has been deprecated in favour of the context class [1].

This change replaces the method call following the recommended
migration path noted in the TYPO3 changelog entry [1].

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97531-ContextRelatedMethodsWithinTSFE.html
TYPO3 v12 deprecated the use of the flash message
constants (integer value) as message severitys in
favour on a new native enum class [1].

This change replaces usages of these constants
with the enum as no TYPO3 v11 support is needed
anymore and prepares for adding TYPO3 v13 support.

Following `UsageService` methods are now marked as
internal to make it clear:

* determineSeverity()
* determineSeverityForSystemInformation()

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-97787-SeveritiesOfFlashMessagesAndReportsDeprecated.html
This change modifies the tests to use the php
attributes provided by PHPUnit instead of the
old php doc-block annotations.

Used command(s):

```bash
Build/Scripts/runTests.sh -t 12 -p 8.1 -s phpstanGenerateBaseline
```
@sbuerk sbuerk merged commit 70a5572 into main Dec 11, 2024
4 checks passed
@sbuerk sbuerk deleted the stefan-1 branch December 11, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants