{"action":"opened","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/3537","repository_url":"https://api.github.com/repos/Codeception/Codeception","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/3537/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/3537/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/3537/events","html_url":"https://github.com/Codeception/Codeception/issues/3537","id":178520408,"number":3537,"title":"autoload Doctrine Annotation","user":{"login":"Soolan","id":3588122,"avatar_url":"https://avatars.githubusercontent.com/u/3588122?v=3","gravatar_id":"","url":"https://api.github.com/users/Soolan","html_url":"https://github.com/Soolan","followers_url":"https://api.github.com/users/Soolan/followers","following_url":"https://api.github.com/users/Soolan/following{/other_user}","gists_url":"https://api.github.com/users/Soolan/gists{/gist_id}","starred_url":"https://api.github.com/users/Soolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soolan/subscriptions","organizations_url":"https://api.github.com/users/Soolan/orgs","repos_url":"https://api.github.com/users/Soolan/repos","events_url":"https://api.github.com/users/Soolan/events{/privacy}","received_events_url":"https://api.github.com/users/Soolan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-22T04:38:42Z","updated_at":"2016-09-22T04:38:42Z","closed_at":null,"body":"Hello,\r\n#### What are you trying to achieve?\r\nI'm using seeInRepository() in my functional test (cest).\r\n#### What do you get instead?\r\nbut I get the following error:\r\n`[Doctrine\\Common\\Annotations\\AnnotationException] [Semantical Error] The annotation \"@Doctrine\\ORM\\Mapping\\Table\" in class AppBundle\\Entity\\WebsitebutlerLog does not exist, or could not be auto-loaded.`\r\n> Provide console output if related. Use `-vvv` mode for more details.\r\nHere you are the console output\r\n```bash\r\n1) DashboardControllerCest: New enquiry test\r\n Test  tests/functional/DashboardControllerCest.php:newEnquiryTest\r\n                                                                                                                                                                                                             \r\n  [Doctrine\\Common\\Annotations\\AnnotationException] [Semantical Error] The annotation \"@Doctrine\\ORM\\Mapping\\Table\" in class AppBundle\\Entity\\WebsitebutlerLog does not exist, or could not be auto-loaded.  \r\n                                                                                                                                                                                                             \r\n\r\nScenario Steps:\r\n\r\n 4. $I->seeInRepository(\"AppBundle\\Entity\\WebsitebutlerLog\",\"id\",{\"websitebutler\":\"3\",\"message\":\"\\n       ...})\r\n 3. $I->grabTextFrom(\"h1\")\r\n 2. $I->seeResponseCodeIs(200)\r\n 1. $I->amOnPage(\"/dashboard/enquiry\")\r\n\r\n/var/www/james/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:708\r\n/var/www/james/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:641\r\n/var/www/james/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:334\r\n/var/www/james/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php:195\r\n/var/www/james/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php:83\r\n/var/www/james/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php:63\r\n/var/www/james/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php:102\r\n/var/www/james/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:151\r\n/var/www/james/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:332\r\n/var/www/james/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:78\r\n/var/www/james/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:216\r\n/var/www/james/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:281\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Module/Doctrine2.php:360\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Module/Doctrine2.php:340\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Step.php:259\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Scenario.php:69\r\n/var/www/james/src/MyBundle/tests/_support/_generated/FunctionalTesterActions.php:2532\r\n/var/www/james/src/MyBundle/tests/functional/DashboardControllerCest.php:40\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Lib/Di.php:121\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Test/Cest.php:131\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Test/Cest.php:143\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Test/Cest.php:77\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Test/Test.php:82\r\n/var/www/james/vendor/phpunit/phpunit/src/Framework/TestSuite.php:747\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:98\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/SuiteManager.php:162\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Codecept.php:209\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Codecept.php:178\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Command/Run.php:329\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Command/Run.php:256\r\n/var/www/james/vendor/symfony/console/Command/Command.php:256\r\n/var/www/james/vendor/symfony/console/Application.php:818\r\n/var/www/james/vendor/symfony/console/Application.php:186\r\n/var/www/james/vendor/symfony/console/Application.php:117\r\n/var/www/james/vendor/codeception/codeception/src/Codeception/Application.php:103\r\n/var/www/james/vendor/codeception/codeception/codecept:33\r\n\r\n\r\nFAILURES!\r\nTests: 2, Assertions: 2, Errors: 1.\r\n\r\nTHE ERROR HANDLER HAS CHANGED!\r\n\r\n```\r\n> Provide test source code if related\r\nhere you are my code\r\n```php\r\n    public function newEnquiryTest(FunctionalTester $I)\r\n    {\r\n        $I->amOnPage('/dashboard/enquiry');\r\n        $I->seeResponseCodeIs(200);\r\n        $message = $I->grabTextFrom('h1');\r\n        $I->seeInRepository(\r\n                WebsitebutlerLog::class,\r\n                'id',\r\n                array(\r\n                    'CustomerId' => '3',\r\n                    'message' => $message\r\n                )\r\n            );\r\n    }\r\n\r\n```\r\n### Details\r\n\r\n* Codeception version: \"codeception/codeception\": \"^2.2\"\r\n* PHP Version:\r\n* Operating System: Ubuntu 16 LTS\r\n* Installation type: Composer\r\n* List of installed packages (`composer show`)\r\n\r\nbehat/gherkin                     v4.4.4             Gherkin DSL parser for PHP 5.3\r\nbehat/transliterator              v1.1.0             String transliterator\r\ncodeception/codeception           2.2.4              BDD-style testing framework\r\ndevio/pipedrive                   1.0.0              Complete Pipedrive API client for PHP\r\ndoctrine/annotations              v1.2.7             Docblock Annotations Parser\r\ndoctrine/cache                    v1.6.0             Caching library offering an object-oriented API for man...\r\ndoctrine/collections              v1.3.0             Collections Abstraction library\r\ndoctrine/common                   v2.6.1             Common Library for Doctrine projects\r\ndoctrine/data-fixtures            v1.1.1             Data Fixtures for all Doctrine Object Managers\r\ndoctrine/dbal                     v2.5.5             Database Abstraction Layer\r\ndoctrine/doctrine-bundle          1.6.4              Symfony DoctrineBundle\r\ndoctrine/doctrine-cache-bundle    1.3.0              Symfony Bundle for Doctrine Cache\r\ndoctrine/doctrine-fixtures-bundle 2.3.0              Symfony DoctrineFixturesBundle\r\ndoctrine/inflector                v1.1.0             Common String Manipulations with regard to casing and s...\r\ndoctrine/instantiator             1.0.5              A small, lightweight utility to instantiate objects in ...\r\ndoctrine/lexer                    v1.0.1             Base library for a lexer that can be used in Top-Down, ...\r\ndoctrine/orm                      v2.5.5             Object-Relational-Mapper for PHP\r\negeloen/lucene-search-bundle      2.0.1              Provides a zend lucene search integration for your Symf...\r\nfacebook/webdriver                1.1.3              A PHP client for WebDriver\r\nguzzlehttp/guzzle                 6.2.1              Guzzle is a PHP HTTP client library\r\nguzzlehttp/promises               1.2.0              Guzzle promises library\r\nguzzlehttp/psr7                   1.3.1              PSR-7 message implementation\r\nilluminate/contracts              v5.2.45            The Illuminate Contracts package.\r\nilluminate/support                v5.2.45            The Illuminate Support package.\r\nimagin/fotolia-api                dev-master 485c279 Composer package of the Fotolia API toolkit\r\nintervention/image                2.3.8              Image handling and manipulation library with support fo...\r\njdorn/sql-formatter               v1.2.17            a PHP SQL highlighting library\r\nknplabs/doctrine-behaviors        1.3.2              Doctrine2 behavior traits\r\nknplabs/knp-menu                  v2.1.1             An object oriented menu library\r\nknplabs/knp-menu-bundle           2.1.2              This bundle provides an integration of the KnpMenu library\r\nleafo/lessphp                     v0.4.0             lessphp is a compiler for LESS written in PHP.\r\nleafo/scssphp                     v0.0.12            scssphp is a compiler for SCSS written in PHP.\r\nleaseweb/memcache-bundle          v2.1.10            Memcache Doctrine caching and session storage in the We...\r\nmashape/unirest-php               v3.0.4             Unirest PHP\r\nmonolog/monolog                   1.21.0             Sends your logs to files, sockets, inboxes, databases a...\r\noro/doctrine-extensions           1.0.12             Doctrine Extensions for MySQL and PostgreSQL.\r\nparagonie/random_compat           v1.4.1             PHP 5.x polyfill for random_bytes() and random_int() fr...\r\nphpdocumentor/reflection-common   1.0                Common reflection classes used by phpdocumentor to refl...\r\nphpdocumentor/reflection-docblock 3.1.0              With this component, a library can provide support for ...\r\nphpdocumentor/type-resolver       0.2                \r\nphpspec/prophecy                  v1.6.1             Highly opinionated mocking framework for PHP 5.3+\r\nphpunit/php-code-coverage         2.2.4              Library that provides collection, processing, and rende...\r\nphpunit/php-file-iterator         1.4.1              FilterIterator implementation that filters files based ...\r\nphpunit/php-text-template         1.2.1              Simple template engine.\r\nphpunit/php-timer                 1.0.8              Utility class for timing\r\nphpunit/php-token-stream          1.4.8              Wrapper around PHP's tokenizer extension.\r\nphpunit/phpunit                   4.8.27             The PHP Unit Testing framework.\r\nphpunit/phpunit-mock-objects      2.3.8              Mock Object library for PHPUnit\r\npsr/http-message                  1.0.1              Common interface for HTTP messages\r\npsr/log                           1.0.1              Common interface for logging libraries\r\nsebastian/comparator              1.2.0              Provides the functionality to compare PHP values for eq...\r\nsebastian/diff                    1.4.1              Diff implementation\r\nsebastian/environment             1.3.8              Provides functionality to handle HHVM/PHP environments\r\nsebastian/exporter                1.2.2              Provides the functionality to export PHP variables for ...\r\nsebastian/global-state            1.1.1              Snapshotting of global state\r\nsebastian/recursion-context       1.0.2              Provides functionality to recursively process PHP varia...\r\nsebastian/version                 1.0.6              Library that helps with managing the version number of ...\r\nsensio/distribution-bundle        v5.0.12            Base bundle for Symfony Distributions\r\nsensio/framework-extra-bundle     v3.0.16            This bundle provides a way to configure your controller...\r\nsensio/generator-bundle           v3.0.8             This bundle generates code for you\r\nsensiolabs/security-checker       v3.0.2             A security checker for your composer.lock\r\nshark/simple_html_dom             dev-master 842b3fc Simple HTML DOM package.\r\nswiftmailer/swiftmailer           v5.4.3             Swiftmailer, free feature-rich PHP mailer\r\nsymfony/console                   v3.1.4             Symfony Console Component\r\nsymfony/monolog-bundle            2.11.1             Symfony MonologBundle\r\nsymfony/phpunit-bridge            v3.1.4             Symfony PHPUnit Bridge\r\nsymfony/polyfill-intl-icu         v1.2.0             Symfony polyfill for intl's ICU-related data and classes\r\nsymfony/polyfill-mbstring         v1.2.0             Symfony polyfill for the Mbstring extension\r\nsymfony/polyfill-php56            v1.2.0             Symfony polyfill backporting some PHP 5.6+ features to ...\r\nsymfony/polyfill-php70            v1.2.0             Symfony polyfill backporting some PHP 7.0+ features to ...\r\nsymfony/polyfill-util             v1.2.0             Symfony utilities for portability of PHP codes\r\nsymfony/swiftmailer-bundle        v2.3.11            Symfony SwiftmailerBundle\r\nsymfony/symfony                   v3.0.9             The Symfony PHP framework\r\ntwig/extensions                   v1.3.0             Common additional features for Twig that do not directl...\r\ntwig/twig                         v1.24.2            Twig, the flexible, fast, and secure template language ...\r\nwebmozart/assert                  1.1.0              Assertions to validate method input/output with nice er...\r\nzendframework/zend-hydrator       1.1.0              \r\nzendframework/zend-stdlib         2.7.7              \r\nzendframework/zendsearch          dev-master c8de250 a general purpose text search engine written entirely i...\r\n\r\n* Suite configuration:\r\n\r\n```yml\r\nclass_name: FunctionalTester\r\nmodules:\r\n    enabled:\r\n        - Symfony:\r\n            var_path: '../../var'\r\n            app_path: '../../app'\r\n        - Doctrine2:\r\n            depends: Symfony\r\n        - PhpBrowser:\r\n            url: 'http://localhost/app_dev.php/'\r\n            auth: ['user', 'pass']\r\n        - \\MyBundle\\Helper\\Functional\r\n\r\n```\r\n\r\n\r\nIt is worth mentioning that when I explicitly include the autoloader in the test _bootstrap.php file as follow:\r\n```php\r\n// I can assure you the path is correct\r\nrequire_once '../../../vendor/autoload.php';\r\n```\r\n\r\nI get the following error:\r\n```bash\r\n$ vendor/bin/codecept run -c src/MyBundle -vvv\r\nPHP Warning:  require_once(../../../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/james/src/MyBundle/tests/_bootstrap.php on line 3\r\nPHP Fatal error:  require_once(): Failed opening required '../../../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/james/src/MyBundle/tests/_bootstrap.php on line 3\r\n```\r\n\r\nadding the autoload to the _bootstrap.php in the functional suite folder gives me the same error.\r\n\r\nThank you for your help.\r\n\r\np.s. All of my @ORM annotations are fine and working with no problem everywhere in my app."}}
{"actor":{"display_login":"Soolan"}}