Skip to content

Commit

Permalink
Merge pull request #874 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
v2.15.0
  • Loading branch information
orakili committed Aug 27, 2024
2 parents e5d392f + db0cc51 commit 7e4f199
Show file tree
Hide file tree
Showing 101 changed files with 1,737 additions and 1,601 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: cafuego/command-output@main
with:
run: |
php --version && composer --version
docker --version && php --version && composer --version
- name: Composer Validate
id: validate
Expand Down Expand Up @@ -153,6 +153,22 @@ jobs:
threshold_metric: "lines"
comment_footer: false

- name: DB Logs
id: dblog
if: failure()
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal drush watchdog:show
- name: PHP Logs
id: phplog
if: failure()
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml exec -T drupal grep -i fatal /var/log/php/error.log
- name: Find Comment
uses: peter-evans/find-comment@v3
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -185,6 +201,9 @@ jobs:
<details><summary>Drupal Logs</summary>
<code>${{ steps.dblog.outputs.stdout }}</code>
</details>
<details><summary>PHP Logs</summary>
<code>${{ steps.phplog.outputs.stdout }}</code>
</details>
*Pusher: @${{ github.actor }}, Action: `${{ github.event_name }}`, Workflow: `${{ github.workflow }}`*
edit-mode: replace
Expand Down
268 changes: 106 additions & 162 deletions PATCHES/core--drupal--3008292-image-upload-validators.patch

Large diffs are not rendered by default.

297 changes: 0 additions & 297 deletions PATCHES/core--drupal--3047110-taxonomy-term-moderation-class.patch

This file was deleted.

12 changes: 12 additions & 0 deletions PATCHES/imageapi_optimize_webp--3424324-property-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/Controller/ImageStyleDownloadController.php b/src/Controller/ImageStyleDownloadController.php
--- a/src/Controller/ImageStyleDownloadController.php (revision c1afae65e07b47ff8abb909fdf35303b36493806)
+++ b/src/Controller/ImageStyleDownloadController.php (date 1709116553784)
@@ -40,7 +40,7 @@
}
$path_info = pathinfo($target);
// If .webp file, look for image to derive from.
- if ($path_info['extension'] == 'webp') {
+ if (isset($path_info['extension']) && $path_info['extension'] === 'webp') {
$image_uri = $scheme . '://' . $target;
// Continue processing if source found, else throw NotFoundHttpException.
if ($source_uri = $this->lookupSourceImage($image_uri)) {
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/src/Controller/ImageStyleDownloadController.php b/src/Controller/ImageStyleDownloadController.php
index c8c9d67..9c33d76 100644
--- a/src/Controller/ImageStyleDownloadController.php
+++ b/src/Controller/ImageStyleDownloadController.php
@@ -33,7 +33,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
/**
* {@inheritdoc}
*/
- public function deliver(Request $request, $scheme, ImageStyleInterface $image_style) {
+ public function deliver(Request $request, $scheme, ImageStyleInterface $image_style, string $required_derivative_scheme) {
$target = $request->query->get('file');
if (!$target) {
throw new NotFoundHttpException();
@@ -46,7 +46,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
if ($source_uri = $this->lookupSourceImage($image_uri)) {
// Replace webp image with source image and call parent:deliver().
$request->query->set('file', str_replace($scheme . '://', '', $source_uri));
- $source_response = parent::deliver($request, $scheme, $image_style);
+ $source_response = parent::deliver($request, $scheme, $image_style, $required_derivative_scheme);
$derivative_uri = $image_style->buildUri($image_uri);
// If parent:deliver() returns BinaryFileResponse, we'll replace
// the BinaryFileResponse with one containing the .webp image
@@ -71,7 +71,7 @@ class ImageStyleDownloadController extends CoreImageStyleDownloadController {
throw new NotFoundHttpException();
}
else {
- return parent::deliver($request, $scheme, $image_style);
+ return parent::deliver($request, $scheme, $image_style, $required_derivative_scheme);
}
}

Loading

0 comments on commit 7e4f199

Please sign in to comment.