Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX LazyImage] Add initial recipe #1319

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented May 30, 2024

Q A
License MIT
Doc issue/PR symfony/symfony-docs#...

Hi everyone, this PR adds the recipe for symfony/ux-lazy-image.
It does not configure anything, instead it gives some hints about the bundle possibilities :)

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 30, 2024 10:06
Copy link

github-actions bot commented May 30, 2024

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1319/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1319/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/ux-lazy-image:^2.18'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

symfony/ux-lazy-image

2.17 vs 2.18
diff --git a/symfony/ux-lazy-image/2.17/config/packages/lazy_image.yaml b/symfony/ux-lazy-image/2.18/config/packages/lazy_image.yaml
index c701d01..0ea8aa9 100644
--- a/symfony/ux-lazy-image/2.17/config/packages/lazy_image.yaml
+++ b/symfony/ux-lazy-image/2.18/config/packages/lazy_image.yaml
@@ -1,4 +1,9 @@
 # lazy_image:
+    # By default, images are fetched through "file_get_contents" function, but you can use your own implementation 
+    # with an invokable service or a callable. 
+    # https://symfony.com/bundles/ux-lazy-image/current/index.html#customizing-images-fetching
+    # fetch_image_content: 'App\BlurHash\FetchImageContent'
+
     # It is recommended to cache the generated BlurHash for performance reasons, to avoid generating it for each request.
     # https://symfony.com/bundles/ux-lazy-image/current/index.html#performance-considerations
     # cache: cache.lazy_image

auto-merge was automatically disabled May 30, 2024 10:08

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 30, 2024 10:08
auto-merge was automatically disabled May 30, 2024 14:11

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 30, 2024 14:11
auto-merge was automatically disabled May 30, 2024 14:12

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 30, 2024 14:13
Comment on lines 2 to 5
# By default, images are fetch through "file_get_contents" function, but you can use your own implementation
# with an invokable service or a callable.
# https://symfony.com/bundles/ux-lazy-image/current/index.html#customizing-images-fetching
# fetch_image_content: 'App\BlurHash\FetchImageContent'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2.18 is not released yet, but it will ship symfony/ux#1781

auto-merge was automatically disabled May 30, 2024 22:16

Head branch was pushed to by a user without write access

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 30, 2024 22:16
@symfony-recipes-bot symfony-recipes-bot merged commit 8899269 into symfony:main Jun 2, 2024
1 of 2 checks passed
@Kocal Kocal deleted the feat/sf-lazy-image branch June 2, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants