alexandresalome / doctrine-extra-bundle

Graph features for Doctrine
MIT License
47 stars 18 forks source link

Error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) #9

Closed OskarStark closed 8 years ago

OskarStark commented 8 years ago

my composer libs

alexandresalome/doctrine-extra-bundle    v0.1.0             Extra features for Doctrine, as a Symfony bundle
alom/graphviz                            v1.0.1             Graphviz generation for PHP
cocur/slugify                            v1.3               Converts a string into a slug.
doctrine/annotations                     v1.2.7             Docblock Annotations Parser
doctrine/cache                           v1.4.2             Caching library offering an object-oriented API for many cache backends
doctrine/collections                     v1.3.0             Collections Abstraction library
doctrine/common                          v2.5.1             Common Library for Doctrine projects
doctrine/data-fixtures                   v1.1.1             Data Fixtures for all Doctrine Object Managers
doctrine/dbal                            v2.4.4             Database Abstraction Layer
doctrine/doctrine-bundle                 v1.5.2             Symfony DoctrineBundle
doctrine/doctrine-cache-bundle           v1.0.1             Symfony2 Bundle for Doctrine Cache
doctrine/doctrine-fixtures-bundle        v2.2.1             Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle      1.0.1              Symfony DoctrineMigrationsBundle
doctrine/inflector                       v1.0.1             Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                    1.0.5              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                           v1.0.1             Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                      v1.0.0             Database Schema migrations using Doctrine DBAL
doctrine/orm                             v2.4.8             Object-Relational-Mapper for PHP
egeloen/ckeditor-bundle                  2.5.2              Provides a CKEditor integration for your Symfony2 Project.
egeloen/json-builder                     1.0.3              JSON builder with escaping control for PHP 5.3+
fabpot/php-cs-fixer                      v1.10              A tool to automatically fix PHP code style
friendsofsymfony/rest-bundle             1.7.1              This Bundle provides various tools to rapidly develop RESTful API's with Symfony2
friendsofsymfony/user-bundle             1.3.x-dev 62fc397  Symfony FOSUserBundle
gedmo/doctrine-extensions                v2.4.6             Doctrine2 behavioral extensions
imagine/imagine                          0.6.2              Image processing for PHP 5.3
incenteev/composer-parameter-handler     v2.1.1             Composer script handling your ignored parameter file
instaclick/php-webdriver                 1.4.3              PHP WebDriver for Selenium 2
jdorn/sql-formatter                      v1.2.17            a PHP SQL highlighting library
jms/metadata                             1.5.1              Class/method/property metadata management in PHP
jms/parser-lib                           1.0.0              A library for easily creating recursive-descent parsers.
jms/serializer                           1.0.0              Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
jms/serializer-bundle                    1.0.0              Allows you to easily serialize, and deserialize data of any complexity
knplabs/gaufrette                        v0.1.9             PHP5 library that provides a filesystem abstraction layer
knplabs/knp-markdown-bundle              1.3.2              Knplabs markdown bundle transforms markdown into html
knplabs/knp-menu                         v2.1.0             An object oriented menu library
knplabs/knp-menu-bundle                  v2.0.0             This bundle provides an integration of the KnpMenu library
kriswallsmith/assetic                    v1.3.0             Asset Management for PHP
kriswallsmith/buzz                       v0.15              Lightweight HTTP client
michelf/php-markdown                     1.4.0              PHP Markdown
monolog/monolog                          1.17.1             Sends your logs to files, sockets, inboxes, databases and various web services
nelmio/api-doc-bundle                    2.9.0              Generates documentation for your REST API from annotations
patchwork/utf8                           v1.2.3             Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP
pdepend/pdepend                          2.2.0              Official version of pdepend to be handled with Composer
phpcollection/phpcollection              0.4.0              General-Purpose Collection Library for PHP
phpdocumentor/reflection-docblock        2.0.4
phpmd/phpmd                              2.2.3              PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.
phpoption/phpoption                      1.5.0              Option Type for PHP
phpspec/prophecy                         v1.5.0             Highly opinionated mocking framework for PHP 5.3+
pixassociates/sortable-behavior-bundle   v1.0               Provides a way to sort your admin listing
psr/log                                  1.0.0              Common interface for logging libraries
salavert/time-ago-in-words               v1.6.2             Time ago Twig extension where you can easily convert a datetime or timestamp to a distance of time in words.
sensio/distribution-bundle               v4.0.1             Base bundle for Symfony Distributions
sensio/framework-extra-bundle            v3.0.10            This bundle provides a way to configure your controllers with annotations
sensio/generator-bundle                  v2.5.3             This bundle generates code for you
sensiolabs/security-checker              v3.0.1             A security checker for your composer.lock
simplethings/entity-audit-bundle         v0.7               Audit for Doctrine Entities
squizlabs/php_codesniffer                2.3.4              PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
stephpy/timeline                         v1.0.4             Standalone library to create timelines
stephpy/timeline-bundle                  2.2.0              Symfony2 bundle to make timeline
stof/doctrine-extensions-bundle          dev-master 7b31445 Integration of the gedmo/doctrine-extensions with Symfony2
swiftmailer/swiftmailer                  v5.4.1             Swiftmailer, free feature-rich PHP mailer
symfony-cmf/routing                      1.3.0              Extends the Symfony2 routing component for dynamic routes and chaining several routers
symfony-cmf/routing-bundle               1.3.5              Symfony RoutingBundle
symfony/assetic-bundle                   v2.7.0             Integrates Assetic into Symfony2
symfony/monolog-bundle                   v2.7.1             Symfony MonologBundle
symfony/swiftmailer-bundle               v2.3.8             Symfony SwiftmailerBundle
symfony/symfony                          v2.7.4             The Symfony PHP framework
twig/extensions                          v1.3.0             Common additional features for Twig that do not directly belong in core
twig/twig                                v1.22.2            Twig, the flexible, fast, and secure template language for PHP
willdurand/jsonp-callback-validator      v1.1.0             JSONP callback validator.
willdurand/negotiation                   1.4.0              Content Negotiation tools for PHP provided as a standalone library.
oskar.stark:/Volumes/development/workspaces/tvthek/orf (develop)$ php app/console doctrine:mapping:graphviz -vvv
[2015-09-24 15:05:57] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
[2015-09-24 15:05:57] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand".
[2015-09-24 15:05:57] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand".
PHP Fatal error:  Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php on line 105
PHP Stack trace:
PHP   1. {main}() /Volumes/development/workspaces/tvthek/orf/app/console:0
PHP   2. Symfony\Component\Console\Application->run() /Volumes/development/workspaces/tvthek/orf/app/console:27
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:886
PHP   7. Alex\DoctrineExtraBundle\Command\DoctrineMetadataGraphvizCommand->execute() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
PHP   8. Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->__construct() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Command/DoctrineMetadataGraphvizCommand.php:34
PHP   9. Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->getCluster() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:31
PHP  10. Exception->__construct() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:105

