My composer json key "require":
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~2.0#dev",
"sonata-project/admin-bundle": "^2.3",
"doctrine/doctrine-cache-bundle": "^1.0",
"knplabs/knp-paginator-bundle": "^2.4",
"excelwebzone/recaptcha-bundle": "^1.4",
"rusdteam/php-js": "dev-master",
"gries/rcon": "^0.0.3",
"friendsofsymfony/comment-bundle": "^2.0",
"egeloen/ckeditor-bundle": "dev-master",
"idma/robokassa": "dev-master",
"sonata-project/news-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "dev-master",
"sonata-project/classification-bundle": "~2.2#dev"
},
In the end I added sonata news bundle, but after I run "composer update" this return error:
Problem 1
- Installation request for sonata-project/news-bundle dev-master -> satisfiable by sonata-project/news-bundle[dev-master].
- sonata-project/news-bundle dev-master requires sonata-project/datagrid-bundle ~2.2 -> no matching package found.
Problem 2
- Installation request for sonata-project/doctrine-orm-admin-bundle dev-master -> satisfiable by sonata-project/doctrine-orm-admin-bundle[dev-master].
- sonata-project/doctrine-orm-admin-bundle dev-master requires sonata-project/admin-bundle ~2.4#dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
What I should add to dependencies for it works?
I would suggest to switch from dev-master to a more specific version on both problematic packages:
"sonata-project/news-bundle": "^2.3",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
Ok, some more tweaks:
{
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "*",
"sonata-project/admin-bundle": "^2.3",
"doctrine/doctrine-cache-bundle": "^1.0",
"knplabs/knp-paginator-bundle": "^2.4",
"excelwebzone/recaptcha-bundle": "^1.4",
"rusdteam/php-js": "dev-master",
"gries/rcon": "^0.0.3",
"friendsofsymfony/comment-bundle": "^2.0",
"egeloen/ckeditor-bundle": "*",
"idma/robokassa": "dev-master",
"sonata-project/datagrid-bundle": "dev-master",
"sonata-project/news-bundle": "^2.3",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
"sonata-project/easy-extends-bundle": "dev-master",
"sonata-project/classification-bundle": "~2.2#dev"
}
}
This resolves and fetches the packages, when running
composer install -vvv --profile
(I've added --ignore-platform-reqs to the cmd, because the sockets extension is missing here.)
Related
This is the require section of the composer.json file from the Symfony 3.4 project
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"friendsofsymfony/rest-bundle": "^2.3",
"incenteev/composer-parameter-handler": "^2.0",
"jms/serializer-bundle": "^2.3",
"nelmio/api-doc-bundle": "^2.12",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"symfony/templating": "^4.0",
"twig/twig": "^1.0||^2.0"
To solve this problem, install the template component using composer:
composer require symfony/templating
Then, add the following configuration under the framework key in config.yml:
templating:
engines: ['twig']
I am getting below exception while deploying symfony application.
The "smarty" translation loader is not registered
I am using below mentioned packages along with their tags.
"require": {
"php": ">=5.3.9",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "^2.4.8",
"incenteev/composer-parameter-handler": "~2.0",
"kriswallsmith/assetic": "1.4.*",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.0.2",
"symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
"symfony/symfony": "2.8.*",
"twig/twig": "2.4.*",
"symfony/assetic-bundle": "2.8.*",
"jms/security-extra-bundle": "1.6.*",
"jms/di-extra-bundle": "1.4.*",
"noiselabs/smarty-bundle": "v2.0.0",
"zendframework/zend-mail": "2.2.*",
"zendframework/zend-validator": "2.2.*",
"twig/extensions": "1.5.*",
"sensio/generator-bundle": "~3.0"
},
When installing these packages using composer install, below packages were installed.
https://pastebin.com/kz0LES5K
Please suggest what could be the issue for this error
I am getting this following error after adding page bundle to formarly working Symfony2 project.
[Symfony\Component\Debug\Exception\FatalErrorException]
Compile Error: Declaration of Sonata\PageBundle\Block\ChildrenPagesBlockServic
e::validateBlock() must be compatible with Sonata\BlockBundle\Block\BlockAdmin
ServiceInterface::validateBlock(Sonata\CoreBundle\Validator\ErrorElement $erro
rElement, Sonata\BlockBundle\Model\BlockInterface $block)
My Composer.json is as following.
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/core-bundle": "^2.3",
"knplabs/knp-menu-bundle": "dev-master",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/seo-bundle": "~1.1",
"sonata-project/notification-bundle": "^2.3",
"sonata-project/cache-bundle": "^2.2",
"sonata-project/datagrid-bundle": "2.2.*#dev",
"sonata-project/page-bundle": "^2.3",
"sonata-project/block-bundle": "^2.3"
Thanks in advance...
Had to downgrade few packages to make page bundle compatable with admin-bundle and block bundle.
"require": {
"sonata-project/admin-bundle": "2.3.*",
"sonata-project/doctrine-orm-admin-bundle": "~2.3",
"sonata-project/page-bundle": "^2.3",
"sonata-project/block-bundle": "2.2.*"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
},
i installed sonata admin bundle as giving in document
mine issue is i am getting this error on clearing cache
Runtime Notice: Declaration of Sonata\MediaBundle\Controller\MediaAdminController::render() should be compatible with Symfony\Bundle\FrameworkBundle\Controller\Controller::render($view, array $parameters = Array, Symfony\Component\HttpFoundation\Response $response = NULL)
here is my composer.json req
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/admin-bundle": "2.4.x-dev",
"sonata-project/doctrine-orm-admin-bundle": "2.4.*#dev",
"sonata-project/datagrid-bundle": "2.2.*#dev",
"sonata-project/user-bundle": "2.3.*#dev",
"sonata-project/formatter-bundle": "2.3.*#stable",
"jms/serializer-bundle": "~0.11",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"stof/doctrine-extensions-bundle": "dev-master",
"egeloen/ckeditor-bundle": "~2.0",
"sonata-project/media-bundle": "2.3.2"
i tired everything but still no clue why i am getting this error please help me
You are using sonata media 2.3 with sonata admin 2.4 : github issue
Change all reference to the 2.4 verson to 2.3. You can set for example : ~2.3.0
I have installed symfony-cmf and finaly I got this error :
PHP Fatal error: Class Sonata\MediaBundle\Block\MediaBlockService contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Sonata\BlockBundle\Block\BlockServiceInterface::validateBlock) in /home/jeremy/web/vendor/sonata-project/media-bundle/Block/MediaBlockService.php on line 213.
My composer.json :
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "v2.4.2",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "dev-master",
"friendsofsymfony/jsrouting-bundle": "2.0.*#dev",
"jms/security-extra-bundle": "dev-master",
"friendsofsymfony/oauth-server-bundle": "dev-master",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures": "#dev",
"jms/serializer-bundle": "0.12.*#dev",
"knplabs/gaufrette": "0.2.*#dev",
"knplabs/knp-gaufrette-bundle": "dev-master",
"vlabs/media-bundle": "v1.1.1",
"lexik/paybox-bundle": "dev-master",
"stof/doctrine-extensions-bundle": "1.1.*#dev",
"sonata-project/admin-bundle": "2.3.*#dev",
"sonata-project/doctrine-orm-admin-bundle": "2.3.*#dev",
"simplethings/entity-audit-bundle": "0.*#dev",
"hwi/oauth-bundle": "0.4.*#dev",
"sonata-project/media-bundle": "2.3.*#dev",
"tilleuls/ckeditor-sonata-media-bundle": "dev-master",
"egeloen/ckeditor-bundle": "2.*",
"sonata-project/formatter-bundle": "2.3.*#dev",
"kunstmaan/voting-bundle": "2.3.*#dev",
"fyneworks/jquery-star-rating": "dev-master",
"friendsofsymfony/comment-bundle": "2.0.*#dev",
"kartik-v/bootstrap-star-rating": "2.5.0",
"symfony-cmf/create-bundle": "1.1.*",
"jackalope/jackalope-doctrine-dbal": "1.1.*",
"doctrine/doctrine-cache-bundle": "1.0.*",
"symfony-cmf/symfony-cmf": "1.1.*",
"symfony-cmf/simple-cms-bundle": "1.1.*",
"nelmio/alice": "1.*"
Do yo have an idea please, Thanks.
why are you using this vendors in the dev version?
If you need to develop something using stable components, use the #stable
"sonata-project/admin-bundle": "#stable",
"sonata-project/doctrine-orm-admin-bundle": "#stable",