Closed gchokeen closed 11 years ago
phpcr 2.1-beta8 is essentially the master state and should be compatible with the latest versions of jackalope and jackalope-jackrabbit/jackalope-doctrine-dbal .. so i suspect that for some reason you got an outdated version of jackalope.
I tried with dev-master and 1.0.x-dev for jackalope-jackrabbit/jackalope-doctrine-dbal nothing seems to be working. Do you thing I am missing any thing on config.yml. Please review the code here.
no, this is definitely an issue with out of sync dependencies. but i am 100% certain that the latest versions of all the jackalope repositories work fine with phpcr 2.1-beta8 (ie the latest code in the phpcr repo).
Oh my bad !
How can I fix this out of sync issue. I am posting full stack trace of error.
gowri@gowri-System-Product-Name:/var/www/contest$ php app/console cache:clear
Clearing the cache for the dev environment with debug true
PHP Fatal error: Declaration of Jackalope\Session::getNode() must be compatible with that of PHPCR\SessionInterface::getNode() in /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Session.php on line 39
PHP Stack trace:
PHP 1. {main}() /var/www/contest/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/contest/app/console:22
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105
PHP 4. Symfony\Component\Console\Application->doRun() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
PHP 5. Symfony\Component\Console\Command\Command->run() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
PHP 6. Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238
PHP 7. Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:75
PHP 8. Symfony\Component\HttpKernel\Kernel->boot() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:97
PHP 9. Symfony\Component\HttpKernel\Kernel->initializeContainer() /var/www/contest/app/bootstrap.php.cache:571
PHP 10. Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() /var/www/contest/app/bootstrap.php.cache:871
PHP 11. Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer->warmUp() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:47
PHP 12. Doctrine\Common\Persistence\AbstractManagerRegistry->getManagers() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php:51
PHP 13. Symfony\Bridge\Doctrine\ManagerRegistry->getService() /var/www/contest/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php:228
PHP 14. Symfony\Component\DependencyInjection\Container->get() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php:35
PHP 15. appDevDebugProjectContainer__50f9179b20be5__->getDoctrinePhpcr_Odm_DefaultDocumentManagerService() /var/www/contest/app/bootstrap.php.cache:211
PHP 16. Symfony\Component\DependencyInjection\Container->get() /var/www/contest/app/cache/dev_new/appDevDebugProjectContainer__50f9179b20be5__.php:497
PHP 17. appDevDebugProjectContainer__50f9179b20be5__->getDoctrinePhpcr_DefaultSessionService() /var/www/contest/app/bootstrap.php.cache:211
PHP 18. Jackalope\Repository->login() /var/www/contest/app/cache/dev_new/appDevDebugProjectContainer__50f9179b20be5__.php:418
PHP 19. Jackalope\Factory->get() /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Repository.php:109
PHP 20. class_exists() /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Factory.php:18
PHP 21. Symfony\Component\ClassLoader\DebugClassLoader->loadClass() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php:0
PHP 22. require() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php:82
Fatal error: Declaration of Jackalope\Session::getNode() must be compatible with that of PHPCR\SessionInterface::getNode() in /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Session.php on line 39
Call Stack:
0.0002 329352 1. {main}() /var/www/contest/app/console:0
0.0159 2193560 2. Symfony\Component\Console\Application->run() /var/www/contest/app/console:22
0.0188 2432224 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105
0.8153 13948644 4. Symfony\Component\Console\Application->doRun() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
0.8258 13948644 5. Symfony\Component\Console\Command\Command->run() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
0.8269 13948820 6. Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238
0.8289 13959060 7. Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:75
0.8435 14124520 8. Symfony\Component\HttpKernel\Kernel->boot() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:97
0.8463 14166168 9. Symfony\Component\HttpKernel\Kernel->initializeContainer() /var/www/contest/app/bootstrap.php.cache:571
5.4272 46104304 10. Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() /var/www/contest/app/bootstrap.php.cache:871
5.4451 47915164 11. Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer->warmUp() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:47
5.4451 47915164 12. Doctrine\Common\Persistence\AbstractManagerRegistry->getManagers() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php:51
5.4451 47915404 13. Symfony\Bridge\Doctrine\ManagerRegistry->getService() /var/www/contest/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php:228
5.4451 47915404 14. Symfony\Component\DependencyInjection\Container->get() /var/www/contest/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php:35
5.4451 47915828 15. appDevDebugProjectContainer__50f9179b20be5__->getDoctrinePhpcr_Odm_DefaultDocumentManagerService() /var/www/contest/app/bootstrap.php.cache:211
5.4459 47998520 16. Symfony\Component\DependencyInjection\Container->get() /var/www/contest/app/cache/dev_new/appDevDebugProjectContainer__50f9179b20be5__.php:497
5.4459 47998908 17. appDevDebugProjectContainer__50f9179b20be5__->getDoctrinePhpcr_DefaultSessionService() /var/www/contest/app/bootstrap.php.cache:211
5.4532 48808072 18. Jackalope\Repository->login() /var/www/contest/app/cache/dev_new/appDevDebugProjectContainer__50f9179b20be5__.php:418
5.4532 48808576 19. Jackalope\Factory->get() /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Repository.php:109
5.4532 48808708 20. class_exists() /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Factory.php:18
5.4532 48808992 21. Symfony\Component\ClassLoader\DebugClassLoader->loadClass() /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php:0
5.4540 48941060 22. require('/var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Session.php') /var/www/contest/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php:82
can you give me the commit sha1 of your phpcr and jackalope reppositories then i can verify the issue.
How can get the commit sha1 for those packages. I am not yet familiar with git.
If you look in your composer.lock file you should see details of all the versions used. It will look like:
"name": "jackalope/jackalope",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/jackalope/jackalope",
"reference": "8b2b6d5b113a1c11f222f4ab3df982a2c31f65ee"
},
@gchokeen you can use composer show -i
or php composer.phar show -i
depending on how you setup composer.
Thank you for the guide. Please check the below
installed:
doctrine/common [2.3.x-dev bb0aebb] : Common Library for Doctrine projects
doctrine/data-fixtures [dev-master 50e7e64] : Data Fixtures for all Doctrine Object Managers
doctrine/dbal [2.3.2] : Database Abstraction Layer
doctrine/doctrine-bundle [1.1.x-dev 78b3680] : Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle [dev-master 95d1e02] : Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle [dev-master 99c0192] : Symfony DoctrineMigrationsBundle
doctrine/migrations [dev-master e1f6efc] : Database Schema migrations using Doctrine DBAL
doctrine/orm [2.3.2] : Object-Relational-Mapper for PHP
doctrine/phpcr-bundle [dev-master 63964ec] : Symfony DoctrinePHPCRBundle
doctrine/phpcr-odm [dev-master e683e13] : Object-Document-Mapper for PHPCR
friendsofsymfony/jsrouting-bundle [dev-master 1.1.2] : Symfony FOSJsRoutingBundle
friendsofsymfony/rest [0.7.0] : This library provides various tools to develop RESTful API's
friendsofsymfony/rest-bundle [dev-master a8cd874] : This Bundle provides various tools to rapidly develop RESTful API's with Symfony2
friendsofsymfony/user-bundle [dev-master 06f10eb] : Symfony FOSUserBundle
gedmo/doctrine-extensions [v2.3.3] : Doctrine2 behavioral extensions
imagine/Imagine [v0.4.0] : Image processing for PHP 5.3
jackalope/jackalope [dev-master 23fe196] : Jackalope PHPCR library
jackalope/jackalope-doctrine-dbal [dev-master 9023e4d] : Jackalope Transport library
jackalope/jackalope-jackrabbit [dev-master 6d2d772] : Jackalope Transport library
jdorn/sql-formatter [v1.2.0] : a PHP SQL highlighting library
jms/aop-bundle [1.0.0] : Adds AOP capabilities to Symfony2
jms/cg [1.0.0] : Toolset for generating PHP code
jms/di-extra-bundle [dev-master 1d17b6c] : Allows to configure dependency injection using annotations
jms/metadata [1.1.1] : Class/method/property metadata management in PHP
jms/parser-lib [1.0.0] : A library for easily creating recursive-descent parsers.
jms/payment-core-bundle [dev-master 9398b6b] : This bundle is providing the foundation for various payment plugins.
jms/security-extra-bundle [dev-master 527fd14] : Enhances the Symfony2 Security Component by adding several new features
jms/serializer [dev-master a9f3100] : Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
jms/serializer-bundle [dev-master 672f708] : Allows you to easily serialize, and deserialize data of any complexity
knplabs/gaufrette [dev-master 514a160] : PHP5 library that provides a filesystem abstraction layer
knplabs/knp-components [1.1.2] : Knplabs component library
knplabs/knp-gaufrette-bundle [dev-master fe09a0c] : Allows to easily use the Gaufrette library in a Symfony project
knplabs/knp-menu [v1.1.2] : An object oriented menu library
knplabs/knp-menu-bundle [v1.1.0] : This bundle provides an integration of the KnpMenu library
knplabs/knp-paginator-bundle [dev-master 6ec70b0] : Paginator bundle for Symfony2 to automate pagination and simplify sorting and other features
kriswallsmith/assetic [dev-master 5591252] : Asset Management for PHP
liip/imagine-bundle [dev-master 5567a0f] : This Bundle assists in imagine manipulation using the imagine library
midgard/createphp [dev-master 521a05b] : PHP adapter for Create.js
monolog/monolog [1.2.1] : Logging for PHP 5.3
ornicar/gravatar-bundle [dev-master 994424a] : This bundles provides a Gravatar API various utilities to work with it in templates
phpcollection/phpcollection [dev-master 3d298a4] : General-Purpose Collection Library for PHP
phpcr/phpcr [2.1.0-beta8] : PHP Content Repository interfaces
phpcr/phpcr-api-tests [dev-master 7e98c94] : PHP Content Repository compliance test suite
phpcr/phpcr-utils [1.0-beta4] : PHP Content Repository implementation independant utilities
phpoption/phpoption [1.0.0] : Option Type for PHP
sensio/distribution-bundle [v2.1.7] : The base bundle for the Symfony Distributions
sensio/framework-extra-bundle [v2.1.7] : This bundle provides a way to configure your controllers with annotations
sensio/generator-bundle [v2.1.7] : This bundle generates code for you
sonata-project/admin-bundle [dev-master c91cb05] : Symfony SonataAdminBundle
sonata-project/block-bundle [dev-master 92b2bfd] : Symfony SonataBlockBundle
sonata-project/cache-bundle [dev-master c89d2db] : This bundle provides caching services
sonata-project/doctrine-extensions [dev-master d2cd67a] : Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle [dev-master effba13] : Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/doctrine-phpcr-admin-bundle [dev-master 11cb042] : Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
sonata-project/easy-extends-bundle [dev-master 779a64a] : Symfony SonataEasyExtendsBundle
sonata-project/exporter [dev-master 1.0.0] : Lightweight Exporter library
sonata-project/google-authenticator [dev-master 181c834] : Library to integrate Google Authenticator into a PHP project
sonata-project/intl-bundle [dev-master 0208ca4] : Symfony SonataIntlBundle
sonata-project/jquery-bundle [dev-master 5f87a76] : Symfony SonatajQueryBundle
sonata-project/user-bundle [dev-master 2ea728b] : Symfony SonataUserBundle
stof/doctrine-extensions-bundle [dev-master 4a17550] : Integration of the gedmo/doctrine-extensions with Symfony2
swiftmailer/swiftmailer [v4.2.2] : Swiftmailer, free feature-rich PHP mailer
symfony-cmf/block-bundle [dev-master 02b3bb3] : Symfony CMF Block Bundle
symfony-cmf/content-bundle [dev-master acf8074] : Symfony CMF Content Bundle
symfony-cmf/core-bundle [dev-master e8392a7] : Symfony CMF Core Bundle
symfony-cmf/create-bundle [dev-master 0515907] : Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations with RDFa.
symfony-cmf/menu-bundle [dev-master 6c69af5] : Symfony CMF Menu Bundle
symfony-cmf/routing [dev-master 1.0.0-alpha3] : Extends the Symfony2 routing component for dynamic routes and chaining several routers
symfony-cmf/routing-extra-bundle [dev-master d1b076b] : Symfony RoutingExtraBundle
symfony-cmf/simple-cms-bundle [dev-master 1061673] : A simple CMS bundle based on the Symfony CMF
symfony-cmf/symfony-cmf [dev-master 4ed2c81] : Symfony Content Management Framework
symfony-cmf/tree-browser-bundle [dev-master 2e3ed42] : Symfony CMF Tree Browser Bundle
symfony-cmf/tree-bundle [dev-master bbf4c7c] : Symfony CMF Tree Bundle
symfony/assetic-bundle [v2.1.0] : Integrates Assetic into Symfony2
symfony/monolog-bundle [v2.1.7] : Symfony MonologBundle
symfony/swiftmailer-bundle [v2.1.7] : Symfony SwiftmailerBundle
symfony/symfony [v2.1.7] : The Symfony PHP framework
twig/extensions [dev-master 5c2d515] : Common additional features for Twig that do not directly belong in core
twig/twig [v1.12.1] : Twig, the flexible, fast, and secure template language for PHP
vich/uploader-bundle [dev-master v0.8.0] : Ease file uploads attached to entities
ok just as I suspected .. you do have the latest version of everything but jackalope/jackalope. your version is https://github.com/jackalope/jackalope/commit/23fe196aae87a976f4556169c591078fa0dd99b3 but there is a newer version as you can see here: https://github.com/jackalope/jackalope/commits
try running composer update jackalope/jackalope
you need it to install https://github.com/jackalope/jackalope/commit/ee2a8ef591818db2b53f1c32fbe9b812aaf50c70
Yes executed the command ( php composer.phar update jackalope/jackalope ) that you gave but I am getting below
gowri@gowri-System-Product-Name:/var/www/contest$ php composer.phar update jackalope/jackalope
Loading composer repositories with package information
Updating dependencies
Nothing to install or update
Generating autoload files
PHP Fatal error: Declaration of Jackalope\Session::getNode() must be compatible with that of PHPCR\SessionInterface::getNode() in /var/www/contest/vendor/jackalope/jackalope/src/Jackalope/Session.php on line 39
So I checked .travis.yml manully seems like upto date
language: php
php:
- 5.3
- 5.4
before_script:
# work around bug in composer: https://github.com/composer/composer/issues/789
- composer install --prefer-source
- composer install --prefer-source --dev
- ./bin/jackrabbit.sh
script: phpunit -c tests/phpunit.xml.dist
notifications:
irc: "irc.freenode.org#jackalope"
ok you need to force the update.
two options:
1) rm -rf
vendor/jackalope/jackalope 2)
cd vendor/jackalope/jackalopeand then
git pull --rebase``
then run the above command again
Oh my God!
You are awesome, Problem solved !. I learned many thing today from you. Thank you so much.
I am having below composer. While I am tring to update the package I am getting this fatal error.
Composer.json
Error that I am getting
I can't use dev-master for phpcr, because I am getting other conflicting error with other packages. So How can I resolve this issue. Help me out