Commit Graph

26605 Commits

Author SHA1 Message Date
Nicolas Grekas 37d39c6be9 bug #19062 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix UPSERT for PgSql >= 9.5

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19057
| License       | MIT
| Doc PR        | -

Commits
-------

ff1f5f8 [HttpFoundation] Fix UPSERT for PgSql >= 9.5
2016-06-16 06:56:55 +02:00
Nicolas Grekas 4d8d083207 minor #19065 [TwigBridge] Add missing type hint to TwigRenderer (enumag)
This PR was merged into the 3.0 branch.

Discussion
----------

[TwigBridge] Add missing type hint to TwigRenderer

| Q             | A
| ------------- | ---
| Branch?       | 3.0
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

dd481d2 [TwigBridge] Add missing type hint to TwigRenderer
2016-06-16 06:55:53 +02:00
Jáchym Toušek dd481d2233 [TwigBridge] Add missing type hint to TwigRenderer 2016-06-15 23:06:35 +02:00
Fabien Potencier e9e0975f22 feature #19060 [ExpressionLanguage] Add a way to hook on each node when dumping the AST (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[ExpressionLanguage] Add a way to hook on each node when dumping the AST

| Q             | A
| ------------- | ---
| Branch?       | "master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19013
| License       | MIT
| Doc PR        | -

This is an iteration over #19013 to allow writing dumpers that can decorate dumps (e.g. add HTML tags based on each node type to do syntax highlighting).

Commits
-------

66d23db [ExpressionLanguage] Add a way to hook on each node when dumping the AST
2016-06-15 18:22:57 +02:00
Fabien Potencier 5e9f58f2fe feature #18880 [PhpUnitBridge] add a triggered errors assertion helper (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] add a triggered errors assertion helper

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

In the past, we updated the test code several times that made sure that deprecation messages are triggered. I think we should move this code to a reusable class in the PhpUnitBridge to make it available everywhere and to be able to change a single method in case we need to update the logic.

Commits
-------

b5c2095 add a triggered errors assertion helper
2016-06-15 18:21:42 +02:00
Fabien Potencier 1ab32c5642 feature #16906 [Console] Better support for one command app (lyrixx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Better support for one command app

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9564
| License       | MIT

Hello;

I write many CLI application, and "single command" in cli application is not so easy to write.
This is why I propose this patch. IMHO, this PR could replaces #9609.

See it in application:
```php
#!/usr/bin/env php
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

(new Application('echo', '1.0.0'))
    ->register('echo')
        ->addArgument('foo', InputArgument::OPTIONAL, 'The directory', 'foo')
        ->addOption('bar', null, InputOption::VALUE_REQUIRED, 'Foobar', 'bar')
        ->setCode(function(InputInterface $input, OutputInterface $output) {
            $output->writeln('start');
            $output->writeln($input->getArgument('foo'));
            $output->writeln($input->getOption('bar'));
        })
    ->getApplication()
    ->setSingleCommand('echo')
    ->run();
```

Some usage:
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php
start
foo
bar
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php  "first argument"
start
first argument
bar
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php  "first argument" --bar="first option"
start
first argument
first option
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php  "first argument" --bar="first option" --help
Usage:
  echo [options] [--] [<foo>]

Arguments:
  foo                   The directory [default: "foo"]

Options:
      --bar=BAR         Foobar [default: "bar"]
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

Commits
-------

4a9bb1d [Console] Better support for one command app
2016-06-15 18:17:41 +02:00
Grégoire Pineau 4a9bb1d28b [Console] Better support for one command app 2016-06-15 18:15:10 +02:00
Fabien Potencier ba34459920 feature #17203 Move Constraint validator test case to Test namespace (WouterJ)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Move Constraint validator test case to Test namespace

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | kinda
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The Validator component has a very usefull test utility to test constraint validators. It's only hidden deep in the Tests namespace. Just as was done with the TypeTestCase of the Form component some years ago, I think it's usefull to move the constraint test case to the Test namespace as well.

*Btw, my last PR of the year and the first deprecation of 3.1* 🎆

Commits
-------

