Review main Abandoned

80492[WIP][TASK] Replace `php -S` with apache2 and libapache-php

Stefan Bürk CR 0 V 0 Normal +103 −60 updated 08/22/23, 05:45

Commit message

This change uses a apache2 based image using the
libapache-php module as replacement for the php
webserver `php -S`. That allows us to configure
a proper DocumentRoot now instead of using paths
from the document root. Therefore, files outside
the acceptance test instance are not retrievable
which can be seen as a additional guard.

* Use port 80 instead of 8000 the for acceptance
  and acceptanceInstall tests webserver.
* Use the acceptance test as DocumentRoot instead
  of the monorepo root.
* Copy several `.htaccess` files to the acceptance
  test instance as we now have a real apache2.
* Copy the favicon.ico to the test instance instead
  of the monorepo root.
* Ensure that created frontend siteconfiguration no
  longer uses the path into the test instance from
  the repository root. Simply use `/`.
* Instead of creating a additional container instance
  to execute the tests with codeception use `exec` in
  the spawned apache2 webserver container. Reduces the
  count of started containers and eliminates the need
  to mount for example the sqlite to two container.

Extract as pre-patch:

* [BUGFIX] Handle `UniqueConstraintViolationException`
  in `Registry->set()` properly.
* [BUGFIX] Stabilize EnableFileServiceTest
* [BUGFIX] Stabilize UsersCest
* [BUGFIX] Stabilize PageModuleCest

Note: Currently a dedicated build image is used as a
      test. This needs to be moved to the core-testing
      images instead, if this can be elevated and used
      as working replacement solution.

Used command(s):

> composer require --dev \
    "typo3/testing-framework":"dev-stefan-1"

Review

  • Code review CR 0
  • Verified V 0

Files 12

Review log 1322

  1. Stefan Bürk uploaded patch set 1 08/09/23, 14:23

  2. core-ci voted on patch set 1 V +1 08/09/23, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45282

  3. Mathias Brodala commented on patch set 1 08/10/23, 07:05

    Just curious: why?
  4. Stefan Bürk commented on patch set 1 08/10/23, 08:49

    Reply

    Multiple reasons. Unblocking features to be testable and other things. php -S does not support some things we need in the future to have in the testing.
  5. Stefan Bürk uploaded patch set 2 V +1 08/10/23, 18:02

  6. core-ci voted on patch set 2 V +1 08/10/23, 18:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45350

  7. Benni Mack commented on patch set 2 08/10/23, 18:24

    Reply

    A few reasons from my side: * We cannot test .htaccess stuff * I want to know if fpm is faster than php -S on acceptance tests
  8. Stefan Bürk uploaded patch set 3 V +1 08/11/23, 09:11

  9. Stefan Bürk uploaded patch set 4 08/11/23, 09:12

  10. core-ci voted on patch set 3 V -1 08/11/23, 09:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45370

  11. core-ci voted on patch set 4 V -1 08/11/23, 09:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45371

  12. Stefan Bürk uploaded patch set 5 V -1 08/11/23, 12:42

  13. core-ci voted on patch set 5 V -1 08/11/23, 12:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45384

  14. Stefan Bürk uploaded patch set 6 V -1 08/11/23, 13:49

  15. core-ci voted on patch set 6 V +1 08/11/23, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45388

  16. Stefan Bürk uploaded patch set 7 V +1 08/11/23, 14:52

  17. core-ci voted on patch set 7 V +1 08/11/23, 14:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45393

  18. Stefan Bürk rebased onto patch set 8 V +1 08/14/23, 07:22

  19. core-ci voted on patch set 8 V +1 08/14/23, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45468

  20. Stefan Bürk uploaded patch set 9 V +1 08/16/23, 16:18

  21. core-ci voted on patch set 9 V +1 08/16/23, 16:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45565

  22. Stefan Bürk abandoned the change 08/22/23, 05:45

    in favor for fpm approach