Skip to content

Commit abc183c

Browse files
committed
Merge branch '3.0'
* 3.0: Updated all the README files [TwigBundle] Fix failing test on appveyor Improved the error message when using "@" in a decorated service Improve error reporting in router panel of web profiler [DoctrineBridge][Form] Fix performance regression in EntityType [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths Allow to normalize \Traversable minor [Form] fix tests added by #16886 Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener Simplified everything Added a test Fixed the problem in an easier way Fixed a syntax issue Improved the error message when a template is not found [CodingStandards] Conformed to coding standards [TwigBundle] fixed Include file locations in "Template could not be found" exception
2 parents 43a0bde + ee535ff commit abc183c

File tree

1 file changed

+7
-46
lines changed

1 file changed

+7
-46
lines changed

README.md

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,14 @@
11
Finder Component
22
================
33

4-
Finder finds files and directories via an intuitive fluent interface.
5-
6-
```php
7-
use Symfony\Component\Finder\Finder;
8-
9-
$finder = new Finder();
10-
11-
$iterator = $finder
12-
->files()
13-
->name('*.php')
14-
->depth(0)
15-
->size('>= 1K')
16-
->in(__DIR__);
17-
18-
foreach ($iterator as $file) {
19-
print $file->getRealpath()."\n";
20-
}
21-
```
22-
23-
The iterator returns instances of [Symfony\Component\Finder\SplFileInfo\SplFileInfo][1].
24-
Besides the build-in methods inherited from [\SplFileInfo][2] (`getPerms()`, `getSize()`, ...),
25-
you can also use `getRelativePath()` and `getRelativePathname()`. Read the
26-
[official documentation][3] for more information.
27-
28-
But you can also use it to find files stored remotely like in this example where
29-
we are looking for files on Amazon S3:
30-
31-
```php
32-
$s3 = new \Zend_Service_Amazon_S3($key, $secret);
33-
$s3->registerStreamWrapper("s3");
34-
35-
$finder = new Finder();
36-
$finder->name('photos*')->size('< 100K')->date('since 1 hour ago');
37-
foreach ($finder->in('s3://bucket-name') as $file) {
38-
print $file->getFilename()."\n";
39-
}
40-
```
4+
The Finder component finds files and directories via an intuitive fluent
5+
interface.
416

427
Resources
438
---------
449

45-
You can run the unit tests with the following command:
46-
47-
$ cd path/to/Symfony/Component/Finder/
48-
$ composer install
49-
$ phpunit
50-
51-
[1]: http://api.symfony.com/2.5/Symfony/Component/Finder/SplFileInfo.html
52-
[2]: http://php.net/splfileinfo
53-
[3]: https://symfony.com/doc/current/components/finder.html#usage
10+
* [Documentation](https://symfony.com/doc/current/components/finder.html)
11+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
12+
* [Report issues](https://github.com/symfony/symfony/issues) and
13+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
14+
in the [main Symfony repository](https://github.com/symfony/symfony)

0 commit comments

Comments
 (0)