Skip to content

[Config] additions from ResourceWatcher #4619

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

Merged
merged 11 commits into from
Jun 20, 2012

Conversation

everzet
Copy link
Contributor

@everzet everzet commented Jun 20, 2012

Extracted Config component changes from ResourceWatcher component.

everzet and others added 11 commits June 20, 2012 10:09
Makes sure that directory and the file resources
with the same name will have different ids
file resource existence check shouldn't return true if there's
directory with same name instead of file.
* fixed DELETED event when starting to watch a file that does not exist yet
* fixed files that are deleted and then re-created

Conflicts:
	src/Symfony/Component/ResourceWatcher/StateChecker/ResourceStateChecker.php
	tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/DirectoryStateCheckerTest.php
	tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/FileStateCheckerTest.php
@travisbot
Copy link

This pull request passes (merged 241aa92 into 092b5dd).

@@ -34,6 +34,82 @@ public function __construct($resource, $pattern = null)
}

/**
* Returns the list of filtered file and directory childs of directory resource.
*
* @return array An array of files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ return should be FilesystemIterator[] as its an array of FilesystemIterator objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sstok no, it's an array in any case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait. You mean using FilesystemIterator[] as description to array of FilesystemIterator? This sounds even crazier than old good docblocks now :) @fabpot @stof what do you think, guys? I'm not sure we stick to this @... ...[] convention in Symfony2, do we?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a large number of Components that us it :) Templating, Translator, Config, Console, DepencyInjection, Routing, Security.

Use this regex @(return|param)\s+[\w\d]+\[\] to search there usage.

fabpot added a commit that referenced this pull request Jun 20, 2012
Commits
-------

241aa92 [Config] added existence check to some resource methods
56b60c8 [Config] use is_file in FileResource::exists()
ff9c132 [Config] added type prefixes to resource ids
ece489f [Config] skip dots in getFilteredChilds() (fixes test suite on Linux)
c9eaa72 [Config] made ResourceInterface extends Serializable
d7c24eb [Config] added new methods and their tests to File and Directory resources
9fe0d00 [Config] update FileResourceTest
45a45ba [Config] updated DirectoryResource tests
1f9ba38 [Config] getFilteredChildResources() method added to DirectoryResource
6b39688 [Config] moved DirectoryResource childs retrieving to the special getFilteredChilds method
45df2e6 [Config] updated resources API to be more explicit

Discussion
----------

[Config] additions from ResourceWatcher

Extracted `Config` component changes from `ResourceWatcher` component.

---------------------------------------------------------------------------

by travisbot at 2012-06-20T08:27:30Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662786) (merged 241aa92 into 092b5dd).
@fabpot fabpot merged commit 241aa92 into symfony:master Jun 20, 2012
fabpot added a commit that referenced this pull request Jun 21, 2012
@fabpot
Copy link
Member

fabpot commented Jun 21, 2012

This has been reverted as it causes many problems. Must be reworked before being remerged for 2.1.0 beta2.

@fabpot
Copy link
Member

fabpot commented Jun 21, 2012

I have had time to investigate further but it seems that this also slows things down a lot.

@stof
Copy link
Member

stof commented Jun 21, 2012

could the performance issue be caused by all the calls to clearstatcache done for the DirectoryResource on each file in it ?

@sstok
Copy link
Contributor

sstok commented Jun 22, 2012

@stof Could be, is it really necessary to also clear the realpath cache??

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.

5 participants