e938361 Move Constraint validator test case to Test namespace
2016-06-15 18:13:08 +02:00
Fabien Potencier 1e263c0b29 feature #18502 [FrameworkBundle] Add file helper to Controller (dfridrich)
This PR was squashed before being merged into the 3.2-dev branch (closes #18502).

Discussion
----------

[FrameworkBundle] Add file helper to Controller

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6454

I think it would be more "sexy" to serve files from controller easier (like `json()` helper does).

**This Controller helper allows user to serve files to Response in these ways:**

* pass `Symfony\Component\HttpFoundation\File` (or `Symfony\Component\HttpFoundation\UploadedFile`) instance
* [REMOVED] provide content as `string` and specify file name (mime type will be auto recognized)
* provide path to file (you are still able to specify other than original file name)

**Examples**

    return $this->file($uploadedFile);
    // ...or...
    return $this->file('/path/to/my/picture.jpg');

Commits
-------

d9a8499 [FrameworkBundle] Add file helper to Controller
2016-06-15 17:31:51 +02:00
Dennis Fridrich d9a84990cf [FrameworkBundle] Add file helper to Controller 2016-06-15 17:31:49 +02:00
Fabien Potencier 161d629c3f feature #19053 [Process] Allow inheriting env vars instead of replacing them (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Process] Allow inheriting env vars instead of replacing them

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18796
| License       | MIT
| Doc PR        | -

Commits
-------

524508c [Process] Allow merging env vars instead of replacing them
2016-06-15 17:29:29 +02:00
WouterJ e938361cf7 Move Constraint validator test case to Test namespace 2016-06-15 16:32:29 +02:00
Nicolas Grekas 524508cdcf [Process] Allow merging env vars instead of replacing them 2016-06-15 12:49:17 +02:00
Nicolas Grekas 66d23dbef6 [ExpressionLanguage] Add a way to hook on each node when dumping the AST 2016-06-15 12:45:31 +02:00
Fabien Potencier 988860c02b feature #18833 [HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations?| no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

c5dc50d Move duplicated logic from Esi/Ssi to an AbstractSurrogate
2016-06-15 12:44:17 +02:00
Robin Chalas c5dc50de9b Move duplicated logic from Esi/Ssi to an AbstractSurrogate
Fabbot fixes

Move duplicated logic from Esi/Ssi::process in AbstractSurrogate::removeFromControl

Fabbot fixes

Fix comment
2016-06-15 12:40:30 +02:00
Nicolas Grekas ff1f5f80d2 [HttpFoundation] Fix UPSERT for PgSql >= 9.5 2016-06-15 12:17:39 +02:00
Fabien Potencier b4b1fef7a3 feature #18220 Don't send default cache header for 301 redirects (e-moe)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Don't send default cache header for 301 redirects

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17139
| License       | MIT
| Doc PR        | see comments from https://github.com/symfony/symfony/issues/17139

Commits
-------

cf253a9 17139: do not send default cache header for 301 redirects
2016-06-15 10:34:31 +02:00
Robin Chalas 54d3d63cf1 Centralize input stream in base Input class
Add StreamableInputInterface

Removed commented code

Prevent BC by looking for QuestionHelper::

Logic fixes

Check for that  implements StreamableInputInterface

Rollback E_USER_DEPRECATED notice in getInputStream

Remove legacy tests to avoid KO because of deprecations

Add missing use

Keep old tests marked as legacy

Undeprecate getInputStream, CS Fixes

Move legacy tests in separated class

Revert separated legacy test class

Keep legacy createInputInterfaceMock()

Depreciate QuestionHelper::getInputStream()
2016-06-15 10:18:17 +02:00
Fabien Potencier b3dbc5678c minor #18830 [Form] fixed EntityType test with query_builder option as null (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fixed EntityType test with query_builder option as null

| Q             | A
| ------------- | ---
| Branch?       | 2.8+
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | symfony/symfony-docs#6599

ref https://github.com/symfony/symfony/pull/13990#issuecomment-220788142.

Commits
-------

ad8e989 [Form] fixed EntityType test with query_builder option
2016-06-15 09:41:10 +02:00
Fabien Potencier 910eff0450 bug #18548 [Form] minor fixes in DateTime transformers (HeahDude)
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #18548).

Discussion
----------

[Form] minor fixes in DateTime transformers

| Q             | A
| ------------- | ---
| Branch?       | 2.3+
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

Commits
-------

b91008f [Form] fixed DateTime transformers
2016-06-15 09:21:32 +02:00
Jules Pietri b91008fb57 [Form] fixed DateTime transformers 2016-06-15 09:21:32 +02:00
Fabien Potencier d7e466ac23 bug #18732 [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't (nykopol)
This PR was squashed before being merged into the 2.7 branch (closes #18732).

Discussion
----------

[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18694
| License       | MIT
| Doc PR        |

When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.

Commits
-------

c46519b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
2016-06-15 09:08:06 +02:00
Johan DESMYTER c46519b40b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't 2016-06-15 09:08:04 +02:00
Fabien Potencier 343c0da7fb bumped Symfony version to 3.1.2 2016-06-15 08:20:59 +02:00
Fabien Potencier 6e1b149727 Merge pull request #19055 from fabpot/release-3.1.1
released v3.1.1
2016-06-15 07:59:11 +02:00
Fabien Potencier 75209e27b8 updated VERSION for 3.1.1 2016-06-15 07:59:04 +02:00
Fabien Potencier 0d5db658a4 updated CHANGELOG for 3.1.1 2016-06-15 07:58:54 +02:00
Fabien Potencier f400f01ecc feature #17662 [Translation][transChoice] allows escaping the pipe character. (aitboudad)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Translation][transChoice] allows escaping the pipe character.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | #15195
| Tests pass?   | yes
| License       | MIT

Commits
-------

a35a93b [Translation][transChoice] allows escaping the pipe character.
2016-06-14 22:35:45 +02:00
Abdellatif Ait boudad a35a93bf49 [Translation][transChoice] allows escaping the pipe character. 2016-06-14 15:15:22 +00:00
Christian Flothmann b5c209558a add a triggered errors assertion helper 2016-06-14 14:58:34 +02:00
Nicolas Grekas 5280d5dc9c bug #19049 [DependencyInjection] fix the sorting by priority (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DependencyInjection] fix the sorting by priority

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18482
| License       | MIT
| Doc PR        |

Commits
-------

6f72657 [DependencyInjection] fix the sorting by priority
2016-06-14 13:29:55 +02:00
Nicolas Grekas 7581f71b34 Merge branch '3.1'
* 3.1: (30 commits)
  Fix merge
  [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
  [Console] fixed PHPDoc
  [Cache] Fix double fetch in ProxyAdapter
  [travis] HHVM 3.12 LTS
  Fix feature detection for IE
  [Form] Fixed collapsed choice attributes
  [Console] added explanation of messages usage in a progress bar
  force enabling the external XML entity loaders
  [Yaml] properly count skipped comment lines
  [WebProfilerBundle] Fix invalid CSS style
  Added progressive jpeg to mime types guesser
  [Yaml] Fix wrong line number when comments are inserted in the middle of a block.
  Fixed singular of committee
  Fixed singular of committee
  Do not inject web debug toolbar on attachments
  Fixed issue with legacy client initialization
  [FrameworkBundle] Remove unused variable
  bumped Symfony version to 3.0.8
  updated VERSION for 3.0.7
  ...
2016-06-14 13:18:32 +02:00
Nicolas Grekas de03922804 Merge branch '3.0' into 3.1
* 3.0: (25 commits)
  Fix merge
  [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
  [Console] fixed PHPDoc
  [travis] HHVM 3.12 LTS
  Fix feature detection for IE
  [Form] Fixed collapsed choice attributes
  [Console] added explanation of messages usage in a progress bar
  force enabling the external XML entity loaders
  [Yaml] properly count skipped comment lines
  [WebProfilerBundle] Fix invalid CSS style
  Added progressive jpeg to mime types guesser
  [Yaml] Fix wrong line number when comments are inserted in the middle of a block.
  Fixed singular of committee
  Do not inject web debug toolbar on attachments
  bumped Symfony version to 3.0.8
  updated VERSION for 3.0.7
  updated CHANGELOG for 3.0.7
  bumped Symfony version to 2.8.8
  updated VERSION for 2.8.7
  updated CHANGELOG for 2.8.7
  ...

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/PropertyAccess/StringUtil.php
	src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php
	src/Symfony/Component/Yaml/Parser.php
	src/Symfony/Component/Yaml/Tests/ParserTest.php
2016-06-14 13:18:07 +02:00
Nicolas Grekas a7ed68b38f Merge branch '2.8' into 3.0
* 2.8: (22 commits)
  Fix merge
  [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
  [Console] fixed PHPDoc
  [travis] HHVM 3.12 LTS
  Fix feature detection for IE
  [Form] Fixed collapsed choice attributes
  [Console] added explanation of messages usage in a progress bar
  force enabling the external XML entity loaders
  [Yaml] properly count skipped comment lines
  [WebProfilerBundle] Fix invalid CSS style
  Added progressive jpeg to mime types guesser
  [Yaml] Fix wrong line number when comments are inserted in the middle of a block.
  Fixed singular of committee
  Do not inject web debug toolbar on attachments
  bumped Symfony version to 2.8.8
  updated VERSION for 2.8.7
  updated CHANGELOG for 2.8.7
  bumped Symfony version to 2.7.15
  updated VERSION for 2.7.14
  update CONTRIBUTORS for 2.7.14
  ...

Conflicts:
	CHANGELOG-2.7.md
	CHANGELOG-3.0.md
	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
	src/Symfony/Component/HttpKernel/Kernel.php
2016-06-14 13:04:19 +02:00
Nicolas Grekas 625513da7b Fix merge 2016-06-14 13:01:05 +02:00
Nicolas Grekas 7fa2eab99f Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
  [Console] fixed PHPDoc
  [travis] HHVM 3.12 LTS
  Fix feature detection for IE
  [Form] Fixed collapsed choice attributes
  [Console] added explanation of messages usage in a progress bar
  force enabling the external XML entity loaders
  [Yaml] properly count skipped comment lines

Conflicts:
	src/Symfony/Component/Translation/Loader/XliffFileLoader.php
2016-06-14 12:47:22 +02:00
Christian Flothmann 6f72657554 [DependencyInjection] fix the sorting by priority 2016-06-14 12:15:55 +02:00
Fabien Potencier 347cd8712e bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

9569c74 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
2016-06-14 11:41:37 +02:00
Nicolas Grekas 9569c7453c [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 2016-06-14 11:40:21 +02:00
Fabien Potencier a80fa4104c bug #19042 [Cache] Fix double fetch in ProxyAdapter (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Cache] Fix double fetch in ProxyAdapter

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

040f53d [Cache] Fix double fetch in ProxyAdapter
2016-06-14 11:24:32 +02:00
Fabien Potencier 2077729d2c minor #19046 [Console] fixed PHPDoc (atailouloute)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19046).

Discussion
----------

[Console] fixed PHPDoc

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

37fac3e [Console] fixed PHPDoc
2016-06-14 10:22:25 +02:00
Ahmed Tailouloute 37fac3e44f [Console] fixed PHPDoc 2016-06-14 10:22:25 +02:00
Fabien Potencier 5c91f6e671 feature #18322 [DomCrawler] Attach label to form fields (carlosV2)
This PR was squashed before being merged into the 3.2-dev branch (closes #18322).

Discussion
----------

[DomCrawler] Attach label to form fields

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

While building a software to extract information from a webpage, I need to fill a form with hints on the fields labels.

Example:

```html
<form>
   ...
   <label for="my_field">Input the result of 3 + 4:</label>
   <input type="text" id="my_field" name="my_field" />
   ...
</form>
```

 I thought it would be handy to have the field labels attached to each field.
So given the previous form you could now do:

```php
$form->get('my_field')->getLabel()->textContent;
```

Commits
-------

82ef55b [DomCrawler] Attach label to form fields
2016-06-14 08:40:06 +02:00
Carlos Ortega Huetos 82ef55b976 [DomCrawler] Attach label to form fields 2016-06-14 08:39:48 +02:00
Fabien Potencier f8dc4593a3 feature #18482 Created a trait to sort tagged services (iltar)
This PR was squashed before being merged into the 3.2-dev branch (closes #18482).

Discussion
----------

Created a trait to sort tagged services

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

When writing the `ControllerArgumentValueResolverPass`, I needed a sorting on `priority`. I ended up copying a method from another class. I noticed this was done more often and 99% of the code was the same. I've moved the most common notation into the trait and "used" the trait in the priority aware passes. This increases horizontal re-use and means people can also use this in their bundles.

The cases that were slightly different, are still working completely. I had to fix some tests because they returned an invalid value from the mocked find method.

Commits
-------

778a70b Created a trait to sort tagged services
2016-06-14 08:28:41 +02:00
Iltar van der Berg 778a70ba98 Created a trait to sort tagged services 2016-06-14 08:28:39 +02:00
Nicolas Grekas 040f53d3e6 [Cache] Fix double fetch in ProxyAdapter 2016-06-14 07:54:16 +02:00
Fabien Potencier 31678c9118 feature #15458 [Filesystem] Add feature to create hardlinks for files (andrerom)
This PR was submitted for the 2.8 branch but it was merged into the 3.2-dev branch instead (closes #15458).

Discussion
----------

[Filesystem] Add feature to create hardlinks for files

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Todo:
- [x] Tests
- [ ] Doc
- [x] Getting someone to test on Windows as exception might differ from symlink functionality

## Why
Symlinks are good for directories, but for files hardlinks are sometime a better match when needing to represent same file in several locations.

One use case for this feature is for multi tagging of Http Cache when running against FileSystem. Multi tagging is used in FoSHttpCache and supported when running Varnish, but not with Symfony HTTPCache, yet.. With hardlinks combined with meta information containing tags within the file, lookup and reverse lookup is thus easily possible.

## What
Introduces method `hardlink()` with similar behavior as `symlink`, difference being:
- Allowing several targets to be provided to match use case in 'why'
- Like `symlink` removes existing target if not the same, but uses `fileinode` to compare target & source

Commits
-------

8475002 [Filesystem] Add feature to create hardlinks for files
2016-06-13 22:18:54 +02:00
André R 8475002dfb [Filesystem] Add feature to create hardlinks for files 2016-06-13 22:18:45 +02:00