-1

I want to start a project with Symfony3 and SonataAdmin I was trying a lot of versions of symfony and sonataAdminBundle But I always get errors when updating composer

What's the correct composer.json to start my project

thanks

Priya
  • 1,359
  • 6
  • 21
  • 41
Abde
  • 41
  • 4
  • Hello, what error are you getting? I've been able to use `composer require sonata-project/admin-bundle` with no errors. – Alvin Bunk Jun 20 '16 at 14:53

1 Answers1

0

According to packagist the current v3.3.1 of SonataAdminBundle should be compatible with Symfony ^3.0.

You can just run composer require sonata-project/admin-bundle and it will automatically look for the newest compatible version. If that fails you could try allowing development-versions as well.

composer require sonata-project/admin-bundle:dev-master

That should be your last resort though as it pulls in an unstable dependency. Feel free to add composer's error to your question and maybe I or someone else can give a more precise answer.

dbrumann
  • 16,803
  • 2
  • 42
  • 58
  • Thank you for your answer I have error when adding **SonataUserBunle** – Abde Jun 20 '16 at 13:17
  • [The packagist entry for SonataUserBundle](https://packagist.org/packages/sonata-project/user-bundle#dev-master) shows that it requires various symfony components in version `^2.3` which means it's not compatible with `^3.0` yet, not even dev-master (linked above). You could [open a ticket with the project](https://github.com/sonata-project/SonataUserBundle/issues) if there is none yet. – dbrumann Jun 20 '16 at 14:26
  • Another solution would be to create a fork of the project, update the dependencies and then [use to that repo in your composer.json instead](https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository) – dbrumann Jun 20 '16 at 14:28