Skip to content

Commit d8c3bb8

Browse files
authored
Fix shared & Symfony web tests (#3298)
* Bump symfony flex for web tests Signed-off-by: Bob Weinand <[email protected]> * Fixup Laravel latest job * Fix Signed-off-by: Bob Weinand <[email protected]> * Fix Signed-off-by: Bob Weinand <[email protected]> * Avoid distinct tests for apache and non-apache on symfony * Fix shared php flavour Signed-off-by: Bob Weinand <[email protected]> --------- Signed-off-by: Bob Weinand <[email protected]>
1 parent a9cb098 commit d8c3bb8

23 files changed

Lines changed: 201 additions & 2104 deletions

.gitlab/generate-shared.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@
134134
SWITCH_PHP_VERSION: nts
135135
artifacts: true
136136
script:
137+
- switch-php nts
138+
<?php if (version_compare($major_minor, "7.4", "<=")): ?>
139+
- echo "extension=json.so" | sudo tee $(php -i | awk -F"=> " '/Scan this dir for additional .ini files/ {print $2}')/json.ini
140+
<?php endif; ?>
141+
- echo "extension=curl.so" | sudo tee $(php -i | awk -F"=> " '/Scan this dir for additional .ini files/ {print $2}')/curl.ini
137142
- mkdir -p tmp/build_zai && cd tmp/build_zai
138143
- CMAKE_PREFIX_PATH=/opt/catch2 Tea_ROOT=../../tmp/tea/nts cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_ZAI_TESTING=ON -DRUN_SHARED_EXTS_TESTS=1 -DPhpConfig_ROOT=$(php-config --prefix) ../../zend_abstract_interface
139144
- make -j all
140-
- make test
145+
- TEA_INI_IGNORE=0 make test
141146
- grep -e "=== Total [0-9]+ memory leaks detected ===" Testing/Temporary/LastTest.log && exit 1 || true
142147
<?php
143148
endforeach;

.gitlab/generate-tests.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,10 @@ function before_script_steps() {
472472
KUBERNETES_MEMORY_REQUEST: 4Gi
473473
KUBERNETES_MEMORY_LIMIT: 4Gi
474474
SWITCH_PHP_VERSION: debug
475+
COMPOSER_VERSION: 2
475476
before_script:
476477
<?php before_script_steps() ?>
477-
- if [[ "$MAKE_TARGET" != "test_composer" ]] || ! [[ "$PHP_MAJOR_MINOR" =~ 8.[01] ]]; then sudo composer self-update --2 --no-interaction; fi
478+
- if [[ "$MAKE_TARGET" != "test_composer" ]] || ! [[ "$PHP_MAJOR_MINOR" =~ 8.[01] ]]; then sudo composer self-update --$COMPOSER_VERSION --no-interaction; fi
478479
- COMPOSER_MEMORY_LIMIT=-1 composer update --no-interaction # disable composer memory limit completely
479480
- make composer_tests_update
480481
- for host in ${WAIT_FOR:-}; do wait-for $host --timeout=30; done
@@ -539,7 +540,10 @@ function before_script_steps() {
539540
ARCH: "amd64"
540541
<?php if ($sapi): ?>
541542
DD_TRACE_TEST_SAPI: "<?= $sapi ?>"
542-
<? endif; ?>
543+
<?php endif; ?>
544+
<?php if (preg_match("(test_web_symfony_(2|30|33|40))", $target)): ?>
545+
COMPOSER_VERSION: 2.2
546+
<?php endif; ?>
543547

544548
<?php
545549
endforeach;

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ define run_opentelemetry_tests
12761276
endef
12771277

12781278
test_opentelemetry_beta: global_test_run_dependencies tests/Frameworks/Custom/OpenTelemetry/composer.lock-php$(PHP_MAJOR_MINOR) tests/OpenTelemetry/composer-beta$(shell [ $(PHP_MAJOR_MINOR) -le 81 ] && echo "-pre-8.1" || echo '').lock-php$(PHP_MAJOR_MINOR)
1279-
$(call run_opentelemetry_tests, OTEL_SERVICE_NAME=datadog/dd-trace-tests TESTSUITE_VENDOR_DIR=vendor-beta)
1279+
$(call run_opentelemetry_tests, TESTSUITE_VENDOR_DIR=vendor-beta)
12801280

12811281
tests/OpenTelemetry/composer-%.lock-php$(PHP_MAJOR_MINOR): tests/OpenTelemetry/composer-%.json
12821282
$(call run_composer_with_lock,tests/OpenTelemetry,composer-$(*).json)

tests/Frameworks/Symfony/Version_2_3/web/.htaccess

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ DirectoryIndex app.php
4545
# - disable this feature by commenting the following 2 lines or
4646
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
4747
# following RewriteCond (best solution)
48-
RewriteCond %{ENV:REDIRECT_STATUS} ^$
49-
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
48+
#RewriteCond %{ENV:REDIRECT_STATUS} ^$
49+
#RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
5050

5151
# If the requested filename exists, simply serve it.
5252
# We only want to let Apache serve files and not directories.

tests/Frameworks/Symfony/Version_2_8/web/.htaccess

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ DirectoryIndex app.php
4545
# - disable this feature by commenting the following 2 lines or
4646
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
4747
# following RewriteCond (best solution)
48-
RewriteCond %{ENV:REDIRECT_STATUS} ^$
49-
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
48+
#RewriteCond %{ENV:REDIRECT_STATUS} ^$
49+
#RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
5050

5151
# If the requested filename exists, simply serve it.
5252
# We only want to let Apache serve files and not directories.

tests/Frameworks/Symfony/Version_4_0/composer.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
"php": "^7.1.3",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8+
"composer/package-versions-deprecated": "^1.11",
9+
"doctrine/annotations": "^1.0",
10+
"doctrine/doctrine-bundle": "^1.10",
11+
"doctrine/doctrine-migrations-bundle": "^2.2",
12+
"doctrine/orm": "^2.7",
13+
"phpdocumentor/reflection-docblock": "^4.3",
814
"sensio/framework-extra-bundle": "^5.1",
915
"symfony/asset": "4.0.*",
1016
"symfony/console": "4.0.*",
@@ -14,10 +20,11 @@
1420
"symfony/form": "4.0.*",
1521
"symfony/framework-bundle": "4.0.*",
1622
"symfony/monolog-bundle": "^3.1",
17-
"symfony/orm-pack": "*",
1823
"symfony/process": "4.0.*",
24+
"symfony/property-access": "4.0.*",
25+
"symfony/property-info": "4.0.*",
1926
"symfony/security-bundle": "4.0.*",
20-
"symfony/serializer-pack": "*",
27+
"symfony/serializer": "4.0.*",
2128
"symfony/swiftmailer-bundle": "^3.1",
2229
"symfony/translation": "4.0.*",
2330
"symfony/twig-bundle": "4.0.*",
@@ -27,10 +34,14 @@
2734
},
2835
"require-dev": {
2936
"doctrine/migrations": "^2.0",
30-
"symfony/debug-pack": "*",
37+
"symfony/browser-kit": "4.0.*",
38+
"symfony/css-selector": "4.0.*",
39+
"symfony/debug-bundle": "4.0.*",
3140
"symfony/maker-bundle": "^1.0",
32-
"symfony/profiler-pack": "*",
33-
"symfony/test-pack": "*",
41+
"symfony/phpunit-bridge": "^5.1",
42+
"symfony/stopwatch": "4.0.*",
43+
"symfony/var-dumper": "4.0.*",
44+
"symfony/web-profiler-bundle": "4.0.*",
3445
"symfony/web-server-bundle": "4.0.*"
3546
},
3647
"config": {

tests/Frameworks/Symfony/Version_4_0/composer.lock

Lines changed: 15 additions & 156 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)