Commit Graph

15616 Commits

Author SHA1 Message Date
Fabien Potencier
0375dc8f9f bug #9237 [FrameworkBundle] assets:install command should mirror .dotfiles (.htaccess) (FineWolf)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9237).

Discussion
----------

[FrameworkBundle] assets:install command should mirror .dotfiles (.htaccess)

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

The `assets:install` command currently ignores all *.dotfiles* when mirroring the `Resources\public` folders of bundles. This can lead to issues when *.htaccess* files are required for some public assets (ie.: CORS headers for font files to be served via Cloudfront).

Since the assets being installed are clearly in a folder called `public`, we can safely assume that those files are in fact supposed to be accessible and copy them over with the normal files.

Commits
-------

9c884a0 [FrameworkBundle] assets:install command should mirror .dotfiles (.htaccess)
2013-10-09 23:05:14 +02:00
Andrew Moore
6f48f8e231 assets:install command should mirror .dotfiles (.htaccess) 2013-10-09 23:05:14 +02:00
Fabien Potencier
2ae07b5fb1 bug #9223 [Translator] PoFileDumper - PO headers (Padam87)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9223).

Discussion
----------

[Translator] PoFileDumper - PO headers

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

Po files should not be dumped without a header. It causes a lot of problems, including charset issues.

See #6765 / 1 for more info

Commits
-------

e93bc50 [Translator] PoFileDumper - PO headers
2013-10-09 22:59:37 +02:00
Adam Prager
a8bc8fff74 PoFileDumper - PO headers 2013-10-09 22:59:37 +02:00
Fabien Potencier
773932b64b removed whitespaces 2013-10-09 22:52:58 +02:00
Fabien Potencier
ad7ac02ee4 Merge branch '2.3'
* 2.3:
  [Process] Fix #9182 : random failure on pipes tests
  Fixed propel guessed relations
  [FramworkBundle][HttpKernel] Check event listener services are not abstract
  fixed CS
  Check for lock existence before unlinking
  remove MinCount and MaxCount contraints. It has been replaced by Count constraints.
  [FrameworkBundle] fixed path replacement on Windows

Conflicts:
	src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php
2013-10-09 22:52:22 +02:00
Fabien Potencier
77a961d040 Merge branch '2.2' into 2.3
* 2.2:
  [Process] Fix #9182 : random failure on pipes tests
  Fixed propel guessed relations
  [FramworkBundle][HttpKernel] Check event listener services are not abstract
  fixed CS
  Check for lock existence before unlinking
  [FrameworkBundle] fixed path replacement on Windows

Conflicts:
	src/Symfony/Component/Process/Process.php
2013-10-09 22:51:36 +02:00
Fabien Potencier
46e70ea6e8 bug #9257 [Process][2.2] Fix 9182 : random failure on pipes tests (romainneutron)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process][2.2] Fix 9182 : random failure on pipes tests

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

I'm not a big fan of this fix, but - at least - it works.

With this code, finally, Process does not behave the same at all on Windows and Linux.
This patch does not smells very good but it solves the random failing test issue (that produced at runtime too).

Actually, calling `proc_get_status` within the waiting loop introduced the bug.
So this PR reverts to the previous behavior (consider a process running as long as pipes give data). On Windows, this is not the same behavior as we're not using streams but file handles. Whereas the feof of a stream is detected when the other side closes, the feof of a file handle can be reached at any time. So, on Windows, `proc_get_status` is called (checking the feof of the file handle might be positive until the executable outputs something), and we consider a process running as long as the information returned says it's running.

We could think of decouple windows and linux logic in two separated objects, using the interfaces I introduced in #8753. This could bring much more readability and make the code more easy to understand.

Commits
-------

