Commit Graph

24655 Commits

Author SHA1 Message Date
Martin Auswöger 2bc11505f4 [Filesystem] Fixed makePathRelative 2017-09-17 08:14:49 -07:00
Fabien Potencier 2adfb375c6 bug #22109 [Validator] check for empty host when calling checkdnsrr() (apetitpa)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22109).

Discussion
----------

[Validator] check for empty host when calling checkdnsrr()

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

This should fix the email validator issue

Commits
-------

7104c4e849 move provider after test
c07fb416ff update dataProvider function name
1825d0f2ae cast substr result to string and remove empty function use
894127bf09 rename dataset provider
d973eb1f7d Add a test to prevent future regressions
6f24b05467 Switch to `empty` native function to check emptiness
f390f29173 remove non relevant test case
91b665c12a Switch to `is_string` native method
6071ff6c8f Remove unnecessary parentheses
9753a2773e Add a test case to prevent future regressions
4fcb24bacb Move empty condition in return statement
a090ef855a Use LF line separator
60392fdd43 fix coding standard to comply with fabbot
197d19f34c Remove malformed EmailValidatorTest + Update UrlValidator test
6b0702e52a Add empty check on host in other methods + add unit tests
6dd023f255 [Validator] Allow checkMX() to return false when $host is empty
2017-04-05 11:10:59 -07:00
apetitpa 7104c4e849 move provider after test 2017-04-05 11:10:47 -07:00
apetitpa c07fb416ff update dataProvider function name 2017-04-05 11:10:47 -07:00
apetitpa 1825d0f2ae cast substr result to string and remove empty function use 2017-04-05 11:10:47 -07:00
apetitpa 894127bf09 rename dataset provider 2017-04-05 11:10:47 -07:00
apetitpa d973eb1f7d Add a test to prevent future regressions 2017-04-05 11:10:47 -07:00
apetitpa 6f24b05467 Switch to `empty` native function to check emptiness
Switch to `empty` because depending on the PHP version, substr returns '' or false
2017-04-05 11:10:47 -07:00
apetitpa f390f29173 remove non relevant test case 2017-04-05 11:10:47 -07:00
apetitpa 91b665c12a Switch to `is_string` native method 2017-04-05 11:10:46 -07:00
apetitpa 6071ff6c8f Remove unnecessary parentheses 2017-04-05 11:10:32 -07:00
apetitpa 9753a2773e Add a test case to prevent future regressions 2017-04-05 11:10:32 -07:00
apetitpa 4fcb24bacb Move empty condition in return statement 2017-04-05 11:10:32 -07:00
apetitpa a090ef855a Use LF line separator 2017-04-05 11:10:32 -07:00
apetitpa 60392fdd43 fix coding standard to comply with fabbot 2017-04-05 11:10:32 -07:00
apetitpa 197d19f34c Remove malformed EmailValidatorTest + Update UrlValidator test
Remove malformed EmailValidatorTest + Update UrlValidator test
2017-04-05 11:10:32 -07:00
apetitpa 6b0702e52a Add empty check on host in other methods + add unit tests
Add empty on host in other methods where checkdnsrr is called and add unit tests to prevent future regressions
2017-04-05 11:10:31 -07:00
apetitpa 6dd023f255 [Validator] Allow checkMX() to return false when $host is empty
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #22106 |
| License | MIT |
| Doc PR | n/a |
2017-04-05 11:10:12 -07:00
Fabien Potencier 933835c13b bug #22280 [DI] Fix the xml schema (GuilhemN)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix the xml schema

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

f2ef1eecef [DI] Fix the xml schema
2017-04-05 08:21:50 -07:00
Fabien Potencier a2003579e9 bug #22255 [Translation] avoid creating cache files for fallback locales. (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation] avoid creating cache files for fallback locales.

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

Commits
-------

