Skip to content

[AsseticBundle] inotify support for --watch option in assetic:dump command #256

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

Closed
wants to merge 1 commit into from

Conversation

naderman
Copy link
Member

Using inotify the command does not need to busy wait for changes in any of the files defining formulae or containing assets anymore. It configures a number of inotify watches and reacts only once a change has been performed.

…available

So far assetic:dump --watch would reload the entire asset manager once a second
to poll for changes to formulae, e.g. in template files, or changes to the
assets themselves. Now, when the inotify extension is installed it is used to
setup monitoring of the paths containing these files. The kernel will then
notify the console as soon as file changes are available and only then assets
will be regenerated.
@fabpot
Copy link
Member

fabpot commented Mar 14, 2011

What about having this a core feature of Symfony. We have quite a few places where it can be used. In fact, all the component using the Config/Loader and Config/Resource classes. What do you think?

@naderman
Copy link
Member Author

Yeah I thought about that, could just build some generic watch mechanism from this.

@everzet
Copy link
Contributor

everzet commented Mar 19, 2011

It could be very useful as Symfony component with fallback to old 1-sec watching mechanism (when inotify is not available). Many other libraries will benefit from it. Like, phpunit or Behat. Can i help somehow on this?

@kriswallsmith
Copy link
Contributor

Any news on integrating some sort of generic inotify support into the core? Are you guys thinking about something like a kernel:watch command that fires events when things change?

@everzet
Copy link
Contributor

everzet commented Mar 23, 2011

I've thought about some Finder integration:

$finder = new Finder();
$iterator = $finder->files()->in(/*...*/);
$iterator->watch(function($changedFile) {/*...*/});

@everzet
Copy link
Contributor

everzet commented Mar 23, 2011

I wanna create new FileWatcher component, which we will be able to integrate into Finder, Config/Resource and others. I can do it till friday if you don't mind?

@naderman
Copy link
Member Author

Feel free.

@everzet
Copy link
Contributor

everzet commented Mar 25, 2011

Created new PR: #391

@fabpot
Copy link
Member

fabpot commented Mar 28, 2011

Closing this PR as PR 391 is more generic.

@fabpot fabpot closed this Mar 28, 2011
jderusse pushed a commit to jderusse/symfony that referenced this pull request Mar 30, 2020
This PR was merged into the master branch.

Discussion
----------

Fix issues with some YAML files

Commits
-------

4455af7 fixed issues with some YAML files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants