-
-
Notifications
You must be signed in to change notification settings - Fork 630
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
Bref Symfony Bridge recipe #1127
Comments
We accept recipes for any packages available on Packagist (we do have plenty on non-bundles already). Replacing an existing file is not an option as it would make debugging/upgrading/... much harder. We should find another way. Maybe the new runtime component can help here? Generating files is one of the things a recipe can do, so I don't any issue here. |
@fabpot thank you for the answer!
Nyholm is working hard on that, the runtime component could be useful in some ways, but AFAIK not directly for this problem. On Lambda, logs & cache need to be moved elsewhere (because the filesystem is read-only except for Worst case scenario: we ask the user to do the change manually, which isn't the end of the world. But I'd love to know if there's an alternative that could be automated. |
What about adding a ServerlessKernel.php file next to the Kernel and tell the user to change one line in index.php ? |
@OskarStark that is the same amount of changes as telling the user to extend Bref's modified Kernel. |
IMHO it's just moving the manual action to another place. The current documented way with the Kernel is below and moving to index.php would be similar. // src/Kernel.php
namespace App;
+ use Bref\SymfonyBridge\BrefKernel;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
- class Kernel extends BaseKernel
+ class Kernel extends BrefKernel
{
// ... |
Ok I thought it would need more adjustments 👍🏻 |
Thanks everyone for the input ! @ker0x I think we should start simple
Once done, we could see what more can be done with the Kernel. What do you think ? |
@t-richard sounds good, though I wouldn't put any documentation file in the project: readers should be following the documentation already so we can explain the last step there. |
@t-richard it sounds good to me too, I will start to work on it this week probably ! @mnapoli At first the |
@ker0x I'd rather not have a documentation file inserted into the project, that doesn't correspond to any practice found in other open-source projects. Users are already following the documentation, we can instruct them on what to do inside the documentation. |
I'm closing the issue as #1129 has been merged. Thanks to everyone for your advices and reviews ❤️ |
Thank you @ker0x! |
Hello
After some discussion with @mnapoli and @t-richard, we would like to propose a recipe for brefphp/symfony-bridge.
Currently the recipe will focus on doing 3 things:
However, before opening a PR we have some questions in suspend.
The library is not a Symfony bundle, so we were wondering if a recipe would be accepted for it?
Next, to work the bridge has to replace the default
Kernel.php
created by Symfony with a new one extended it to override the cache and logs directories. Is it something a recipe is allowed to do or is it only permitted by offcial recipes (or totally forbidden) ?Finally, the recipe will create a
serverless.yml
configuration file at the root of the project. Does this file should be store on the library side or recipe side?The text was updated successfully, but these errors were encountered: