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 docs about applications with Symfony Runtime #1032

Closed
wants to merge 3 commits into from

Conversation

Nyholm
Copy link
Contributor

@Nyholm Nyholm commented Sep 19, 2021

I thought about making this part of the existing Symfony page, however, it didn't really fit. First, the Runtime component works very well with Symfony apps, Laravel app, PSR-15 apps and pure PHP applications. I also didnt want to remove docs how to use Bref with non-runtime symfony applications.

That is why I added a new page. This page describe how to install and deploy a pure PHP application with the Runtime component. If you want to add assets you still need to read the Symfony/Laravel docs.

This PR follows the recipe: symfony/recipes#1001

@deleugpn
Copy link
Member

The resistence I have with this is that Bref first philosophy is

simplify problems by removing choices

While I think Symfony Runtime seems a very interesting concept, it brings a bit of overhead coupled with something that's experimental.

@Nyholm
Copy link
Contributor Author

Nyholm commented Sep 19, 2021

Thank you for your quick reply.

Could you elaborate what you mean with "overhead"? Are you talking about loading ~5 extra files? When I did some tests I found using the runtime component was faster that starting PHP-FPM.

Yes, the component is marked as "experimental" for about 2 more months. It is really unlikely there will be any BC breaks. I would not worry about adding docs about it.

I know that Bref is all about simplicity. I dont make a suggestion now, but using the Runtime component will remove the need for the console layer, FPM layer and FPM-debug layer. It will solve time timeout issue and make sure all PHP frameworks/apps have the same setup/install. But this can be discussed in another thread. This PR is just to explain how to deploy modern/symfony applications with Bref.

@deleugpn
Copy link
Member

deleugpn commented Sep 19, 2021

By overhead I mean cognitive overhead. It's a shiny new thing that has the potential to completely change how everyone runs PHP. Serverless is another shiny new thing. It has it's own set of resistence barriers. Although I think Serverless is where the Symfony Runtime will probably "shine the most", I feel it would lead to just more cognitive stress for people adopting serverless right now.

@deleugpn
Copy link
Member

deleugpn commented Sep 19, 2021

I'm not super fond of the fact the user is "forced" to have their own bootstrap file in order to correctly use runtime/bref (source https://github.com/php-runtime/bref#how-to-use). That seems a step backwards compared to running Bref with the existing layers. I understand there's an extra layer to "overcome" that limitation, but layers are scarse resources (we can only have 5) and putting the management of the bootstrap file onto users or 3rd-party library doesn't seem something that Bref should encourage.

@Nyholm
Copy link
Contributor Author

Nyholm commented Sep 19, 2021

I agree with you. Im not super excited about that either. It is very similar to the current Bref console layer.

I will try to make that bootstrap file as a part of Bref in the future. But I decided to start with some documentation.

@t-richard
Copy link
Member

I agree with you. Im not super excited about that either. It is very similar to the current Bref console layer.

And what about the runtime layer that was added in bref/extra-php-extensions ?

@Nyholm
Copy link
Contributor Author

Nyholm commented Sep 20, 2021

And what about the runtime layer that was added in bref/extra-php-extensions ?

That is a good idea. I opened #889 a while ago to discuss that. There are many things we can do to make the runtime component to work better with Bref. I am happy to do all of them, but we need to start somewhere. I thought it was a good idea to start writing docs.

@mnapoli
Copy link
Member

mnapoli commented Dec 30, 2021

As mentioned in #889:

🎉 Symfony runtime is now implemented and supported in https://github.com/brefphp/symfony-bridge

I've released a beta version, there should be a stable in the coming weeks!

@mnapoli mnapoli closed this Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants