Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find bundle in plugin tests #863

Closed
tobybatch opened this issue Jun 18, 2019 · 5 comments
Closed

Cannot find bundle in plugin tests #863

tobybatch opened this issue Jun 18, 2019 · 5 comments

Comments

@tobybatch
Copy link
Member

Describe the bug
There are no registered paths for namespace "ChromeExt" while loading test in the crawler. It seems the test environment can't find my bundle templates in the plugin name space.

        return $this->render('@ChromeExt/index.html.twig', [
            'customers' => $_customers,
            'projects' => $_projects        
    ]);

To Reproduce
Steps to reproduce the behavior:

  1. In the code base for a plugin create a tests/SomeControllerTest.php
  2. Create a tests that loads a route with a template
  3. Route errors, can find name space

Logfile

[2019-06-18 10:57:30] doctrine.DEBUG: SELECT t0.id AS id_1, t0.name AS name_2, t0.number AS number_3, t0.comment AS comment_4, t0.visible AS visible_5, t0.company AS company_6, t0.contact AS contact_7, t0.address AS address_8, t0.country AS country_9, t0.currency AS currency_10, t0.phone AS phone_11, t0.fax AS fax_12, t0.mobile AS mobile_13, t0.email AS email_14, t0.homepage AS homepage_15, t0.timezone AS timezone_16, t0.fixed_rate AS fixed_rate_17, t0.hourly_rate AS hourly_rate_18, t0.color AS color_19 FROM kimai2_customers t0 WHERE t0.id = ? [1] [] 
[2019-06-18 10:57:30] request.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "There are no registered paths for namespace "ChromeExt"." at /home/tobias/workspace/kimai/kimai2-app/vendor/twig/twig/src/Loader/FilesystemLoader.php line 227 {"exception":"[object] (Twig\\Error\\LoaderError(code: 0): There are no registered paths for namespace \"ChromeExt\". at /home/tobias/workspace/kimai/kimai2-app/vendor/twig/twig/src/Loader/FilesystemLoader.php:227)"} [] 
[2019-06-18 10:57:30] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} [] 


Desktop/Smartphone
Please complete the following information if this seems to be a frontend issue:

  • Device: PC
  • OS: Ubuntu 18.04
  • Browser: phpunit

Additional context

  • Kimai version: master
  • PHP 7.2

The bundle in question: https://github.com/neontribe/ChromeExtBundle.git

@kevinpapst
Copy link
Member

See https://github.com/kevinpapst/kimai2/blob/master/src/Kernel.php#L86

Any suggestions on this one? Activating it caused a lot of troubles for me... but I am not against it, it was just a "quick fix" to a problem I experienced more than once.

@tobybatch
Copy link
Member Author

cheers @kevinpapst I'll give it a go and see what happens. ;)

@kevinpapst
Copy link
Member

Sent me a PR if you think this line should be removed!

@tobybatch
Copy link
Member Author

will do

@lock
Copy link

lock bot commented Aug 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants