From dbf1f1b6e58b3dfca68310ff7f558954fc196286 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 3 Mar 2016 13:05:42 +0100 Subject: [PATCH 1/4] Updated all the README files --- src/Symfony/Bridge/Doctrine/README.md | 9 +++---- src/Symfony/Bridge/Monolog/README.md | 9 +++---- src/Symfony/Bridge/Propel1/README.md | 9 +++---- src/Symfony/Bridge/ProxyManager/README.md | 9 +++---- src/Symfony/Bridge/Twig/README.md | 10 +++----- src/Symfony/Component/BrowserKit/README.md | 14 +++++------ src/Symfony/Component/ClassLoader/README.md | 12 ++++++--- src/Symfony/Component/Config/README.md | 11 ++++---- src/Symfony/Component/Console/README.md | 25 +++++++------------ src/Symfony/Component/CssSelector/README.md | 15 ++++++----- src/Symfony/Component/Debug/README.md | 10 ++++---- .../Component/DependencyInjection/README.md | 10 ++++---- src/Symfony/Component/DomCrawler/README.md | 10 ++++---- .../Component/EventDispatcher/README.md | 10 ++++---- src/Symfony/Component/Filesystem/README.md | 10 ++++---- src/Symfony/Component/Finder/README.md | 10 ++++---- src/Symfony/Component/Form/README.md | 10 ++++---- .../Component/HttpFoundation/README.md | 10 ++++---- src/Symfony/Component/HttpKernel/README.md | 10 ++++---- src/Symfony/Component/Intl/README.md | 10 ++++---- .../Component/OptionsResolver/README.md | 10 ++++---- src/Symfony/Component/Process/README.md | 10 ++++---- .../Component/PropertyAccess/README.md | 10 ++++---- src/Symfony/Component/Routing/README.md | 10 ++++---- src/Symfony/Component/Security/README.md | 10 ++++---- src/Symfony/Component/Serializer/README.md | 10 ++++---- src/Symfony/Component/Stopwatch/README.md | 10 ++++---- src/Symfony/Component/Templating/README.md | 10 ++++---- src/Symfony/Component/Translation/README.md | 18 ++++--------- src/Symfony/Component/Validator/README.md | 24 ++++++------------ src/Symfony/Component/Yaml/README.md | 10 ++++---- 31 files changed, 165 insertions(+), 190 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/README.md b/src/Symfony/Bridge/Doctrine/README.md index 3dabc3cd6df88..46d897d061e0f 100644 --- a/src/Symfony/Bridge/Doctrine/README.md +++ b/src/Symfony/Bridge/Doctrine/README.md @@ -7,8 +7,7 @@ various Symfony components. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Bridge/Doctrine/ - $ composer install - $ phpunit + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Bridge/Monolog/README.md b/src/Symfony/Bridge/Monolog/README.md index b0d91ca4f4486..2d19b3e27cfd4 100644 --- a/src/Symfony/Bridge/Monolog/README.md +++ b/src/Symfony/Bridge/Monolog/README.md @@ -6,8 +6,7 @@ Provides integration for Monolog with various Symfony components. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Bridge/Monolog/ - $ composer install - $ phpunit + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Bridge/Propel1/README.md b/src/Symfony/Bridge/Propel1/README.md index 22590ca58364b..41286745ab61a 100644 --- a/src/Symfony/Bridge/Propel1/README.md +++ b/src/Symfony/Bridge/Propel1/README.md @@ -6,8 +6,7 @@ Provides integration for Propel with various Symfony components. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Bridge/Propel1/ - $ composer install - $ phpunit + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Bridge/ProxyManager/README.md b/src/Symfony/Bridge/ProxyManager/README.md index 35d41998b82e0..38d3d6964527f 100644 --- a/src/Symfony/Bridge/ProxyManager/README.md +++ b/src/Symfony/Bridge/ProxyManager/README.md @@ -6,10 +6,9 @@ Provides integration for [ProxyManager][1] with various Symfony components. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Bridge/ProxyManager/ - $ composer install - $ phpunit + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) [1]: https://github.com/Ocramius/ProxyManager diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md index 1f92af944f1f1..eb084147c37f8 100644 --- a/src/Symfony/Bridge/Twig/README.md +++ b/src/Symfony/Bridge/Twig/README.md @@ -7,9 +7,7 @@ Symfony components. Resources --------- -If you want to run the unit tests, install dev dependencies before -running PHPUnit: - - $ cd path/to/Symfony/Bridge/Twig/ - $ composer install - $ phpunit + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md index 5600fe2e1f4fe..056c8e8346502 100644 --- a/src/Symfony/Component/BrowserKit/README.md +++ b/src/Symfony/Component/BrowserKit/README.md @@ -6,9 +6,6 @@ BrowserKit simulates the behavior of a web browser. The component only provides an abstract client and does not provide any "default" backend for the HTTP layer. -Resources ---------- - For a simple implementation of a browser based on an HTTP layer, have a look at [Goutte](https://github.com/FriendsOfPHP/Goutte). @@ -16,8 +13,11 @@ For an implementation based on HttpKernelInterface, have a look at the [Client](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php) provided by the HttpKernel component. -You can run the unit tests with the following command: +Resources +--------- - $ cd path/to/Symfony/Component/BrowserKit/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/browser_kit/introduction.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 0d2955dc97e83..7848a8640f0c7 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/README.md @@ -78,8 +78,12 @@ provide byte caches. Resources --------- -You can run the unit tests with the following command: - $ cd path/to/Symfony/Component/ClassLoader/ - $ composer install - $ phpunit +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/class_loader/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md index 690d7d74f986e..7492cd53f5922 100644 --- a/src/Symfony/Component/Config/README.md +++ b/src/Symfony/Component/Config/README.md @@ -9,9 +9,8 @@ can optionally be used to convert from different formats to arrays. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Config/ - $ composer install - $ phpunit - + * [Documentation](https://symfony.com/doc/current/components/config/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index 25f700c8d42dc..c11208186c8ff 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -44,24 +44,17 @@ The component provides a lot of features like output coloring, input and output abstractions (so that you can easily unit-test your commands), validation, automatic help messages, ... -Tests ------ - -You can run the unit tests with the following command: +Resources +--------- - $ cd path/to/Symfony/Component/Console/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/console/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) -Third Party ------------ +Third Party Dependencies +------------------------ `Resources/bin/hiddeninput.exe` is a third party binary provided within this component. Find sources and license at https://github.com/Seldaek/hidden-input. - -Resources ---------- - -[The Console Component](https://symfony.com/doc/current/components/console.html) - -[How to create a Console Command](https://symfony.com/doc/current/cookbook/console/console_command.html) diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index ffe6c890f6b35..f1df634ab3fdb 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -36,12 +36,15 @@ names are lower-cased, the following extra pseudo-classes are supported: Resources --------- + * [Documentation](https://symfony.com/doc/current/components/css_selector.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) + +Third Party Dependencies +------------------------ + This component is a port of the Python cssselect library [v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1), which is distributed under the BSD license. - -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/CssSelector/ - $ composer install - $ phpunit diff --git a/src/Symfony/Component/Debug/README.md b/src/Symfony/Component/Debug/README.md index ad10a4188940c..fd1dcfd795b66 100644 --- a/src/Symfony/Component/Debug/README.md +++ b/src/Symfony/Component/Debug/README.md @@ -37,8 +37,8 @@ and HttpFoundation components. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Debug/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/debug/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md index 66f62be5de2ef..06f2d2c7db669 100644 --- a/src/Symfony/Component/DependencyInjection/README.md +++ b/src/Symfony/Component/DependencyInjection/README.md @@ -74,8 +74,8 @@ $sc->get('bar'); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/DependencyInjection/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/dependency_injection/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md index d2c8de5da42b0..c60a813a9b6e1 100644 --- a/src/Symfony/Component/DomCrawler/README.md +++ b/src/Symfony/Component/DomCrawler/README.md @@ -29,8 +29,8 @@ print $crawler->filter('body > p')->text(); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/DomCrawler/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/dom_crawler.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index 8031f4dd3f194..eb8e1b47d23cb 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -20,8 +20,8 @@ $dispatcher->dispatch('event_name'); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/EventDispatcher/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/event_dispatcher/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md index df09f93dce72a..76060abe12ef2 100644 --- a/src/Symfony/Component/Filesystem/README.md +++ b/src/Symfony/Component/Filesystem/README.md @@ -40,8 +40,8 @@ $filesystem->isAbsolutePath($file); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Filesystem/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/filesystem/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index 4fb1eca007a8c..9bb5ecc378866 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -42,11 +42,11 @@ foreach ($finder->in('s3://bucket-name') as $file) { Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Finder/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/finder.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) [1]: http://api.symfony.com/2.5/Symfony/Component/Finder/SplFileInfo.html [2]: http://php.net/splfileinfo diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index a2f24777af60b..9d2609dfb8960 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -19,8 +19,8 @@ https://symfony.com/doc/2.3/book/forms.html Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Form/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/form/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md index 11ad6eef54d72..51cc8ac6b43b0 100644 --- a/src/Symfony/Component/HttpFoundation/README.md +++ b/src/Symfony/Component/HttpFoundation/README.md @@ -49,8 +49,8 @@ if (!interface_exists('SessionHandlerInterface')) { Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/HttpFoundation/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/http_foundation/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index 9ec8c0427ba79..113144fc1a0df 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -92,8 +92,8 @@ with no efforts. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/HttpKernel/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/http_kernel/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index 43f86a31b8395..44882842f322d 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -15,11 +15,11 @@ The documentation for the component can be found [online] [1]. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Intl/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/intl.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) [0]: http://www.php.net/manual/en/intl.setup.php [1]: https://symfony.com/doc/2.3/components/intl.html diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index bb54c287c1454..182acad7ae595 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -108,8 +108,8 @@ class Employee extends Person Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/OptionsResolver/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/options_resolver.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md index 7c83ed413e565..aae01e269236f 100644 --- a/src/Symfony/Component/Process/README.md +++ b/src/Symfony/Component/Process/README.md @@ -44,8 +44,8 @@ remote server) and give feedback to the user in real-time. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Process/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/process.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/PropertyAccess/README.md b/src/Symfony/Component/PropertyAccess/README.md index 9fb92f058de8f..fdb666f7046ba 100644 --- a/src/Symfony/Component/PropertyAccess/README.md +++ b/src/Symfony/Component/PropertyAccess/README.md @@ -7,8 +7,8 @@ string notation. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/PropertyAccess/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/property_access/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md index 1a94583a873b8..d0ac49e3f25d1 100644 --- a/src/Symfony/Component/Routing/README.md +++ b/src/Symfony/Component/Routing/README.md @@ -29,8 +29,8 @@ $parameters = $matcher->match('/hello'); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Routing/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/routing/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index e38bc333749a1..974abf6d0c640 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -16,8 +16,8 @@ https://symfony.com/doc/2.3/book/security.html Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Security/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/security/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md index 156a288426438..5a6e6044ff2ed 100644 --- a/src/Symfony/Component/Serializer/README.md +++ b/src/Symfony/Component/Serializer/README.md @@ -8,8 +8,8 @@ It can also handle deserializing XML and JSON back to object graphs. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Serializer/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/serializer.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Stopwatch/README.md b/src/Symfony/Component/Stopwatch/README.md index 611df90ca5fac..de48dfe364c01 100644 --- a/src/Symfony/Component/Stopwatch/README.md +++ b/src/Symfony/Component/Stopwatch/README.md @@ -6,8 +6,8 @@ Stopwatch provides a way to profile code. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Stopwatch/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/stopwatch.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md index 253eb4f5076df..653dbc1da2ef0 100644 --- a/src/Symfony/Component/Templating/README.md +++ b/src/Symfony/Component/Templating/README.md @@ -11,8 +11,8 @@ blocks and layouts. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Templating/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/templating/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index 9a9dd80a54c77..247665b6bbd90 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -22,16 +22,8 @@ echo $translator->trans('Hello World!')."\n"; Resources --------- -Silex integration: - -https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/TranslationServiceProvider.php - -Documentation: - -https://symfony.com/doc/2.3/book/translation.html - -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Translation/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/translation/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index a1e59c7939712..c56c00494c7d5 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -1,7 +1,7 @@ Validator Component =================== -This component is based on the JSR-303 Bean Validation specification and +This component is based on the [JSR-303 Bean Validation specification] [1] and enables specifying validation rules for classes using XML, YAML, PHP or annotations, which can then be checked against instances of these classes. @@ -107,20 +107,10 @@ these drivers. Resources --------- -Silex integration: + * [Documentation](https://symfony.com/doc/current/book/validation.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) -https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/ValidatorServiceProvider.php - -Documentation: - -https://symfony.com/doc/2.3/book/validation.html - -JSR-303 Specification: - -http://jcp.org/en/jsr/detail?id=303 - -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Validator/ - $ composer install - $ phpunit +[1]: http://jcp.org/en/jsr/detail?id=303 diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md index 85a9786735afb..b85218ac37afc 100644 --- a/src/Symfony/Component/Yaml/README.md +++ b/src/Symfony/Component/Yaml/README.md @@ -14,8 +14,8 @@ print Yaml::dump($array); Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Yaml/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/yaml/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) From a473f6c41be30c2e89aacca88310c065183793f3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 3 Mar 2016 13:28:19 +0100 Subject: [PATCH 2/4] Fixed errors mentioned by reviewers --- src/Symfony/Component/Console/README.md | 4 ++-- src/Symfony/Component/CssSelector/README.md | 4 ++-- src/Symfony/Component/Finder/README.md | 26 ++------------------- src/Symfony/Component/Form/README.md | 11 --------- src/Symfony/Component/Intl/README.md | 8 +------ 5 files changed, 7 insertions(+), 46 deletions(-) diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index c11208186c8ff..dace3aed89ac0 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -53,8 +53,8 @@ Resources [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) -Third Party Dependencies ------------------------- +Credits +------- `Resources/bin/hiddeninput.exe` is a third party binary provided within this component. Find sources and license at https://github.com/Seldaek/hidden-input. diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index f1df634ab3fdb..698f31ff31110 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -42,8 +42,8 @@ Resources [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) -Third Party Dependencies ------------------------- +Credits +------- This component is a port of the Python cssselect library [v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1), diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index 9bb5ecc378866..af19d5472311b 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -1,7 +1,8 @@ Finder Component ================ -Finder finds files and directories via an intuitive fluent interface. +Finder finds files and directories via an intuitive fluent interface, both in +local and remote filesystems (such as Amazon S3): ```php use Symfony\Component\Finder\Finder; @@ -20,25 +21,6 @@ foreach ($iterator as $file) { } ``` -The iterator returns instances of [Symfony\Component\Finder\SplFileInfo\SplFileInfo][1]. -Besides the build-in methods inherited from [\SplFileInfo][2] (`getPerms()`, `getSize()`, ...), -you can also use `getRelativePath()` and `getRelativePathname()`. Read the -[official documentation][3] for more information. - -But you can also use it to find files stored remotely like in this example where -we are looking for files on Amazon S3: - -```php -$s3 = new \Zend_Service_Amazon_S3($key, $secret); -$s3->registerStreamWrapper("s3"); - -$finder = new Finder(); -$finder->name('photos*')->size('< 100K')->date('since 1 hour ago'); -foreach ($finder->in('s3://bucket-name') as $file) { - print $file->getFilename()."\n"; -} -``` - Resources --------- @@ -47,7 +29,3 @@ Resources * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: http://api.symfony.com/2.5/Symfony/Component/Finder/SplFileInfo.html -[2]: http://php.net/splfileinfo -[3]: https://symfony.com/doc/current/components/finder.html#usage diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index 9d2609dfb8960..c1194fa7ac517 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -5,17 +5,6 @@ Form provides tools for defining forms, rendering and mapping request data to related models. Furthermore it provides integration with the Validation component. -Resources ---------- - -Silex integration: - -https://github.com/silexphp/Silex/blob/master/src/Silex/Provider/FormServiceProvider.php - -Documentation: - -https://symfony.com/doc/2.3/book/forms.html - Resources --------- diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index 44882842f322d..d1ff93ecb7f71 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -5,12 +5,7 @@ A PHP replacement layer for the C intl extension that includes additional data from the ICU library. The replacement layer is limited to the locale "en". If you want to use other -locales, you should [install the intl extension] [0] instead. - -Documentation -------------- - -The documentation for the component can be found [online] [1]. +locales, you should [install the PHP intl extension] [0] instead. Resources --------- @@ -22,4 +17,3 @@ Resources in the [main Symfony repository](https://github.com/symfony/symfony) [0]: http://www.php.net/manual/en/intl.setup.php -[1]: https://symfony.com/doc/2.3/components/intl.html From 7fd3fed0b1cbdc48a7185362171cb08349f2d48a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 3 Mar 2016 14:57:11 +0100 Subject: [PATCH 3/4] Removed all the explanations from README files --- src/Symfony/Component/BrowserKit/README.md | 13 +-- src/Symfony/Component/ClassLoader/README.md | 79 +------------ src/Symfony/Component/Config/README.md | 7 +- src/Symfony/Component/Console/README.md | 44 +------- src/Symfony/Component/CssSelector/README.md | 32 +----- src/Symfony/Component/Debug/README.md | 33 +----- .../Component/DependencyInjection/README.md | 71 +----------- src/Symfony/Component/DomCrawler/README.md | 25 +---- .../Component/EventDispatcher/README.md | 18 +-- src/Symfony/Component/Filesystem/README.md | 36 +----- src/Symfony/Component/Finder/README.md | 21 +--- src/Symfony/Component/Form/README.md | 4 +- .../Component/HttpFoundation/README.md | 46 +------- src/Symfony/Component/HttpKernel/README.md | 91 +-------------- src/Symfony/Component/Intl/README.md | 9 +- src/Symfony/Component/Locale/README.md | 2 +- .../Component/OptionsResolver/README.md | 106 +----------------- src/Symfony/Component/Process/README.md | 40 +------ .../Component/PropertyAccess/README.md | 4 +- src/Symfony/Component/Routing/README.md | 25 +---- src/Symfony/Component/Security/README.md | 17 +-- src/Symfony/Component/Serializer/README.md | 7 +- src/Symfony/Component/Stopwatch/README.md | 2 +- src/Symfony/Component/Templating/README.md | 11 +- src/Symfony/Component/Translation/README.md | 18 +-- src/Symfony/Component/Validator/README.md | 104 +---------------- src/Symfony/Component/Yaml/README.md | 10 +- 27 files changed, 58 insertions(+), 817 deletions(-) diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md index 056c8e8346502..a0083ac5bd7ea 100644 --- a/src/Symfony/Component/BrowserKit/README.md +++ b/src/Symfony/Component/BrowserKit/README.md @@ -1,17 +1,8 @@ BrowserKit Component ==================== -BrowserKit simulates the behavior of a web browser. - -The component only provides an abstract client and does not provide any -"default" backend for the HTTP layer. - -For a simple implementation of a browser based on an HTTP layer, have a look -at [Goutte](https://github.com/FriendsOfPHP/Goutte). - -For an implementation based on HttpKernelInterface, have a look at the -[Client](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php) -provided by the HttpKernel component. +The BrowserKit component simulates the behavior of a web browser, allowing you +to make requests, click on links and submit forms programmatically. Resources --------- diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 7848a8640f0c7..d61992b6a80e7 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/README.md @@ -1,83 +1,8 @@ ClassLoader Component ===================== -ClassLoader loads your project classes automatically if they follow some -standard PHP conventions. - -The ClassLoader object is able to autoload classes that implement the PSR-0 -standard or the PEAR naming convention. - -First, register the autoloader: - -```php -require_once __DIR__.'/src/Symfony/Component/ClassLoader/ClassLoader.php'; - -use Symfony\Component\ClassLoader\ClassLoader; - -$loader = new ClassLoader(); -$loader->register(); -``` - -Then, register some namespaces with the `addPrefix()` method: - -```php -$loader->addPrefix('Symfony', __DIR__.'/src'); -$loader->addPrefix('Monolog', __DIR__.'/vendor/monolog/src'); -``` - -The `addPrefix()` method takes a namespace prefix and a path where to -look for the classes as arguments. - -You can also register a sub-namespaces: - -```php -$loader->addPrefix('Doctrine\\Common', __DIR__.'/vendor/doctrine-common/lib'); -``` - -The order of registration is significant and the first registered namespace -takes precedence over later registered one. - -You can also register more than one path for a given namespace: - -```php -$loader->addPrefix('Symfony', array(__DIR__.'/src', __DIR__.'/symfony/src')); -``` - -Alternatively, you can use the `addPrefixes()` method to register more -than one namespace at once: - -```php -$loader->addPrefixes(array( - 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), - 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', - 'Doctrine' => __DIR__.'/vendor/doctrine/lib', - 'Monolog' => __DIR__.'/vendor/monolog/src', -)); -``` - -For better performance, you can use the APC class loader: - -```php -require_once __DIR__.'/src/Symfony/Component/ClassLoader/ClassLoader.php'; -require_once __DIR__.'/src/Symfony/Component/ClassLoader/ApcClassLoader.php'; - -use Symfony\Component\ClassLoader\ClassLoader; -use Symfony\Component\ClassLoader\ApcClassLoader; - -$loader = new ClassLoader(); -$loader->addPrefix('Symfony', __DIR__.'/src'); - -$loader = new ApcClassLoader('apc.prefix.', $loader); -$loader->register(); -``` - -Furthermore, the component provides tools to aggregate classes into a single -file, which is especially useful to improve performance on servers that do not -provide byte caches. - -Resources ---------- - +The ClassLoader component provides tools to autoload your classes and cache +their locations for performance. Resources --------- diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md index 7492cd53f5922..bf400da196b22 100644 --- a/src/Symfony/Component/Config/README.md +++ b/src/Symfony/Component/Config/README.md @@ -1,10 +1,9 @@ Config Component ================ -Config provides the infrastructure for loading configurations from different -data sources and optionally monitoring these data sources for changes. There -are additional tools for validating, normalizing and handling of defaults that -can optionally be used to convert from different formats to arrays. +The Config component provides several classes to help you find, load, combine, +autofill and validate configuration values of any kind, whatever their source +may be (YAML, XML, INI files, or for instance a database). Resources --------- diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index dace3aed89ac0..664a37c0ee7be 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -1,48 +1,8 @@ Console Component ================= -Console eases the creation of beautiful and testable command line interfaces. - -The Application object manages the CLI application: - -```php -use Symfony\Component\Console\Application; - -$console = new Application(); -$console->run(); -``` - -The ``run()`` method parses the arguments and options passed on the command -line and executes the right command. - -Registering a new command can easily be done via the ``register()`` method, -which returns a ``Command`` instance: - -```php -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -$console - ->register('ls') - ->setDefinition(array( - new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'), - )) - ->setDescription('Displays the files in the given directory') - ->setCode(function (InputInterface $input, OutputInterface $output) { - $dir = $input->getArgument('dir'); - - $output->writeln(sprintf('Dir listing for %s', $dir)); - }) -; -``` - -You can also register new commands via classes. - -The component provides a lot of features like output coloring, input and -output abstractions (so that you can easily unit-test your commands), -validation, automatic help messages, ... +The Console component eases the creation of beautiful and testable command line +interfaces. Resources --------- diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index 698f31ff31110..7c4c411635dc2 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -1,37 +1,7 @@ CssSelector Component ===================== -CssSelector converts CSS selectors to XPath expressions. - -The component only goal is to convert CSS selectors to their XPath -equivalents: - -```php -use Symfony\Component\CssSelector\CssSelector; - -print CssSelector::toXPath('div.item > h4 > a'); -``` - -HTML and XML are different --------------------------- - -The `CssSelector` component comes with an `HTML` extension which is enabled by -default. If you need to use this component with `XML` documents, you have to -disable this `HTML` extension. That's because, `HTML` tag & attribute names -are always lower-cased, but case-sensitive in `XML`: - -```php -// disable `HTML` extension: -CssSelector::disableHtmlExtension(); - -// re-enable `HTML` extension: -CssSelector::enableHtmlExtension(); -``` - -When the `HTML` extension is enabled, tag names are lower-cased, attribute -names are lower-cased, the following extra pseudo-classes are supported: -`checked`, `link`, `disabled`, `enabled`, `selected`, `invalid`, `hover`, -`visited`, and the `lang()` function is also added. +The CssSelector component converts CSS selectors to XPath expressions. Resources --------- diff --git a/src/Symfony/Component/Debug/README.md b/src/Symfony/Component/Debug/README.md index fd1dcfd795b66..a1d16175c1a1f 100644 --- a/src/Symfony/Component/Debug/README.md +++ b/src/Symfony/Component/Debug/README.md @@ -1,38 +1,7 @@ Debug Component =============== -Debug provides tools to make debugging easier. - -Enabling all debug tools is as easy as calling the `enable()` method on the -main `Debug` class: - -```php -use Symfony\Component\Debug\Debug; - -Debug::enable(); -``` - -You can also use the tools individually: - -```php -use Symfony\Component\Debug\ErrorHandler; -use Symfony\Component\Debug\ExceptionHandler; - -error_reporting(-1); - -ErrorHandler::register($errorReportingLevel); -if ('cli' !== php_sapi_name()) { - ExceptionHandler::register(); -} elseif (!ini_get('log_errors') || ini_get('error_log')) { - ini_set('display_errors', 1); -} -``` - -Note that the `Debug::enable()` call also registers the debug class loader -from the Symfony ClassLoader component when available. - -This component can optionally take advantage of the features of the HttpKernel -and HttpFoundation components. +The Debug component provides tools to ease debugging PHP code. Resources --------- diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md index 06f2d2c7db669..932647f94a903 100644 --- a/src/Symfony/Component/DependencyInjection/README.md +++ b/src/Symfony/Component/DependencyInjection/README.md @@ -1,75 +1,8 @@ DependencyInjection Component ============================= -DependencyInjection manages your services via a robust and flexible Dependency -Injection Container. - -Here is a simple example that shows how to register services and parameters: - -```php -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -$sc = new ContainerBuilder(); -$sc - ->register('foo', '%foo.class%') - ->addArgument(new Reference('bar')) -; -$sc->setParameter('foo.class', 'Foo'); - -$sc->get('foo'); -``` - -Method Calls (Setter Injection): - -```php -$sc = new ContainerBuilder(); - -$sc - ->register('bar', '%bar.class%') - ->addMethodCall('setFoo', array(new Reference('foo'))) -; -$sc->setParameter('bar.class', 'Bar'); - -$sc->get('bar'); -``` - -Factory Class: - -If your service is retrieved by calling a static method: - -```php -$sc = new ContainerBuilder(); - -$sc - ->register('bar', '%bar.class%') - ->setFactoryClass('%bar.class%') - ->setFactoryMethod('getInstance') - ->addArgument('Aarrg!!!') -; -$sc->setParameter('bar.class', 'Bar'); - -$sc->get('bar'); -``` - -File Include: - -For some services, especially those that are difficult or impossible to -autoload, you may need the container to include a file before -instantiating your class. - -```php -$sc = new ContainerBuilder(); - -$sc - ->register('bar', '%bar.class%') - ->setFile('/path/to/file') - ->addArgument('Aarrg!!!') -; -$sc->setParameter('bar.class', 'Bar'); - -$sc->get('bar'); -``` +The DependencyInjection component allows you to standardize and centralize the +way objects are constructed in your application. Resources --------- diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md index c60a813a9b6e1..5fad2e27adc2f 100644 --- a/src/Symfony/Component/DomCrawler/README.md +++ b/src/Symfony/Component/DomCrawler/README.md @@ -1,30 +1,7 @@ DomCrawler Component ==================== -DomCrawler eases DOM navigation for HTML and XML documents. - -If you are familiar with jQuery, DomCrawler is a PHP equivalent: - -```php -use Symfony\Component\DomCrawler\Crawler; - -$crawler = new Crawler(); -$crawler->addContent('

Hello World!

'); - -print $crawler->filterXPath('descendant-or-self::body/p')->text(); -``` - -If you are also using the CssSelector component, you can use CSS Selectors -instead of XPath expressions: - -```php -use Symfony\Component\DomCrawler\Crawler; - -$crawler = new Crawler(); -$crawler->addContent('

Hello World!

'); - -print $crawler->filter('body > p')->text(); -``` +The DomCrawler component eases DOM navigation for HTML and XML documents. Resources --------- diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index eb8e1b47d23cb..185c3fecf8fee 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -1,21 +1,9 @@ EventDispatcher Component ========================= -The Symfony EventDispatcher component implements the Mediator pattern in a -simple and effective way to make your projects truly extensible. - -```php -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\Event; - -$dispatcher = new EventDispatcher(); - -$dispatcher->addListener('event_name', function (Event $event) { - // ... -}); - -$dispatcher->dispatch('event_name'); -``` +The EventDispatcher component provides tools that allow your application +components to communicate with each other by dispatching events and listening to +them. Resources --------- diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md index 76060abe12ef2..877ab3543f32d 100644 --- a/src/Symfony/Component/Filesystem/README.md +++ b/src/Symfony/Component/Filesystem/README.md @@ -1,41 +1,7 @@ Filesystem Component ==================== -Filesystem provides basic utility to manipulate the file system: - -```php -copy($originFile, $targetFile, $override = false); - -$filesystem->mkdir($dirs, $mode = 0777); - -$filesystem->touch($files, $time = null, $atime = null); - -$filesystem->remove($files); - -$filesystem->exists($files); - -$filesystem->chmod($files, $mode, $umask = 0000, $recursive = false); - -$filesystem->chown($files, $user, $recursive = false); - -$filesystem->chgrp($files, $group, $recursive = false); - -$filesystem->rename($origin, $target); - -$filesystem->symlink($originDir, $targetDir, $copyOnWindows = false); - -$filesystem->makePathRelative($endPath, $startPath); - -$filesystem->mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array()); - -$filesystem->isAbsolutePath($file); -``` +The Filesystem component provides basic utilities for the filesystem. Resources --------- diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index af19d5472311b..0b19c752572d8 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -1,25 +1,8 @@ Finder Component ================ -Finder finds files and directories via an intuitive fluent interface, both in -local and remote filesystems (such as Amazon S3): - -```php -use Symfony\Component\Finder\Finder; - -$finder = new Finder(); - -$iterator = $finder - ->files() - ->name('*.php') - ->depth(0) - ->size('>= 1K') - ->in(__DIR__); - -foreach ($iterator as $file) { - print $file->getRealpath()."\n"; -} -``` +The Finder component finds files and directories via an intuitive fluent +interface. Resources --------- diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index c1194fa7ac517..3fe6f8bbf3206 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -1,9 +1,7 @@ Form Component ============== -Form provides tools for defining forms, rendering and mapping request data to -related models. Furthermore it provides integration with the Validation -component. +The Form component allows you to easily create, process and reuse HTML forms. Resources --------- diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md index 51cc8ac6b43b0..8907f0b967896 100644 --- a/src/Symfony/Component/HttpFoundation/README.md +++ b/src/Symfony/Component/HttpFoundation/README.md @@ -1,50 +1,8 @@ HttpFoundation Component ======================== -HttpFoundation defines an object-oriented layer for the HTTP specification. - -It provides an abstraction for requests, responses, uploaded files, cookies, -sessions, ... - -In this example, we get a Request object from the current PHP global -variables: - -```php -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -$request = Request::createFromGlobals(); -echo $request->getPathInfo(); -``` - -You can also create a Request directly -- that's interesting for unit testing: - -```php -$request = Request::create('/?foo=bar', 'GET'); -echo $request->getPathInfo(); -``` - -And here is how to create and send a Response: - -```php -$response = new Response('Not Found', 404, array('Content-Type' => 'text/plain')); -$response->send(); -``` - -The Request and the Response classes have many other methods that implement -the HTTP specification. - -Loading -------- - -If you are not using Composer but are using PHP 5.3.x, you must add the following to your autoloader: - -```php -// SessionHandlerInterface -if (!interface_exists('SessionHandlerInterface')) { - $loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs'); -} -``` +The HttpFoundation component defines an object-oriented layer for the HTTP +specification. Resources --------- diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index 113144fc1a0df..cc5e74b6bca3b 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -1,93 +1,10 @@ HttpKernel Component ==================== -HttpKernel provides the building blocks to create flexible and fast HTTP-based -frameworks. - -``HttpKernelInterface`` is the core interface of the Symfony full-stack -framework: - -```php -interface HttpKernelInterface -{ - /** - * Handles a Request to convert it to a Response. - * - * @param Request $request A Request instance - * - * @return Response A Response instance - */ - function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); -} -``` - -It takes a ``Request`` as an input and should return a ``Response`` as an -output. Using this interface makes your code compatible with all frameworks -using the Symfony components. And this will give you many cool features for -free. - -Creating a framework based on the Symfony components is really easy. Here is -a very simple, but fully-featured framework based on the Symfony components: - -```php -$routes = new RouteCollection(); -$routes->add('hello', new Route('/hello', array('_controller' => - function (Request $request) { - return new Response(sprintf("Hello %s", $request->get('name'))); - } -))); - -$request = Request::createFromGlobals(); - -$context = new RequestContext(); -$context->fromRequest($request); - -$matcher = new UrlMatcher($routes, $context); - -$dispatcher = new EventDispatcher(); -$dispatcher->addSubscriber(new RouterListener($matcher)); - -$resolver = new ControllerResolver(); - -$kernel = new HttpKernel($dispatcher, $resolver); - -$kernel->handle($request)->send(); -``` - -This is all you need to create a flexible framework with the Symfony -components. - -Want to add an HTTP reverse proxy and benefit from HTTP caching and Edge Side -Includes? - -```php -$kernel = new HttpKernel($dispatcher, $resolver); - -$kernel = new HttpCache($kernel, new Store(__DIR__.'/cache')); -``` - -Want to functional test this small framework? - -```php -$client = new Client($kernel); -$crawler = $client->request('GET', '/hello/Fabien'); - -$this->assertEquals('Fabien', $crawler->filter('p > span')->text()); -``` - -Want nice error pages instead of ugly PHP exceptions? - -```php -$dispatcher->addSubscriber(new ExceptionListener(function (Request $request) { - $msg = 'Something went wrong! ('.$request->get('exception')->getMessage().')'; - - return new Response($msg, 500); -})); -``` - -And that's why the simple looking ``HttpKernelInterface`` is so powerful. It -gives you access to a lot of cool features, ready to be used out of the box, -with no efforts. +The HttpKernel component provides a structured process for converting a Request +into a Response by making use of the EventDispatcher component. It's flexible +enough to create a full-stack framework (Symfony), a micro-framework (Silex) or +an advanced CMS system (Drupal). Resources --------- diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index d1ff93ecb7f71..3278ae53ad940 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -1,11 +1,8 @@ Intl Component ============= -A PHP replacement layer for the C intl extension that includes additional data -from the ICU library. - -The replacement layer is limited to the locale "en". If you want to use other -locales, you should [install the PHP intl extension] [0] instead. +A PHP replacement layer for the C intl extension that also provides access to +the localization data of the ICU library. Resources --------- @@ -15,5 +12,3 @@ Resources * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) - -[0]: http://www.php.net/manual/en/intl.setup.php diff --git a/src/Symfony/Component/Locale/README.md b/src/Symfony/Component/Locale/README.md index d2298ec53275e..cea6d8af58941 100644 --- a/src/Symfony/Component/Locale/README.md +++ b/src/Symfony/Component/Locale/README.md @@ -4,5 +4,5 @@ Locale Component Locale provides fallback code to handle cases when the ``intl`` extension is missing. -The Locale component is deprecated since version 2.3 and will be removed in +The Locale component is deprecated since version 2.3 and was removed in Symfony 3.0. You should use the more capable Intl component instead. diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index 182acad7ae595..5768f68e7ff7d 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -1,109 +1,9 @@ OptionsResolver Component ========================= -OptionsResolver helps at configuring objects with option arrays. - -It supports default values on different levels of your class hierarchy, -option constraints (required vs. optional, allowed values) and lazy options -whose default value depends on the value of another option. - -The following example demonstrates a Person class with two required options -"firstName" and "lastName" and two optional options "age" and "gender", where -the default value of "gender" is derived from the passed first name, if -possible, and may only be one of "male" and "female". - -```php -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; -use Symfony\Component\OptionsResolver\Options; - -class Person -{ - protected $options; - - public function __construct(array $options = array()) - { - $resolver = new OptionsResolver(); - $this->setDefaultOptions($resolver); - - $this->options = $resolver->resolve($options); - } - - protected function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setRequired(array( - 'firstName', - 'lastName', - )); - - $resolver->setDefaults(array( - 'age' => null, - 'gender' => function (Options $options) { - if (self::isKnownMaleName($options['firstName'])) { - return 'male'; - } - - return 'female'; - }, - )); - - $resolver->setAllowedValues(array( - 'gender' => array('male', 'female'), - )); - } -} -``` - -We can now easily instantiate a Person object: - -```php -// 'gender' is implicitly set to 'female' -$person = new Person(array( - 'firstName' => 'Jane', - 'lastName' => 'Doe', -)); -``` - -We can also override the default values of the optional options: - -```php -$person = new Person(array( - 'firstName' => 'Abdullah', - 'lastName' => 'Mogashi', - 'gender' => 'male', - 'age' => 30, -)); -``` - -Options can be added or changed in subclasses by overriding the `setDefaultOptions` -method: - -```php -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\OptionsResolver\Options; - -class Employee extends Person -{ - protected function setDefaultOptions(OptionsResolverInterface $resolver) - { - parent::setDefaultOptions($resolver); - - $resolver->setRequired(array( - 'birthDate', - )); - - $resolver->setDefaults(array( - // $previousValue contains the default value configured in the - // parent class - 'age' => function (Options $options, $previousValue) { - return self::calculateAge($options['birthDate']); - } - )); - } -} -``` - - +The OptionsResolver component is `array_replace on steroids. It allows you to +create an options system with required options, defaults, validation (type, +value), normalization and more. Resources --------- diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md index aae01e269236f..b7ca5b4254942 100644 --- a/src/Symfony/Component/Process/README.md +++ b/src/Symfony/Component/Process/README.md @@ -1,45 +1,7 @@ Process Component ================= -Process executes commands in sub-processes. - -In this example, we run a simple directory listing and get the result back: - -```php -use Symfony\Component\Process\Process; - -$process = new Process('ls -lsa'); -$process->setTimeout(3600); -$process->run(); -if (!$process->isSuccessful()) { - throw new RuntimeException($process->getErrorOutput()); -} - -print $process->getOutput(); -``` - -You can think that this is easy to achieve with plain PHP but it's not especially -if you want to take care of the subtle differences between the different platforms. - -And if you want to be able to get some feedback in real-time, just pass an -anonymous function to the ``run()`` method and you will get the output buffer -as it becomes available: - -```php -use Symfony\Component\Process\Process; - -$process = new Process('ls -lsa'); -$process->run(function ($type, $buffer) { - if (Process::ERR === $type) { - echo 'ERR > '.$buffer; - } else { - echo 'OUT > '.$buffer; - } -}); -``` - -That's great if you want to execute a long running command (like rsync-ing files to a -remote server) and give feedback to the user in real-time. +The Process component executes commands in sub-processes. Resources --------- diff --git a/src/Symfony/Component/PropertyAccess/README.md b/src/Symfony/Component/PropertyAccess/README.md index fdb666f7046ba..1959fd9e93492 100644 --- a/src/Symfony/Component/PropertyAccess/README.md +++ b/src/Symfony/Component/PropertyAccess/README.md @@ -1,8 +1,8 @@ PropertyAccess Component ======================== -PropertyAccess reads/writes values from/to object/array graphs using a simple -string notation. +The PropertyAccess component provides function to read and write from/to an +object or array using a simple string notation. Resources --------- diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md index d0ac49e3f25d1..88fb1fde5a7bd 100644 --- a/src/Symfony/Component/Routing/README.md +++ b/src/Symfony/Component/Routing/README.md @@ -1,30 +1,7 @@ Routing Component ================= -Routing associates a request with the code that will convert it to a response. - -The example below demonstrates how you can set up a fully working routing -system: - -```php -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Matcher\UrlMatcher; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; - -$routes = new RouteCollection(); -$routes->add('hello', new Route('/hello', array('controller' => 'foo'))); - -$context = new RequestContext(); - -// this is optional and can be done without a Request instance -$context->fromRequest(Request::createFromGlobals()); - -$matcher = new UrlMatcher($routes, $context); - -$parameters = $matcher->match('/hello'); -``` +The Routing component maps an HTTP request to a set of configuration variables. Resources --------- diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 974abf6d0c640..b8bba12f20362 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -1,17 +1,12 @@ Security Component ================== -Security provides an infrastructure for sophisticated authorization systems, -which makes it possible to easily separate the actual authorization logic from -so called user providers that hold the users credentials. It is inspired by -the Java Spring framework. - -Resources ---------- - -Documentation: - -https://symfony.com/doc/2.3/book/security.html +The Security component provides a complete security system for your web +application. It ships with facilities for authenticating using HTTP basic or +digest authentication, interactive form login or X.509 certificate login, but +also allows you to implement your own authentication strategies. Furthermore, +the component provides ways to authorize authenticated users based on their +roles, and it contains an advanced ACL system. Resources --------- diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md index 5a6e6044ff2ed..14270b5363afb 100644 --- a/src/Symfony/Component/Serializer/README.md +++ b/src/Symfony/Component/Serializer/README.md @@ -1,9 +1,10 @@ Serializer Component ==================== -With the Serializer component it's possible to handle serializing data structures, -including object graphs, into array structures or other formats like XML and JSON. -It can also handle deserializing XML and JSON back to object graphs. +With the Serializer component it's possible to handle serializing data +structures, including object graphs, into array structures or other formats like +XML and JSON. It can also handle deserializing XML and JSON back to object +graphs. Resources --------- diff --git a/src/Symfony/Component/Stopwatch/README.md b/src/Symfony/Component/Stopwatch/README.md index de48dfe364c01..eb0ebb3fa8ab0 100644 --- a/src/Symfony/Component/Stopwatch/README.md +++ b/src/Symfony/Component/Stopwatch/README.md @@ -1,7 +1,7 @@ Stopwatch Component =================== -Stopwatch provides a way to profile code. +The Stopwatch component provides a way to profile code. Resources --------- diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md index 653dbc1da2ef0..58e2a0a5c6b83 100644 --- a/src/Symfony/Component/Templating/README.md +++ b/src/Symfony/Component/Templating/README.md @@ -1,12 +1,13 @@ Templating Component ==================== -Templating provides all the tools needed to build any kind of template system. +The Templating component provides all the tools needed to build any kind of +template system. -It provides an infrastructure to load template files and optionally monitor -them for changes. It also provides a concrete template engine implementation -using PHP with additional tools for escaping and separating templates into -blocks and layouts. +It provides an infrastructure to load template files and optionally monitor them +for changes. It also provides a concrete template engine implementation using +PHP with additional tools for escaping and separating templates into blocks and +layouts. Resources --------- diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index 247665b6bbd90..46f3d1f2f25e6 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -1,23 +1,7 @@ Translation Component ===================== -Translation provides tools for loading translation files and generating -translated strings from these including support for pluralization. - -```php -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\MessageSelector; -use Symfony\Component\Translation\Loader\ArrayLoader; - -$translator = new Translator('fr_FR', new MessageSelector()); -$translator->setFallbackLocales(array('fr')); -$translator->addLoader('array', new ArrayLoader()); -$translator->addResource('array', array( - 'Hello World!' => 'Bonjour', -), 'fr'); - -echo $translator->trans('Hello World!')."\n"; -``` +The Translation component provides tools to internationalize your application. Resources --------- diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index c56c00494c7d5..9dfbffb3f545a 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -1,108 +1,8 @@ Validator Component =================== -This component is based on the [JSR-303 Bean Validation specification] [1] and -enables specifying validation rules for classes using XML, YAML, PHP or -annotations, which can then be checked against instances of these classes. - -Usage ------ - -The component provides "validation constraints", which are simple objects -containing the rules for the validation. Let's validate a simple string -as an example: - -```php -use Symfony\Component\Validator\Validation; -use Symfony\Component\Validator\Constraints\Length; - -$validator = Validation::createValidator(); - -$violations = $validator->validateValue('Bernhard', new Length(array('min' => 10))); -``` - -This validation will fail because the given string is shorter than ten -characters. The precise errors, here called "constraint violations", are -returned by the validator. You can analyze these or return them to the user. -If the violation list is empty, validation succeeded. - -Validation of arrays is possible using the `Collection` constraint: - -```php -use Symfony\Component\Validator\Validation; -use Symfony\Component\Validator\Constraints as Assert; - -$validator = Validation::createValidator(); - -$constraint = new Assert\Collection(array( - 'name' => new Assert\Collection(array( - 'first_name' => new Assert\Length(array('min' => 101)), - 'last_name' => new Assert\Length(array('min' => 1)), - )), - 'email' => new Assert\Email(), - 'simple' => new Assert\Length(array('min' => 102)), - 'gender' => new Assert\Choice(array(3, 4)), - 'file' => new Assert\File(), - 'password' => new Assert\Length(array('min' => 60)), -)); - -$violations = $validator->validateValue($input, $constraint); -``` - -Again, the validator returns the list of violations. - -Validation of objects is possible using "constraint mapping". With such -a mapping you can put constraints onto properties and objects of classes. -Whenever an object of this class is validated, its properties and -method results are matched against the constraints. - -```php -use Symfony\Component\Validator\Validation; -use Symfony\Component\Validator\Constraints as Assert; - -class User -{ - /** - * @Assert\Length(min = 3) - * @Assert\NotBlank - */ - private $name; - - /** - * @Assert\Email - * @Assert\NotBlank - */ - private $email; - - public function __construct($name, $email) - { - $this->name = $name; - $this->email = $email; - } - - /** - * @Assert\True(message = "The user should have a Google Mail account") - */ - public function isGmailUser() - { - return false !== strpos($this->email, '@gmail.com'); - } -} - -$validator = Validation::createValidatorBuilder() - ->enableAnnotationMapping() - ->getValidator(); - -$user = new User('John Doe', 'john@example.com'); - -$violations = $validator->validate($user); -``` - -This example uses the annotation support of Doctrine Common to -map constraints to properties and methods. You can also map constraints -using XML, YAML or plain PHP, if you dislike annotations or don't want -to include Doctrine. Check the documentation for more information about -these drivers. +The Validator component provides tools to validate values following the +[JSR-303 Bean Validation specification][1]. Resources --------- diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md index b85218ac37afc..0d324881ce5e4 100644 --- a/src/Symfony/Component/Yaml/README.md +++ b/src/Symfony/Component/Yaml/README.md @@ -1,15 +1,7 @@ Yaml Component ============== -YAML implements most of the YAML 1.2 specification. - -```php -use Symfony\Component\Yaml\Yaml; - -$array = Yaml::parse(file_get_contents(filename)); - -print Yaml::dump($array); -``` +The Yaml component loads and dumps YAML files. Resources --------- From 98b6034c396253031694629e1a9c642c33718c39 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 3 Mar 2016 15:26:11 +0100 Subject: [PATCH 4/4] Restored some contents --- src/Symfony/Component/Intl/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index 3278ae53ad940..30cb5093c4541 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -4,6 +4,9 @@ Intl Component A PHP replacement layer for the C intl extension that also provides access to the localization data of the ICU library. +The replacement layer is limited to the locale "en". If you want to use other +locales, you should [install the intl PHP extension] [0] instead. + Resources --------- @@ -12,3 +15,5 @@ Resources * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) in the [main Symfony repository](https://github.com/symfony/symfony) + +[0]: http://www.php.net/manual/en/intl.setup.php