22425b2692 [Translation] avoid creating cache files for fallback locales.
2017-04-05 07:56:27 -07:00
Fabien Potencier cb49907570 bug #22292 Fixes #22264 - add support for Chrome headless (redthor)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixes #22264 - add support for Chrome headless

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

Commits
-------

a03dbd2cca Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966
2017-04-05 06:41:26 -07:00
Douglas Reith a03dbd2cca Fixes #22264 - add support for Chrome headless, see also Seldaek/monolog#966 2017-04-05 12:36:22 +00:00
Nicolas Grekas 405a1a4edc minor #22281 Dont call sprintf() when no placeholders are used (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Dont call sprintf() when no placeholders are used

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

Commits
-------

4951d3c Dont call sprintf() when no placeholders are used
2017-04-04 21:03:45 +02:00
Nicolas Grekas 4951d3c962 Dont call sprintf() when no placeholders are used 2017-04-04 20:32:29 +02:00
Guilhem Niot f2ef1eecef
[DI] Fix the xml schema 2017-04-04 20:13:57 +02:00
Fabien Potencier a2cd63c885 minor #22267 fix some more risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some more risky tests

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

Continuation of #22066 fixing the tests for the following components:

* Config
* Form
* HttpFoundation
* Security

Commits
-------

fffcd247b2 fix some risky tests
2017-04-04 08:21:03 -07:00
Abdellatif Ait boudad 22425b2692 [Translation] avoid creating cache files for fallback locales. 2017-04-04 16:15:29 +01:00
Christian Flothmann fffcd247b2 fix some risky tests 2017-04-04 16:55:33 +02:00
Fabien Potencier e580c68899 bumped Symfony version to 2.7.27 2017-04-03 21:47:45 -07:00
Fabien Potencier 103414623c Merge pull request #22263 from fabpot/release-2.7.26
released v2.7.26
2017-04-03 21:32:30 -07:00
Fabien Potencier 4cc567782e updated VERSION for 2.7.26 2017-04-03 21:31:58 -07:00
Fabien Potencier c06f35e4eb update CONTRIBUTORS for 2.7.26 2017-04-03 21:31:39 -07:00
Fabien Potencier 8cf344b2af updated CHANGELOG for 2.7.26 2017-04-03 21:27:56 -07:00
Fabien Potencier a9da8a3858 bug #22229 [ExpressionLanguage] Provide the expression in syntax errors (k0pernikus, stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] Provide the expression in syntax errors

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

This finishes the PR #19449.

Commits
-------

7cd744133d Complete the injection of the expression in all syntax errors
dc55db2a9d add expression text to SyntaxError
2017-04-03 14:52:00 -07:00
Nicolas Grekas 85ae039cd0 minor #22249 Lighten tests output by removing composer suggestions (maidmaid)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22249).

Discussion
----------

Lighten tests output by removing composer suggestions

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

Tests on PHP 7.1 has more that 4'000 output lines. I suggest to remove composer suggestions, to lighten a bit output.

Commits
-------

8c8b181 Lighten tests output by removing composer suggestions
2017-04-03 11:45:50 +02:00
Dany Maillard 8c8b181f06 Lighten tests output by removing composer suggestions 2017-04-03 11:45:38 +02:00
Christophe Coevoet 7cd744133d Complete the injection of the expression in all syntax errors 2017-04-03 10:58:13 +02:00
Nicolas Grekas d518e42ec9 minor #22232 CS: Remove invisible chars (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #22232).

Discussion
----------

CS: Remove invisible chars

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

I found out that we have 2 non-visible in regular IDE chars in codebase.
One is just inside a comment, it could be safely removed.
But second is inside a real code, I have replaced it with `pack`, so one won't accidentally replace non-breaking space with regular space.

Commits
-------

0f623f4 CS: Remove invisible chars
2017-04-03 10:10:25 +02:00
Dariusz Ruminski 0f623f4220 CS: Remove invisible chars 2017-04-03 10:10:21 +02:00
Nicolas Grekas 03755ee8b3 minor #22237 [EventDispatcher] Remove unneded count() (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[EventDispatcher] Remove unneded count()

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

