Giter Site home page Giter Site logo

Comments (12)

ker0x avatar ker0x commented on June 16, 2024 2

I'm closing the issue as #1129 has been merged. Thanks to everyone for your advices and reviews ❤️

from recipes-contrib.

fabpot avatar fabpot commented on June 16, 2024 1

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.

from recipes-contrib.

mnapoli avatar mnapoli commented on June 16, 2024 1

@OskarStark that is the same amount of changes as telling the user to extend Bref's modified Kernel.

from recipes-contrib.

OskarStark avatar OskarStark commented on June 16, 2024 1

Ok I thought it would need more adjustments 👍🏻

from recipes-contrib.

t-richard avatar t-richard commented on June 16, 2024 1

Thanks everyone for the input ! @ker0x I think we should start simple

  1. copy-from-recipe for the serverless.yaml
  2. add .serverless in gitignore
  3. add a post-install.txt to explain what to do with the kernel

Once done, we could see what more can be done with the Kernel.

What do you think ?

from recipes-contrib.

mnapoli avatar mnapoli commented on June 16, 2024

@fabpot thank you for the answer!

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?

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 /tmp). The only way to do that is by editing Kernel.php (unless there's another way?).

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.

from recipes-contrib.

OskarStark avatar OskarStark commented on June 16, 2024

What about adding a ServerlessKernel.php file next to the Kernel and tell the user to change one line in index.php ?

from recipes-contrib.

t-richard avatar t-richard commented on June 16, 2024

What about adding a ServerlessKernel.php file next to the Kernel and tell the user to change one line in index.php ?

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
{
    // ...

from recipes-contrib.

mnapoli avatar mnapoli commented on June 16, 2024

@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.

from recipes-contrib.

ker0x avatar ker0x commented on June 16, 2024

@t-richard it sounds good to me too, I will start to work on it this week probably !

@mnapoli At first the post-install.txt file will only show a link to the documentation (which will need to be updated though). We can always improve it later

from recipes-contrib.

mnapoli avatar mnapoli commented on June 16, 2024

@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.

from recipes-contrib.

mnapoli avatar mnapoli commented on June 16, 2024

Thank you @ker0x!

from recipes-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.