-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.1] Resource watcher component #391
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
Conversation
👍 |
* | ||
* @param Event $event | ||
*/ | ||
public function handles(Event $event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be renamed to supports
to be consistent with other parts of the framework.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. Changed!
Do we need a standalone component or does it belong to the Config one? |
I don't think it belongs to |
This feature will be considered for 2.1. Tell me if there is anything we can do in the current code to ease this addition. |
Fair enough :-) So, i will keep this PR opened to not forget about it? |
The one possible change i would propose is moving |
@stof needs some things to be fixed and merged. Hopefully will be able to work on it next week :-/ |
@everzet any news ? |
@stof too busy with move preparations. Will try to update this PR in the train to Nantes ;-) |
I actually like this idea. My first pass at trying to figure out the Config component had me wondering why the Resource stuff was in there and not in a more generic place. There are a lot of things there that could be useful in a generic sense that don't have anything to do with configuration other than the fact that Config uses it to do its work. |
@simensen When introducing the Config component, there was not all the |
Almost finished huge refactoring of RecursiveIterator and it's testing on top of rebased API. Will finish this PR thursday-friday. |
this is a basic state checker, which checks all files and directories recursively for changes
this resources tracker uses recursive iterator state checker internally
if no tracker were specified in watcher constructor it will use best one (inotify if available and rec otherwise)
…istent with other parts of the framework.
…FilteredChilds method
There's a discussion about using |
We've agreed on |
…ist yet * fixed DELETED event when starting to watch a file that does not exist yet * fixed files that are deleted and then re-created
@everzet: I have fixed some small issues here: everzet:resource-watcher-component...PR-391 |
I've just tested inotify support and there are some issues. I will have to investigate further. |
@fabpot ok. I'll merge your changes this evening. |
Merged. |
I have tested it and it works fine. I still need to work on it to be sure that the features are the same for both the plain PHP implementation and the inotify implementation (I fear that this is not the case right now). |
After working a bit more with the code, it's definitely not ready for merge. Before merging, we need to work on the following topics:
|
@fabpot agree. Will work on EventDispatcher integration and events refactoring. |
Just wondering if this has been updated to work wirth 2.1 yet? Or if it will even get in? I see alot of potential for a component like this!!! |
@stof multiplatform test suite, i'll try to finish/rebase it this week |
Closed if favor of newly created #3961 |
Update version constraint on simplesamlphp/simplesamlphp/2018-12-20.yaml
As we've talked in this PR: #256, i've created new Symfony2 component with ability to track resource changes (both files and directories) with 2 basic strategies:
Component supports them both and use best one by default (if inotify available - it will be used).
Usage example: https://gist.github.com/1406938