Commits
-------

9a1915f [EventDispatcher] Remove unneded count()
2017-04-03 10:06:44 +02:00
Nicolas Grekas c7163e2b89 bug #22240 [DI] Fix fatal error at ContainerBuilder::compile() if config is not installed (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix fatal error at ContainerBuilder::compile() if config is not installed

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

Using the DI component independently, running the following code:

```php
(new ContainerBuilder())->compile();
```

gives

> Fatal error: Uncaught Error: Class 'Symfony\Component\Config\Resource\FileResource' not found

Considering that using the container without ever compiling it doesn't really make sense, I think this currently makes the config component an hard requirement. I propose to make it softer as a bug fix, enabling resource tracking by default only if the config component is installed.

Commits
-------

75d5cb1 Disable resource tracking if the config component is missing
2017-04-03 09:46:08 +02:00
Robin Chalas 75d5cb1bad Disable resource tracking if the config component is missing 2017-04-02 15:41:57 +02:00
Gabriel Ostrolucký 9a1915f88b [EventDispatcher] Remove unneded count() 2017-04-01 00:21:40 +02:00
Fabien Potencier 6008489153 bug #22140 [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set (fancyweb)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set

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

Commits
-------

ef39b704cc [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-03-31 16:36:01 +02:00
Fabien Potencier d62b765298 bug #22217 [Console] Fix table cell styling (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix table cell styling

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | tiny one
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Fixes an issue with newlines and table cells. Remembered this little trick from @chalasr as we had it before with style blocks i believe..

```php
$table = new Table($output);
$table->setRows(array(
    array(new TableCell('<error>Dont break'."\n".'here</error>', array('colspan' => 2))),
    new TableSeparator(),
    array('foo', new TableCell('<error>Dont break'."\n".'here</error>', array('rowspan' => 2))),
    array('bar'),
));
$table->render();
```

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24467857/74dacc9e-14b6-11e7-8f62-3831508ac949.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24467923/bb578f0e-14b6-11e7-85ed-039cd73b81a0.png)

Commits
-------

53ecf8393e [Console] Fix table cell styling
2017-03-31 16:33:09 +02:00
Fabien Potencier fb6de49fd0 bug #22194 [Console] CommandTester: disable color support detection (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] CommandTester: disable color support detection

| 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        | -

By default, the command tester relies on [color support guessing](3fe419cf66/src/Symfony/Component/Console/Output/StreamOutput.php (L91)) to enable output decoration.

This is an issue for tests in that guessing is done against the stream instance on Linux and against the actual environment running the test on Windows, so color support can be detected on Windows even when the used stream is a memory stream like here, resulting in non-deterministic tests.

This PR disables output decoration by default. This will only change behavior on Windows with color support, as guessing on Linux always detects color as not supported for memory streams anyway. Tests should enable decoration explicitly when they want to test it.

A better fix would be to actually detect that we are using a memory stream on Windows as well, but I'm not sure it's possible.

Commits
-------

3fe419cf66 Disable color support detection for tests
2017-03-31 14:44:27 +02:00
Fabien Potencier adf73aac03 minor #22235 Fix tests expecting a valid date (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix tests expecting a valid date

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

Tests are failing in 2.7 and 2.8 because the day 0 is not considered valid.

Commits
-------

071548090b Fix tests expecting a valid date
2017-03-31 14:41:44 +02:00
Christophe Coevoet 071548090b Fix tests expecting a valid date 2017-03-31 14:26:28 +02:00
Philipp Kretzschmar dc55db2a9d add expression text to SyntaxError
fixes #19445
2017-03-31 09:39:36 +02:00
Roland Franssen 53ecf8393e [Console] Fix table cell styling 2017-03-30 10:19:40 +02:00