repincln
repincln

Reputation: 2049

Install Sonata Dashboard bundle

I want to install Sonata Dashboard bundle, so I follow these steps.

After installing and configuring I get an error:

Compile Error: Declaration of Application\Sonata\DashboardBundle\Entity\Dashboard::getId() must be compatible with Sonata\DashboardBundle\Model\Dashboard::getId(): ?int

I use Symfony 3.4, php 7.2 and composer.json looks like:

"require": {
    "php": ">=5.5.9",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/orm": "^2.5",
    "enqueue/amqp-lib": "^0.8.23",
    "friendsofsymfony/rest-bundle": "^2.3",
    "friendsofsymfony/user-bundle": "^2.1",
    "incenteev/composer-parameter-handler": "^2.0",
    "jms/serializer-bundle": "^2.3",
    "liip/monitor-bundle": "^2.6",
    "nelmio/api-doc-bundle": "^3.2",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^5.0.0",
    "sonata-project/admin-bundle": "^3.34",
    "sonata-project/block-bundle": "^3.12",
    "sonata-project/cache": "1.x-dev",
    "sonata-project/cache-bundle": "2.4",
    "sonata-project/classification-bundle": "^3.6",
    "sonata-project/core-bundle": "^3.9",
    "sonata-project/dashboard-bundle": "^0.3.0",
    "sonata-project/datagrid-bundle": "2.3",
    "sonata-project/doctrine-extensions": "^1.0",
    "sonata-project/doctrine-orm-admin-bundle": "^3.5",
    "sonata-project/easy-extends-bundle": "^2.5",
    "sonata-project/formatter-bundle": "^3.4",
    "sonata-project/google-authenticator": "^2.1",
    "sonata-project/media-bundle": "^3.12",
    "sonata-project/news-bundle": "3.4",
    "sonata-project/notification-bundle": "^3.5",
    "sonata-project/seo-bundle": "^2.5",
    "sonata-project/user-bundle": "^4.1",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "3.4.*",
    "symfony/templating": "3.4.8",
    "twig/twig": "^1.0||^2.0"
},

Any ideas what can be wrong?

Upvotes: 2

Views: 322

Answers (1)

greg0ire
greg0ire

Reputation: 23255

Looks like the generated entity misses the return type hints… probably a bug in Sonata Easy Extends bundle. You can add type hint by finding and modifying Application\Sonata\DashboardBundle\Entity\Dashboard

Upvotes: 2

Related Questions