Commit Graph

11352 Commits

Author SHA1 Message Date
Fabien Potencier
c79584aac8 merged branch romainneutron/DependencyInjectionExceptions (PR #5399)
Commits
-------

f2e4802 [Yaml] Normalize exceptions
b0f5f2e [Serializer] Normalize exceptions
bcd8db2 [DependencyInjection] Normalize exceptions

Discussion
----------

Normalize exceptions

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

This PR adds consistence to components which already have their own exception interface.

DependencyInjection, Serializer and Yaml now only throw their own scoped exceptions.

For other components, it's much more work and could introduce some bugs. It would be better to do it in Symfony 2.2.
2012-09-18 19:05:29 +02:00
Fabien Potencier
0d181bc06d merged branch romainneutron/ProcessExceptions (PR #5398)
Commits
-------

c5e7793 [Process] Normalize exceptions

Discussion
----------

[Process] Normalize exceptions

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

There were some exceptions in the Process scope but they were not implemented everywhere in the component.

This PR ensure that all exceptions thrown inside Process implements `Process\Exception\ExceptionInterface`.

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

by romainneutron at 2012-08-30T20:05:41Z

Tests passes, it's a travis issue, see http://travis-ci.org/#!/symfony/symfony/builds/2287439
2012-09-18 19:05:11 +02:00
Fabien Potencier
5a4a73ef94 merged branch havvg/2.1 (PR #5540)
Commits
-------

8dd19d8 fix Fatal error: Cannot access private property

Discussion
----------

fix Fatal error: Cannot access private property

The testsuite fails with fatal error with message:

```plain
PHP Fatal error: Cannot access private property Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::$options
in src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php on line 85
```

on this system:

```plain
PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20 2012 17:05:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans
```

```plain
PHPUnit 3.6.11 by Sebastian Bergmann
```
2012-09-18 18:44:48 +02:00
Toni Uebernickel
8dd19d8d89 fix Fatal error: Cannot access private property
PHP Fatal error: Cannot access private property Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::$options
in src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php on line 85
2012-09-18 18:09:52 +02:00
Fabien Potencier
bf41d8b74a merged branch fabpot/profiler-tests (PR #4897)
Commits
-------

22e9036 updated CHANGELOG
bafe890 [FrameworkBundle] changed Client::enableProfiler() behavior to fail silently when the profiler is not available (it makes it easier to write functional tests)
f41872b [FrameworkBundle] added a way to enable the profiler for the very next request in functional tests (closes #4307)
67b91e5 [HttpKernel] added a way to enable a disable Profiler

Discussion
----------

[2.2] added a way to enable the profiler for the very next request in a functional test

Bug fix: yes/no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4307
Todo: -
License of the code: MIT
Documentation PR: should be done before merging

After merging this PR, we need to disable the profiler in the test environment in Symfony SE.
2012-09-18 16:35:58 +02:00
Fabien Potencier
22e9036f8c updated CHANGELOG 2012-09-18 16:35:13 +02:00
Fabien Potencier
bafe89047f [FrameworkBundle] changed Client::enableProfiler() behavior to fail silently when the profiler is not available (it makes it easier to write functional tests) 2012-09-18 16:35:10 +02:00
Jeanmonod David
71db836e1f Better config validation handling for numerical values:
* New node type Integer and Float
 * New expressions: min() and max()
2012-09-18 16:22:25 +02:00
Fabien Potencier
f6857d4075 updated CHANGELOG 2012-09-18 15:46:10 +02:00
Fabien Potencier
d6b5feb769 merged branch merk/financial-validators (PR #4734)
Commits
-------

6ff9b04 Add Luhn validator

Discussion
----------

[2.2] [Validator] Add Luhn validator

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: Adding documentation if this PR is blessed.
License of the code: MIT

I submitted these validators to JMSPaymentCoreBundle, because they're payment related, but @schmittjoh feels that they're a better choice for adding to Symfony2.

See schmittjoh/JMSPaymentCoreBundle#52 for the original submission.

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

by fabpot at 2012-07-04T05:19:42Z

I'm +1. @bschussek?

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

by shieldo at 2012-07-04T15:46:05Z

+1 in principle (certainly the Luhn check).  I did wonder whether Visa Electron should also be in there (although, that uses a subset of the Visa range, and the chance that you would be checking for a Visa Electron but *not* Visa at the same time is vanishingly small, so maybe this is unnecessary).

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

by merk at 2012-07-04T21:25:30Z

@shieldo I did have a concern about the Electron as well, but in the case of an online system doing payment processing, I'm not sure anyone would ever need to check if it was an Electron card or not.

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

by merk at 2012-07-04T21:28:25Z

We could expand the CardScheme stuff further with this list: http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers

Is there any point expanding the validator beyond financial services and into the other sevices listed?

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

by shieldo at 2012-07-04T21:37:41Z

@merk Yes, in actuality there are always going to be cases you can't trap with a regex - I'd say validation like this is working if it catches a majority of cases of invalid numbers, because in reality ones that get through will just fail downstream anyway. The purpose of the validator isn't to identify individual schemes for numbers, it's to do a sanity check across collections of schemes.

I don't really see any point expanding beyond financial services for a core validator (imho) - I'm not sure how stable some of this information is.

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

by Gator92 at 2012-07-11T00:45:50Z

+1 on the Luhn check (without the authorship, just give credit to Greg Knapp), the CardScheme, however, is not really required by most gateways these days, it's a better candidate for a custom constraint.

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

by merk at 2012-07-11T00:47:20Z

I dont object, but Greg's algorithm has a flaw for odd length creditcard numbers. The unit testing written by Infinite caught this.

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

by Gator92 at 2012-07-11T01:35:46Z

You're right, the Knapp algo is flawed and does not appear to work on odd-numbered length cards.

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

by fabpot at 2012-07-11T05:49:22Z

@merk: Can you open two new pull requests? One for each validator?

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

by merk at 2012-07-26T23:42:24Z

PR updated to remove CardScheme into its own PR.

Documentation PR added to symfony-docs
2012-09-18 15:45:05 +02:00
Fabien Potencier
81206a2c92 Merge branch '2.1'
* 2.1:
  Create CONTRIBUTING.md file for auto-linking in PR's
  Added Bulgarian translation
  [Profiler]Use the abstract method to get client IP
  Typo fix
  Fixing incorrect word in twig:lint command description
  Rename $key parameter to $name for consistency
  =Minor chnage: replaced function by method
  Fixed the phpdoc in the DependencyInjection component
2012-09-17 22:42:23 +02:00
Fabien Potencier
ff1b990075 merged 2.0 2012-09-17 22:41:57 +02:00
Fabien Potencier
d62f492529 merged branch jmikola/2.0-contributing-file (PR #5533)
Commits
-------

71d8148 Create CONTRIBUTING.md file for auto-linking in PR's

Discussion
----------

Create CONTRIBUTING.md file for auto-linking in PR's

See: https://github.com/blog/1184-contributing-guidelines

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

by kbond at 2012-09-17T17:35:26Z

@jmikola won the race

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

by stof at 2012-09-17T17:37:35Z

and this should be updated according to the discussion on the dev mailing-list

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

by fabpot at 2012-09-17T17:42:28Z

Instead of duplicating the information, I would just linked to the documentation.

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

by jmikola at 2012-09-17T18:42:29Z

I reduced the file to the "Contributing" block from the readme.

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

by lsmith77 at 2012-09-17T19:36:36Z

+1
2012-09-17 22:33:03 +02:00
Jeremy Mikola
71d8148ad6 Create CONTRIBUTING.md file for auto-linking in PR's
See: https://github.com/blog/1184-contributing-guidelines
2012-09-17 14:40:53 -04:00
Fabien Potencier
470a770c7a merged branch RoumenMe/translation-2.1 (PR #5534)
Commits
-------

3269014 Added Bulgarian translation

Discussion
----------

Added Bulgarian translation

Bulgarian translation of validator messages
2012-09-17 19:56:59 +02:00
Roumen Damianoff
326901497a Added Bulgarian translation
Bulgarian translation of validator messages
2012-09-17 20:45:59 +03:00
Fabien Potencier
5bd1fd3e04 merged branch AndreyChernykh/2.1 (PR #5524)
Commits
-------

580d5a7 Typo fix

Discussion
----------

Typo fix

Typo fix in "Range" validator constraints.
2012-09-17 19:15:52 +02:00
Fabien Potencier
8e759076f0 merged branch armetiz/patch-7 (PR #5530)
Commits
-------

de6658b [Profiler]Use the abstract method to get client IP

Discussion
----------

[Profiler]Use the abstract method to get client IP

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

by armetiz at 2012-09-17T13:37:19Z

This PR is also done for master branch : https://github.com/symfony/symfony/pull/5527
2012-09-17 19:11:29 +02:00
Thomas Tourlourat
de6658b902 [Profiler]Use the abstract method to get client IP 2012-09-17 16:33:21 +03:00
Martin Hasoň
91354311f0 [HttpKernel] Added support for WinCache in ConfigDataCollector 2012-09-17 10:32:13 +02:00
Martin Hasoň
bb2566c17d [Console] Console colorization is also provided by ConEmu on Windows 2012-09-17 10:22:05 +02:00
Andrey Chernykh
580d5a7c54 Typo fix 2012-09-17 11:30:49 +04:00
Fabien Potencier
9993b86a48 merged branch richardmiller/fixing_twig_lint_description (PR #5523)
Commits
-------

2bcb6f2 Fixing incorrect word in twig:lint command description

Discussion
----------

[TwigBundle} Fixing incorrect word in twig:lint command description
2012-09-17 08:54:20 +02:00
Richard Miller
2bcb6f2c9b Fixing incorrect word in twig:lint command description 2012-09-16 20:33:46 +01:00
Fabien Potencier
846df269dd merged branch aderuwe/patch-1 (PR #5505)
Commits
-------

c2f8563 Rename $key parameter to $name for consistency

Discussion
----------

[DependencyInjection] Rename $key parameter to $name for consistency

When I worked on #5478, I noticed an inconsistency in parameter naming in the ```ParameterBag#remove``` method. This PR brings things in line with the rest of the class.

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
2012-09-16 09:41:02 +02:00
Fabien Potencier
e2f1914636 merged branch Nanocom/master (PR #5519)
Commits
-------

cc58b30 [Console] Misuse of str_pad instead of str_repeat

Discussion
----------

[Console] Misuse of str_pad instead of str_repeat
2012-09-16 09:25:14 +02:00
Fabien Potencier
6e390513e9 merged branch pborreli/config-tweak (PR #5521)
Commits
-------

baf2c46 [Config] Little tweak

Discussion
----------

[Config] Little tweak

removed 2 useless call of dirname
2012-09-16 08:38:43 +02:00
Pascal Borreli
baf2c46a07 [Config] Little tweak 2012-09-16 00:50:00 +00:00
Arnaud Kleinpeter
cc58b3092d [Console] Misuse of str_pad instead of str_repeat 2012-09-15 18:15:43 +02:00
Alexander Deruwe
c2f8563a52 Rename $key parameter to $name for consistency 2012-09-13 09:24:01 +02:00
Fabien Potencier
61d57f7eba merged 2.1 2012-09-13 08:13:00 +02:00
Michal Piotrowski
2a35941bab ParameterBag tests 2012-09-11 16:34:01 +02:00
Fabien Potencier
f23fd03732 bumped Symfony version to 2.1.2-DEV 2012-09-11 11:12:50 +02:00
Fabien Potencier
87065dc0ba merged branch besnikb/2.0 (PR #5482)
Commits
-------

3648abe =Minor chnage: replaced function by method

Discussion
----------

=Minor chnage: replaced function by method
2012-09-11 09:00:20 +02:00
Fabien Potencier
173711a462 updated VERSION for 2.1.1 2012-09-11 07:00:41 +02:00
Fabien Potencier
f6ff2fae89 updated CHANGELOG for 2.1.1 2012-09-11 06:59:00 +02:00
Fabien Potencier
d0818dd1c4 added CHANGELOG for 2.1 2012-09-11 06:58:24 +02:00
Tobias Schultze
005a9a3c5b [Routing] fixed RouteCompiler for adjacent and nested placeholders 2012-09-10 22:41:05 +02:00
Fabien Potencier
885d473366 merged branch Tobion/empty-requirement (PR #5426)
Commits
-------

02516de [Routing] fix variable with a requirement of '0'
1f5b793 [Routing] fix setting empty requirement in Route

Discussion
----------

[Routing] fix setting empty requirement

First commit: A requirement of "^$" was overlooked and wasn't recognized as empty after stripping it in Route.
Second commit: Fixes a requirement of '0' that was ignored by the Compiler.
2012-09-10 22:27:16 +02:00
Besnik Br
3648abea9b =Minor chnage: replaced function by method 2012-09-10 20:40:01 +02:00
Fabien Potencier
597819eff1 reintroduced self.version for the replace entry 2012-09-10 16:10:21 +02:00
Fabien Potencier
13937de2c8 replaced self.version/2.1.* by 2.2.* in composer.json files 2012-09-10 12:59:37 +02:00
Fabien Potencier
a9a0f420e2 merged 2.1 2012-09-10 12:54:04 +02:00
Fabien Potencier
3c32fd993d replaced self.version by 2.1.* in composer.json files 2012-09-10 12:53:42 +02:00
Fabien Potencier
c5edce7c48 merged branch eventhorizonpl/100ptc_component_httpfundation_p7 (PR #5434)
Commits
-------

8f46795 tests for HeaderBag

Discussion
----------

tests for HeaderBag

Hi,

This patch adds 100% tests coverage for HeaderBag.

Best regards,
Michal
2012-09-10 11:51:36 +02:00
Fabien Potencier
4d6dd469ce merged branch eventhorizonpl/100ptc_component_httpfundation_p6 (PR #5433)
Commits
-------

9bc8f65 Cookie tests

Discussion
----------

Cookie tests

Hi,

This patch adds 100% test coverage for Cookie class.

Best regards,
Michal
2012-09-10 11:50:31 +02:00
Fabien Potencier
329efcd3df merged branch boombatower/proccess-callable (PR #5466)
Commits
-------

622102e [Process] change all  documentation type to callable

Discussion
----------

[Process] change all  documentation type to callable

Update documentation per #5456 instead of mixing in with restart() pull request.
2012-09-10 11:48:39 +02:00
Fabien Potencier
487b8c1bbb merged branch aderuwe/issue-5477 (PR #5478)
Commits
-------

690e28e Convert parameter name to lowercase when removing an element from ParameterBag

Discussion
----------

[DependencyInjection] Convert parameter name to lowercase when removing an element from ParameterBag

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5477
License of the code: MIT

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

by sstok at 2012-09-10T08:42:30Z

👍

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

by fabpot at 2012-09-10T09:28:16Z

Shouldn't it be done on the 2.0 branch?

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

by stloyd at 2012-09-10T09:29:35Z

@fabpot AFAIK `2.0` don't have `ParameterBag#remove()` method

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

by aderuwe at 2012-09-10T09:29:52Z

The remove method is not present in 2.0.

On Mon, Sep 10, 2012 at 11:28 AM, Fabien Potencier <notifications@github.com
> wrote:

> Shouldn't it be done on the 2.0 branch?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/5478#issuecomment-8418300>.
>
>
2012-09-10 11:46:45 +02:00
Fabien Potencier
8b7ba9b1e5 merged branch Tobion/numeric-placeholder (PR #5439)
Commits
-------

be28e56 [Routing] disallow numeric named variables in pattern

Discussion
----------

[Routing] compile check for numeric named variables in pattern

Because PHP raises an error for such subpatterns in PCRE and thus would break matching, e.g. this is not allowed as regex `(?<123>.+)`.
So add a compile time check for a non-working pattern like '/{123}'.

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

by sstok at 2012-09-06T08:31:42Z

Strangely enough Regex buddy gives no warning or error with the pattern.
Is the name all numeric invalid or just the beginning?

1e4 and 0xFF would be perfectly valid but returns true with is_nummeric()

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

by Tobion at 2012-09-06T08:59:07Z

Any numeric is not valid. I guess this limitation is unique to PHP's binding to PCRE.
I think it's because the returned matches array of of preg_match contains both the subpattern as integer index and as named variable. So having a numeric named variable would conflict as `array['1'] === array[1]`.
2012-09-10 11:27:26 +02:00
Fabien Potencier
71b39d51de merged branch Tobion/same-requirements-issue (PR #5435)
Commits
-------

7c5cfeb [Routing] added test why #5238 is not that easy

Discussion
----------

[Routing] added test why #5238 is not that easy

This just adds a test that wasn't covered yet and shows why #5238 is not that easy as I thought at first.
2012-09-10 11:25:47 +02:00