64a0b40 [Process] Fix #9182 : random failure on pipes tests
2013-10-09 22:48:03 +02:00
Romain Neutron
64a0b40e6f [Process] Fix #9182 : random failure on pipes tests 2013-10-09 18:53:02 +02:00
Fabien Potencier
8bee6883b6 fixed a test 2013-10-09 09:29:29 +02:00
Fabien Potencier
d221a697c7 minor #9245 fixed typo (inmarelibero)
This PR was merged into the master branch.

Discussion
----------

fixed typo

Commits
-------

780f463 fixed typo
2013-10-08 19:55:40 +02:00
Emanuele Gaspari
780f463b1b fixed typo 2013-10-08 19:38:18 +02:00
Fabien Potencier
b00289a6d0 bug #9236 [Form] fix missing use statement for exception UnexpectedTypeException (jaugustin)
This PR was merged into the master branch.

Discussion
----------

[Form] fix missing use statement for exception UnexpectedTypeException

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

fix missing use statement for exception `Symfony\Component\Form\Exception\UnexpectedTypeException`

cc @bschussek

Commits
-------

ea91533 [form] fix missing use statement for exception UnexpectedTypeException
2013-10-08 10:34:28 +02:00
Fabien Potencier
f2b60e9c68 [Console] changed an exception class 2013-10-08 08:39:58 +02:00
Fabien Potencier
5bed1cd6d2 bumped Symfony version to 2.4.0 2013-10-08 08:33:45 +02:00
Jérémie Augustin
ea915334e1 [form] fix missing use statement for exception UnexpectedTypeException 2013-10-07 19:12:10 +02:00
Fabien Potencier
911b328dc1 bug #9216 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator (bschussek)
This PR was merged into the master branch.

Discussion
----------

[Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator

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

This is a follow-up PR of #6554 that splits the CsrfTokenGenerator into two separate classes for generating and managing CSRF tokens. As a consequence, it is now possible to explicitly remove or refresh CSRF tokens if they should be used only once. See #9210 for more information.

Commits
-------

d4bb5f4 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
2013-10-07 15:08:26 +02:00
Bernhard Schussek
d4bb5f4e3c [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator 2013-10-07 14:50:43 +02:00
Fabien Potencier
4f19105604 updated VERSION for 2.4.0-BETA1 2013-10-07 12:36:58 +02:00
Fabien Potencier
f4bb91f1c7 updated CHANGELOG for 2.4.0-BETA1 2013-10-07 12:36:51 +02:00
Fabien Potencier
937d908c43 fixed test side effects 2013-10-07 12:30:10 +02:00
Fabien Potencier
6659d7d9df bug #9222 [Bridge] [Propel1] Fixed guessed relations (ClementGautier)
This PR was merged into the 2.2 branch.

Discussion
----------

[Bridge] [Propel1] Fixed guessed relations

<table>
  <tr><th>Q</th><th>A</th></tr>
  <tr><td>Bug fix</td><td>yes</td></tr>
  <tr><td>Feature addition</td><td>no</td></tr>
  <tr><td>Backwards compatibility break</td><td>no</td></tr>
  <tr><td>Symfony2 tests pass</td><td>yes</td></tr>
  <tr><td>Fixes the following tickets</td><td>N/A</td></tr>
  <tr><td>Todo</td><td>N/A</td></tr>
  <tr><td>License of the code</td><td>MIT</td></tr>
  <tr><td>Documentation PR</td><td>N/A</td></tr>
</table>

The `PropelTypeGuesser` did not match OneToMany relations properly. For example if you have a `Author` class with `Comments` attributes the guesser would guess "Comment" instead of "Comments".

I added some tests to ensure the non regression.

Commits
-------

0b1e95f Fixed propel guessed relations
2013-10-07 11:38:21 +02:00
Clément Gautier
0b1e95f84c Fixed propel guessed relations 2013-10-06 13:10:32 +02:00
Fabien Potencier
405a7c15fe feature #9199 [FrameworkBundle] Adds the possibility to register Commands via the DIC (fabpot)
This PR was squashed before being merged into the master branch (closes #9199).

Discussion
----------

[FrameworkBundle] Adds the possibility to register Commands via the DIC

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | don't now
| Fixed tickets | #8166
| License       | MIT
| Doc PR        | symfony/symfony-docs#3031

Todo:

* [x] Documentation
* [x] Clean code (add type hinting)
* [x] Add tests

Commits
-------

cabb1fa [FrameworkBundle] Adds the possibility to register Commands via the DIC
2013-10-04 16:09:28 +02:00
Grégoire Pineau
cabb1fa8bb [FrameworkBundle] Adds the possibility to register Commands via the DIC 2013-10-04 16:09:28 +02:00
Fabien Potencier
e410b1f311 bug #9214 [FramworkBundle] Check event listener services are not abstract (lyrixx)
This PR was merged into the 2.2 branch.

Discussion
----------

[FramworkBundle] Check event listener services are not abstract

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

Commits
-------

6744ead [FramworkBundle][HttpKernel] Check event listener services are not abstract
2013-10-04 16:07:27 +02:00
Grégoire Pineau
6744ead017 [FramworkBundle][HttpKernel] Check event listener services are not abstract 2013-10-04 15:20:41 +02:00
Fabien Potencier
678e1de289 skipped some tests on PHP 5.3 2013-10-04 15:17:50 +02:00
Fabien Potencier
e18bd76dd8 [ExpressionLanguage] fixed typo 2013-10-04 11:41:51 +02:00
Fabien Potencier
86ef58c771 fixed some tests 2013-10-04 11:41:28 +02:00
Fabien Potencier
600f3bb5db [Console] fixed tests 2013-10-04 11:08:13 +02:00
Fabien Potencier
6fce9d8391 fixed CS 2013-10-04 10:27:42 +02:00
Fabien Potencier
83fc73eef0 bug #9207 [HttpKernel] Check for lock existence before unlinking (ollietb)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9207).

Discussion
----------

[HttpKernel] Check for lock existence before unlinking

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

My logs are filled with a bazillion errors stating "Warning: unlink(/var/www/mysite/app/cache/prod/http_cache/md/cf/47/c693da5dab3eccb65fa36a9b4b07ad0f7cc4.lck): No such file or directory in /var/www/mysite/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 53"

Commits
-------

89cd3b9 Check for lock existence before unlinking
2013-10-04 10:27:20 +02:00
Ollie Harridge
8fc64439ca Check for lock existence before unlinking
My logs are filled with a bazillion errors stating "Warning: unlink(/var/www/mysite/app/cache/prod/http_cache/md/cf/47/c693da5dab3eccb65fa36a9b4b07ad0f7cc4.lck): No such file or directory in /var/www/mysite/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 53"
2013-10-04 10:27:20 +02:00
Fabien Potencier
5130c0317b feature #9208 [Form] Add a 'submitted' attribute to the form view (egeloen)
This PR was merged into the master branch.

Discussion
----------

[Form] Add a 'submitted' attribute to the form view

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

Basically, the use case of this PR is to determine in the view if a form has been validated by the validator. By default, the valid attribute is true and we can't know if the form has been submitted. Now, we can use `form.vars.submitted && form.vars.valid`.

Commits
-------

a386c74 [Form] Add a 'submitted' attribute to the form view
2013-10-04 07:57:02 +02:00
Eric GELOEN
a386c74153 [Form] Add a 'submitted' attribute to the form view 2013-10-04 00:18:53 +02:00
Fabien Potencier
2d983b5caf removed obsolete code 2013-10-03 09:18:41 +02:00
Fabien Potencier
c6b3ec2729 minor #9201 [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator) (fabpot)
This PR was merged into the master branch.

Discussion
----------

[ExpressionLanguage] replaced the =~ operator by matches (removed the != operator)

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

To be consistent with fabpot/Twig#1209

Commits
-------

4c2d2e2 [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator)
2013-10-02 21:37:33 +02:00
Fabien Potencier
4c2d2e287a [ExpressionLanguage] replaced the =~ operator by matches (removed the != operator) 2013-10-02 20:16:09 +02:00
Fabien Potencier
96fb922e67 bug #9197 [FrameworkBundle] updated XML route description (jfsimon)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] updated XML route description

This PR turns

```xml
<route name="route_1" path="/hello/{name}" class="Symfony\Component\Routing\Route" path_regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">
```

into

```xml
<route name="route_1" class="Symfony\Component\Routing\Route">
    <path regex="#^/hello(?:/(?P&lt;name&gt;[a-z]+))?$#s">/hello/{name}</path>
```

in XML routing description.

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

Commits
-------

7b99ede [FrameworkBundle] updated XML route description
2013-10-02 16:57:54 +02:00
Fabien Potencier
4b094e2b12 bug #9195 [WIP] [FrameworkBundle] fixed container:debug and router:debug commands (fabpot)
This PR was merged into the master branch.

Discussion
----------

[WIP] [FrameworkBundle] fixed container:debug and router:debug commands

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

#7887 is buggy as hell :(

Commits
-------

fe5961a [FrameworkBundle] moved router:debug and container:debug to use the compact layout
bd16157 [FrameworkBundle] changed JSON descriptors to be more readable on PHP 5.4+
1d210f8 [FrameworkBundle] changed the router:debug to use the shortcut notation for the controller
d997dfa [FrameworkBundle] fixed container:debug and router:debug commands
2013-10-02 16:44:28 +02:00
Fabien Potencier
fe5961a6cd [FrameworkBundle] moved router:debug and container:debug to use the compact layout 2013-10-02 16:43:14 +02:00
Fabien Potencier
bd16157e98 [FrameworkBundle] changed JSON descriptors to be more readable on PHP 5.4+ 2013-10-02 16:42:10 +02:00
Fabien Potencier
1d210f86a6 [FrameworkBundle] changed the router:debug to use the shortcut notation for the controller 2013-10-02 16:42:09 +02:00
Fabien Potencier
d997dfa556 [FrameworkBundle] fixed container:debug and router:debug commands 2013-10-02 16:42:09 +02:00
Fabien Potencier
5bd18c01a3 feature #9196 [Console] added a compact layout for the table helper (fabpot)
This PR was merged into the master branch.

Discussion
----------

[Console] added a compact layout for the table helper

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

That helps with large tables like the ones we have in container:debug and router:debug.

Commits
-------

da9bee0 [Console] added a compact layout for the table helper
e9ea733 [Console] added an exception when the padding char is empty to avoid a PHP error in the table helper
2013-10-02 14:11:08 +02:00
Fabien Potencier
a878e68266 bug #9184 Fixed cache warmup of paths which contain back-slashes (fabpot)
This PR was merged into the 2.2 branch.

Discussion
----------

Fixed cache warmup of paths which contain back-slashes

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

From #8781

"
At this step in the warmup process there is a string replacement made, but paths with backslashes
are written into the cache file as something like `C:\\path\\to\\cache/pro_/...` but the str_replace
searches for the plain string `C:\path\to\cache/pro_/...`, which produces no matches.

The fix solves this by using var_export to escape the search (and replace) paths so they match the
format originally output into the cache file.
"

Commits
-------

526d285 [FrameworkBundle] fixed path replacement on Windows
2013-10-02 12:55:44 +02:00
Fabien Potencier
da9bee08e4 [Console] added a compact layout for the table helper 2013-10-02 09:34:37 +02:00
Fabien Potencier
e9ea73311f [Console] added an exception when the padding char is empty to avoid a PHP error in the table helper 2013-10-02 09:34:00 +02:00
Jean-François Simon
7b99ede0dc [FrameworkBundle] updated XML route description 2013-10-02 09:30:07 +02:00