Fatal error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php on line 105

Call Stack:
    0.0025     234192   1. {main}() /Volumes/development/workspaces/tvthek/orf/app/console:0
    0.0441    3540600   2. Symfony\Component\Console\Application->run() /Volumes/development/workspaces/tvthek/orf/app/console:27
    0.0483    3754584   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
    0.7030   38738928   4. Symfony\Component\Console\Application->doRun() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
    0.7034   38739848   5. Symfony\Component\Console\Application->doRunCommand() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:195
    0.7127   38998072   6. Symfony\Component\Console\Command\Command->run() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:886
    0.7132   39004240   7. Alex\DoctrineExtraBundle\Command\DoctrineMetadataGraphvizCommand->execute() /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
    0.7166   39110680   8. Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->__construct() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Command/DoctrineMetadataGraphvizCommand.php:34
    1.6605   43951200   9. Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->getCluster() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:31
    1.6605   43966952  10. Exception->__construct() /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:105

[2015-09-24 15:05:58] php.CRITICAL: Fatal Error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) {"type":1,"file":"/Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php","line":105,"level":-1,"stack":[{"function":"__construct","type":"->","class":"Exception","file":"/Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php","line":105,"args":[]},{"function":"getCluster","type":"->","class":"Alex\\DoctrineExtraBundle\\Graphviz\\DoctrineMetadataGraph","file":"/Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php","line":31,"args":[]},{"function":"__construct","type":"->","class":"Alex\\DoctrineExtraBundle\\Graphviz\\DoctrineMetadataGraph","file":"/Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Command/DoctrineMetadataGraphvizCommand.php","line":34,"args":[]},{"function":"execute","type":"->","class":"Alex\\DoctrineExtraBundle\\Command\\DoctrineMetadataGraphvizCommand","file":"/Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php","line":259,"args":[]},{"function":"run","type":"->","class":"Symfony\\Component\\Console\\Command\\Command","file":"/Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php","line":886,"args":[]},{"function":"doRunCommand","type":"->","class":"Symfony\\Component\\Console\\Application","file":"/Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php","line":195,"args":[]},{"function":"doRun","type":"->","class":"Symfony\\Component\\Console\\Application","file":"/Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php","line":96,"args":[]},{"function":"doRun","type":"->","class":"Symfony\\Bundle\\FrameworkBundle\\Console\\Application","file":"/Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php","line":126,"args":[]},{"function":"run","type":"->","class":"Symfony\\Component\\Console\\Application","file":"/Volumes/development/workspaces/tvthek/orf/app/console","line":27,"args":[]},{"function":"{main}","file":"/Volumes/development/workspaces/tvthek/orf/app/console","line":0,"args":[]}]}

  [Symfony\Component\Debug\Exception\FatalErrorException]
  Error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])

Exception trace:
 () at /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:105
 Exception->__construct() at /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:105
 Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->getCluster() at /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php:31
 Alex\DoctrineExtraBundle\Graphviz\DoctrineMetadataGraph->__construct() at /Volumes/development/workspaces/tvthek/orf/vendor/alexandresalome/doctrine-extra-bundle/Alex/DoctrineExtraBundle/Command/DoctrineMetadataGraphvizCommand.php:34
 Alex\DoctrineExtraBundle\Command\DoctrineMetadataGraphvizCommand->execute() at /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:886
 Symfony\Component\Console\Application->doRunCommand() at /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /Volumes/development/workspaces/tvthek/orf/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /Volumes/development/workspaces/tvthek/orf/app/console:27
 {main}() at /Volumes/development/workspaces/tvthek/orf/app/console:0

doctrine:mapping:graphviz

oskar.stark:/Volumes/development/workspaces/tvthek/orf (develop)$
OskarStark commented 8 years ago

@jverdeyen does this work for you?

jverdeyen commented 8 years ago

I'm using this on Elcodi (https://github.com/elcodi/bamboo) and Sylius (https://github.com/Sylius/Sylius).

I didn't work from scratch as the mapped entities aren't formatted like AcmeBundle:User butAcmeBundle\User`

Quick fixed it (but the behaviour for clusters will break) with:

# Alex/DoctrineExtraBundle/Graphviz/DoctrineMetadataGraph.php
private function getCluster($entityName)
    {
        return 'Sylius';
..

But I don't think this is related to this issue.

Your doctrine mappings are correct?

OskarStark commented 8 years ago

will check that later, thank you

alexandresalome commented 8 years ago

The method does not throw exception anymore in dev-master (fixed in #10 , removed in #3)