CODE
No route found for "GET /login/"
natomiast jak wpiszę adres bez slasha na końcu to wyskakuje komunikat:
CODE
AppBundle\Entity\auction object not found.
Wszystko robiłem metodą kopiuj-> wklej z instrukcji symfony. Pliki które konfigurowałem wyglądają tak:
app/AppKernel:
CODE
$bundles = [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new FOS\UserBundle\FOSUserBundle(), new AppBundle\AppBundle(), ];
app/config/security.yml
CODE
security: encoders: FOS\UserBundle\Model\UserInterface: bcrypt role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN providers: fos_userbundle: id: fos_user.user_provider.username firewalls: main: pattern: ^/ form_login: provider: fos_userbundle csrf_token_generator: security.csrf.token_manager logout: true anonymous: true access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin/, role: ROLE_ADMIN }
app/config/config.yml
CODE
fos_user: db_driver: orm firewall_name: main user_class: AppBundle\Entity\User from_email: address: "%mailer_user%" sender_name: "%mailer_user%"
CODE
app: resource: '@AppBundle/Controller/' type: annotation fos_user: resource: "@FOSUserBundle/Resources/config/routing/all.xml"
Klasy dostępu "User" nie wkleiłem bo nie chodzi o łączenie z bazą danych