jdog jdog - 1 month ago 8
PHP Question

Installing kunstmaan/adminlist-bundle with Symfony 2.8 or 3.1

I have a Symfony 3.1 project which uses the finder component. I'm now trying to build a CRUD interface with kunstmaan/adminlist-bundle.

I'm struggling to resolve requirements for composer.

From starting installing kunstmaan bundles it appears they are only compatible with Symfony 2.7 or 2.8?

I seem to have been going in circles with this for a while. What is a good strategy to resolve these issues?

composer.json:

{
"name": "jochen/processor",
"license": "proprietary",
"type": "project",
"minimum-stability": "dev",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=7.0.0",
"symfony/symfony": "2.7.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.7",
"symfony/polyfill-apcu": "^1.0",
"symfony/finder": "@dev",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"kunstmaan/admin-bundle": "@dev",
"kunstmaan/adminlist-bundle": "@dev",
"kunstmaan/generator-bundle": "^3.5"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"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::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}


Composer output

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- kunstmaan/generator-bundle 3.5.x-dev requires symfony/symfony ~2.8 -> satisfiable by symfony/symfony[2.8.x-dev].
- kunstmaan/generator-bundle 3.5.0 requires symfony/symfony ~2.8 -> satisfiable by symfony/symfony[2.8.x-dev].
- kunstmaan/generator-bundle 3.5.1 requires symfony/symfony ~2.8 -> satisfiable by symfony/symfony[2.8.x-dev].
- kunstmaan/generator-bundle 3.5.x-dev requires symfony/symfony ~2.8 -> satisfiable by symfony/symfony[2.8.x-dev].
- Conclusion: don't install symfony/symfony 2.8.x-dev
- Installation request for kunstmaan/generator-bundle ^3.5 -> satisfiable by kunstmaan/generator-bundle[3.5.0, 3.5.1, 3.5.x-dev].

Answer

The kunstmaan/generator-bundle "^3.5" that you have in your composer.json requires symfony 2.8 (as you can see in https://packagist.org/packages/kunstmaan/generator-bundle#3.5.1). In your composer.json you have symfony 2.7.*. Change it to 2.8.*.