Review main Abandoned

64562[BUGFIX] Avoid PHP 7.4 notices with nikic/php-parser

Benni Mack CR 0 V 0 Hard +6 −440 updated 05/25/20, 12:37

Commit message

TYPO3 v9 is loaded with nikic/php-parser 4.2.2
and TYPO3 v10 with 4.3.0.

In order to avoid PHP notices, which are fixed
in later versions of this dependency, both branches
raise the shipped version to its current version 4.4.0.

  composer update nikic/php-parser --with-all-dependencies

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 810

  1. Benni Mack uploaded patch set 1 05/22/20, 11:06

  2. Benni Mack updated the commit message in patch set 2 05/22/20, 11:07

  3. TYPO3com voted on patch set 1 V +1 05/22/20, 11:17 Completed build in 11m 28s on Fri, 22 May, 11:17 AM Test Summary: 73805 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3486

  4. Oliver Klee commented on patch set 2 05/22/20, 11:18

    This does not solve this problems for Composer-based installations. We either need to have a corresponding dependency in the composer.json or a conflict with older versions (which is what I would prefer as long as we to not use the parser directly).

    composer.lock:1511

    Are you using an older version of Composer here so that it removed these lines?
  5. TYPO3com voted on patch set 2 V +1 05/22/20, 11:28 Completed build in 20m 10s on Fri, 22 May, 11:28 AM Test Summary: 73805 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3487

  6. Benni Mack commented on patch set 2 05/22/20, 13:29

    Reply

    composer-based projects usually run with the latest versions when setting up a new installation or when running "composer update typo3/cms-* --with-dependencies". So in 99% of the cases, composer-based installations run more up-to-date versions of dependencies than tarball/zip distributions. In our case, we would need to add a conflict for composer when running PHP 7.4 which is technically only possible with a meta-package defining a PHP constraint + php-parser constraint. We actually use the parser directly in our code btw.

    composer.lock:1511 Reply Unresolved

    composer version 1.10.5
  7. Oliver Klee commented on patch set 2 CR -1 05/22/20, 13:36

    Reply

    > We actually use the parser directly in our code btw. Then we also need to have a direct dependency. (Relying on transitive dependencies is very risky.) > composer-based projects usually run with the latest versions when setting up a new installation or when running "composer update typo3/cms-* --with-dependencies". I know. However, in my projects' CI, I often test with both the highest as well as the lowest dependencies to make sure the code works correctly in both cases. (Users might have other depemdencies that might cause a lower version of a package to be installed. In that cases, the user should be able to rely on Composer warning them instead of seeing their code break at some later point.)
  8. Benni Mack commented on patch set 2 05/22/20, 13:40

    Reply Unresolved

    >> We actually use the parser directly in our code btw. > Then we also need to have a direct dependency. (Relying on transitive dependencies is very risky.) We do. It's "nikic/php-parser": "^4.3". OK - regarding your CI in your projects... I don't exactly understand now, what we should do to solve this issue other than my way. What is your proposal for TYPO3 Core then? If your project runs with PHP 7.4 on CI, you should require the correct version then in your project?
  9. Benni Mack commented on patch set 2 05/25/20, 12:37

    when doing a composer require, I noticed we don't even need 4.4.0 right now. So this change will be 9.5 only
  10. Benni Mack abandoned the change 05/25/20, 12:37