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

Add recipe for fluffydiscord/roadrunner-symfony-bundle #1672

Conversation

FluffyDiscord
Copy link
Contributor

Copy link

github-actions bot commented Sep 16, 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-contrib/flex/pull-1672/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1672/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'fluffydiscord/roadrunner-symfony-bundle:^3.0'
  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.

fluffydiscord/roadrunner-symfony-bundle

2.3 vs 3.0
diff --git a/fluffydiscord/roadrunner-symfony-bundle/2.3/config/packages/fluffy_discord_road_runner.yaml b/fluffydiscord/roadrunner-symfony-bundle/3.0/config/packages/fluffy_discord_road_runner.yaml
index b8ccb966..bd3ac37a 100644
--- a/fluffydiscord/roadrunner-symfony-bundle/2.3/config/packages/fluffy_discord_road_runner.yaml
+++ b/fluffydiscord/roadrunner-symfony-bundle/3.0/config/packages/fluffy_discord_road_runner.yaml
@@ -19,6 +19,21 @@ fluffy_discord_road_runner:
         # and then use dynamic worker scaling as described here https://docs.roadrunner.dev/php-worker/scaling
         lazy_boot: false
 
+        # Optional
+        # -----------
+        # This decides if Symfony routing should be preloaded when worker starts and boots Symfony kernel.
+        # This option halves the initial request response time.
+        # (based on a project with over 400 routes and quite a lot of services, YMMW)
+        #
+        # true (default in PROD) - sends one dummy (empty) HTTP request to the kernel to initialize routing and services around it
+        # false (default in DEV) - only when first worker request arrives, routing and services are loaded
+        #
+        # You might want to create a dummy "/" route for the route to "land",
+        # or listen to onKernelRequest events and look in the request for the attribute
+        # FluffyDiscord\RoadRunnerBundle\Worker\HttpWorker::DUMMY_REQUEST_ATTRIBUTE
+        # Set this to "false" if you have any issues and report them to me.
+        early_router_initialization: true
+
     # https://docs.roadrunner.dev/plugins/centrifuge
     centrifugo:
         # Optional
@@ -49,3 +64,7 @@ fluffy_discord_road_runner:
         # for end-to-end encryption. "sodium" php extension is required.
         # https://docs.roadrunner.dev/key-value/overview-kv#end-to-end-value-encryption
         keypair_path: bin/keypair.key
+
+when@dev:
+    fluffy_discord_road_runner:
+        early_router_initialization: false

auto-merge was automatically disabled September 16, 2024 14:01

Head branch was pushed to by a user without write access

@FluffyDiscord
Copy link
Contributor Author

The run updated recipes Github action is failing because of unsupported PHP version. Am I required to downgrade my bundle to support php 7.4 and 8.1?

@diimpp
Copy link
Member

diimpp commented Nov 12, 2024

@FluffyDiscord Hi, do you plan to resolve review's comments?

The run updated recipes Github action is failing because of unsupported PHP version. Am I required to downgrade my bundle to support php 7.4 and 8.1?

No, it's just how CI is configured, PR can be accepted even without passing tests due version mismatch.

@FluffyDiscord
Copy link
Contributor Author

@FluffyDiscord Hi, do you plan to resolve review's comments?

The run updated recipes Github action is failing because of unsupported PHP version. Am I required to downgrade my bundle to support php 7.4 and 8.1?

No, it's just how CI is configured, PR can be accepted even without passing tests due version mismatch.

Sorry for the delay. I will look at it tomorrow.

auto-merge was automatically disabled November 13, 2024 21:56

Head branch was pushed to by a user without write access

@FluffyDiscord
Copy link
Contributor Author

Also added new version for major release.

@symfony-recipes-bot symfony-recipes-bot merged commit dd311ac into symfony:main Nov 14, 2024
1 of 2 checks passed
@FluffyDiscord FluffyDiscord deleted the flufffy-discord-road-runner-bundle branch November 14, 2024 06:46
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.

4 participants