Skip to content

Symfony receipie #2

Description

@disjfa

Symfony 4 uses receipes to easy install bundles. Maybe you can one, so your bundle is set up easily.

The receipies can be found here.
https://flex.symfony.com
https://github.com/symfony/recipes-contrib

I also added one a bundle of mine, example here https://github.com/symfony/recipes-contrib/tree/master/disjfa/mozaic-bundle/0.1

So the minimal way is to set it up like that, routes and config in the config folders and a manifest. Lets check what to add default.

config/packages/phpmob_settings.yaml

# use with doctrine orm
doctrine:
    orm:
        mappings:
            PhpMobSettings:
                type: xml
                is_bundle: false
                prefix: PhpMob\Settings\Model
                dir: '%kernel.project_dir%/vendor/phpmob/settings-bundle/src/Resources/config/doctrine/model'

phpmob_settings:

config/routes/phpmob_settings.yaml

_phpmob_settings:
    resource: '@PhpMobSettingsBundle/Resources/config/routing.xml'
    prefix:  /admin

manifest.json

{
    "bundles": {
        "PhpMob\\SettingsBundle\\PhpMobSettingsBundle": [
            "all"
        ]
    },
    "copy-from-recipe": {
        "config/": "%CONFIG_DIR%/"
    }
}

That should do it and it would be autloaded. If you want i can also just set it up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions