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

[Suggestion] routing completion without rebuilding the cache #261

Closed
stof opened this issue Mar 31, 2014 · 17 comments
Closed

[Suggestion] routing completion without rebuilding the cache #261

stof opened this issue Mar 31, 2014 · 17 comments
Labels

Comments

@stof
Copy link
Contributor

stof commented Mar 31, 2014

Currently, new routes are available for code completion only after the router cache is rebuilt. However, you are already parsing the routing definition files, as you can link to the route definition. Could it be possible to update the code completion as soon as new routes are added in the definition files ?

@hoshsadiq
Copy link

From what I am aware the plugin uses the app/cache/dev/appDevDebugProjectContainer.php which is generated by Symfony. You can either manually run app/console cache:warmup --env=dev if you are using annotations for routing or alternatively use the File Watchers plugin and set up a file watcher to warmup the cache when saving .yml files. See this screenshot.

@stof
Copy link
Contributor Author

stof commented Apr 1, 2014

I'm talking about the routing completion, so it does not uses app/cache/dev/appDevDebugProjectContainer.php for it, but the routing cache.

And I know that a cache warmup will rebuild it. However, the plugin is already able to parse the route definitions to link to the source, so it could use them to provide the completion as well without requiring any manual wiring.

And triggering a cache:warmup through a file watcher each time a yml file changes is not something I want to do. It would run lots of useless cache warmups (and potentially broken ones if some code is not in a working shape at the time the file watchers triggers the warmup). and each warmup will then trigger some further indexing (for instance by this plugin) by modifying the cache files even if they end up with the same content.

@Haehnchen
Copy link
Owner

yes cache clear will help, but i have already implement a yml indexer, so at least i can provide them as "weak" one in realtime. iam currently refactoing some index related stuff, that also on my todo.

@stof
Copy link
Contributor Author

stof commented Apr 1, 2014

btw, the same could be done for services (even if we cannot get all of them from service definitions given that compiler passes and DI extensions can alter them, so it should be considered weaker ones)

@hoshsadiq
Copy link

@Haehnchen What about routes defined in annotations?

@Haehnchen
Copy link
Owner

they are not indexed, because annotation are inside of an external plugin. that will take some more time to integrate...

@stof
i was also thinking about that. but need to check performance first, because most indexed services are parameter names that need to resolve again

@znahas
Copy link

znahas commented Apr 9, 2014

Hello,

I just updated the plugin to 0.10.52 and I use tcpdf bundle in my project. The indexer seem to get stuck at indexing the file tcpdf.php which is around 25k lines of code. This was working before the plugin update. I tried invalidating the cache and restarting but the ide stays stuck at indexing and you cannot do anything before the indexing is finished.

I had to manually delete that tcpdf.php file temporary in order to continue my development.

@Haehnchen
Copy link
Owner

@znahas thx

@znahas
Copy link

znahas commented Apr 9, 2014

@Haehnchen np.

@Max101
Copy link

Max101 commented Apr 11, 2014

Hello! Would it be possible to have more than a simple "Weak service" pop-up on the service that is considered weak, like with a bit more documentation? From your conversation I still dont understand what is a weak service, and if there is a pref in phpStorm to turn this feature off.
Many thanks & Keep up the good work!

@mnapoli
Copy link

mnapoli commented Apr 11, 2014

Yeah it's unclear to me too what "Weak" means, does that just mean that the route/service was parsed from the config files and not the compiled version, which means it's not 100% sure the service/route really exist?

(if so, I don't see the point of the warning: we can't do anything about it, and it's not really a problem to fix)

@Haehnchen
Copy link
Owner

@mnapoli u are right about the "Weaks". but we have info that something can be wrong in that case. so display it is right here. but i will move the annoations to inspections (+description), so you can better control to display or not...

@gregholland
Copy link

I stumbled upon this thread trying to work out what the 'Weak Service' warning means, I'm not really understanding this thread, could someone explain it a little better?

@scottgutman
Copy link

I, too, was looking for more information about a "weak Service" warning. Can you point me in the right direction as to what this means?

Thanks

@mhlavac
Copy link

mhlavac commented Aug 12, 2014

http://stackoverflow.com/questions/23909895/symfony-weak-route

Is it possible to add description directly to plugin, so people don't get scared by this? 👍

@Haehnchen
Copy link
Owner

just wait for jetbrains doc :)

@vpArth
Copy link

vpArth commented Dec 5, 2016

Should we still wait for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants