Commit Graph

13167 Commits

Author SHA1 Message Date
Fabien Potencier d0022e31d7 merged branch Tobion/deprecation-trigger (PR #7266)
This PR was merged into the 2.2 branch.

Commits
-------

c0687cd remove() should not use deprecated getParent() so it does not trigger deprecation internally
708c0d3 adjust routing tests to not use prefix in addCollection
6180c5b add test for uniqueness of resources
c0de07b added tests for addDefaults, addRequirements, addOptions
0a1cfcd adjust RouteCollectionTest for the addCollection change and refactor the tests to only skip the part that really needs the config component
ea694e4 added tests for remove() that wasnt covered yet and special route name
9e2bcb5 refactor interator test that was still assuming a tree
ceb9ab4 adjust tests to no use addPrefix with options
2b8bf6b adjusted tests to not use RouteCollection::getPrefix
acff735 [Routing] trigger deprecation warning for deprecated features that will be removed in 2.3

Discussion
----------

[2.2][Routing] Trigger deprecation and refactor tests to not use deprecated methods

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

@fabpot please don't squash because it also added new tests
2013-03-06 17:23:04 +01:00
Fabien Potencier 5e3756fae0 merged branch mmuruev/patch-1 (PR #7278)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7278).

Commits
-------

0cf2656 Default validation message translation fix.

Discussion
----------

Default validation message translation fix.

Add 'validators' for $translationDomain. Detailed discussion https://github.com/fabpot/Silex/pull/641

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

by fabpot at 2013-03-06T08:17:43Z

ping @bschussek

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

by stof at 2013-03-06T08:43:53Z

@fabpot Using ``null`` as translation domain would make weird things in the Translator component. So this change is needed IMO to have a sensible default.

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

by bschussek at 2013-03-06T10:42:59Z

👍
2013-03-06 17:05:34 +01:00
Maksim Muruev 709518bafd Default validation message translation fix.
Add 'validators' for $translationDomain. Detailed discussion https://github.com/fabpot/Silex/pull/641
2013-03-06 17:05:34 +01:00
Tobias Schultze c0687cd5fa remove() should not use deprecated getParent() so it does not trigger deprecation internally 2013-03-05 15:23:59 +01:00
Tobias Schultze 708c0d3ff9 adjust routing tests to not use prefix in addCollection 2013-03-05 15:23:58 +01:00
Tobias Schultze 6180c5b031 add test for uniqueness of resources 2013-03-05 15:23:57 +01:00
Tobias Schultze c0de07b960 added tests for addDefaults, addRequirements, addOptions 2013-03-05 15:23:56 +01:00
Tobias Schultze 0a1cfcdb5f adjust RouteCollectionTest for the addCollection change and refactor the tests to only skip the part that really needs the config component 2013-03-05 15:23:56 +01:00
Tobias Schultze ea694e445d added tests for remove() that wasnt covered yet and special route name 2013-03-05 15:23:55 +01:00
Tobias Schultze 9e2bcb5d9e refactor interator test that was still assuming a tree 2013-03-05 15:23:54 +01:00
Tobias Schultze ceb9ab44a4 adjust tests to no use addPrefix with options 2013-03-05 15:23:53 +01:00
Tobias Schultze 2b8bf6beec adjusted tests to not use RouteCollection::getPrefix 2013-03-05 15:23:53 +01:00
Tobias Schultze acff7356ce [Routing] trigger deprecation warning for deprecated features that will be removed in 2.3 2013-03-05 15:23:52 +01:00
Fabien Potencier 49984b6fba merged branch pborreli/patch-6 (PR #7228)
This PR was merged into the 2.2 branch.

Commits
-------

c6c71bf Fixed trailing whitespace

Discussion
----------

Fixed trailing whitespace
2013-03-01 15:58:56 +01:00
Fabien Potencier ff00f9856a merged branch jfsimon/console-tests-fix (PR #7232)
This PR was merged into the 2.2 branch.

Commits
-------

5bf2f71 [Console] added deprecation annotation
f95f8e2 [Console] added string input test
4b12118 Revert "merged branch jfsimon/issue-6749 (PR #7220)"

Discussion
----------

[Console] fixes tests

Previous `StringInputTest::testInputOptionWithGivenString` test was broken.
Trying make it pass broke the way `StringInput` is used in the console.

Two things to know abour the `StringInput` class in its actual state:
*  the second argument in the constructor is useless
*  the `bind` method **must** be called in order to access arguments/options

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
2013-03-01 15:57:26 +01:00
Jean-François Simon 5bf2f7110f [Console] added deprecation annotation 2013-03-01 15:42:44 +01:00
Jean-François Simon f95f8e2a3b [Console] added string input test 2013-03-01 15:41:03 +01:00
Jean-François Simon 4b12118bc2 Revert "merged branch jfsimon/issue-6749 (PR #7220)"
This reverts commit f52120bdd3, reversing
changes made to 66c2be30d0.
2013-03-01 15:36:15 +01:00
Fabien Potencier 62baab5b36 fixed CS 2013-03-01 11:42:10 +01:00
Pascal Borreli c6c71bf826 Fixed trailing whitespace 2013-03-01 09:15:25 +00:00
Fabien Potencier 7d9688dc6d merged branch fzerorubigd/master (PR #7226)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7226).

Commits
-------

80aa012 Add persian translation to Components/Security

Discussion
----------

Add Persian (farsi) Translation to Component/Security

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | somehow :)
| BC breaks?    | no
| Tests pass?   | yes
| License       | MIT

Just add farsi translation to Component/Security
2013-03-01 10:02:55 +01:00
fzerorubigd 4e72983bb2 Add persian translation to Components/Security 2013-03-01 10:02:55 +01:00
Fabien Potencier 2d8f53eb25 bumped Symfony version to 2.2.1-DEV-DEV 2013-03-01 08:52:34 +01:00
Fabien Potencier 23c2be3d32 updated VERSION for 2.2.0 2013-03-01 07:52:29 +01:00
Fabien Potencier 4734354659 updated CHANGELOG for 2.2.0 2013-03-01 07:52:04 +01:00
Fabien Potencier 556ca0cfbd Merge branch '2.1' into 2.2
* 2.1:
  Options small typo
  [Console] fixed unparsed StringInput tokens
  [TwigBridge] fixed trans twig extractor
  [DomCrawler] fix handling of schemes by Link::getUri()
  [Console] Fixed comment
  [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056)
  Fixed handling absent href attribute in base tag
  added a DebuClassLoader::findFile() method to make the wrapping less invasive
  fixed CHANGELOG
  bumped Symfony version to 2.1.9-DEV
  updated VERSION for 2.1.8
  updated CHANGELOG for 2.1.8
  StringInput resets the given options.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
2013-03-01 07:43:14 +01:00
Fabien Potencier 08757db05e Merge branch '2.0' into 2.1
* 2.0:
  [Console] Fixed comment

Conflicts:
	src/Symfony/Component/Console/Output/OutputInterface.php
2013-03-01 07:42:22 +01:00
Fabien Potencier 1114f73ced merged branch yahuarkuntur/master (PR #7224)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7224).

Commits
-------

801a71f [Console] Options small typo

Discussion
----------

[Console] Fix small Options typo

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
2013-02-28 23:03:28 +01:00
Brian Debuire e2ef708f1a Options small typo 2013-02-28 23:03:28 +01:00
Fabien Potencier f52120bdd3 merged branch jfsimon/issue-6749 (PR #7220)
This PR was merged into the 2.1 branch.

Commits
-------

5b19c89 [Console] fixed unparsed StringInput tokens
635b1fc StringInput resets the given options.

Discussion
----------

[Console] fixes unparsed StringInput tokens

`StringInput` instances call `setToken` after constructor, `parse` method is called in constructor, so `StringInput` tokens where never parsed.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6749
2013-02-28 18:08:29 +01:00
Jean-François Simon 5b19c892cf [Console] fixed unparsed StringInput tokens 2013-02-28 17:44:20 +01:00
Fabien Potencier ea5c7f1275 merged branch lmcd/mask-passwords (PR #6482)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6482).

Commits
-------

f3e227a Mask PHP_AUTH_PW header in profiler

Discussion
----------

Mask PHP_AUTH_PW header in profiler

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

by fabpot at 2012-12-27T17:39:26Z

Not sure about this one. Having public access to the web profiler in the production environment is really bad anyway. There is a ton of information that could help an attacker. So, just hiding this specific bit of information won't make it better.

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

by lmcd at 2012-12-27T18:04:45Z

A few scenarios are suggested here where a developer might want the profiler switched on in production: http://symfony.com/doc/current/book/internals.html

I'm talking specifically about someone gaining malicious access to the filesystem. Ripping database tables are somewhat ineffective at stealing user credentials, considering passwords are usually securely hashed nowadays. But the profiler database would have usernames/passwords just sitting there in plaintext.

I know there is lots of information there to aid an attacker, but so is there in most databases (IP addresses, useragents, names, email addresses etc) - but passwords are widely accepted as the *one* thing that should *never* just be stored in plaintext.
2013-02-28 15:46:40 +01:00
Lee McDermott e92b76c5ff Mask PHP_AUTH_PW header in profiler 2013-02-28 15:46:39 +01:00
Fabien Potencier bc79f27f70 merged branch kriswallsmith/2.2 (PR #6988)
This PR was merged into the 2.2 branch.

Commits
-------

da22926 [Validator] gracefully handle transChoice errors

Discussion
----------

[Validator] gracefully handle transChoice errors

This validator annotation was throwing an error for me:

```
/** @Assert\Length(min=6, minMessage="Must be 6 characters") */
```

To avoid this error in the current code I would need to provide a message template that accommodates the minimum length being 1, even though that's not the case.

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

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

by kriswallsmith at 2013-02-25T19:41:51Z

ping @fabpot

Any thoughts on this change? Having to provide a transChoice template when you know what the pluralization is going to be is a pain in the neck.

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

by kriswallsmith at 2013-02-25T19:42:11Z

ping @bschussek too :)

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

by fabpot at 2013-02-25T19:57:08Z

I'm +1 for this change. What do you think @bschussek?

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

by vicb at 2013-02-26T10:44:33Z

Would this be a common enough use case to be pushed to the translator ?
2013-02-28 15:29:34 +01:00
Fabien Potencier 66c2be30d0 merged branch jfsimon/issue-6943 (PR #7206)
This PR was squashed before being merged into the 2.1 branch (closes #7206).

Commits
-------

bae83c7 [TwigBridge] fixed trans twig extractor

Discussion
----------

[TwigBridge] fixed trans twig extractor

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6943
2013-02-28 15:09:19 +01:00
Jean-François Simon bae83c7c81 [TwigBridge] fixed trans twig extractor 2013-02-28 15:09:18 +01:00
Fabien Potencier 06560dfb9e merged branch jfsimon/finder-adapter-selection (PR #7212)
This PR was squashed before being merged into the 2.2 branch (closes #7212).

Commits
-------

f40adbc [Finder] adds adapter selection/unselection capabilities

Discussion
----------

[Finder] adds adapter selection/unselection capabilities

As we have many issues with the native finder adapter, it would be good to:
*  permit selection of a particular adapter which will be choosed over the others until its unselection
*  permit unselection of adapters to get the finder select trhe best on (by priority)
*  have `PhpAdapter` selected by default

This PR adds 2 methods to the `Finder`:
*  `setAdapter($adapter)`: selects an adapter by its name
*  `useBestAdapter()`: tells the finder to select best adapter by their priority

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

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

by jfsimon at 2013-02-28T14:05:25Z

@fabpot I just applied all your good advices, there was no bad one :)
2013-02-28 15:06:37 +01:00
Jean-François Simon f40adbc1ae [Finder] adds adapter selection/unselection capabilities 2013-02-28 15:06:36 +01:00
Fabien Potencier 8e99eb07d3 merged branch matthijsvandenbos/matthijsvandenbos/link-handle-scheme (PR #7214)
This PR was merged into the 2.1 branch.

Commits
-------

8f8ba38 [DomCrawler] fix handling of schemes by Link::getUri()

Discussion
----------

[DomCrawler] fixed handling of schemes by Link::getUri()

A link (anchor tag with an href attr) in pages crawled by the Crawler
can contain any valid URI, including mailto: links.

Currently this is not correctly supported by `Link::getUri`.
Schemes that do not start with 'http' are treated as relative URIs
and appenden to the base URI. This leads to strange URIs like this:
http://foo.com/mailto:foo@bar.com

Fixed `Link::getUri` to treat any URI with a schema part as an
absolute URL. Updated the unit tests to test for this.

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

by matthijsvandenbos at 2013-02-28T11:55:18Z

Ok, I will update the pull request

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

by matthijsvandenbos at 2013-02-28T12:25:45Z

Fixed
2013-02-28 13:27:29 +01:00
Matthijs van den Bos 8f8ba380d6 [DomCrawler] fix handling of schemes by Link::getUri()
A link (anchor tag with an href attr) in crawled by the Crawler
can contain any valid URI, including mailto: links.

Currently this is not correctly supported by Link::getUri.
Schemes that do not start with 'http' are treated as relative URIs
and appenden to the base URI. This leads to strange URIs like this:
http://foo.com/mailto:foo@bar.com

Fixed Link::getUri to treat any URI with a schema part as an
absolute URL. Updated the unit tests to test for this.
2013-02-28 13:15:59 +01:00
Fabien Potencier cb2277ac94 merged branch DenisGorbachev/2.0 (PR #7198)
This PR was merged into the 2.0 branch.

Commits
-------

3be3dde [Console] Fixed comment

Discussion
----------

[Console] Fixed comment

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -
2013-02-27 12:39:01 +01:00
Denis Gorbachev 3be3dde806 [Console] Fixed comment 2013-02-27 22:08:35 +13:00
Fabien Potencier 83382bc798 [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056)
Trimming was not done by the extractor but it was the default behavior
of the TransNode class. Now, things are consistent between the two.
2013-02-27 08:36:53 +01:00
Fabien Potencier d10ad0f9e7 merged branch lsmith77/debugclassloader_findfile_2_1 (PR #7168)
This PR was merged into the 2.1 branch.

Commits
-------

0690709 added a DebuClassLoader::findFile() method to make the wrapping less invasive

Discussion
----------

added a DebuClassLoader::findFile() method to make the wrapping less invasive

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

i have classified it as a bug fix, since due to the wrapping it can break assumptions about the loaded class loader, so implementing this method at least doesnt break the assumption that ``findFile()`` is available.

actually i think we should also introduced a loader interface to reduce the duct typing

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

by stof at 2013-02-24T16:39:46Z

👎 for the interface:

- it would make the use of the autoloader more difficult (you would have to require the interface before requiring the loader)
- it would forbid using these wrappers with the composer ClassLoader

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

by digitalkaoz at 2013-02-24T19:16:36Z

mh, i think all autoloaders should follow a common interface, maybe its worth to think about a PSR?

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

by lsmith77 at 2013-02-24T19:27:27Z

ah I see

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

by stof at 2013-02-24T20:33:07Z

@digitalkaoz Such an interface would have to be in PHP itself, otherwise, you would have to require it first each time (as it cannot be autoloaded before registering the autoloader). And an autoloader in PHP is just a callable.

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

by digitalkaoz at 2013-02-24T20:47:10Z

Yes @stof, i know, but it would be nice if all autoloaders follows a common pattern , call it a convention ;)
2013-02-27 08:22:37 +01:00
Fabien Potencier 0c09b9392a merged branch matthijsvandenbos/matthijsvandenbos/basetag-href-fix (PR #7178)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7178).

Commits
-------

c41f640 [DomCrawler] Fixed handling absent href attribute in base tag

Discussion
----------

[DomCrawler] Fixed handling absent href attribute in base tag

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

# Description
The HTML5 spec states that the href attribute is optional for the
base tag. The current code causes an exception on conforming HTML.
Fixed the DomCrawler::addHtmlContent() method to support this.
Added Unit Test to check for this situation.

# Explanantion
Currently, if the base tag doesn't have an href attribute, the uri for the DomCrawler gets set to an empty string. This is incorrect behaviour, especially because it breaks DomCrawler::links(). The Symfony\Component\DomCrawler\Link objects it creates, expect a non-empty string in their constructor arguments and throw an InvalidArgumentException.

# References
http://www.w3.org/TR/html-markup/base.html#base.attrs.href
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-base-element
2013-02-26 17:49:54 +01:00
Matthijs van den Bos b1ea8e5b68 Fixed handling absent href attribute in base tag
The HTML5 spec states that the href attribute is optional for the
base tag. Fixed the DomCrawler::addHtmlContent() method to support this

See here and here:
http://www.w3.org/TR/html-markup/base.html#base.attrs.href
http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-base-element
2013-02-26 17:49:54 +01:00
Fabien Potencier 9c46043e21 merged branch jfsimon/issue-4911 (PR #7188)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7188).

Commits
-------

3b2cb79 [Finder] fixed paths/notPaths regex for shell adapters
45b84c5 [Finder] fix issue 4911

Discussion
----------

[Finder] Fixes paths/notPaths issue with shell adapters

This PR is built upon #5128 from @gajdaw.
It fixes wrong handling of regex in `paths` and `notPaths` criteria by shell adapters.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #4911, #5128
2013-02-26 17:36:32 +01:00
Jean-François Simon 83a61cfb2b fixed paths/notPaths regex for shell adapters 2013-02-26 17:36:31 +01:00
Włodzimierz Gajda 32c5bf7b91 fix issue 4911 2013-02-26 17:36:31 +01:00
Fabien Potencier 0df16f2062 merged branch jfsimon/issue-6586 (PR #7190)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7190).

Commits
-------

b2e9bdb [Finder] Adds expandable globs support to shell adapters

Discussion
----------

[Finder] Adds expandable globs support to shell adapters

As expandable globs, i mean glob following `*.{a,b}` syntax.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6586
2013-02-26 17:36:07 +01:00