LIN3S / SymfonyStandard

[UNMAINTAINED] Check https://github.com/LIN3S/PhpDDDStandard
14 stars 2 forks source link

routes profile #1

Closed pabarrientos closed 9 years ago

pabarrientos commented 9 years ago

Hello, i am from Argentina, i read the book write by Jon Torrado and i like the lin3s way.. :-). ok, i have an error on /profiel route using SymfonyStandard:

An exception has been thrown during the rendering of a template ("The block type "sonata.user.block.menu" does not exist") in SonataUserBundle:Profile:action.html.twig at line 27.

composer.json { "name": "lin3s/symfony-standard", "description": "The \"Symfony Standard Edition\" distribution in the LIN3S way", "keywords": ["lin3s", "symfony", "standard"], "type": "project", "license": "MIT", "authors": [ { "name": "LIN3S", "email": "info@lin3s.com", "homepage": "https://lin3s.com" } ], "require": { "php": ">=5.4",

    "doctrine/dbal":                                  "2.5.*",
    "doctrine/doctrine-bundle":                       "~1.4",
    "doctrine/orm":                                   "~2.2,>=2.2.3",
    "sensio/distribution-bundle":                     "~4.0",
    "sensio/framework-extra-bundle":                  "~3.0,>=3.0.2",
    "incenteev/composer-parameter-handler":           "~2.0",
    "symfony/monolog-bundle":                         "~2.4",
    "symfony/swiftmailer-bundle":                     "~2.3",
    "symfony/symfony":                                "2.7.*",

    "doctrine/migrations":                            "^1.0",
    "doctrine/doctrine-migrations-bundle":            "^1.0",
    "liip/imagine-bundle":                            "~1.3",
    "stof/doctrine-extensions-bundle":                "~1.1",

    "sonata-project/admin-bundle":                    "dev-master",
    "sonata-project/datagrid-bundle":                 "dev-master",
    "sonata-project/doctrine-orm-admin-bundle":       "dev-master",
    "sonata-project/easy-extends-bundle":             "dev-master",
    "sonata-project/user-bundle":                     "dev-master",

    "lin3s/cs":                                       "~0.1",
    "lin3s/lin3s-distribution":                       "~1.1",
    "lin3s/symfony-foundation":                       "~0.1"
},
"require-dev": {
    "behat/behat" :                                   "~3.0",
    "behat/mink-browserkit-driver":                   "~1.2",
    "behat/mink-extension" :                          "~2.0",
    "behat/symfony2-extension" :                      "~2.0",
    "behat/web-api-extension":                        "~1.0@dev",
    "doctrine/doctrine-fixtures-bundle":              "~2.2",
    "henrikbjorn/phpspec-code-coverage":              "~1.0",
    "phpspec/phpspec":                                "~2.1",
    "sensio/generator-bundle":                        "~2.3"
},
"scripts": {
    "post-root-package-install": [
        "SymfonyStandard\\Composer::hookRootPackageInstall"
    ],
    "post-install-cmd": [
        "LIN3S\\CS\\Composer\\Hooks::buildDistFile",
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "LIN3S\\CS\\Composer\\Hooks::addHooks",
        "LIN3S\\CS\\Composer\\Hooks::addFiles",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-update-cmd": [
        "LIN3S\\CS\\Composer\\Hooks::buildDistFile",
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "LIN3S\\CS\\Composer\\Hooks::addHooks",
        "LIN3S\\CS\\Composer\\Hooks::addFiles",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ]
},
"autoload": {
    "psr-4": { "": "src/" }
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": [
        {
            "file": "app/config/parameters.yml"
        },
        {
            "file": ".lin3s_cs.yml",
            "dist-file": ".lin3s_cs.yml.dist"
        }
    ]
}

}

config.yml

This file is part of the Symfony Standard project.

Copyright (c) 2015 LIN3S info@lin3s.com

For the full copyright and license information, please view the LICENSE

file that was distributed with this source code.

@author Jon Torrado jontorrado@gmail.com

@author Beñat Espiña benatespina@gmail.com

imports:

framework:

esi: ~

translator:      { fallbacks: ["%locale%"] }
secret:          "%secret%"
router:
    resource: "%kernel.root_dir%/config/routing.yml"
    strict_requirements: ~
form:            ~
csrf_protection: ~
validation:      { enable_annotations: true }
#serializer:      { enable_annotations: true }
templating:
    engines: ['twig']
    #assets_version: SomeVersionScheme
default_locale:  "%locale%"
trusted_hosts:   ~
trusted_proxies: ~
session:
    handler_id: session.handler.native_file
    name: SFSESSID
    save_path: "%kernel.root_dir%/sessions"
fragments:       ~
http_method_override: true
#ide: "phpstorm://open?file=%%f&line=%%l"

Twig Configuration

twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%"

Doctrine Configuration

doctrine: dbal: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: UTF8 types: json: Sonata\Doctrine\Types\JsonType

if using pdo_sqlite as your database driver:

    #   1. add the path in parameters.yml
    #     e.g. database_path: "%kernel.root_dir%/data/data.db3"
    #   2. Uncomment database_path in parameters.yml.dist
    #   3. Uncomment next line:
    #     path:     "%database_path%"
orm:
    auto_generate_proxy_classes: "%kernel.debug%"
    naming_strategy: doctrine.orm.naming_strategy.underscore
    auto_mapping: true

Swiftmailer Configuration

swiftmailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory }

Doctrine Migrations Configuration

doctrine_migrations: dir_name: "%kernel.root_dir%/migrations" namespace: "%application_name%\Migrations" table_name: migration_versions name: %application_name% Migrations

LiipImagine Configuration

liip_imagine: resolvers: default: web_path: ~

filter_sets:
    cache: ~
    #thumb_example:
    #    quality: 75
    #    filters:
    #        thumbnail: { size: [120, 90], mode: outbound }

StofDoctrineExtensions Configuration

stof_doctrine_extensions: default_locale: "%locale%" orm: default: timestampable: true

mongodb:

#    default: ~

Sonata Admin & User Configuration

sonata_block: default_contexts: [cms] blocks: sonata.admin.block.admin_list: contexts: [admin]

fos_user: db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' firewall_name: main user_class: Application\Sonata\UserBundle\Entity\User group: group_class: Application\Sonata\UserBundle\Entity\Group group_manager: sonata.user.orm.group_manager service: user_manager: sonata.user.orm.user_manager

sonata_user: manager_type: orm # can be orm or mongodb admin: user: class: Application\Sonata\UserBundle\Admin\UserAdmin

sonata_block: default_contexts: [cms] blocks: sonata.admin.block.admin_list: contexts: [admin] sonata.user.block.menu: # used to display the menu in profile pages sonata.user.block.account: # used to display menu option (login option) sonata.block.service.text: # used to if you plan to use Sonata user routes

AppKernel.php

<?php

/*

use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface;

/**

Thanks

jontorrado commented 9 years ago

Hi there,

Here you have the fix https://github.com/LIN3S/SymfonyStandard/commit/55662f48cce2944261cf8c0d1d36413eae4d1c44.

Thanks for the issue. Kind regards.