PHPackages                             survos/landing-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. survos/landing-bundle

Abandoned → [survos/bootstrap-bundle](/?search=survos%2Fbootstrap-bundle)Symfony-bundle[Utility &amp; Helpers](/categories/utility)

survos/landing-bundle
=====================

Add some tools and resources to a Symfony5 application

1.7.2(6y ago)0565MITTwigCI failing

Since Jul 31Pushed 2y ago2 watchersCompare

[ Source](https://github.com/survos/LandingBundle)[ Packagist](https://packagist.org/packages/survos/landing-bundle)[ RSS](/packages/survos-landing-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (11)Versions (15)Used By (0)

landing-bundle
==============

[](#landing-bundle)

@todo:

Add new Bundle directory convention consistent with standard skeletons:

```
└── MyBundle/
    ├── config/
    ├── public/
    ├── src/
    │   └── MyBundle.php
    ├── templates/
    └── translations/

    class MyBundle extends Bundle
    {
        public function getPath(): string
        {
            return \dirname(__DIR__);
        }
    }

```

A moderately-opinionated bundle that provides a quick way to get up and running with Symfony, using best practices.

Besides the Symfony web skeleton, this bundle also requires:

- Javascript: jquery, bootstrap
- Symfony: KnpMenu, WebpackEncore

and recommends:

- Javascript: fontawesome
- Symfony: EasyAdminBundle

### Goals

[](#goals)

This bundle was created originally to isolate issues with other bundles and to get data on a website as quickly and painlessly as possible.

### Requirements

[](#requirements)

- composer
- PHP 7.1+
- yarn
- Symfony CLI (for running a local server, creating project, etc.)

### Create github Project

[](#create-github-project)

- Create a NEW repository

on github.com with no files (no README or license), clone it to some directory and go there.

```
 REPO=xml-serializer-demo && git clone git@github.com:tacman/$REPO.git && cd $REPO

```

- Create the Symfony Skeleton WITHOUT a git repo, then ADD the repo.

    mv .git .. &amp;&amp; symfony new --full . --no-git &amp;&amp; mv ../.git .

Create the project on heroku, after logging in

```
heroku create $REPO
 bin/console make:user User --is-entity --identity-property-name=email --with-password -n

# composer config extra.symfony.allow-contrib true

# interaction is required for the next commands, so if you're cutting and pasting, stop here!

# use the defaults (App\Entity\User)

```

### Create LoginFormAuthenticator

[](#create-loginformauthenticator)

```
bin/console make:auth

   1 # Login Form Authenticator
   AppAuthenticator
    # SecurityController
    # /logout
```

```
# Optional, since SurvosBaseBundle has this already, formatted for mobile
bin/console make:registration-form

# Now install the Landing (SurvosBase?) bundle
composer config minimum-stability dev
composer req survos/landing-bundle

    composer config repositories.adminlte '{"type": "vcs", "url": "git@github.com:tacman/AdminLTEBundle.git"}'

    composer config repositories.blog '{"type": "vcs", "url": "git@github.com:survos/OdiseoBlogBundle.git"}'

# local dev: create a symlink

composer config repositories.survoslanding '{"type": "path", "url": "../Survos/LandingBundle"}'
composer config repositories.geonames '{"type": "path", "url": "../Survos/geonames-bundle"}'
composer config repositories.phpspreadsheet '{"type": "path", "url": "../Survos/phpspreadsheet-bundle"}'

composer config repositories.multisearch '{"type": "vcs", "url": "git@github.com:tacman/PetkoparaMultiSearchBundle.git"}'

composer config repositories.captcha '{"type": "vcs", "url": "git@github.com:cyrilverloop/symfony-captcha-bundle.git"}'

composer config repositories.git-survoslanding '{"type": "vcs", "url": "https://github.com/survos/LandingBundle.git"}'

composer config repositories.git-geonames '{"type": "vcs", "url": "https://github.com/survos/geonames-bundle.git"}'

composer config repositories.flowdemo '{"type": "path", "url": "../Survos/../CraueFormFlowDemoBundle"}'

composer config repositories.social_post_bundle '{"type": "path", "url": "../Survos/social-post-bundle"}'

composer config repositories.social_post_bundle '{"type": "vcs", "url": "https://github.com/tacman/social-post-bundle"}'

# this is needed because it creates MAILER_DSN, which isn't created otherwise
# composer req mail
composer req knplabs/knp-menu-bundle:"^3.0@dev"

composer req survos/landing-bundle:"*@dev"
phpstorm .env

```

OR

```
composer req survos/landing-bundle

# creates survos_landing.yaml (a recipe would be nicer!)
bin/console survos:init

# edit .env and set MAILER_URL

```

Ugh, still doesn't work, needs a landing menu
=============================================

[](#ugh-still-doesnt-work-needs-a-landing-menu)

```
# introspection, creates menus, looks for entities, easyadmin, etc.
bin/console survos:configure

# symfony run -d yarn encore dev --watch

```

### Integrating Facebook and other OAuth

[](#integrating-facebook-and-other-oauth)

Go to

e.g.

```
composer require league/oauth2-facebook

```

The create an app and enable login:

Need a config script that asks for the ID and sets it in .env.local (or Heroku, etc.)

### Install and Configure UserBundle (optional)

[](#install-and-configure-userbundle-optional)

See \[docs/recommended\_bundles\]

#### If developing LandingBundle

[](#if-developing-landingbundle)

```
composer config repositories.survoslanding '{"type": "path", "url": "../Survos/LandingBundle"}'
composer req survos/landing-bundle:"*@dev"

```

#### Normal installation

[](#normal-installation)

Install the bundle, then go through the setup to add and configure the tools.

```
composer req survos/landing-bundle

yarn install

xterm -e "yarn run encore dev-server" &

composer req "kevinpapst/adminlte-bundle"
bin/console make:subscriber KnpMenuSubscriber "KevinPapst\AdminLTEBundle\Event\KnpMenuEvent"

bin/console survos:init

bin/console survos:config --no-interaction
bin/console doctrine:schema:update --force

```

#### survos:init

[](#survosinit)

First time setup, downloads jquery, bootstrap, etc. Also *modifies* some yaml files, and creates the first menu.

```
# config/packages/admin_lte.yaml
admin_lte:
    knp_menu:
        enable: true

    routes:
        adminlte_welcome: app_homepage
        adminlte_login: app_login
        adminlte_profile: app_profile
```

@todo: Generate this Controller and templates?

```
# config/routes/survos_landing.yaml
survos_landing: {path: /, controller: 'Survos\LandingBundle\Controller\LandingController::landing'}
# app_homepage: {path: /, controller: 'Survos\LandingBundle\Controller\LandingController::landing'}
app_logo: {path: /logo, controller: 'Survos\LandingBundle\Controller\LandingController::logo'}
app_profile: {path: /profile, controller: 'Survos\LandingBundle\Controller\LandingController::profile'}
# profile: {path: /profile, controller: 'Survos\LandingBundle\Controller\LandingController::profile'}
# logout: {path: /logout, controller: 'Survos\LandingBundle\Controller\LandingController::logout'}
# required if app_profile is used, since you can change the password from the profile
app_change_password: {path: /change-password, controller: 'Survos\LandingBundle\Controller\LandingController::changePassword'}
```

{% extends '@AdminLTE/layout/default-layout.html.twig' %} {% block page\_content %} {{ block('body') }} {% endblock %}

{% block logo\_mini %}**KPA**{% endblock %} {% block logo\_large '**KPA** Admin' %}

{% block page\_title 'KPA Admin' %} {% block page\_subtitle 'Songs and Music!' %}

#### Now install some bundles!

[](#now-install-some-bundles)

```
See the details at [Recommended Bundles](docs/recommended-bundles.md)

```

If you chosen to integrate the userbundle, update the schema and add an admin

```
bin/console doctrine:schema:update --force

symfony server:start --no-tls

```

When finished, the application will have a basic landing page with top navigation, optionally including login/registration pages. Logged in users with ROLE\_ADMIN will also (optionally) have links to easyadmin and api-platform.

### Api Platform

[](#api-platform)

@todo: put this in a survos:setup command.

- Expose the API routes (for jsRoutingBundle), and

```
# config/routes/api_platform.yaml
api_platform:
    resource: .
    type: api_platform
    prefix: /api
    options:
        expose: true
```

Create resources.yaml to store the configuration

```
# api/config/api_platform/resources.yaml
App\Entity\User: ~
App\Entity\Location:
  shortName: 'Location'                   # optional
  description: 'A place within a building where inventory item is physically located.' # optional
  attributes:                          # optional
    pagination_items_per_page: 30   # optional
    normalization_context:
      groups: ['jstree']
    denormalization_context:
      groups: ['jstree']
```

Add the resources.yaml directory to the mapping paths

```
# config/packages/api_platform.yaml
api_platform:
    mapping:
        paths:
            - '%kernel.project_dir%/src/Entity'
            - '%kernel.project_dir%/config/api_platform' # yaml or xml directory configuration]
    patch_formats:
        json: ['application/merge-patch+json']
    swagger:
        versions: [3]
```

Configure the serializer (may need to create the directory)

```
# config/serializer/serialization.yaml
App\Entity\User:
  attributes:
    id:
      groups: ['Default']
    email:
      groups: ['Default']

App\Entity\Song:
  attributes:
    title:
      groups: ['Default']
```

### Customizing the bundle

[](#customizing-the-bundle)

### Deploy to heroku

[](#deploy-to-heroku)

```
heroku create $projectName

echo "web:  vendor/bin/heroku-php-nginx -C heroku-nginx.conf  -F fpm_custom.conf public/" > Procfile

heroku buildpacks:add heroku/nodejs
heroku buildpacks:add --index 2 heroku/nodejs

composer config --unset repositories.survoslanding && composer update
git commit -m "unset survoslanding" . && git push heroku master

```

bin/console survos:setup-heroku

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~41 days

Total

14

Last Release

2242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21b39551f92ed4143772c622f9e571589c5a72c96ab3c53fe67489ce0d83e806?d=identicon)[tacman1123](/maintainers/tacman1123)

---

Top Contributors

[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (95 commits)")[![tac-survos](https://avatars.githubusercontent.com/u/161215078?v=4)](https://github.com/tac-survos "tac-survos (9 commits)")

---

Tags

generatorSkeletonsymfony4symfony5

### Embed Badge

![Health badge](/badges/survos-landing-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/survos-landing-bundle/health.svg)](https://phpackages.com/packages/survos-landing-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M717](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M465](/packages/pimcore-pimcore)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[oro/platform

Business Application Platform (BAP)

642140.7k105](/packages/oro-platform)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
