Skip to content

Add the webapp pack #1010

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

Merged
merged 1 commit into from
Oct 20, 2021
Merged

Add the webapp pack #1010

merged 1 commit into from
Oct 20, 2021

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Oct 20, 2021

Q A
License MIT

I'd like to deprecate the website-skeleton in favor of a new webapp pack.

The recommended pack is opinionated as it promotes the following:

  • Doctrine ORM
  • PostgreSQL as a default transport for Messenger (default recipes already makes PostgreSQL the default database choice)
  • Symfony Webpack Encore / Symfony UX

We might add additional opinionated choices over time.

The idea is to get something that works out of the box for most applications.

@github-actions
Copy link

github-actions bot commented Oct 20, 2021

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On *nix and Mac
    export SYMFONY_ENDPOINT=https://api.github.com/repos/symfony/recipes/contents/index.json?ref=flex/pull-1010
    # On Windows
    SET SYMFONY_ENDPOINT=https://api.github.com/repos/symfony/recipes/contents/index.json?ref=flex/pull-1010
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/webapp-pack:^1.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On *nix and Mac
    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.

@javiereguiluz
Copy link
Member

I agree on this idea ... but the recommended name concerns me. This comment:

The idea is to get something that works out of the box for most applications

I guess it refers to "web apps", not "apps in general" or specific apps such as "CLI apps", "microservices apps", etc.

That's why I think we should make it more clear that this is recommended for "web apps". Maybe we could think of other name? Random idea: web-starter

@fabpot
Copy link
Member Author

fabpot commented Oct 20, 2021

I would not use starter, but I do understand where you're coming from. We could also have another pack for CLI command projects for instance, but that would only be about 0 more dep (console is already installed by default), so not really needed (the same goes for API).
So, it looks like this is the "only" case where we would need more is web applications, which is the core of what people build with the full-stack framework, hence "recommended".

@fabpot
Copy link
Member Author

fabpot commented Oct 20, 2021

Would webapp-pack be better? People would use it as composer req webapp.

@fabpot
Copy link
Member Author

fabpot commented Oct 20, 2021

The only downside is that webapp does not convey the opinionated part of this pack.

@javiereguiluz
Copy link
Member

For reference purposes, Spring Framework has many kinds of starter project templates and they have one called "Spring Boot" which:

Takes an opinionated view of building Spring applications and gets you up and running as quickly as possible.

Also, we'd need to know if this concept of "project templates" is going to expand. "CLI apps" probably not needed because of what Fabien said above, but similar to what Apple's Xcode shows in "Create New Project" window:

We may want (in the future) to create a "cloud-first app", a "SPA app", etc.

@fabpot
Copy link
Member Author

fabpot commented Oct 20, 2021

We don't have a concept of project templates as we promote composition instead. So, a project is a blend of packages and packs that you can mix the way you want.
Again, I don't envision more than this webapp-pack in the future.

@fabpot fabpot changed the title Add the recommended pack Add the webapp pack Oct 20, 2021
@fabpot
Copy link
Member Author

fabpot commented Oct 20, 2021

PR updated accordingly.

@fabpot fabpot merged commit 1094526 into master Oct 20, 2021
@fabpot fabpot deleted the recommended-pack branch October 20, 2021 16:19
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.

2 participants