Commit Graph

16631 Commits

Author SHA1 Message Date
Tobias Schultze
e3f17f9d30 add scheme option to router:match command 2014-03-21 17:50:06 +01:00
Fabien Potencier
6586eaa35f feature #10194 [Console] Added standalone PSR-3 compliant logger (dunglas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Added standalone PSR-3 compliant logger

This PR adds a standalone, PSR-3 compliant, logger to the Console component. It logs all messages on the console output. Messages of `DEBUG`, `INFO` and `NOTICE` levels are displayed using the `info` format (default to green). Higher levels are displayed using the `error` formatter (default to red).

This logger is similar to the [Monolog's Console Handler](http://symfony.com/doc/current/cookbook/logging/monolog_console.html) but does not have any external dependency (except `php-fig/log`). This is useful for console applications and commands needing a lightweight PSR-3 compliant logger (e.g. required by a dependency or to display basic informations to the user).

An usage example is available here: https://github.com/dunglas/php-schema.org-model/blob/master/src/SchemaOrgModel/Command/GenerateEntitiesCommand.php#L71

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

Commits
-------

e40b34d [Console] Added standalone PSR-3 compliant logger
2014-03-19 16:49:37 +01:00
Kévin Dunglas
e40b34d59d [Console] Added standalone PSR-3 compliant logger 2014-03-19 16:21:15 +01:00
Fabien Potencier
53fec31566 feature #9097 [Validator] Added hasser support for entity method validation (bicpi)
This PR was squashed before being merged into the 2.5-dev branch (closes #9097).

Discussion
----------

[Validator] Added hasser support for entity method validation

Hasser support was added in addition to existing getter and isser support for more consistency between components

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

Commits
-------

e8b6978 [Validator] Added hasser support for entity method validation
2014-03-19 10:45:16 +01:00
Philipp Rieber
e8b6978d3a [Validator] Added hasser support for entity method validation 2014-03-19 10:45:16 +01:00
Fabien Potencier
b14fa26b67 feature #10476 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle (Badkill)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Fixed unsetting of setted attributes on OutputFormatterStyle

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

Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes

Conflicts:
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
	src/Symfony/Component/Console/Tests/Output/OutputTest.php

Commits
-------

ce0c4b4 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle
2014-03-19 07:24:10 +01:00
Danilo Silva
ce0c4b4284 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle
Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes

Conflicts:
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
	src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
	src/Symfony/Component/Console/Tests/Output/OutputTest.php
2014-03-18 22:29:59 +01:00
Fabien Potencier
8170db84b3 feature #10473 [WebProfilerBundle] enhance logs display (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[WebProfilerBundle] enhance logs display

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

Commits
-------

3e6c940 [WebProfilerBundle] enhance logs display
2014-03-18 14:44:19 +01:00
Fabien Potencier
6deb4ccb88 minor #10474 [Console] Rename Command::setProcessName to Command::setProcessTitle (lyrixx)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Console] Rename Command::setProcessName to Command::setProcessTitle

To be more consistant with the underlying system.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (because the 2.5 is not released yet)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

Commits
-------

6786f6d [Console] Rename Command::setProcessName to Command::setProcessTitle
2014-03-18 10:32:32 +01:00
Nicolas Grekas
3e6c940495 [WebProfilerBundle] enhance logs display 2014-03-18 10:04:14 +01:00
Grégoire Pineau
6786f6db18 [Console] Rename Command::setProcessName to Command::setProcessTitle
To be more consistant with the underlying system.
2014-03-18 00:05:29 +01:00
Fabien Potencier
71dc07ce08 feature #10466 [Debug] add a screaming mode to ErrorHandler (nicolas-grekas)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Debug] add a screaming mode to ErrorHandler

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

Collect and display silenced PHP errors in the debug toolbar.

Commits
-------

5cc817d [Debug] add a screaming mode to ErrorHandler
2014-03-17 16:55:06 +01:00
Fabien Potencier
c152ccb5b6 minor #10469 fix doc block and namespace by @insekticide (cordoval)
This PR was merged into the 2.5-dev branch.

Discussion
----------

fix doc block and namespace by @insekticide

|Q            |A     |
|---          |---   |
|Bug Fix?     |yes   |
|New Feature? |no    |
|BC Breaks?   |no    |
|Deprecations?|no    |
|Tests Pass?  |yes   |
|Fixed Tickets|#10464|
|License      |MIT   |
|Doc PR       |      |

Commits
-------

89bde6e fix class namespace by @insekticid and doc block fix
2014-03-17 16:29:53 +01:00
Nicolas Grekas
5cc817d1bd [Debug] add a screaming mode to ErrorHandler 2014-03-17 14:44:56 +00:00
Luis Cordova
89bde6e03b fix class namespace by @insekticid and doc block fix 2014-03-17 07:23:37 -07:00
Fabien Potencier
48c9985e73 feature #10451 [TwigBundle] Add possibility to generate absolute assets urls (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[TwigBundle] Add possibility to generate absolute assets urls

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/3683

This is another approach of #7722

 - [x] Add unit tests
 - [x] Update doc

Commits
-------

76b8851 [TwigBundle] Add possibility to generate absolute assets urls
2014-03-15 09:47:57 +01:00
Fabien Potencier
a635c4f9a3 bug #10456 [Process] Handle idle timeout and disabled output conflict (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Process] Handle idle timeout and disabled output conflict

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10453
| License       | MIT
| Doc PR        | WIP (a note should be added in the doc)

Commits
-------

ae84810 [Process] Increase tests speed
40c08c6 [Process] Handle idle timeout and disable output conflict
2014-03-15 09:40:48 +01:00
Romain Neutron
ae8481038e [Process] Increase tests speed 2014-03-14 19:46:29 +01:00
Romain Neutron
40c08c640e [Process] Handle idle timeout and disable output conflict 2014-03-14 19:08:20 +01:00
Romain Neutron
76b88511a6 [TwigBundle] Add possibility to generate absolute assets urls 2014-03-14 14:43:21 +01:00
Fabien Potencier
1e973b2a9a feature #10404 [Security] Match request based on HTTP methods in firewall config (danez)
This PR was submitted for the 2.4 branch but it was merged into the 2.5-dev branch instead (closes #10404).

Discussion
----------

[Security] Match request based on HTTP methods in firewall config

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

For an api I had to work on, I was in the need to have different firewalls for different HTTP Methods. I started building my own ```RequestMatcher``` until I discovered, that the regular RequestMatcher is able to handle HTTP Methods. The only thing that is missing is the possibility to configure it in the firewall section of the configuration. (For access_control it is already possible)

With this PR it is possible to do things like this:
```yaml
security:
    firewalls:
        api_options:
            pattern:    ^/
            methods:    [OPTIONS]
            security:   false
        api:
            pattern:    ^/
            some_auth:  true
```

I think this integrates quite nicely. Or is there any downside you can think of?

If it is good to go, I'll open a PR for the docs.

Commits
-------

2878757 Make it possible to match the request based on HTTP methods in the firewall configuration
2014-03-14 12:27:42 +01:00
Daniel Tschinder
a8e9ed5cf1 Make it possible to match the request based on HTTP methods in the firewall configuration 2014-03-14 12:27:42 +01:00
Fabien Potencier
f0c0c2c99d tweaked sentence 2014-03-14 12:08:56 +01:00
Fabien Potencier
120a7e99d7 bug #10443 [FrameworkBundle] Use DIC parameter as default host value if available (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] Use DIC parameter as default host value if available

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

This follows #10439

Commits
-------

85a2fbf [FrameworkBundle] Use DIC parameter as default host value if available
2014-03-13 17:31:53 +01:00
Romain Neutron
85a2fbf27c [FrameworkBundle] Use DIC parameter as default host value if available 2014-03-13 16:54:59 +01:00
Fabien Potencier
b7c158a831 feature #10439 [FrameworkBundle] Add posibility to specify method and host in router:match command (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] Add posibility to specify method and host in router:match command

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

Replaces #9340

Commits
-------

acc66b9 [FrameworkBundle] Add posibility to specify method and host in router:match command
2014-03-13 14:44:14 +01:00
pmartelletti
acc66b9d72 [FrameworkBundle] Add posibility to specify method and host in router:match command 2014-03-13 14:26:26 +01:00
Fabien Potencier
c14d67c11d [SecurityBundle] changed a hardcoded string to its constant equivalent 2014-03-13 06:12:30 +01:00
Fabien Potencier
ea0598ae78 minor #10390 [Security] Add constants for access decision strategies (c960657)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Security] Add constants for access decision strategies

I suggest adding constants for the three access decision strategies (affirmative, consensus, unanimous).

They are difficult to spell, and without constants they are difficult to identify when reading the code.

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

5d6ef00 Add class constants for access decision strategies.
2014-03-13 06:11:00 +01:00
Fabien Potencier
1e0fea61e8 minor #10432 clean up framework bundle commands (cordoval)
This PR was merged into the 2.5-dev branch.

Discussion
----------

clean up framework bundle commands

|Q            |A  |
|---          |---|
|Bug Fix?     |no |
|New Feature? |no |
|BC Breaks?   |no |
|Deprecations?|no |
|Tests Pass?  |yes|
|Fixed Tickets|   |
|License      |MIT|
|Doc PR       |na |

Commits
-------

0984313 clean up commands from framework bundle
2014-03-13 06:03:27 +01:00
Luis Cordova
09843131ba clean up commands from framework bundle 2014-03-12 23:58:17 -05:00
Fabien Potencier
5e0bb71b90 feature #10425 [Process] Add Process::disableOutput and Process::enableOutput methods (romainneutron)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Process] Add Process::disableOutput and Process::enableOutput methods

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9007
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/3664

This is another implementation for #9007 that allows to disable the output/error-output storage in a Process in order to avoid using memory.
This is particularly useful when the process outputs large data and it's not read.

Commits
-------

a891e14 [Process] Add Process::disableOutput and Process::enableOutput methods
2014-03-12 19:33:59 +01:00
Romain Neutron
a891e14d11 [Process] Add Process::disableOutput and Process::enableOutput methods 2014-03-12 12:02:04 +01:00
Fabien Potencier
c2d4be1d6b feature #10418 [Form] Removed "magic" from FormErrorIterator (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] Removed "magic" from FormErrorIterator

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

Commits
-------

daac66e [Form] Removed "magic" from FormErrorIterator
2014-03-11 18:20:42 +01:00
Bernhard Schussek
daac66e719 [Form] Removed "magic" from FormErrorIterator 2014-03-11 16:57:35 +01:00
Fabien Potencier
5b07e0abb6 feature #10414 [Validator] Checked the constraint class in constraint validators (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Validator] Checked the constraint class in constraint validators

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

Commits
-------

df56c23 [Validator] Checked the constraint class in constraint validators
2014-03-11 11:03:48 +01:00
Fabien Potencier
ce8119913f feature #9918 [Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten (webmozart)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten

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

See the changes in the UPGRADE files for more information.

Commits
-------

6b3fbb5 [Form] Changed the default value of $flatten in Form::getErrors() to true
a9268c4 [Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten
2014-03-11 10:37:33 +01:00
Bernhard Schussek
df56c23d8f [Validator] Checked the constraint class in constraint validators 2014-03-10 12:58:20 +00:00
Christian Schmidt
5d6ef003ff Add class constants for access decision strategies. 2014-03-05 23:13:10 +01:00
Fabien Potencier
f15ea50b17 minor #10376 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer (alexsegura)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Component][Serializer] Add fluent interface to GetSetMethodNormalizer

| 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

Commits
-------

2d42533 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer
2014-03-04 21:00:43 +01:00
Alexandre Segura
2d42533964 [Component][Serializer] Add fluent interface to GetSetMethodNormalizer 2014-03-04 15:58:09 +01:00
Fabien Potencier
bc38d76f94 minor #10366 [FrameworkBundle] set a default value for gc_probability (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

[FrameworkBundle] set a default value for gc_probability

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

This sets the `gc_probability` to 1 by default (which is the default value in PHP). That should help mitigate #10349.

Commits
-------

7e1bdd7 [FrameworkBundle] set a default value for gc_probability
2014-03-04 10:28:13 +01:00
Fabien Potencier
1948d3647f Merge branch '2.4'
* 2.4:
  Revert "[HttpFoundation] removed test file not related to 2.3"
  [HttpFoundation] removed test file not related to 2.3
  [HttpKernel] fixed CS
  Add tests for RequestStack class
2014-03-04 08:36:44 +01:00
Fabien Potencier
91ceddcb42 Revert "[HttpFoundation] removed test file not related to 2.3"
This reverts commit 60ed3880d7.
2014-03-04 08:36:26 +01:00
Fabien Potencier
29edeeae66 Merge branch '2.3' into 2.4
* 2.3:
  [HttpFoundation] removed test file not related to 2.3
  [HttpKernel] fixed CS
  Add tests for RequestStack class
2014-03-04 08:36:00 +01:00
Fabien Potencier
f6bc83fc07 minor #10373 added the BC docs to the contributing file (fabpot)
This PR was merged into the 2.5-dev branch.

Discussion
----------

added the BC docs to the contributing file

Commits
-------

2f9432a added the BC docs to the contributing file
2014-03-04 08:34:34 +01:00
Fabien Potencier
b3cf27a184 minor #10372 [HttpKernel] fixed CS (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] fixed CS

Commits
-------

7539e41 [HttpKernel] fixed CS
2014-03-04 08:33:50 +01:00
Fabien Potencier
60ed3880d7 [HttpFoundation] removed test file not related to 2.3 2014-03-04 08:33:02 +01:00
Fabien Potencier
2f9432a45b added the BC docs to the contributing file 2014-03-04 08:26:38 +01:00
Fabien Potencier
7539e4197e [HttpKernel] fixed CS 2014-03-04 08:21:33 +01:00