Commit Graph

13745 Commits

Author SHA1 Message Date
Fabien Potencier
b3081e85a0 [Form] removed deprecated methods and classes 2013-03-23 11:48:19 +01:00
Fabien Potencier
e0385a2c1c [Validator] removed deprecated methods 2013-03-23 11:48:19 +01:00
Fabien Potencier
65e3b1684b [Validator] removed deprecated constraints 2013-03-23 11:48:18 +01:00
Fabien Potencier
4a70ddff4d [HttpFoundation] removed deprecated session methods 2013-03-23 11:48:18 +01:00
Fabien Potencier
4e7943fad0 [Yaml] removed deprecated support of PHP parsin when parsing YAML files 2013-03-23 11:48:18 +01:00
Fabien Potencier
09a5969b89 [HttpFoundation] removed deprecated Request::splitHttpAcceptHeader() method 2013-03-23 11:48:18 +01:00
Fabien Potencier
c28f1b0926 removed deprected way to declared trusted proxies 2013-03-23 11:48:18 +01:00
Fabien Potencier
5ff6006fa6 removed deprecated stuff in the fragment sub-framework 2013-03-23 11:46:55 +01:00
Fabien Potencier
0a06a7c107 [Translation] removed deprecated classes 2013-03-23 11:46:26 +01:00
Fabien Potencier
67f6397a83 [Security] removed deprecated classes 2013-03-23 11:46:26 +01:00
Fabien Potencier
9e7a877f7c merged branch fabpot/webprofiler-customization (PR #7003)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.3] [WebProfiler] added the possibility to override the application name/version in the WDT

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

Commits
-------

d35cb9f [WebProfiler] added the possibility to override the application name/version in the WDT
2013-03-23 11:44:58 +01:00
Fabien Potencier
d35cb9f880 [WebProfiler] added the possibility to override the application name/version in the WDT 2013-03-23 11:43:44 +01:00
Fabien Potencier
cec98c1d7a [DependencyInjection] fixed PHP notice when the scope is not defined 2013-03-23 11:39:42 +01:00
Fabien Potencier
5b5c7db23a merged branch igorw/css-display (PR #6624)
This PR was merged into the master branch.

Discussion
----------

[2.3][TwigBundle] Use display instead of visibility for exception page icons

Originally spawned from #6612, this allows us to get rid of the ugly margins for the open and close icons on the exception page.

Commits
-------

e66bd14 [TwigBundle] Use display instead of visibility for exception page icons
2013-03-23 11:31:30 +01:00
Fabien Potencier
55f0e76495 [HttpFoundation] added missing entry in the CHANGELOG 2013-03-23 11:06:01 +01:00
Fabien Potencier
2b4cfbdbb7 merged branch bamarni/http-uploaded-file (PR #7201)
This PR was merged into the master branch.

Discussion
----------

[2.3] moved a security check in HttpUploadedFile

closes #6802

- [x] fix the testsuite, I've only run the component suite, but it needs to be updated in other places too (according to travis)

Commits
-------

5bb44f5 [HttpFoundation] UploadedFile - moved a security check
2013-03-23 11:04:42 +01:00
Bilal Amarni
5bb44f52a0 [HttpFoundation] UploadedFile - moved a security check
Squashed commit of the following:

commit b03b32ecc985c4a4f9dc7df2d3336a4cd75aae30
Merge: fb7004b fc70e13
Author: Bilal Amarni <bilal.amarni@gmail.com>
Date:   Wed Feb 27 11:33:37 2013 +0100

    [HttpFoundation] UploadedFile - moved a security check

commit fc70e138c1d3858775c9efe51268cae6d7ec3f69
Author: Bilal Amarni <bilal.amarni@gmail.com>
Date:   Thu Jan 24 11:07:29 2013 +0100

    explicitly passed UPLOAD_ERR_OK constant in a test

commit dda03a2faab9539ca3a93736dd2bc0ec27feb4e7
Author: Bilal Amarni <bilal.amarni@gmail.com>
Date:   Fri Jan 18 17:24:06 2013 +0100

    [HttpFoundation] UploadedFile - moved a security check from move() to isValid()
2013-03-23 10:56:11 +01:00
Fabien Potencier
550df5a85a moved the request scope creation to the ContainerAwareHttpKernel class 2013-03-23 10:14:37 +01:00
Fabien Potencier
69dbbdda3d added missing entries in CHANGELOGs 2013-03-23 10:10:35 +01:00
Fabien Potencier
f465d2aa6f merged branch marcosQuesada/serializer/denormalize-camelcase (PR #6951)
This PR was merged into the master branch.

Discussion
----------

[2.3] [Serializer] Enabled camelCase format to be used on denormalize method

 Enabled camelCase formater , that way when hydrating from arrays, attributes as attribute_name could be implemented as attributteName parameter, with getAttributeName and setAttributeName, giving different formating option from setAttribute_name  getAttribute_name.

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

Commits
-------

fbffdf0 Enabled camelCase format to be used on denormalize method, that way camel_case attribute can be used on object as getCamelCase()
2013-03-23 09:19:40 +01:00
Fabien Potencier
25a5395d9d merged branch lmcnearney/querystring (PR #7028)
This PR was squashed before being merged into the master branch (closes #7028).

Discussion
----------

[2.3] [Routing] Added access to querystring in RequestContext

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

This is related to a Silex change request: https://github.com/fabpot/Silex/pull/623

Commits
-------

4a2b755 [2.3] [Routing] Added access to querystring in RequestContext
2013-03-23 09:12:44 +01:00
Lance McNearney
4a2b75536e [2.3] [Routing] Added access to querystring in RequestContext 2013-03-23 09:12:43 +01:00
Fabien Potencier
77ec799751 Merge branch '2.2'
* 2.2:
  #7106 - fix for ZTS builds
  Added '@@' escaping strategy for YamlFileLoader and YamlDumper
  [Yaml] fixed bugs with folded scalar parsing
  [Form] made DefaultCsrfProvider using session_status() when available
  Added unit tests to Dumper
  Update .travis.yml (closes #7355)
  [HttpFoudantion] fixed Request::getPreferredLanguage()
  Revert "merged branch jfsimon/issue-6928 (PR #7378)"
  Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129
2013-03-23 09:06:49 +01:00
Fabien Potencier
a045925d2a [ClassLoader] added missing CHANGELOG entry for previous merge 2013-03-23 09:02:48 +01:00
Fabien Potencier
86d76195fb merged branch Smart-Core/master (PR #7076)
This PR was merged into the master branch.

Discussion
----------

[2.3] Add missing WinCacheClassLoader

Commits
-------

af86e5b Add missing WinCacheClassLoader
2013-03-23 09:00:58 +01:00
Fabien Potencier
03fc97d11a Merge branch '2.1' into 2.2
* 2.1:
  #7106 - fix for ZTS builds
  Added '@@' escaping strategy for YamlFileLoader and YamlDumper
  [Yaml] fixed bugs with folded scalar parsing
  [Form] made DefaultCsrfProvider using session_status() when available
  Added unit tests to Dumper
  Update .travis.yml (closes #7355)
  [HttpFoudantion] fixed Request::getPreferredLanguage()
  Revert "merged branch jfsimon/issue-6928 (PR #7378)"
  Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129

Conflicts:
	.travis.yml
	src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
	src/Symfony/Component/Routing/RouteCollection.php
2013-03-23 08:49:54 +01:00
Fabien Potencier
8ae7d98569 merged branch DHorchler/2.1 (PR #7193)
This PR was merged into the 2.1 branch.

Discussion
----------

Routing issue with installation in a sub-directory

ref: https://github.com/symfony/symfony/issues/7129

Commits
-------

8d9cd42 Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129
2013-03-23 08:47:35 +01:00
Fabien Potencier
78ebba558e merged branch lizjulien/7106 (PR #7248)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7248).

Discussion
----------

#7106 - check php version for getcwd()

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

Commits
-------

11d3855  #7106 - fix for ZTS builds
2013-03-23 08:44:02 +01:00
Julien Moulin
11c0fb580d #7106 - fix for ZTS builds 2013-03-23 08:44:01 +01:00
Fabien Potencier
bbf9ec93e9 [Finder] added a CHANGELOG entry for the previous merge 2013-03-23 08:42:25 +01:00
Fabien Potencier
e5be0ded50 merged branch jfsimon/finder-access-denied-exception (PR #7256)
This PR was merged into the master branch.

Discussion
----------

[Finder] Adds AccessDeniedException

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

Commits
-------

714ace8 [finder] Introduced AccessDeniedException
2013-03-23 08:39:29 +01:00
Fabien Potencier
2f7a9fde7f updated various CHANGELOG files that were not updated when the PRs were merged 2013-03-23 08:35:36 +01:00
Fabien Potencier
9fba645cb2 [Console] added a note in the CHANGELOG for the previous merge, fixed some CS 2013-03-23 08:15:46 +01:00
Fabien Potencier
062cce0018 merged branch pkruithof/progress-helper-enhancements (PR #7300)
This PR was squashed before being merged into the master branch (closes #7300).

Discussion
----------

[Console] Progress helper enhancements

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

Two enhancements:

1. The progress bar clears the current line before writing the current progress. This can cause some flickering in the terminal. I've modified the write method to append whitespace to the line to be written, so it matches the previous line's length.
2. Added a `setCurrent` method to set the current progress. Rather than advancing by 1 or more steps, sometimes you want to just set the current state. For example if you are downloading a file, and a callback provides you with the current download status. A workaround for this could be to keep track of the previous event, calculate the difference, and advancing by the diff. But it's easier to just set the current progress.

Sidenotes:
* The [`overwrite`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/ProgressHelper.php#L387) method copied documentation of the Output's [`write`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Output/Output.php#L139) method. The difference is, the overwrite method does not handle an array of messages. I've updated the documentation for this.
* The helper uses `strlen` to calculate line lengths. This could cause a problem when using multibyte strings. I'd change it to `mb_strlen`, but I'm not sure if the `mb_string` extension is required by Symfony.

Commits
-------

5ae76f0 [Console] Progress helper enhancements
2013-03-23 08:10:00 +01:00
Peter Kruithof
5ae76f0dbf [Console] Progress helper enhancements 2013-03-23 08:10:00 +01:00
Fabien Potencier
11a0481e32 merged branch tPl0ch/feature/yaml-parameter-escape (PR #7357)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7357).

Discussion
----------

[DependencyInjection] Added @@ escaping strategy for YamlFileLoader and YamlDumper

Added the possibility to to use ```@@``` as an escaping strategy for
parameters that should be treated as strings but start with ```@```
(i.e. safe mailer passwords).

This PR is deprecating https://github.com/symfony/symfony/pull/7307, since as a new feature it has to be compared against the master branch.

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

Commits
-------

8cdf387 [DependencyInjection] Added '@@' escaping strategy for YamlFileLoader and YamlDumper
2013-03-23 07:58:10 +01:00
Thomas Ploch
9875c4bcb4 Added '@@' escaping strategy for YamlFileLoader and YamlDumper
Added the possibility to to use '@@' as an escaping strategy for
parameters that should be treated as strings but start with '@'
(i.e. safe mailer passwords).
2013-03-23 07:58:10 +01:00
Fabien Potencier
996912158c merged branch ezzatron/yaml-folded-scalar (PR #7455)
This PR was merged into the 2.1 branch.

Discussion
----------

[Yaml] fixed bugs with folded scalar parsing (2.1 branch)

| 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

This is a re-do of #7445, which was submitted against 2.0, which is no longer supported. Additionally, the previous PR broke some tests because literal tabs were accidentally changed to spaces, and GitHub's diff engine seemingly ignored the change, although the differences showed up when using git diff directly. This PR leaves the literals untouched, and hence the tests should now pass.

**From the original PR:**

I found some more bugs with the parsing of folded scalars. I'd also made some mistakes in the tests introduced by me in #6785. This PR fixes the incorrect tests, and introduces more related tests.

I had to completely rewrite the `Parser::parseFoldedScalar()` method. I think it came out simpler in the end - less 'special cases'. I've done some basic profiling by running the parser tests on repeat and haven't noticed any difference in parsing performance.

Commits
-------

bbcdfe2 [Yaml] fixed bugs with folded scalar parsing
2013-03-23 07:49:58 +01:00
Erin Millard
bbcdfe25ca [Yaml] fixed bugs with folded scalar parsing 2013-03-23 11:54:33 +10:00
Fabien Potencier
883bf909b1 merged branch hason/di_exceptions (PR #7313)
This PR was merged into the master branch.

Discussion
----------

[DependencyInjection] Added missing support for setting previous exception

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

Commits
-------

9b4cd73 [DependencyInjection] Added missing support for setting previous exception
2013-03-22 17:25:48 +01:00
Fabien Potencier
38fd9d995c [DoctrineBridge] fixed failing test 2013-03-22 16:41:38 +01:00
dinitrol
4f7c6f4f9f Fixed parameters for substr() function 2013-03-22 16:40:24 +01:00
Fabien Potencier
aac8f8fe3d merged branch bamarni/form-default-csrf-provider-session-status (PR #7449)
This PR was merged into the 2.1 branch.

Discussion
----------

[Form] made DefaultCsrfProvider using session_status() when available

| Q             | A
| ------------- | ---
| Bug fix?      | [on PHP 5.4]
| Tests pass?   | [yes]
| License       | MIT

Commits
-------

5afea04 [Form] made DefaultCsrfProvider using session_status() when available
2013-03-22 16:37:06 +01:00
Jean-François Simon
714ace8250 [finder] Introduced AccessDeniedException
This exception is thrown when trying to open a non-readable directory.

Squashed commits:
[Finder] Fixed small errors
[Finder] small changes about AccessDeniedException
[Finder] removed unnecessary comment
[Finder] added access denied exception test
[Finder] Updated AccessDeniedException base class
[Finder] fixed access denied exception test
[Finder] native adapters now throw AccessDeniedException on stderr
2013-03-22 06:21:57 +01:00
Bilal Amarni
5afea04d4a [Form] made DefaultCsrfProvider using session_status() when available 2013-03-21 16:59:06 +01:00
Fabien Potencier
9568768fd9 merged branch fabpot/kernel-flexibility (PR #7437)
This PR was merged into the master branch.

Commits
-------

7c3179a [HttpKernel] moved the Container compilation for more flexibility
757194c [HttpKernel] made the Kernel class more flexible (closes #7396)

Discussion
----------

[HttpKernel] made the Kernel class more flexible (closes #7396)

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

---------------------------------------------------------------------------

by jrobeson at 2013-03-20T14:04:53Z

I still (personally) think that the compile() method is still too close to the building of the container. Is there a reasonable way to move the compile() method away from the rest of the logic used to build the container?

---------------------------------------------------------------------------

by elnur at 2013-03-20T14:34:23Z

I like this one. Can't wait to see this merged.

---------------------------------------------------------------------------

by stof at 2013-03-20T14:50:22Z

@jrobeson compiling the container is part of building it (it is the step running the compiler passes)

---------------------------------------------------------------------------

by jrobeson at 2013-03-20T15:32:26Z

i read the code stof .. that is what it does :) . I just thought it'd be easier to modify the container from the kernel of the compile() call was placed after the  buildContainer() call at https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Kernel.php#L556

This is something i had to work around when migrating to symfony. It's not a big deal to me anymore, so no worries.

---------------------------------------------------------------------------

by stof at 2013-03-20T15:36:12Z

@jrobeson the container is not fully build until you compile it. Half of the work is done by the compile() call.

---------------------------------------------------------------------------

by fabpot at 2013-03-20T15:38:24Z

I've moved the compile method as it makes things even more flexible.

---------------------------------------------------------------------------

by jrobeson at 2013-03-20T15:41:45Z

@stof : i know .. which is even better reason to move it outside that big method.

@fabpot: thanks!
2013-03-20 18:03:16 +01:00
Fabien Potencier
48856b1ce2 merged branch eddiejaoude/master (PR #7144)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7144).

Commits
-------

448983c [YAML] Added unit tests to Dumper

Discussion
----------

[YAML] Added unit tests to Dumper

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

---------------------------------------------------------------------------

by stof at 2013-02-21T11:28:55Z

I don't like the fact that you are adding a getter for the only purpose of reaching 100% coverage (which could be achieved differently by checking that the dumper can indeed use 8 spaces when dumping)

---------------------------------------------------------------------------

by eddiejaoude at 2013-02-21T11:33:03Z

Ok, fair point, I will amend.

---------------------------------------------------------------------------

by eddiejaoude at 2013-02-21T11:35:14Z

I also thought of using reflection for the private property, as checking 8 space dump is less of a unit test as using multiple methods, thoughts?

---------------------------------------------------------------------------

by eddiejaoude at 2013-02-21T13:42:30Z

Another way to look at it, is if the property has a 'setter' why should it not have a 'getter' too? i.e. If the developer can 'set' it, why cant they 'get' it too. Just another thought, once the best way to move forward is confirmed, I will update my other tests accordingly & submit them.

---------------------------------------------------------------------------

by Baachi at 2013-02-21T13:49:25Z

Another solution would be, to extend the `Dumper` class and move the `getIndentation` to this class. This class should be located into the `tests/` folder.

@stof What do you think?

---------------------------------------------------------------------------

by stof at 2013-02-21T14:21:54Z

@Baachi IMO, the unit test should ensure that we can actually change the indentation of the dumped code (which is what we want to do). We don't bother about being able to get the indentation (we don't even have a method for it currently), we want it to be applied. The Dumper is not a configuration object. It is an object doing some work.

So testing that a new getter returns the value will not ensure that changing the indentation is working.

---------------------------------------------------------------------------

by Baachi at 2013-02-21T15:07:23Z

@stof Ah yes, I understand you. So my solution is wrong, @eddiejaoude should call `setIndentation` and check the dumped yaml` if the string has the right indentation.

---------------------------------------------------------------------------

by eddiejaoude at 2013-02-22T07:35:08Z

Ok, thanks for the clarification guys. I will get on the case shortly!
2013-03-20 17:54:46 +01:00
Eddie Jaoude
992a4401e9 Added unit tests to Dumper 2013-03-20 17:54:45 +01:00
Fabien Potencier
bb83b3ea43 [HttpKernel] added a safeguard for when a fragment is rendered outside the context of a master request 2013-03-20 17:13:45 +01:00
Fabien Potencier
5d7b8356ab [FrameworkBundle] added some functional tests 2013-03-20 17:13:44 +01:00