Review main Merged

62427[BUGFIX] Fix compatibility with symfony/dependency-injection:5.0

Benjamin Franzke CR +2 V +2 Easy +32 −7 updated 11/27/19, 21:31

Commit message

The recently released symfony 4.4 introduced a deprecation for
non-object services and so 5.0 dropped support.
That means we run into exception with symfony 5.0 when
we add synthetic non-object services. Symfony 5.0 contains
a type declaration that allows for objects only:

Argument 2 passed to
Symfony\Component\DependencyInjection\Container::set()
must be an object or null, bool given, called in
[…]/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php
on line 99
at
Symfony\Component\DependencyInjection\Container->set(
    '_early.env.is_unix',
    true
)

We provided four boolean services in v10.0 but never used
or documented these in core, therefore we drop them now:
 - env.is_unix
 - env.is_windows
 - env.is_cli
 - env.is_compoer_mode

These variales can actually be substitued by using dynamic
environment parameters (those are supported thanks to our
EnvVarProcessor):

 - "%env(TYPO3:isUnix)%"
 - "%env(TYPO3:isWindows)%"
 - "%env(TYPO3:isCli)%"
 - "%env(TYPO3:isComposerMode)%"

One more, internally used, boolean service is now migrated into
the internal boot.state service:

 - cache.disabled

Review

  • Code review CR +2 Done
    • Richard Haeser +2
    • Frank Nägler +1
  • Verified V +2 Done
    • Richard Haeser +2
    • Frank Nägler +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 911

  1. Benjamin Franzke uploaded patch set 1 11/25/19, 09:57

  2. TYPO3com voted on patch set 1 V +1 11/25/19, 10:04 Completed build in 07m 10s on Mon, 25 Nov, 10:04 AM Test Summary: 48161 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38813

  3. Benni Mack voted on patch set 1 V +1 CR +1 11/25/19, 15:10

  4. Alexander Schnitzler commented on patch set 1 V +1 CR +1 11/26/19, 10:06

    Unresolved

    out our? Did you mean: our own?

    ServiceProvider.php:61 Unresolved

    I know that you are not so much if an IDE guy but we could use a variable here with a doc block, exposing the actual type of $container->get('boot.state') here.
  5. Richard Haeser updated the commit message in patch set 2 11/27/19, 21:21

  6. Richard Haeser voted on patch set 2 V +1 CR +1 11/27/19, 21:21

  7. Frank Nägler voted on patch set 2 CR +1 11/27/19, 21:22

  8. Frank Nägler voted on patch set 2 V +1 11/27/19, 21:28

  9. TYPO3com voted on patch set 2 V +1 11/27/19, 21:29 Completed build in 08m 00s on Wed, 27 Nov, 09:29 PM Test Summary: 48165 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-38868

  10. Richard Haeser voted on patch set 2 V +2 CR +2 11/27/19, 21:31

  11. Richard Haeser merged patch set 3 11/27/19, 21:31