From 3d1c6ad7742bbf4b7d3ca33fb54ecaa383be4306 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 21 Jun 2024 09:02:47 +0200 Subject: [PATCH 1/3] Use correct API doc root by reading it from the request Fixes #2611 Also we should not append /api since the swagger already does this. (cherry picked from commit 7858e80f6eef33a749a845edd054d812b11507d9) --- webapp/config/packages/nelmio_api_doc.yaml | 4 +-- .../ExternalDocDescriber.php | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 webapp/src/NelmioApiDocBundle/ExternalDocDescriber.php diff --git a/webapp/config/packages/nelmio_api_doc.yaml b/webapp/config/packages/nelmio_api_doc.yaml index 2453372b42..5904171595 100644 --- a/webapp/config/packages/nelmio_api_doc.yaml +++ b/webapp/config/packages/nelmio_api_doc.yaml @@ -1,9 +1,9 @@ nelmio_api_doc: documentation: servers: - - url: "%domjudge.baseurl%api" + - url: ~ # Will be set by App\NelmioApiDocBundle\ExternalDocDescriber description: API used at this contest - - url: https://www.domjudge.org/demoweb/api + - url: https://www.domjudge.org/demoweb description: New API in development info: title: DOMjudge diff --git a/webapp/src/NelmioApiDocBundle/ExternalDocDescriber.php b/webapp/src/NelmioApiDocBundle/ExternalDocDescriber.php new file mode 100644 index 0000000000..2805d51b55 --- /dev/null +++ b/webapp/src/NelmioApiDocBundle/ExternalDocDescriber.php @@ -0,0 +1,29 @@ +requestStack->getCurrentRequest(); + $this->decorated->describe($api); + Util::merge($api->servers[0], ['url' => $request->getSchemeAndHttpHost(),], true); + } +} From b8e4405eedc98bbde09c0232398908968e75371c Mon Sep 17 00:00:00 2001 From: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> Date: Fri, 1 Nov 2024 09:34:36 +0100 Subject: [PATCH 2/3] Skip C++ test for fedora Fedora 41 seems to ship with C++ support either in the package or via dependencies. Exclude it as a quick fix. (cherry picked from commit fb67ba708f9f9b93387898935c33f652598c4102) --- .github/jobs/configure-checks/all.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/jobs/configure-checks/all.bats b/.github/jobs/configure-checks/all.bats index 0b422e1067..666d391564 100755 --- a/.github/jobs/configure-checks/all.bats +++ b/.github/jobs/configure-checks/all.bats @@ -111,6 +111,10 @@ compile_assertions_finished () { } @test "Install GNU C only" { + if [ "$distro_id" = "ID=fedora" ]; then + # Fedora ships with a gcc with enough C++ support + skip + fi repo-remove clang g++ repo-install gcc libcgroup-dev compiler_assertions gcc '' From 2233361f2b9c7377bee937d615164993299e7641 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Tue, 12 Nov 2024 14:08:12 +0100 Subject: [PATCH 3/3] Use PHPStan version from composer (cherry picked from commit f90dbe542f251fba2ba90eb6eae49700641fb29c) --- .github/workflows/phpstan.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index d2577b6018..fb628abaf4 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -21,3 +21,4 @@ jobs: configuration: phpstan.dist.neon path: webapp/src webapp/tests php_extensions: gd intl mysqli pcntl zip + version: composer