This PR was merged into the 2.1 branch.
Discussion
----------
[HttpFoundation] Fixed bug in key searching for NamespacedAttributeBag
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7564
| License | MIT
| Doc PR | N/A
Fixed a bug in NamespacedAttributeBag causing a result to be falsely found when
the last key of the attribute matched the last of the queried name regardless of
if the key did not exist in the search.
Added Tests to demonstrate the issue and resolved by setting keys to null when
iterating through query and returning proper responses in the case that the
given array does in fact not exist.
Commits
-------
0f0c29c [HttpFoundation] Fixed bug in key searching for NamespacedAttributeBag
This PR was merged into the 2.1 branch.
Discussion
----------
[Routing][XML Loader] Add a possibility to set a default value to null
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/7335
| License | MIT
Example:
<route id="acme_user_show" pattern="/{id}">
<default key="_controller">AcmeUserBundle:User:show</default>
<default key="id" xsi:nil="true" />
</route>
Commits
-------
94a9cdc [Routing][XML Loader] Add a possibility to set a default value to null
This PR was merged into the 2.1 branch.
Discussion
----------
[Form] DateTimeToRfc3339Transformer use proper transformation exteption in reverse transformation
Handle _Exception_ throwed by DateTime constructor if an invalid date is passed.
Then throws proper transformation exception.
| 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
-------
7fc429f [Form] DateTimeToRfc3339Transformer use proper transformation exteption in reverse transformation
This PR was squashed before being merged into the master branch (closes#7620).
Discussion
----------
Enforce sprintf for exceptions
| Q | A
| ------------- | ---
| Bug fix? |no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | [yes|no]
| Fixed tickets | n/a
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/2483
Changed format of exceptions which concatenate strings as follows
````
throw new \Exception('The '.$something.' needs the '.$foobar.' parameter');
````
to
````
throw new \Exception(sprintf('The %s needs the %s parameter', $something, $foobar));
````
This follows discussion on mailing list: https://groups.google.com/forum/?fromgroups#!topic/symfony-devs/tecj3UOAueM
Unit test results are pending...
Commits
-------
e655120 Enforce sprintf for exceptions
Fixed a bug in NamespacedAttributeBag causing a result to be falsely found when
the last key of the attribute matched the last of the queried name regardless of
if the key did not exist in the search.
Added Tests to demonstrate the issue and resolved by setting keys to null when
iterating through query and returning proper responses in the case that the
given array does in fact not exist.
* Updated Syntax of null checks
* Fixing missing else case for if statement in write context
This PR was merged into the 2.1 branch.
Discussion
----------
[HttpFoundation] getClientIp is fixed.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | no
The getClientIp now returns ip of the earliest server in a proxy chain when all the servers in the chain are trusted proxies. Before this patch the getClientIp used to return null at such condition.
Some appropriate tests are added.
Commits
-------
c4da2d9 [HttpFoundation] getClientIp is fixed.
This PR was merged into the master branch.
Discussion
----------
[Console] Cleaned up the unit tests.
Cleaned up some unit tests in the Console component as suggested in #6935. I didn't fully cleanup the Application tests to not to delay this PR. I might do it later as a separate one.
| Q | A |
|--------------|--------------------------------|
| Bug fix? | no |
|New feature? | no |
|BC breaks? | no |
|Deprecations? | no |
|Tests pass? | yes |
|Fixed tickets | #6935 |
|License | MIT |
|Doc PR | n/a |
Commits
-------
5ca04b0 [Console] Cleaned up the unit tests.
This PR was squashed before being merged into the master branch (closes#7507).
Discussion
----------
[FrameworkBundle] Enable possibility to run PHP bultin server in production env
See the referenced ticket for discussion;
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7430
| License | MIT
Commits
-------
12fce13 [FrameworkBundle] Enable possibility to run PHP bultin server in production env
This PR was merged into the master branch.
Discussion
----------
[CssSelector] Updated parsers to support namespaces (fix for ClassParser included)
ClassParser was passing improper parameters to `ElementNode`, as well as namespaces simply not being supported in the various parsers. This is a natural extension of #6650, by properly parsing the requested CSS filter if supplied.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
3c015d5 Updated parsers to support namespaces (fix for ClassParser included)
This PR was merged into the master branch.
Discussion
----------
[Security] [Acl] [BasicPermissionMap] Made $map protected and moved it to __construct
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
By making $map protected and moving it to the construct, you can simply extend the BasicPermissionMap class if you want to simply add some extra permissions. In it's current form, you have to copy/paste the entire array AND the getMasks and contains functions.
Commits
-------
1369d54 Made $map protected and moved it to construct.
This PR was merged into the master branch.
Discussion
----------
[2.3] [Security] Add a getter for providers to the ChainUserProvider class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
I've got a use case where I need to check if any of the chained user providers implement a particular interface. This getter would really help with that.
Commits
-------
0a82d73 Add a getter for providers to the ChainUserProvider class
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] Removed unused var
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | I guess
| Fixed tickets | -
Commits
-------
bd26419 [Security] Removed unused var
By making $map protected and moving it to the construct, you can simply extend the BasicPermissionMap class if you want to simply add some extra permissions. In it's current form, you have to copy/paste the entire array AND the getMasks and contains functions.
* 2.2:
Fix finding ACLs from ObjectIdentity's with different types
[HttpKernel] tweaked previous merge
#7531: [HttpKernel][Config] FileLocator adds NULL as global resource path
Fix autocompletion of command names when namespaces conflict
Fix timeout in Process::stop method
fixed CS
Round stream_select fifth argument up.
Fix Process timeout
[HttpKernel] Remove args from 5.3 stack traces to avoid filling log files, fixes#7259
bumped Symfony version to 2.2.2-DEV
updated VERSION for 2.2.1
updated CHANGELOG for 2.2.1
Fixed phpdoc blocks to show that $uri can be passed as a string or ControllerReference (rather than just as a string)
[HttpFoundation] Fixed copy pasted comment from FlashBag in AttributeBag
[FrameworkBundle] fixed the discovery of the PHPUnit configuration file when using aggregate options like in -vc app/ (closes#7562)
[WebProfilerBundle] removed next pointer class in a template
fix overwriting of request's locale if attribute _locale is missing
Conflicts:
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpKernel] fix overwriting of request's locale by LocaleListener if attribute _locale is missing
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7474
| License | MIT
| Doc PR | n.a.
Commits
-------
e8cae94 fix overwriting of request's locale if attribute _locale is missing
This PR was merged into the master branch.
Discussion
----------
[DomCrawler] added support for HTML5 'form' attribute
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7486
| License | MIT
| Doc PR |
Commits
-------
f8178dd [DomCrawler] added support for HTML5 'form' attribute
This PR was squashed before being merged into the master branch (closes#7535).
Discussion
----------
AF_* constants are only available with the sockets extension
Skip test if the extension is not available
Commits
-------
82e550b AF_* constants are only available with the sockets extension
This PR was merged into the 2.2 branch.
Discussion
----------
[Symfony\Bridge\Twig\Extension] fixed two methods' documentation blocks
| Q | A
| ------------- | ---
| Fixed tickets | None
| License | MIT
Fixed phpdoc blocks to show that $uri can be passed as a string or ControllerReference (rather than just as a string)
Commits
-------
2ea5eaa Fixed phpdoc blocks to show that $uri can be passed as a string or ControllerReference (rather than just as a string)
This PR was merged into the 2.1 branch.
Discussion
----------
[2.1][Process] Fix timeout in Process::stop method
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7579
| License | MIT
- The timeout is ten times more than set.
- The timeout does not occurs, it is actually blocking until the process dies.
Commits
-------
bec8ff1 Fix timeout in Process::stop method
This PR was squashed before being merged into the master branch (closes#6368).
Discussion
----------
[2.3] [Console] TableHelper
When building a console application it may be useful to display tabular data.
`TableHelper` can display table header and rows, customizable alignment of columns, cell padding and colors.
Basic usage example:
```php
$table = $app->getHelperSet()->get('table');
$table
->setHeaders(array('ISBN', 'Title', 'Author'))
->setRows(array(
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'),
array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'),
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
))
;
$table->render($output);
```
Output:
![table](https://f.cloud.github.com/assets/208957/14955/6fb4f500-46ca-11e2-8435-0f6b22f96e58.png)
If this PR gets merged I will submit doc PR as well.
I'm sure there is a plenty of room for improvements so any feedback is welcome.
Commits
-------
8de7813 [2.3] [Console] TableHelper
* 2.1:
[HttpFoundation] Fixed copy pasted comment from FlashBag in AttributeBag
[FrameworkBundle] fixed the discovery of the PHPUnit configuration file when using aggregate options like in -vc app/ (closes#7562)
[WebProfilerBundle] removed next pointer class in a template
This allows control over how the session start on demand works
0: no start on demand when bags are accessed
1: start session if bags are accessed
2: no start on demand when bags are accessed but still return bag contents
This PR was merged into the 2.1 branch.
Discussion
----------
[HttpFoundation] Fixed copy pasted comment from FlashBag in AttributeBag
| Q | A
| ------------- | ---
| Bug fix? | [no]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes] I assume : only changed a comment word
| License | MIT
Commits
-------
815eb61 [HttpFoundation] Fixed copy pasted comment from FlashBag in AttributeBag
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] adds possibility to add attributes to hx:include tag
This PR follows #7439 and adds escaping to attributes.
This introduces 2 options to the `HIncludeFragmentRenderer::render()` method:
* `id`: an optional `id` attribute for the `hx:include` tag
* `attrs`: an optional array of attributes for the `hx:include` tag
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7439
Commits
-------
670a502 [HttpKernel] added escaping for hx:include tag attributes
342d089 Allow to set id + custom attributes to hinclude tag
* 2.2: (22 commits)
fixed doc references (closes#7515)
fixed doc references (closes#7515)
On OS X, sys_get_tmp_dir() returns /var/private/..., which really is below /private/var.
Doctrine cannot handle bare random non-utf8 strings
small changes
[SecurityBundle] Fixed configuration exemple
idAsIndex should be true with a smallint or bigint id field.
[PropertyAccess] Remove trailing periods from doc blocks
Fix param docs for PropertyAccessor read method
Fixed long multibyte parameter logging in DbalLogger:startQuery
Keep the file extension in the temporary copy and test that it exists (closes#7482)
bumped Symfony version to 2.1.10-DEV
[Validator][translation][japanese]replaced period to japanese one [Validator][translation][japanese]fixed japanese translation to more practical one [Validator][translation][japanese]fixed message ordering to be consistent with other languages [Validator][translation][japanese]added new validation messages in japanese translation
updated VERSION for 2.1.9
update CONTRIBUTORS for 2.1.9
updated CHANGELOG for 2.1.9
[Security] fixed wrong interface
Remove already defined arguments
Add missing use
[FrameworkBundle] Reuse definition variable in FormPass
...
Conflicts:
src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
* 2.1:
fixed doc references (closes#7515)
small changes
[SecurityBundle] Fixed configuration exemple
idAsIndex should be true with a smallint or bigint id field.
Fixed long multibyte parameter logging in DbalLogger:startQuery
Keep the file extension in the temporary copy and test that it exists (closes#7482)
[Validator][translation][japanese]replaced period to japanese one [Validator][translation][japanese]fixed japanese translation to more practical one [Validator][translation][japanese]fixed message ordering to be consistent with other languages [Validator][translation][japanese]added new validation messages in japanese translation
Conflicts:
src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf
This PR was merged into the 2.1 branch.
Discussion
----------
[Form] [Doctrine] [EntityChoiceList] idAsIndex should be true with a smallint id field.
When the id of an entity is a smallint, $this->idAsIndex should also be true.
It was not the case.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: should
License of the code: MIT
Commits
-------
673fd9b idAsIndex should be true with a smallint or bigint id field.
This PR was merged into the 2.1 branch.
Discussion
----------
[2.1][SecurityBundle] Fixed configuration exemple
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
2c7a99b [SecurityBundle] Fixed configuration exemple
This PR was merged into the 2.2 branch.
Discussion
----------
[Security/Http/RememberMe] PersistentTokenBasedRememberMeServices bugfix
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The database and debug layer cannot handle raw random strings. It may contain invalid ut8 characters and whatnot. So, in order to avoid a lot of database bugs, we must base64_encode the random strings.
Commits
-------
751abe1 Doctrine cannot handle bare random non-utf8 strings
This PR was merged into the 2.1 branch.
Discussion
----------
[Validator] [translation] updated Japanese translation for Validator component
| Q | A
| ------------- | ---
| Fixed tickets | N/A
| License | MIT
I will also update translations for new messages available after 2.2 once this request is merged.
Commits
-------
987aded [Validator][translation][japanese]replaced period to japanese one [Validator][translation][japanese]fixed japanese translation to more practical one [Validator][translation][japanese]fixed message ordering to be consistent with other languages [Validator][translation][japanese]added new validation messages in japanese translation
* 2.1:
bumped Symfony version to 2.1.10-DEV
updated VERSION for 2.1.9
update CONTRIBUTORS for 2.1.9
updated CHANGELOG for 2.1.9
[FrameworkBundle] Reuse definition variable in FormPass
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
[Validator][translation][japanese]fixed japanese translation to more practical one
[Validator][translation][japanese]fixed message ordering to be consistent with other languages
[Validator][translation][japanese]added new validation messages in japanese translation
This PR was merged into the master branch.
Discussion
----------
Improve bytes conversion method
This PR improves bytes conversion `regex` method introduced in #7413 (thanks to @vicb's comments).
* Adds support of `+` prefix.
* Adds support of blank chars between `+`, number and unit.
* Adds support of octal/hexa bases.
Notice that this can not be unit tested for `ServerParams` and `UploadedFile` classes because `ini_set()` function does not work with `post_max_size` and `upload_max_filesize` settings.
For information, this convertion is located in 3 classes:
* `Symfony\Component\Form\Extension\Validator\Util\ServerParams`
* `Symfony\Component\HttpFoundation\File\UploadedFile`
* `Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7413
Commits
-------
21291ca improved bytes conversion method
This PR was merged into the master branch.
Discussion
----------
Console dispatcher
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #3889, #6124
| License | MIT
| Doc PR | symfony/symfony-docs#2352
refs #1884, #1929
This is an alternative implementation for adding events to console applications.
This implementation has the following features:
* Available for anyone using the Console component and it is not tied to
FrameworkBundle (this is important as one thing we are trying to solve is
email sending from a command, and frameworks like Silex using the Console
component needs a solution too);
* Non-intrusive as the current code has not been changed (except for renaming
an internal variable that was wrongly named -- so that's not strictly needed
for this PR)
* The new DispatchableApplication class also works without a dispatcher,
falling back to the regular behavior. That makes easy to create applications
that can benefit from a dispatcher when available, but can still work
otherwise.
* Besides the *before* and *after* events, there is also an *exception* event
that is dispatched whenever an exception is thrown.
* Each event is quite powerful and can manipulate the input, the output, but
also the command to be executed.
Commits
-------
4f9a55a refactored the implementation of how a console application can handle events
4edf29d added helperSet to console event objects
f224102 Added events for CLI commands
The getClientIp now returns ip of the earliest server in a proxy chain when all the servers in the chain are trusted proxies. Before this patch the getClientIp used to return null at such condition.
Some appropriate tests are added.
This PR was merged into the master branch.
Discussion
----------
[Console] added a way to normalize a command display when using the tester
| 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
-------
afd7d05 [Console] added a way to normalize a command display when using the tester
This adds an init and terminate event for commands. They are
dispatched from ContainerAwareCommand.
The cache:clear command can't implement this (cf. #3889 on Github).
This PR was merged into the master branch.
Discussion
----------
[2.3] [FrameworkBundle] [Serializer] Loads the Serializer component as a service in the Framework Bundle
This PR is the same as
https://github.com/symfony/symfony/pull/5347
but since I am struggling to squash all the commits I better create a new one. Sorry for the inconveniences, :)
Commits
-------
b4e4844 Add the serializer service
This PR was merged into the master branch.
Discussion
----------
[Security] Return 401 when using use_forward for form authentication
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
- [x] document the BC breaks in UPDATE and CHANGELOG
Currently, unauthenticated requests gets handled as exceptions and forwarded to the FormAuthenticationEntryPoint::start. When using use_forward = true, this method does not modify the status code, which means that final response to the end user will use a 500 status code. This is not right, as there is not a server problem, the problem is that the user is not authenticated. The status code should be 401.
This PR checks if the sub request to the form view is successful, and sets an X-Status-Code header if it is.This might break applications that rely on the 500 error code being returned for unauthenticated requests.
Commits
-------
b5597e8 [Security] Return 401 when using use_forward for form authentication
This PR was merged into the master branch.
Discussion
----------
[2.3] [FrameworkBundle] [Templating] added Stopwatch support to the PHP engine
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I did not include tests nor documentation because there weren't any for TimedTwigEngine (I took it as an example). If I'm mistaken and they are needed, I'll gladly write them.
Commits
-------
3c3d34d [FrameworkBundle] [Templating] added Stopwatch support to the PHP engine
This PR was merged into the master branch.
Discussion
----------
[2.2] [Security] Add an option to disable the hasPreviousSession() check in AbstractAuthenticationListener
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/adrienbrault/symfony.png?branch=security-feature)](http://travis-ci.org/adrienbrault/symfony)
Fixes the following tickets: #3703
Todo: Add this option to the symfony doc security configuration reference
License of the code: MIT
Documentation PR: N/A
As stated in #3703, all authentication listeners that inherit from AbstractAuthenticationListener, only work when a previous session has been created.
This PR allows to change the default behavior in the security.yml file.
Example:
```yml
security:
firewalls:
secured_area:
pattern: ^/demo/secured/
form_login:
check_path: /demo/secured/login_check
login_path: /demo/secured/login
require_previous_session: false # The default value is true
logout:
path: /demo/secured/logout
target: /demo/
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"
```
PS: While removing my old commit, it closed the #4774 PR ...
Commits
-------
0562463 [Security] Add an option to disable the hasPreviousSession() check in AbstractAuthenticationListener
This PR was merged into the master branch.
Discussion
----------
[2.3] [WIP] Synchronized services...
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5300, #6756
| License | MIT
| Doc PR | symfony/symfony-docs#2343
Todo:
- [x] update documentation
- [x] find a better name than contagious (synchronized)?
refs #6932, refs #5012
This PR is a proof of concept that tries to find a solution for some problems we have with scopes and services depending on scoped services (mostly the request service in Symfony).
Basically, whenever you want to inject the Request into a service, you have two possibilities:
* put your own service into the request scope (a new service will be created whenever a sub-request is run, and the service is not available outside the request scope);
* set the request service reference as non-strict (your service is always available but the request you have depends on when the service is created the first time).
This PR addresses this issue by allowing to use the second option but you service still always has the right Request service (see below for a longer explanation on how it works).
There is another issue that this PR fixes: edge cases and weird behaviors. There are several bug reports about some weird behaviors, and most of the time, this is related to the sub-requests. That's because the Request is injected into several Symfony objects without being updated correctly when leaving the request scope. Let me explain that: when a listener for instance needs the Request object, it can listen to the `kernel.request` event and store the request somewhere. So, whenever you enter a sub-request, the listener will get the new one. But when the sub-request ends, the listener has no way to know that it needs to reset the request to the master one. In practice, that's not really an issue, but let me show you an example of this issue in practice:
* You have a controller that is called with the English locale;
* The controller (probably via a template) renders a sub-request that uses the French locale;
* After the rendering, and from the controller, you try to generate a URL. Which locale the router will use? Yes, the French locale, which is wrong.
To fix these issues, this PR introduces a new notion in the DIC: synchronized services. When a service is marked as synchronized, all method calls involving this service will be called each time this service is set. When in a scope, methods are also called to restore the previous version of the service when the scope leaves.
If you have a look at the router or the locale listener, you will see that there is now a `setRequest` method that will called whenever the request service changes (because the `Container::set()` method is called or because the service is changed by a scope change).
Commits
-------
17269e1 [DependencyInjection] fixed management of scoped services with an invalid behavior set to null
bb83b3e [HttpKernel] added a safeguard for when a fragment is rendered outside the context of a master request
5d7b835 [FrameworkBundle] added some functional tests
ff9d688 fixed Request management for FragmentHandler
1b98ad3 fixed Request management for LocaleListener
a7b2b7e fixed Request management for RequestListener
0892135 [HttpKernel] ensured that the Request is null when outside of the Request scope
2ffcfb9 [FrameworkBundle] made the Request service synchronized
ec1e7ca [DependencyInjection] added a way to automatically update scoped services
This PR was merged into the master branch.
Discussion
----------
moved the request scope creation to the ContainerAwareHttpKernel class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#2343
While updating the scope documentation, I realized that the request scope was created in the FrameworkBundle while the HttpKernel that manages it was in the HttpKernel component. So, this PR makes things more consistent.
Commits
-------
cec98c1 [DependencyInjection] fixed PHP notice when the scope is not defined
550df5a moved the request scope creation to the ContainerAwareHttpKernel class
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
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()
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
* 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
This PR was merged into the master branch.
Discussion
----------
[2.3] Add missing WinCacheClassLoader
Commits
-------
af86e5b Add missing WinCacheClassLoader
* 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
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
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 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
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
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
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!
This change allows any service to depend on the Request (via a method
call) and always have the right Request instance without the need for
the service to be in the request scope (you still need to set the
Request reference as non-strict).
A service can now be marked as synchronized; when set, all method calls
involving this service will be called each time this service is set.
When in a scope, methods are also called to restore the previous version of the
service.
* 2.2: (70 commits)
change wrapped exception message to be more usefull
updated VERSION for 2.0.23
update CONTRIBUTORS for 2.0.23
updated CHANGELOG for 2.0.23
[Form] fixed failing test
[DomCrawler] added support for query string with slash
Fixed invalid file path for hiddeninput.exe on Windows.
fix xsd definition for strict-requirements
[WebProfilerBundle] Fixed the toolbar styles to apply them in IE8
[ClassLoader] fixed heredocs handling
fixed handling of heredocs
Add a public modifier to an interface method
removing xdebug extension
[HttpRequest] fixes Request::getLanguages() bug
[HttpCache] added a test (cached content should be kept after purging)
[DoctrineBridge] Fixed non-utf-8 recognition
[Security] fixed HttpUtils class tests
replaced new occurences of 'Request::create()' with '::create()'
changed sub-requests creation to '::create()'
fixed merge issue
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig
src/Symfony/Component/DomCrawler/Link.php
src/Symfony/Component/Translation/Translator.php
* 2.1:
updated VERSION for 2.0.23
update CONTRIBUTORS for 2.0.23
updated CHANGELOG for 2.0.23
[Form] fixed failing test
[DomCrawler] added support for query string with slash
This PR was merged into the master branch.
Commits
-------
3674c22 changed bytes conversion method
Discussion
----------
Changed bytes conversion method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
**The old way:**
```php
switch (strtolower(substr($memory, -1))) {
case 'g':
$memory *= 1024;
case 'm':
$memory *= 1024;
case 'k':
$memory *= 1024;
}
```
**The new way:**
```php
if (preg_match('#^(\d+)([bkmgt])#i', $memory, $match)) {
$shift = array('b' => 0, 'k' => 10, 'm' => 20, 'g' => 30, 't' => 40);
$memory = ($match[1] * (1 << $shift[strtolower($match[2])]));
}
```
---------------------------------------------------------------------------
by bendavies at 2013-03-18T16:27:52Z
pretty unreadable, no?
---------------------------------------------------------------------------
by benja-M-1 at 2013-03-18T16:29:25Z
I agree, I would not like to have to debug it.
---------------------------------------------------------------------------
by pborreli at 2013-03-18T16:31:43Z
just for my culture, what does : `1 << $var` ?
---------------------------------------------------------------------------
by bendavies at 2013-03-18T16:33:23Z
@pborreli it's a left shift http://php.net/manual/en/language.operators.bitwise.php
---------------------------------------------------------------------------
by jfsimon at 2013-03-18T16:47:15Z
@bendavies @benja-M-1 it's concise and easily recognised (if you understood it the first time).
FYI I didn't find it myself... pretty clever isn't it?
---------------------------------------------------------------------------
by benja-M-1 at 2013-03-18T16:50:53Z
Clearly too much clever for me :)
And what about moving this code in its own class to avoid the copy/paste?
---------------------------------------------------------------------------
by jfsimon at 2013-03-18T16:52:51Z
@benja-M-1 It would add a dependency to the components using it :(
---------------------------------------------------------------------------
by bendavies at 2013-03-18T16:55:26Z
@jfsimon clever indeed, but not necessarily better!
---------------------------------------------------------------------------
by jfsimon at 2013-03-18T16:57:18Z
@bendavies that's true.
---------------------------------------------------------------------------
by Tobion at 2013-03-18T17:00:56Z
There are other places where it could be used too (e.g. FileValidator).
---------------------------------------------------------------------------
by bendavies at 2013-03-18T17:06:01Z
on the other side of the argument, i *hate* the sneaky fall through on the switch statement.
very confusing the first time you see it!
---------------------------------------------------------------------------
by bendavies at 2013-03-18T17:19:42Z
this method has already made it into symfony here: https://github.com/symfony/symfony/pull/7395
---------------------------------------------------------------------------
by jfsimon at 2013-03-19T08:16:19Z
@Tobion I have some questions about the `FileValidator`:
* Why is th `k` in lower case and the `M` in upper case?
* Why is the size divided by 1000 and not 1024?
---------------------------------------------------------------------------
by Tobion at 2013-03-19T08:30:23Z
I was wondering the same. I guess this config (which is also displayed to users) uses the official metric prefixes (k = kilo, M = mega). So it's not about the computer terms where 1 KB = 1024 byte.
---------------------------------------------------------------------------
by vicb at 2013-03-19T16:03:21Z
kB =1000, kiB=1024.
Imo regexps should be case insensitive and account for the "i".
I am not in favor of the changes in this pr (the current way is also documented on php.net fwiw)
This PR was merged into the 2.1 branch.
Commits
-------
e6b7515 [DomCrawler] added support for query string with slash
Discussion
----------
[DomCrawler] added support for query string with slash
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Link\getUri() failed to return correct uri when current query string contains slash
Test pass on branch 2.1 but fails on master
This PR was merged into the 2.2 branch.
Commits
-------
633c051 Fixed invalid file path for hiddeninput.exe on Windows.
Discussion
----------
[2.2] [Console] Fix "The system cannot find the path specified." on Windows for askHiddenResponse().
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none available
| License | MIT
| Doc PR | n/a
* 2.1:
Add a public modifier to an interface method
[HttpRequest] fixes Request::getLanguages() bug
[HttpCache] added a test (cached content should be kept after purging)
[DoctrineBridge] Fixed non-utf-8 recognition
[Security] fixed HttpUtils class tests
This PR was merged into the 2.1 branch.
Commits
-------
54609b9 [HttpCache] added a test (cached content should be kept after purging)
Discussion
----------
[HttpCache] added a test (cached content should be kept after purging)
closes#6830
This PR was merged into the master branch.
Commits
-------
a011842 [HttpKernel] fixed memory collector
def2ccb Add PHP memory_limit to WDT
Discussion
----------
[HttpKernel] fixed memory collector
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7037
---------------------------------------------------------------------------
by vicb at 2013-03-15T20:21:55Z
OT, that's great to see many contributions for you @jfsimon, thanks !
---------------------------------------------------------------------------
by jfsimon at 2013-03-18T09:35:54Z
Thanks @vicb, this is so lovely :)
This PR was merged into the master branch.
Commits
-------
ed58e36 [HttpKernel] CLI - don't always display errors
Discussion
----------
[HttpKernel] CLI - don't always display errors
I had closed#6370 by mistake when cleaning up my branches.
---------------------------------------------------------------------------
by sstok at 2013-02-13T15:13:16Z
👍
This PR was merged into the 2.2 branch.
Commits
-------
0992032 [Translator] fix metadata
3b71000 [Translator] fix typecast in transChoice
88f98c9 [Translator] optimized adding of resources and saving a call to array_unique
e88bf7b [Translator] fix phpdoc of MessageCatalogueInterface::add and ::replace
c97ee8d [Translator] mention that the message id may also be an object that can be cast to string in TranslatorInterface and fix the IdentityTranslator that did not respect this
5a36b2d [Translator] fix MessageCatalogueInterface::getFallbackCatalogue that can return null
d1c34e8 [Translator] coding style
Discussion
----------
[Translator] several fixes and refactorings
Reasoning see individual commits.
BC break: no <del>yes because I added an array typehint to `MessageCatalogueInterface::add` and `::replace` since it's required. I could remove the typhint again so there would be no bc break, but IMO having it is much more explicit and consistent as there are already other array typhints as in the constructor.</del>
---------------------------------------------------------------------------
by Tobion at 2013-02-14T09:36:35Z
@fabpot removed typehint and code movement. Added 2 more commits.
---------------------------------------------------------------------------
by Tobion at 2013-03-04T16:14:37Z
@fabpot ping
This PR was merged into the master branch.
Commits
-------
b6a5457 [Validator] Fixed member (getter/property) metadata readers. [Validator] added overridden getter metadata test [Validator] class member reflection build requires object instance [Validator] fixed error [Validation] fixed member metadata reflection cache [Validation] added property metedata test [Validation] fixed class/member metadata mapping [Validation] removed var_dump
9b6cd80 Update src/Symfony/Component/Validator/Mapping/GetterMetadata.php
Discussion
----------
[Validator] Use concrete Class Methods to check validations
This PR just adds a test to #7069.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7069
---------------------------------------------------------------------------
by vicb at 2013-03-05T18:21:02Z
@jfsimon Do you have a response about my comment in the original PR ?
At least we now have a BC break (ie new is no more called).
---------------------------------------------------------------------------
by jfsimon at 2013-03-05T18:30:43Z
@vicb I didn't saw it. I update the description.
---------------------------------------------------------------------------
by vicb at 2013-03-05T18:34:01Z
np, do you have a reply ?
_BCB = yes should trigger a note in the changelog_
---------------------------------------------------------------------------
by jfsimon at 2013-03-05T18:51:15Z
@vicb a response about the `newReflectionMember` method update?
---------------------------------------------------------------------------
by vicb at 2013-03-05T19:08:54Z
Yep
"Jean-François Simon" <notifications@github.com> wrote:
>@vicb a response about the `newReflectionMember` method update?
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/symfony/symfony/pull/7271#issuecomment-14457748
---------------------------------------------------------------------------
by Gladhon at 2013-03-06T08:04:38Z
@vicb
newReflectionMember is a Method that comes from the parent and has no argument "object". So it can only get the reflection Member of the configured class, while we need once (in this special case) need the method of the concrete class.
---------------------------------------------------------------------------
by jfsimon at 2013-03-06T08:29:11Z
@vicb @Gladhon correct me if I'm wrong.
This method is only used to check the member scope. In the case of a getter, this scope is always public (`method_exists` returns true only if method is visible, then is this case public, isn'it?), so the `isPublic`, `isProtected` and `isPrivate` methods can be safely overriden. Am I right?
---------------------------------------------------------------------------
by Gladhon at 2013-03-06T08:43:54Z
Yes i am in agreement with that.
But I just think about to change the getPropertyValue also in PropertyMetadata. Can that make sense in any case ?
---------------------------------------------------------------------------
by vicb at 2013-03-06T08:56:21Z
@jfsimon `method_exists` returns `true` when the method exists, whatever its visibility.
My question is whether it would make sense to change the signature of `newReflectionMember` to accept an objet ?
That would be a BC break but the implementation proposed here is also a BC break (`newReflectionMember` which was called from `getReflectionMember` is no more called with this PR - it could have been overriden by a dev)
Finally `PropertyMetadata` should probably be updated in the same way.
---------------------------------------------------------------------------
by vicb at 2013-03-06T08:57:33Z
_and fyi you can both work on the same PR, ie @Gladhon you can send some changes (a PR) to the repo of @jfsimon_
---------------------------------------------------------------------------
by Gladhon at 2013-03-06T10:22:07Z
Well, i like it how it is now. Cause if we change that, you also need to have a object if calling "isPublic". For me it makes more sence to have only the object parameter if its realy needed.
Where do you see a real benefit if we change the `newReflectionMember` instead ?
---------------------------------------------------------------------------
by jfsimon at 2013-03-07T13:43:43Z
@vicb I think passing object instance to `getReflectionMember` is **required** for consistency.
I just pushed it.
This PR was squashed before being merged into the 2.1 branch (closes#7378).
Commits
-------
17dc2ff [HttpRequest] fixes Request::getLanguages() bug
Discussion
----------
[HttpRequest] fixes Request::getLanguages() bug
This PR adds to suported languages the first segment of all compouds languages codes.
When receiving `Accept-Language: en-us` header, accepted languages will now be `en, en_US`.
This should not be a BC break as most browsers already send the long **and** short versions of language codes... but some dont.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6928
This PR was merged into the 2.1 branch.
Commits
-------
bd38483 [Security] fixed HttpUtils class tests
Discussion
----------
[Security] fixed HttpUtils class tests
This fixes tests broken in #7325.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7325
* 2.1:
sub-requests are now created with the same class as their parent
[FrameworkBundle] removed BC break
[FrameworkBundle] changed temp kernel name in cache:clear
[DoctrineBridge] Avoids blob values to be logged by doctrine
[Security] use current request attributes to generate redirect url?
[Validator] fix showing wrong max file size for upload errors
[TwigBridge] removed double var initialization (refs #7344)
[2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
[FrameworkBundle] fixed cahe:clear command's warmup
[TwigBridge] now enter/leave scope on Twig_Node_Module
[TwigBridge] fixed fixed scope & trans_default_domain node visitor
[TwigBridge] fixed non probant tests & added new one
[BrowserKit] added ability to ignored malformed set-cookie header
[Translation] removed wriong 'use'
[Translation] added xliff loader/dumper with resname support
[TwigBridge] fixes
Conflicts:
src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
src/Symfony/Component/Security/Http/HttpUtils.php
src/Symfony/Component/Translation/Loader/XliffFileLoader.php
src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
This PR was merged into the 2.2 branch.
Commits
-------
602cdee replace INF to PHP_INT_MAX inside Finder component.
Discussion
----------
[2.2][Finder] fix assets:install issue
I have some bundle with assets, and when i do.
```
app/console assets:install --env=prod
```
I don't have any of my file inside web/bundles, only empty first level directory like "css"
bug issue introduced by 7c66dffa6b
---------------------------------------------------------------------------
by fabpot at 2013-03-13T13:34:10Z
Can you base your patch on the 2.1 branch as the bug is also there? Thanks.
---------------------------------------------------------------------------
by BenoitLeveque at 2013-03-13T14:29:55Z
i didn't reproduce this issue on the latest commit (175cdc0fd0) on 2.1 branch
---------------------------------------------------------------------------
by taylorotwell at 2013-03-13T14:35:28Z
Yeah, it appears the Finder component's recursion is basically broken on the 2.2 branch.
---------------------------------------------------------------------------
by BenoitLeveque at 2013-03-14T13:24:52Z
@fabpot i can't reproduce this issue on the 2.1 branch because you already fix it, see 7241be9b64
This PR was squashed before being merged into the 2.2 branch (closes#7365).
Commits
-------
d9ee869 [HttpKernel] Updated TraceableEventDispatcher.php
Discussion
----------
[HttpKernel] Updated TraceableEventDispatcher.php
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Currently, if no listeners are registered for an dispatched event, the StopwatchEvent "$eventName.'.loading'" is never being stopped.
This PR was merged into the master branch.
Commits
-------
cce3a6b [HttpKernel] Collect data if the controller is a Closure
Discussion
----------
[HttpKernel] RequestDataCollector: collect data if the controller is a Closure
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Use the same format as object methods to describe closures and collect the file and the line where it's been declared.
Currently, the `file` and `line` parameters are not shown by the webprofiler, but they could be useful to find a closure.
This PR was merged into the 2.1 branch.
Commits
-------
f2ef6bc [FrameworkBundle] removed BC break
cc3a40e [FrameworkBundle] changed temp kernel name in cache:clear
7d87ecd [FrameworkBundle] fixed cahe:clear command's warmup
Discussion
----------
[FrameworkBundle] fixes cahe:clear command's warmup
Solution taken is to replace the last char of the cache directory name to create a temporary cache directory, this way the temporary cache path has the same length than the real one. I tested this on several projects, in dev and prod environments.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6203
---------------------------------------------------------------------------
by jfsimon at 2013-03-13T12:32:25Z
@toloco @gergelypolonkai @ghost-x47 @stewe it would be great if you could test this patch on your projects and report result!
---------------------------------------------------------------------------
by toloco at 2013-03-13T12:41:47Z
Im sorry but have the same...
Notice: unserialize(): Error at offset 155 of 174227 bytes in /home/tolopalmer/Projects/shareandcoach/app/bootstrap.php.cache line 915
---------------------------------------------------------------------------
by jfsimon at 2013-03-13T12:45:04Z
@toloco could you paste the backtrace in a gist? and maybe the concerned file?
---------------------------------------------------------------------------
by stof at 2013-03-13T13:11:47Z
@jfsimon You probably have the same issue with the name of the temporary kernel class
---------------------------------------------------------------------------
by jfsimon at 2013-03-13T13:36:13Z
@stof if you're right, it's a nightmare. It must be possible to write a parser/fixer for serialized objects, don't you think?
---------------------------------------------------------------------------
by toloco at 2013-03-13T14:22:56Z
Here you are the gist with the stack and the bootstrap.php.cache file
https://gist.github.com/toloco/5152581
---------------------------------------------------------------------------
by mpdude at 2013-03-13T20:08:08Z
@jfsimon Writing such a parser is painting yourself in the corner.
Use a temp kernel class name of the same length as a quick fix.
#7230 could bring a solution because we might be able to inject a different ConfigCache factory during the command that intercepts and substitutes Resources before they get written into the meta file. Not sure if that PR has a chance of being picked though.
---------------------------------------------------------------------------
by toloco at 2013-03-14T08:19:58Z
So guys? we are blocked with this problem, can I help you? I can provide more stacks if it's needed
---------------------------------------------------------------------------
by mpdude at 2013-03-14T10:05:05Z
@toloco Could you please post the /home/tolopalmer/Projects/shareandcoach/app/cache/dev/appDevUrlMatcher.php.meta file? That's the one that is broken.
---------------------------------------------------------------------------
by jfsimon at 2013-03-14T10:15:20Z
@mpdude you can find its content in the gist https://gist.github.com/toloco/5152581 (1st file, 6th line)
---------------------------------------------------------------------------
by mpdude at 2013-03-14T10:24:55Z
@toloco That file should contain a serialized set of Resources, it's not in the Gist.
---------------------------------------------------------------------------
by jfsimon at 2013-03-14T10:33:12Z
@mpdude it's more visible in the raw file: ttps://gist.github.com/toloco/5152581/raw/48a1a823b5c8e6ba03936a52e8dc0d0ff1888f8a/Error+
---------------------------------------------------------------------------
by jfsimon at 2013-03-14T10:33:27Z
sorry: 48a1a823b5/Error+
---------------------------------------------------------------------------
by toloco at 2013-03-14T10:37:09Z
https://gist.github.com/toloco/5160317 here you are the appDevUrlMatcher.php and meta
---------------------------------------------------------------------------
by jfsimon at 2013-03-14T10:51:46Z
@toloco I applied @mpdude's solution (have a temp kernel class name of the same length than the real one).
Could you test it to see if it fixes your problem?
---------------------------------------------------------------------------
by mpdude at 2013-03-14T10:58:46Z
@jfsimon Thanks!
@toloco If Jean-François' fix does not work, please make sure that the .meta file you posted was the broken one? I was able to unserialize it without problems.
---------------------------------------------------------------------------
by toloco at 2013-03-14T11:02:09Z
Man!!!! you are the fucking boss it works!!
---------------------------------------------------------------------------
by mpdude at 2013-03-14T11:04:30Z
@jfsimon you just made someone happy.
---------------------------------------------------------------------------
by jfsimon at 2013-03-14T11:12:39Z
@toloco @mpdude \o/
Use the same format as object methods to describe closures and collect
the file and the line where it's been declared.
These informations should be added in the views of the webprofiler.
This PR was squashed before being merged into the 2.1 branch (closes#7297).
Commits
-------
ef53456 [DoctrineBridge] Avoids blob values to be logged by doctrine
Discussion
----------
[DoctrineBridge] Avoids blob values to be logged by doctrine
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7012
---------------------------------------------------------------------------
by pborreli at 2013-03-07T17:07:23Z
what about clob ?
---------------------------------------------------------------------------
by jfsimon at 2013-03-07T17:10:45Z
@pborreli do you think clob values shouldn't be logged?
---------------------------------------------------------------------------
by pborreli at 2013-03-07T17:26:27Z
well they can have same size than blob
---------------------------------------------------------------------------
by beberlei at 2013-03-07T18:07:15Z
I agree, skipping clobs as well would be WIN :-)
---------------------------------------------------------------------------
by francisbesset at 2013-03-08T08:44:08Z
Where are the tests?
---------------------------------------------------------------------------
by beberlei at 2013-03-08T09:25:20Z
Ah yes, the DbalLogger has a testsuite, can you extend it to show this behavior works?
---------------------------------------------------------------------------
by jfsimon at 2013-03-08T10:28:53Z
@francisbesset @beberlei tests written.
---------------------------------------------------------------------------
by staabm at 2013-03-10T16:00:55Z
May I also ask for text/char fields with a certain amount of chars?
This PR was squashed before being merged into the 2.1 branch (closes#7325).
Commits
-------
6575df6 [Security] use current request attributes to generate redirect url?
Discussion
----------
[Security] use current request attributes to generate redirect url?
Maybe we should consider to use current request attributes to generate the login/logout redirections URL?
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5080
---------------------------------------------------------------------------
by Seldaek at 2013-03-11T08:33:37Z
Can you explain why?
---------------------------------------------------------------------------
by jfsimon at 2013-03-11T09:30:07Z
@Seldaek let say I prefixed all my URLs with a `{domain}` var (`_locale` for instance), I'd like it to be passed to my redirected request. I guess it could lead to side effects, that's why I tagged this PR `RFC`.
---------------------------------------------------------------------------
by Seldaek at 2013-03-11T09:46:33Z
Fair enough. The main issue I see is that you end up with "garbage" query params in the URL. Any params that was needed by the previous page and not needed by the new one ends up as ?foo=bar in the URL. It's usually not harmful, but not very clean either. I'm not sure what it would take to grab all the params that a route can use, and only copy those over.
---------------------------------------------------------------------------
by jfsimon at 2013-03-11T10:12:49Z
@Seldaek indeed, I didn't think about those query parameters... I'll try to fix this in a simple way this afternoon.
---------------------------------------------------------------------------
by jfsimon at 2013-03-11T14:54:31Z
@Seldaek tell me if what you think of this, it may look like a hack (which wont be acceptable).
---------------------------------------------------------------------------
by Seldaek at 2013-03-11T14:59:39Z
Eh I see. I can't say it's the less hacky thing I ever saw, but it might be alright. I don't think I'm the best person to take this call though.. Let's see what @fabpot thinks.
This PR was merged into the 2.1 branch.
Commits
-------
7216cb0 [Validator] fix showing wrong max file size for upload errors
Discussion
----------
[Validator] fix showing wrong max file size for upload errors
this was because the maxSize option wasn't parsed correctly and simple string comparision could lead to wrong results, e.g. 200 > 1000M
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes|]
| Fixed tickets | [#6441,#5551]
| License | MIT
Will apply cleanly to 2.2
This PR was squashed before being merged into the 2.1 branch (closes#7344).
Commits
-------
c423f16 [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
Discussion
----------
[2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7342
| License | MIT
| Doc PR | --
---------------------------------------------------------------------------
by stof at 2013-03-12T13:28:15Z
Can you add a test to avoid regressions ?
---------------------------------------------------------------------------
by benbender at 2013-03-12T13:54:02Z
Done
---------------------------------------------------------------------------
by stevelacey at 2013-03-12T14:40:59Z
Looks good to me?
---------------------------------------------------------------------------
by pborreli at 2013-03-12T16:04:27Z
👍
This PR was merged into the 2.1 branch.
Commits
-------
5ad4bd1 [TwigBridge] now enter/leave scope on Twig_Node_Module
fe4cc24 [TwigBridge] fixed fixed scope & trans_default_domain node visitor
c5e999a [TwigBridge] fixed non probant tests & added new one
Discussion
----------
[TwigBundle] fixes errors with the default domain node visitor & scope
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7281
---------------------------------------------------------------------------
by Julien-Webgenery at 2013-03-12T16:35:58Z
👍
---------------------------------------------------------------------------
by lennerd at 2013-03-12T16:38:40Z
👍
---------------------------------------------------------------------------
by rc2c at 2013-03-12T16:53:04Z
👍
This PR was squashed before being merged into the 2.1 branch (closes#7304).
Commits
-------
5bc30bb [Translation] added xliff loader/dumper with resname support
Discussion
----------
[Translation] added xliff loader/dumper with resname support
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5940
---------------------------------------------------------------------------
by jfsimon at 2013-03-08T15:49:18Z
@Tobion what do you think of `XliffFileWithResnameDumper` and `XliffFileWithResnameLoader`?
---------------------------------------------------------------------------
by robinduval at 2013-03-08T15:49:58Z
💯 great idea !
---------------------------------------------------------------------------
by lizjulien at 2013-03-08T15:51:45Z
🌟 better.
---------------------------------------------------------------------------
by saro0h at 2013-03-08T15:52:50Z
👍 Can't be worse than the previous one
---------------------------------------------------------------------------
by dxb at 2013-03-08T16:00:32Z
+1
---------------------------------------------------------------------------
by Tobion at 2013-03-08T16:07:59Z
@jfsimon yes the name make sense. It is not possible to add this feature without BC break?
And if not, why not simply add an option/enable method to the existing classes. Having new classes for this seems awkward to me.
---------------------------------------------------------------------------
by jfsimon at 2013-03-08T16:17:44Z
@Tobion I totaly agree with you, but this has been discussed in #5940.
Does the presence of the `resname` attribute in the `trans-unit` tags represent a BC break?
Would opening another PR with this solution be a good idea?
---------------------------------------------------------------------------
by stof at 2013-03-08T17:01:00Z
Your XliffFileWithResnameLoader is able to load all files supported by XliffFileLoader so IMO you don't need to add a new class.
---------------------------------------------------------------------------
by jfsimon at 2013-03-08T18:21:32Z
@stof would the `resname` attribute addition in the dumped XLIFF be considered as a BC break?
---------------------------------------------------------------------------
by jfsimon at 2013-03-09T13:16:32Z
@stof done.
@mvrhov done.
This PR was squashed before being merged into the 2.1 branch (closes#7281).
Commits
-------
e3547c6 [TwigBridge] fixes
Discussion
----------
[TwigBridge] fixes `TranslationDefaultDomainNodeVisitor`
... by adding scope management.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6747
---------------------------------------------------------------------------
by vicb at 2013-03-06T15:14:57Z
Are `open` and `close` good names ? I would prefer `addChild` and `getParent` as there is nothing that is really opened or closed ?
Edit: by looking at the code a second time, I think open & close make sense .
---------------------------------------------------------------------------
by jfsimon at 2013-03-07T13:46:13Z
@vicb I know this is not consistent with the rest of the framework.
I dont think @fabpot will like them.
---------------------------------------------------------------------------
by stof at 2013-03-07T13:53:14Z
what about enter and leave ? It would be consistent with the naming used for scopes in the DI component
---------------------------------------------------------------------------
by vicb at 2013-03-07T13:59:35Z
@stof I like your proposal. My main concern being "leave" (former "close"), @jfsimon could you throw when a scope is used after it has been left ?
---------------------------------------------------------------------------
by jfsimon at 2013-03-07T14:01:56Z
go for enter/leave, but why throwing an exception on using a leaved scope?
---------------------------------------------------------------------------
by vicb at 2013-03-07T14:05:22Z
because if you have a ref to a left scope, you can still use it which is bad
This PR was squashed before being merged into the 2.2 branch (closes#7321).
Commits
-------
4f3771d [2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
Discussion
----------
[2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/7309
---------------------------------------------------------------------------
by Aitboudad at 2013-03-10T11:38:59Z
Hi @fabpot,
can you see why all commits has failed on Travis ?
---------------------------------------------------------------------------
by henrikbjorn at 2013-03-10T11:42:25Z
The test expects the option to be called `renderer` and not `strategy` so you need to change the tests.
---------------------------------------------------------------------------
by Aitboudad at 2013-03-10T12:19:19Z
@henrikbjorn thanks it's ok, but there is still 1 test :( in Symfony\Component\Form\Tests\Extension\Core\Type\TimeTypeTest::testSetDataDifferentTimezones
@bschussek Can you see why :).
* 2.1:
[FrameworkBundle] Fix code status in dockblock
Fixed test to use Reflection
[Finder] fixed a potential issue on Solaris where INF value is wrong (refs #7269)
Update RouteCompiler.php
[FrameworkBundle] avoids cache:clear to break if new/old folders already exist
[HttpKernel] Fixed possible profiler token collision (closes#7272, closes#7171)
[ClassLoader] tweaked test
[ClassLoader] made DebugClassLoader idempotent
[DomCrawler] Fix relative path handling in links
Conflicts:
src/Symfony/Component/DomCrawler/Link.php
src/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php
src/Symfony/Component/Routing/RouteCompiler.php
This PR was merged into the 2.1 branch.
Commits
-------
27cc0df Merge pull request #1 from merk/class-loader/idempotent
95af84c Fixed test to use Reflection
bb08247 [ClassLoader] tweaked test
73bead7 [ClassLoader] made DebugClassLoader idempotent
Discussion
----------
[ClassLoader] made DebugClassLoader idempotent
The DebugClassLoader will wrap itself if `enable()` is called multiple time, such as when running functional tests.
Please merge to 2.2 and master ASAP.
| 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-03-07T16:38:55Z
ping @fabpot: this will speed up lots of functional tests :)
---------------------------------------------------------------------------
by kriswallsmith at 2013-03-08T04:51:51Z
@fabpot fixed by @merk
This PR was squashed before being merged into the master branch (closes#7202).
Commits
-------
817453c [2.2] add http_method_override option to ease setup
Discussion
----------
[2.2] add http_method_override option to ease setup
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR was merged into the 2.2 branch.
Commits
-------
a59e5e4 [Finder] Unified tests
Discussion
----------
[Finder] Unified tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Tests for `Finder` are very difficult to read because they contain calls to:
sys_get_temp_dir() . '/symfony2_finder/'
This improved version simplifies adding and removing new dirs and files.
This PR was merged into the 2.2 branch.
Commits
-------
54c333d [Routing] unify and fix the loader tests
41ad9d8 [Routing] make xml loader more tolerant
Discussion
----------
[Routing] make xml loader more tolerant
schemes and methods may also be delimited by whitespace, comma or pipe.
Fixes https://github.com/symfony/symfony/pull/6049#issuecomment-11315698
this eases migration as now `methods="GET|POST"` also works
the second commit unifies the tests and fixes some strange assertions that were useless
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [yes but not really]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| License | MIT
This PR was merged into the 2.1 branch.
Commits
-------
a4ec677 [DomCrawler] Fix relative path handling in links
Discussion
----------
[2.1][DomCrawler] Fix relative path handling in links
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7219
| License | MIT
| Doc PR | n/a
Added relative path canonicalization according to RFC 3986, section 5.2.4
---------------------------------------------------------------------------
by vicb at 2013-03-02T14:48:46Z
@fabpot seems like 2.1 as a deps issue if you look at travis logs
This PR was squashed before being merged into the 2.1 branch (closes#7260).
Commits
-------
1d3da29 [FrameworkBundle] avoids cache:clear to break if new/old folders already exist
Discussion
----------
[FrameworkBundle] avoids cache:clear to break if new/old folders already exist
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6502
---------------------------------------------------------------------------
by mahmouds at 2013-03-04T19:07:20Z
👍
This PR was squashed before being merged into the master branch (closes#6846).
Commits
-------
9024c07 [2.3] [DI] Improve the generated PHPDoc of the dumped PHP container
Discussion
----------
[2.3] [DI] Improve the generated PHPDoc of the dumped PHP container
By adding "@throws InactiveScopeException" where applicable
---------------------------------------------------------------------------
by vicb at 2013-01-23T11:51:11Z
thanks @stof
> Native types should be lowercase
Never say that to @fabpot :)
---------------------------------------------------------------------------
by stof at 2013-01-23T12:10:56Z
@vicb he has an exception for ``Boolean`` (and explained why) but the reason cannot be applied to ``object``
---------------------------------------------------------------------------
by vicb at 2013-01-23T13:01:55Z
@stof all "Object"s should be covered now. Yeah I know he has such a mannerism !
---------------------------------------------------------------------------
by stof at 2013-01-23T19:01:07Z
@vicb none of the dumping tests modified ? this looks weird
---------------------------------------------------------------------------
by stof at 2013-01-23T19:06:06Z
hmm, travis is indeed agreeing with me...
---------------------------------------------------------------------------
by vicb at 2013-01-23T20:07:16Z
I'll fix that tomorrow
---------------------------------------------------------------------------
by vicb at 2013-01-24T08:37:55Z
travis I hope you like it !
* 2.2: (26 commits)
[FrameworkBundle] Fixes invalid serialized objects in cache
remove dead code in yaml component
Fixed typo in UPGRADE-2.2
fixed typo
RedisProfilerStorage wrong db-number/index-number selected
[DependencyInjection] added a test for the previous merge (refs #7261)
Unset loading[$id] in ContainerBuilder on exception
Default validation message translation fix.
remove() should not use deprecated getParent() so it does not trigger deprecation internally
adjust routing tests to not use prefix in addCollection
add test for uniqueness of resources
added tests for addDefaults, addRequirements, addOptions
adjust RouteCollectionTest for the addCollection change and refactor the tests to only skip the part that really needs the config component
added tests for remove() that wasnt covered yet and special route name
refactor interator test that was still assuming a tree
adjust tests to no use addPrefix with options
adjusted tests to not use RouteCollection::getPrefix
[Routing] trigger deprecation warning for deprecated features that will be removed in 2.3
[Console] fixed StringInput binding
[Console] added string input test
...
This PR was merged into the master branch.
Commits
-------
0ef08f5 [Translator] fixed inconsistency in Translator
Discussion
----------
[2.3] [Translator] fixed inconsistency in Translator
| 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
---------------------------------------------------------------------------
by stof at 2013-02-17T20:44:32Z
shouldn't you make ``setFallbackLocale`` call ``setFallbackLocales`` ?
---------------------------------------------------------------------------
by fabpot at 2013-02-18T14:04:39Z
@stof: done
---------------------------------------------------------------------------
by stof at 2013-02-18T14:18:10Z
shoudn't you also update the place where the method is used (in FrameworkBundle probably) to use the non-deprecated one ?
This PR was merged into the master branch.
Commits
-------
439b8bc [WebProfilerBundle] Draw retina canvas if devicePixelRatio is bigger than 1
Discussion
----------
[2.3] [WebProfilerBundle] Draw retina canvas elements
When using a MacBook Pro Retina the default canvas is fuzzy and ugly, this scales the elements for a higher DPI so they will look sharp and crisp.
This PR was merged into the master branch.
Commits
-------
b0bca01 add status text to web profiler response panel
Discussion
----------
[2.3] add status text to web profiler response panel
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | cosmetic
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add the status text to the web profiler response panel
---------------------------------------------------------------------------
by Burgov at 2013-02-17T11:08:37Z
The response object allows for setting a custom status message, so displaying the predefined one could be confusing.
E.g. ```$reponse->setStatusCode(403, "You can't go here!")```
However, there is no getter for it to be read... Perhaps it should be added?
---------------------------------------------------------------------------
by fabpot at 2013-02-17T11:32:37Z
I think displaying the default text is good enough. I suppose that the intent is to easily remember what a given status code means. There is no getter for the status text as it has no real meaning in terms of HTTP.
---------------------------------------------------------------------------
by gimler at 2013-02-17T16:50:47Z
Yes this was my intention. But i think this is a good point the response should have a `getStatusText` method.
So actual to only point where the status text is use is when the response is converted to string.
@fabpot i would add the `getStatusText` method to the `response` class and modify the PR to use this text. Do you agree with that?
---------------------------------------------------------------------------
by fabpot at 2013-02-17T17:13:07Z
Ad I said in my previous comment, not having a `getStatusText()` was in fact intentional.
This PR was squashed before being merged into the 2.1 branch (closes#7177).
Commits
-------
c82c754 RedisProfilerStorage wrong db-number/index-number selected
Discussion
----------
RedisProfilerStorage wrong db-number/index-number selected
bug: in the webprofiler the wrong database (0) is selected when storage should not go to index 0. on redis connect the default behaviour is to select index/database number 0, but it is necessary to select a special index/database.
see: http://rediscookbook.org/multiple_databases.html
[HttpKernel] [Profiler] [RedisProfilerStorage] added select for a db-number/db-index to dsn-patttern
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets |
| License | MIT
Usage with index/db-number = 7 :
```xml
<!-- config_dev.xml -->
<symfony:profiler only-exceptions="false" dsn="redis://127.0.0.1:6379/7" lifetime="3600" />
```
```yml
#config_dev.yml
framework:
...
profiler:
...
dsn: redis://127.0.0.1:6379/7
```
---------------------------------------------------------------------------
by fabpot at 2013-02-27T07:21:02Z
Can you also add some unit tests?
---------------------------------------------------------------------------
by JohnDoe007 at 2013-02-27T09:36:28Z
@fabpot the function getRedis() is currently not testable, I think. this means I have to do a bigger change to the class, add a public function initRedis() or something and move initialize code there to make the initialization process, where my change is, testable. is this ok to do it in that bugfix/pull request? or should I add this test change to master and only adding this small bugfix to the 2.1-branch?
---------------------------------------------------------------------------
by fabpot at 2013-03-06T16:47:37Z
Thanks, I've merged the fix. Can you work on the changes needed to allow the code to be testable (on the master branch)?
This PR was squashed before being merged into the master branch (closes#7179).
Commits
-------
c6fe27f [2.3] [DomCrawler] adds schema relative URL support to link
Discussion
----------
[2.3] [DomCrawler] adds schema relative URL support to link
Adds support for `//relative/schema` URLs to `DomCrawler` links.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7169
---------------------------------------------------------------------------
by stof at 2013-02-25T19:17:10Z
👍
This PR was merged into the 2.1 branch.
Commits
-------
6681df0 [Console] fixed StringInput binding
6b98883 [Console] added string input test
32f1904 Revert "merged branch jfsimon/issue-6749 (PR #7220)"
Discussion
----------
[Console] fixes tests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7231
---------------------------------------------------------------------------
by gigablah at 2013-03-02T13:25:10Z
Apparently 5b19c892cf broke the console shell. I was wondering why all commands executed through the shell in 2.2.0 were throwing "Too many arguments" exception.
---------------------------------------------------------------------------
by stof at 2013-03-02T13:27:09Z
@gigablah This is already fixed in the 2.2 branch as this PR has already been merged in 2.2 (but the revert is also needed in 2.1)
---------------------------------------------------------------------------
by gigablah at 2013-03-02T13:51:44Z
Ah, guess I'll have to wait for it to be pushed to the symfony/console repository then.
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
* 2.2:
fixed CS
Add persian translation to Components/Security
bumped Symfony version to 2.2.1-DEV-DEV
updated VERSION for 2.2.0
updated CHANGELOG for 2.2.0
* 2.2: (24 commits)
Options small typo
[Console] fixed unparsed StringInput tokens
Mask PHP_AUTH_PW header in profiler
[TwigBridge] fixed trans twig extractor
[Finder] adds adapter selection/unselection capabilities
[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
fixed paths/notPaths regex for shell adapters
fix issue 4911
Adds expandable globs support to shell adapters
[HttpFoundation] Fixed messed up headers
Fixes AppCache + ESI + Stopwatch problem
added a DebuClassLoader::findFile() method to make the wrapping less invasive
bumped Symfony version to 2.2.0-RC4-DEV
updated VERSION for 2.2.0-RC3
updated CHANGELOG for 2.2.0-RC3
fixed CHANGELOG
bumped Symfony version to 2.1.9-DEV
...
* 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
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
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 ?
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
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.
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 ;)
* 2.2:
Defined stable version point of Doctrine.
[HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes#6750)
Update composer.json
[Form] Fixed TimeType not to render a "size" attribute in select tags
[Form] Added test for "label" option to accept the value "0"
Expanded fault-tolerance for unusual cookie dates
Fix docblock type
[Form] Fixed "label" option to accept the value "0"
Added greek translation
merged branch jfcixmedia/2.1 (PR #5838)
added a note about a BC break for the path info of sub-request (closes#7138)
[DomCrawler] lowered parsed protocol string (fixes#6986)
[FrameworkBundle] Fix a BC for Hinclude global template
[HttpKernel] fixed locale management when exiting sub-requests
fixed HInclude renderer (closes#7113)
Removed some leaking deprecation warning in the Form component
[HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html
Conflicts:
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/Security/composer.json
* 2.1:
Defined stable version point of Doctrine.
[HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes#6750)
Update composer.json
[Form] Fixed TimeType not to render a "size" attribute in select tags
[Form] Added test for "label" option to accept the value "0"
Expanded fault-tolerance for unusual cookie dates
Fix docblock type
[Form] Fixed "label" option to accept the value "0"
merged branch jfcixmedia/2.1 (PR #5838)
[DomCrawler] lowered parsed protocol string (fixes#6986)
Conflicts:
composer.json
src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/time_widget.html.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/Form/Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php
src/Symfony/Component/Routing/composer.json
src/Symfony/Component/Security/composer.json
src/Symfony/Component/Validator/composer.json
This PR was squashed before being merged into the 2.1 branch (closes#7153).
Commits
-------
b2080c4 [HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes#6750)
Discussion
----------
[HttpFoundation] Remove Cache-Control when using https download via IE<9 (fixes#6750)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6750
| License | MIT
| Doc PR |
This PR was merged into the 2.1 branch.
Commits
-------
b7bd630 [Form] Fixed TimeType not to render a "size" attribute in select tags
Discussion
----------
[Form] Fixed TimeType not to render a "size" attribute in select tags
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6153
| License | MIT
| Doc PR | -
This PR was merged into the 2.2 branch.
Commits
-------
54d7d25 [HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html
Discussion
----------
[HttpKernel] hinclude fragment renderer must escape URIs properly to return valid html
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | [-]
| License | MIT
| Doc PR | [-]
Since rendering of hinclude fragments returns html/xml, it is marked as safe. So it's not auto-escaped of course. But that means it must properly escape it's input (the URI) when outputting in html context.
Btw, this does not need to be done for esi because esi tags are processed in middleware which do not go to the client/browser.
---------------------------------------------------------------------------
by Koc at 2013-02-15T22:59:05Z
Will it works correct when `arg_separator.output="&"`?
---------------------------------------------------------------------------
by stof at 2013-02-15T23:04:01Z
if your url comes form the routing, yes. It [does not rely on the default separator](https://github.com/symfony/Routing/blob/master/Generator/UrlGenerator.php#L265) to avoid issues when the separator is configured to ``&`` as it would have been escaped again in Twig templates for instance.
---------------------------------------------------------------------------
by fabpot at 2013-02-16T07:26:19Z
Can you include the proper PR header in the description? Thanks.
---------------------------------------------------------------------------
by Tobion at 2013-02-16T12:28:18Z
Added.
This PR was merged into the 2.2 branch.
Commits
-------
171cff0 [FrameworkBundle] Fix a BC for Hinclude global template
Discussion
----------
[FrameworkBundle] Fix a BC break for Hinclude global template
@fabpot should the one who broke BC write a UT for this ? (I won't have time in the next few days).
This PR was squashed before being merged into the master branch (closes#5838).
Commits
-------
201f3e6 [Form] Fixed cannot unset string offsets in CsrfValidationListener
Discussion
----------
[Form] Fixed cannot unset string offsets in CsrfValidationListener
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
A php fatal error is happening when someone rewrite the entire form data for an object with a single input.
```
Fatal error: Cannot unset string offsets in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php on line 72
```
Example:
```html
<form action="/app_dev.php/post/create" method="post" >
<div id="posttype">
<div>
<label for="posttype_name" class="required">Name</label>
<input type="text" id="posttype_name" name="posttype[name]" required="required" maxlength="255" />
</div>
<div>
<label for="posttype_text" class="required">Text</label>
<textarea id="posttype_text" name="posttype[text]" required="required"></textarea>
</div>
<input type="hidden" id="posttype__token" name="posttype[_token]" value="83a1617c694fbdea43c2527f1a55c7419ce82a42" /></div>
<p>
<button type="submit">Create</button>
</p>
</form>
```
If someone alters the html to add a simple input at the bottom of the form like this one:
```html
<input type="text" id="posttype" name="posttype" value="test123" />
```
The result will be a php fatal error.
---------------------------------------------------------------------------
by bschussek at 2012-10-26T09:49:05Z
Thank you for the pull request! Could you please reference the pull request in the test?
```php
// https://github.com/symfony/symfony/pull/5838
public function testStringFormData()
{
...
```
---------------------------------------------------------------------------
by jfcixmedia at 2012-10-26T10:21:29Z
@bschussek Added, thanks.
This PR was merged into the 2.1 branch.
Commits
-------
3e40c17 [HttpKernel] fixed locale management when exiting sub-requests
Discussion
----------
[HttpKernel] fixed locale management when exiting sub-requests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7063
| License | MIT
| Doc PR | n/a
This fix is temporary as #7007 will fix it properly in Symfony 2.3.
---------------------------------------------------------------------------
by vicb at 2013-02-17T20:17:44Z
changelog ?
---------------------------------------------------------------------------
by fabpot at 2013-02-17T20:27:22Z
The changelogs are updated when we release a new version only.
---------------------------------------------------------------------------
by stof at 2013-02-17T20:41:00Z
@fabpot the intl locale should be reset to the right value too
---------------------------------------------------------------------------
by stof at 2013-02-17T20:42:31Z
hmm sorry, I missed the fact that you are changing the locale in the Request again, which will set the intl one
* 2.2: (22 commits)
[Process] Fix regression introduced in #6620 / 880da01c49, fixes#7082
[HttpKernel] added a unit for the previous commit (closes#7025)
[HttpFoundation] fixed, overwritten CONTENT_TYPE
[BrowserKit] fixed test added in the previous merge (refs #7059)
[FrameworkBundle] tweaked reference dumper command (see #7093)
Remove unnecessary comment and change test name
[Config] tweaked dumper to indent multi-line info
[HttpKernel] added some tests for previous merge
Fix REMOTE_ADDR for cached subrequests
[FrameworkBundle] CSRF should be on by default
[WebProfilerBundle] removed dependency on FrameworkBundle (closes#6949)
[HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)
[HttpFoundation] tweaked previous merge
[HttpFoundation] Added getter for httpMethodParameterOverride state
Create validators.lv.xlf
[Process] Warn user with a useful message when tmpfile() failed
[BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form
Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()
bumped Symfony version to 2.2.0-DEV
Revert "merged branch povilas/issue_6101 (PR #6708)"
...
This PR was merged into the 2.2 branch.
Commits
-------
a313188 added a proper setter for the templating servicein HInclude
Discussion
----------
added a proper setter for the templating servicein HInclude
| 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
---------------------------------------------------------------------------
by stof at 2013-02-17T12:44:40Z
👍
This PR was merged into the 2.2 branch.
Commits
-------
738de9a [HttpKernel] added a unit for the previous commit (closes#7025)
d0e4b76 [HttpFoundation] fixed, overwritten CONTENT_TYPE
Discussion
----------
Fixed content type when passed as a server value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7025
| License | MIT
| Doc PR | n/a
---------------------------------------------------------------------------
by stof at 2013-02-17T14:51:35Z
👍
* 2.1:
[FrameworkBundle] tweaked reference dumper command (see #7093)
[HttpKernel] added some tests for previous merge
Fix REMOTE_ADDR for cached subrequests
[Process] Warn user with a useful message when tmpfile() failed
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
This PR was merged into the 2.1 branch.
Commits
-------
18b139d [FrameworkBundle] tweaked reference dumper command (see #7093)
Discussion
----------
[FrameworkBundle] tweaked reference dumper command (see #7093)
The same as #7093 just for 2.1.
This PR was merged into the 2.2 branch.
Commits
-------
b240d1f [BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form
Discussion
----------
[WIP]BrowserKit] added a test to make sure HTTP authentication is preserved
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Since #6995 BrowseKit no longer seems to preserve the HTTP authentication when submitting a form. This PR adds a test to demonstrate the failure.
---------------------------------------------------------------------------
by vicb at 2013-02-13T12:49:16Z
Thanks. Could you add a "[WIP]" prefix to the PR tittle and set "bug fix" to "no" for now ?
---------------------------------------------------------------------------
by sstok at 2013-02-13T13:59:42Z
done 👍
---------------------------------------------------------------------------
by fabpot at 2013-02-17T12:49:35Z
This cannot be related to #6995 as your test does not involve any HttpFoundation classes.
This PR was merged into the 2.2 branch.
Commits
-------
cb319ac [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)
Discussion
----------
[HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)
| 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
---------------------------------------------------------------------------
by bamarni at 2013-02-15T10:15:29Z
Are you sure this fixes the twice displaying issue? This is already done here : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Kernel.php#L99
Fatal errors are displayed twice in some situations because this handler gets registered twice, and it registers 2 times the same shutdown callback, a few lines below your change.
---------------------------------------------------------------------------
by fabpot at 2013-02-15T10:21:39Z
No, I've closed this #6254 as this is an Assetic issue, not a Symfony one.
This PR was squashed before being merged into the 2.2 branch (closes#7060).
Commits
-------
f842ae6 [FrameworkBundle] CSRF should be on by default
Discussion
----------
[FrameworkBundle] CSRF should be on by default
---------------------------------------------------------------------------
by stof at 2013-02-13T11:27:32Z
👍
---------------------------------------------------------------------------
by vicb at 2013-02-15T08:54:39Z
Oops seems like a file is missing... will update
---------------------------------------------------------------------------
by vicb at 2013-02-15T09:04:13Z
@fabpot the fix is fixed, ready to be merged !
---------------------------------------------------------------------------
by stloyd at 2013-02-15T09:05:24Z
Shouldn't this be noted in upgrade/changelog file? It's kinda of BC break...
---------------------------------------------------------------------------
by vicb at 2013-02-15T09:13:18Z
don't fix so, this is something I did break a few weeks ago, just reverting to how it is supposed to work.
---------------------------------------------------------------------------
by fabpot at 2013-02-15T09:49:21Z
If you broke CSRF configuration, I suppose that you also broke form, ESI, framgents, translator, validator, and profiler configuration, no (see fde7585)?
---------------------------------------------------------------------------
by vicb at 2013-02-15T09:51:51Z
Hey @fabpot I am not that BAD :)
"form, ESI, framgents, translator, validator, and profiler" are off by default. Only CSRF should be on by default.
This PR was squashed before being merged into the 2.2 branch (closes#6999).
Commits
-------
de0f7b7 [HttpFoundation] Added getter for httpMethodParameterOverride state
Discussion
----------
[HttpFoundation] Added getter for httpMethodParameterOverride state
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6984
| License | MIT
| Doc PR | ~
Please use the concrete Class Methods to check validations. Its realy unexpected that Validator don't use the normal Object way and can call anything...
* 2.2:
Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation
moved file hash calculation to own method
[Validator] Add check for existing metadata on property
added support for the X-Forwarded-For header (closes#6982, closes#7000)
fixed the IP address in HttpCache when calling the backend
[EventDispatcher] Added assertion.
[EventDispathcer] Fix removeListener
[DependencyInjection] Add clone for resources which were introduced in 2.1
[DependencyInjection] Allow frozen containers to be dumped to graphviz
Fix 'undefined index' error, when entering scope recursively
[Security] fixed session creation on login (closes#7011)
replaced usage of the deprecated pattern routing key (replaced with path)
Add dot character `.` to legal mime subtype regular expression
[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes#6923, closes#6936)
* 2.1:
added support for the X-Forwarded-For header (closes#6982, closes#7000)
fixed the IP address in HttpCache when calling the backend
[EventDispatcher] Added assertion.
[EventDispathcer] Fix removeListener
[DependencyInjection] Add clone for resources which were introduced in 2.1
[DependencyInjection] Allow frozen containers to be dumped to graphviz
Fix 'undefined index' error, when entering scope recursively
[Security] fixed session creation on login (closes#7011)
Add dot character `.` to legal mime subtype regular expression
[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes#6923, closes#6936)
This PR was squashed before being merged into the 2.2 branch (closes#6972).
Commits
-------
4cbdbcb [Validator] Add check for existing metadata on property
Discussion
----------
[Validator] Add check for existing metadata on property
| Q | A
| ------------- | ---
| Bug fix? | no (sort of)
| New feature? | no
| BC breaks? | no (I don't think so)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Todo:
- [x] Check if the new method should be added to the interface as well.
This adds a check for metadata existence before usage else the code will emit a warning.
This should not be a BC break or a bug fix as the patched code is 2.2 specific.
@bschussek let me know if I should add the method in the interface as well. Thank you.
---------------------------------------------------------------------------
by vicb at 2013-02-05T10:40:56Z
Strictly speaking this is a BC break (you are adding a public method). But I guess we should better defined what should be describe as BC break - I have asked myself the same question more than one time /cc @fabpot
Please also add a UT and a note in the changelog.
---------------------------------------------------------------------------
by dlsniper at 2013-02-05T11:26:30Z
@vicb thanks for input. In this case I guess I should add the method to the interface as well.
As for unit tests I'll add them soon as well.
---------------------------------------------------------------------------
by fabpot at 2013-02-05T14:19:14Z
Can you add a test?
---------------------------------------------------------------------------
by dlsniper at 2013-02-05T15:57:12Z
I'll do it tonight as I've bumped into some work related issues.
---------------------------------------------------------------------------
by fabpot at 2013-02-11T11:11:12Z
Just for the record, this is not a BC break as the interface was added in 2.2.
This PR was squashed before being merged into the master branch (closes#6992).
Commits
-------
8adb0e3 [Form]fixed FormRenderer::humanize() to humanize camel cased label
Discussion
----------
[Form]fixed FormRenderer::humanize() to humanize camel cased label
| 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
FormRenderer::humanize() only converts underscored_field_name to humanized field name(just the same as sfInflector::humanize()).
Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator does not convert camelCased field names to underscored one, however.
I have to edit manually field names in the generated FormType class everytime I use doctrine:generate:form Command, too messy.
so I suggest humanize() is to take care of it.
---------------------------------------------------------------------------
by 77web at 2013-02-08T01:40:59Z
@vicb thank you for your kind review. I've added commits as you told.
---------------------------------------------------------------------------
by vicb at 2013-02-08T07:33:47Z
@77web you probably could merge the the setup into the test method.
---------------------------------------------------------------------------
by 77web at 2013-02-08T08:17:10Z
@vicb I've merged setUp() and tearDown() into test method(before and after assertion). anything else to fix?
---------------------------------------------------------------------------
by 77web at 2013-02-08T10:11:51Z
@vicb I've fixed test as you told.thanks again for your kind help!
---------------------------------------------------------------------------
by vicb at 2013-02-08T12:00:29Z
One last thing: a note in the changelog ?
---------------------------------------------------------------------------
by 77web at 2013-02-08T12:23:57Z
I added a note in 2.2.0 section. or shold I write it in 2.1.0?
---------------------------------------------------------------------------
by vicb at 2013-02-08T12:25:36Z
As you send it to master, you should create a 2.3.0 (2.1 & 2.2 have their own branches)
---------------------------------------------------------------------------
by vicb at 2013-02-08T12:26:40Z
and should write your comment as "fixed xyz to abc". Thanks.
---------------------------------------------------------------------------
by 77web at 2013-02-08T12:32:39Z
fixed my note. thanks a lot! @vicb
This PR was merged into the 2.2 branch.
Commits
-------
73aa7d1 replaced usage of the deprecated pattern routing key (replaced with path)
Discussion
----------
replaced usage of the deprecated pattern routing key (replaced with path)
| 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
---------------------------------------------------------------------------
by lsmith77 at 2013-02-07T13:35:54Z
do we have tests to cover the BC behavior?
---------------------------------------------------------------------------
by fabpot at 2013-02-07T16:30:31Z
I've just added some tests for the legacy way.
* 2.2: (30 commits)
[HttpFoundation] Added support for partial ranges in the BinaryFileResponse.
[HttpFoundation] Fixed byte ranges in the BinaryFileResponse.
updated required versions when depending on the HttpFoundation component
updated required versions when depending on the HttpKernel component
updated required versions when depending on the Config component
updated required versions when depending on the Form component
updated required versions when depending on the DependencyInjection component
updated required versions when depending on the Validator component
updated required versions when depending on the Translation component
updated required versions when depending on the Routing component
updated required versions when depending on the EventDispatcher component
updated required versions when depending on the OptionsResolver component
updated required versions when depending on the PropertyAccess component
updated required versions when depending on the Security component
updated required versions when depending on the Templating component
updated required versions when depending on the Stopwatch component
updated required versions when depending on the Process component
updated required versions when depending on the Finder component
updated required versions when depending on the Dom Crawler component
use ~2.0 when depending on the Dom Crawler component
...
This PR was merged into the 2.2 branch.
Commits
-------
0e4a1fe updated required versions when depending on the HttpFoundation component
2704705 updated required versions when depending on the HttpKernel component
0a70fe7 updated required versions when depending on the Config component
2f1939b updated required versions when depending on the Form component
719628a updated required versions when depending on the DependencyInjection component
3db311a updated required versions when depending on the Validator component
a671313 updated required versions when depending on the Translation component
289ccfc updated required versions when depending on the Routing component
a742f0a updated required versions when depending on the EventDispatcher component
51857fe updated required versions when depending on the OptionsResolver component
20dfc15 updated required versions when depending on the PropertyAccess component
f971ccf updated required versions when depending on the Security component
da06817 updated required versions when depending on the Templating component
108a8c0 updated required versions when depending on the Stopwatch component
155cccb updated required versions when depending on the Process component
b95184b updated required versions when depending on the Finder component
a5da4a1 updated required versions when depending on the Dom Crawler component
0d74948 use ~2.0 when depending on the Dom Crawler component
d2d4c0a use ~2.1 when depending on the ClassLoader component
4def221 use ~2.0 when depending on the CSS selector component
9b64be2 use ~2.0 when depending on the locale component
c3906a4 updated required versions when depending on the Yaml component
Discussion
----------
Update Composer deps
| 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
Since we adopted Composer in Symfony, we limit the Symfony Components deps for any Symfony Component to the current version of Symfony. That's very limited as for instance, any version of Yaml can be used as a dependency for any other Symfony Component. So, this PR changes the version constraints for dependencies to the largest range possible.
The idea is also to open the range even more when new versions of Symfony comes.
---------------------------------------------------------------------------
by bamarni at 2013-02-08T17:40:41Z
👍closes#5891
---------------------------------------------------------------------------
by canni at 2013-02-08T23:42:04Z
👍
---------------------------------------------------------------------------
by simensen at 2013-02-09T05:35:41Z
👍
I think this is a great idea but it opens up the potential for internal version conflicts between components. The increased maintenance is probably worth it, though. :)
Several packages on Packagist are currently broken (see #6983) and I think this would fix that. A number of my projects have been forced back to 2.2@RC in favor of staying on 2.3@dev so I'm excited to see this resolved one way or another.
---------------------------------------------------------------------------
by vicb at 2013-02-09T10:06:36Z
Would the right way to fix this issue be semantic versioning ?
According to rfc2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1)
byte positions are inclusive:
The first-byte-pos value in a byte-range-spec gives the byte-offset of
the first byte in a range. The last-byte-pos value gives the byte-offset
of the last byte in the range; that is, the byte positions specified are
inclusive. Byte offsets start at zero.
* 2.0:
[DependencyInjection] Allow frozen containers to be dumped to graphviz
Add dot character `.` to legal mime subtype regular expression
[HttpFoundation] fixed the creation of sub-requests under some circumstancies (closes#6923, closes#6936)
This PR was merged into the 2.2 branch.
Commits
-------
30b0c37 [Router] Fix TraceableUrlMatcher
Discussion
----------
[BugFix][Router] Fix TraceableUrlMatcher
TraceableUrlMatcher does not take care with new host route features
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6744
| License | MIT
| Doc PR | n/a
* 2.2:
[HttpFoundation] fixed Request::create() method
[HttpKernel] fixed the creation of the Profiler directory
[HttpKernel] fixed the hinclude fragment renderer when the template is empty
bumped Symfony version to 2.2.0-RC2-DEV
[DependencyInjection] enhanced some error messages
[FrameworkBundle] fixed typo
fixed typo
tweaked previous merge
[Security] fixed interface implementation (closes#6974)
Add "'property_path' => false" deprecation message for forms
fixed CS
Added BCrypt password encoder.
updated VERSION for 2.2.0-RC1
Removed underscores from test method names to be consistent with other components.
[Security] fixed session creation when none is needed (closes#6917)
[FrameworkBundle] removed obsolete comment (see 2e356c1)
Micro-optimization
[FrameworkBundle] removed extra whitespaces
[Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.
[FrameworkBundle] fixed wrong indentation on route debug output
This PR was merged into the 2.0 branch.
Commits
-------
a12744e Add dot character `.` to legal mime subtype regular expression
Discussion
----------
[HttpFoundation][2.0] Add dot character `.` to legal mime subtype regular expression
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
For example, the following mimetype (used for Microsoft powerpoints) is not recognized given the current regexp : `application/vnd.ms-powerpoint; charset=binary`
This PR was merged into the 2.2 branch.
Commits
-------
5a2caa5 [HttpKernel] fixed the hinclude fragment renderer when the template is empty
Discussion
----------
[HttpKernel] fixed the hinclude fragment renderer when the template is empty
| 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
---------------------------------------------------------------------------
by lsmith77 at 2013-02-07T13:36:58Z
does it make sense to allow the template to be empty? i mean isnt this instead an error condition?
---------------------------------------------------------------------------
by fabpot at 2013-02-07T16:16:04Z
Why not? An empty template means and empty content, which you might want as this is just the fallback content displayed when the real content is not loaded yet.
This PR was merged into the 2.2 branch.
Commits
-------
bc4a0e7 [HttpFoundation] fixed Request::create() method
Discussion
----------
[HttpFoundation] fixed Request::create() method
| 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
When creating a Request with Request::create(), some information can
come from the URI and the server variable. Until now, it was not clear
which information had precedence over the other and as a matter of fact,
this method was not consistent.
Now, information contained in the URI always take precedence over
information coming from the server array. That makes sense as the server
array is often copied from another existing Request object.
---------------------------------------------------------------------------
by vicb at 2013-02-07T14:42:15Z
You should add a note in the changelog
When creating a Request with Request::create(), some information can
come from the URI and the server variable. Until now, it was not clear
which information had precedence over the other and as a matter of fact,
this method was not consistent.
Now, information contained in the URI always take precedence over
information coming from the server array. That makes sense as the server
array is often copied from another existing Request object.
This PR was merged into the 2.2 branch.
Commits
-------
3053194 [DependencyInjection] enhanced some error messages
Discussion
----------
[DependencyInjection] enhanced some error messages
| 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
* 2.1:
[HttpKernel] fixed the creation of the Profiler directory
[Security] fixed session creation when none is needed (closes#6917)
[FrameworkBundle] removed obsolete comment (see 2e356c1)
This PR was merged into the 2.2 branch.
Commits
-------
badb2b9 Add "'property_path' => false" deprecation message for forms
Discussion
----------
Add "'property_path' => false" deprecation message for forms
It is more common to use fully camel-cased names for test methods. Only some of the test methods are called with underscore notation. To avoid confusion it is better to be consistent.
This PR was merged into the 2.2 branch.
Commits
-------
35b62ac [Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.
Discussion
----------
[Security] renamed Constraint namespace to Constraints for validator classes in order to be consistent with the whole current validator API.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes (for people already using the ``UserPassword`` constraint class in their code)
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR was merged into the 2.1 branch.
Commits
-------
8ca00c5 [Security] fixed session creation when none is needed (closes#6917)
Discussion
----------
[Security] fixed session creation when none is needed (closes#6917)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6917
| License | MIT
| Doc PR | n/a
---------------------------------------------------------------------------
by drak at 2013-02-04T16:24:49Z
That looks good. Maybe we need a test for this logic to prevent any regression in the future?
---------------------------------------------------------------------------
by bendavies at 2013-02-04T16:30:38Z
Yep, this was exactly what i tried locally, but really wasn't familiar enough with it to be confident enough to submit it as a fix.
Works for me!
---------------------------------------------------------------------------
by bendavies at 2013-02-04T17:19:32Z
A few test failures which were added by the breaking PR #2414 in the first place.
---------------------------------------------------------------------------
by fabpot at 2013-02-04T18:00:31Z
I've fixed the tests which now really test that the session is not started.
This PR was merged into the 2.2 branch.
Commits
-------
95f0202 [FrameworkBundle] fixed wrong indentation on route debug output
Discussion
----------
[FrameworkBundle] fixed wrong indentation on route debug output
I'm not sure this is something to fix, but with this PR the debug output for a single route is like the lower part of the image, instead of the currently displayed upper part.
![output](https://f.cloud.github.com/assets/254808/120850/f2b6e8ce-6d43-11e2-9fdd-24200eb2e93b.jpg)
* 2.2:
fixed regression in the Finder component (it was possible to use it without using exec before, closes#6357)
fixed a circular call (closes#6864)
typo
[Security] [Tests] added unit tests for the UserPasswordValidator class and made the validator service for the UserPassword constraint configurable.
fixed wrong indentation
tweaked previous commit
[HttpKernel] Fix the URI signer (closes#6801)
Add Arabic translations.
[HttpKernel] fixed regression when rendering an inline controller and passing some objects (closes#6822)
[FrameworkBundle] fixed typo
renamed some classes and Twig functions to more descriptive names (refs #6871)
Classcollectionloader: fix traits + enhancements
Fix a deprecated method call in the tests
Update `composer.json` files: - to allow versions ~2.2 (>=2.2,<3.0) of Doctrine DBAL, ORM & Common - fixed Propel1 versions difference between main and bridge files - fixed Twig versions difference between main and bridge files - to allow versions ~1.11 (>=1.11,<2.0) of Twig - fixed Locale ext-intl version to accept all, not non-existing version
Correct comment in NativeSessionStorage regarding session.save_handler
[Security] Add PHPDoc to AuthenticationEvents
This PR was merged into the 2.2 branch.
Commits
-------
a433ba2 [Security] [Tests] added unit tests for the UserPasswordValidator class and made the validator service for the UserPassword constraint configurable.
Discussion
----------
[Security] [Tests] added unit tests for the UserPasswordValidator class ...
...and made the validator service for the UserPassword constraint configurable.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR was merged into the 2.2 branch.
Commits
-------
8f8d6cf [HttpKernel] fixed regression when rendering an inline controller and passing some objects (closes#6822)
Discussion
----------
[HttpKernel] fixed regression when rendering an inline controller and passing some objects (closes#6822)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6822
| License | MIT
| Doc PR | n/a
This PR was merged into the 2.1 branch.
Commits
-------
e7624b6 [Security] Add PHPDoc to AuthenticationEvents
Discussion
----------
[Security] Added PHPDoc to AuthenticationEvents
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
HttpContentRenderer has been renamed to FragmentHandler.
The RendererStrategy subnamespace has been renamed to Fragment.
The strategy classes now have Fragment in their names.
ProxyRouterListener has been renamed to FragmentListener
The router_proxy configuration entry has been renamed to fragments.
This PR was merged into the master branch.
Commits
-------
b1d1168 Fixed the NullLogger to implement the HttpKernel interface again
Discussion
----------
Fixed the NullLogger to implement the HttpKernel interface again
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (reverting one introduced by mistake)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
This BC breaking mistake has been reported in https://github.com/schmittjoh/JMSSecurityExtraBundle/pull/105#issuecomment-12908659
This PR was squashed before being merged into the master branch (closes#6852).
Commits
-------
fde7585 [DIC] Better handling of enableable configurations
Discussion
----------
[DIC] Better handling of enableable configurations
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no, this feature has not been released yet
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
My definition of bug fix might be discussable. The thing which I think is not discussable is that this PR fixes the semantic - and I think it is important for a "semantic configuration": before this PR, some nodes had `->canBeDisabled` for nodes that were actually disabled by default. Those nodes now have `->canBeEnabled` which sounds right.
**Edit: Jan 28, 2013** - history:
See [the related comments](https://github.com/symfony/symfony/pull/6829#discussion_r2727742).
I think Symfony **must** get the configuration right as we can expect of lot of devs to use this as a template when writting their own configuration.
@schmittjoh could you please give me your feedback on [this change](https://github.com/symfony/symfony/pull/6852/files#L4R224) considering [the rationale](https://github.com/symfony/symfony/pull/6852/files#L3R7).
---------------------------------------------------------------------------
by stof at 2013-01-23T16:10:33Z
@vicb your links are broken as they are pointing to the PR creation page
---------------------------------------------------------------------------
by stof at 2013-01-23T16:10:55Z
and to create a TODO list, it has to be a list first
---------------------------------------------------------------------------
by vicb at 2013-01-23T16:31:10Z
@stof thanks for reporting the broken links, they are fixed /cc @schmittjoh
---------------------------------------------------------------------------
by vicb at 2013-01-23T16:31:50Z
@Tobion please submit a PR to my repo, I don't have much time to work on this. Thanks !
---------------------------------------------------------------------------
by vicb at 2013-01-25T15:14:47Z
@fabpot @schmittjoh I'd like your feedback on the latest commit, rationale is in the method phpDoc. It better matches what we do now and seem the most sensible thing to do.
edit: with this you can no more disable the node explicitly, I have to find a better solution
---------------------------------------------------------------------------
by schmittjoh at 2013-01-25T15:20:13Z
Looks good.
On Fri, Jan 25, 2013 at 4:15 PM, Victor Berchet <notifications@github.com>wrote:
> @fabpot <https://github.com/fabpot> @schmittjoh<https://github.com/schmittjoh>I'd like your feedback on the latest commit, rationale is in the method
> phpDoc. It better matches what we do now and seem the most sensible thing
> to do.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/6852#issuecomment-12704585>.
>
>
---------------------------------------------------------------------------
by vicb at 2013-01-28T14:37:57Z
@fabpot I know I keep insisting on this one and I am sorry for that but I think this should be considered as a bug fix (see the PR header for details) and should be merged in 2.2. I think the Symfony core should be exemplary as it is used by many developers as a template when creating their own bundle. *This PR is no more a WIP and can be merged right now*.
In addition to fixing the enableable nodes, this PR contain new UTs and some fixes to the code / tests.
---------------------------------------------------------------------------
by fabpot at 2013-01-28T16:43:42Z
@vicb As explained in a comment, this is not a BC break as this feature does not exist in 2.1. So, I can make the change to the CHANGELOG if you want after merging, or I can let you make the change.
---------------------------------------------------------------------------
by vicb at 2013-01-28T16:46:33Z
I am going to change it right now !
---------------------------------------------------------------------------
by vicb at 2013-01-28T16:46:56Z
(and thanks for having checked this)
---------------------------------------------------------------------------
by vicb at 2013-01-28T16:54:37Z
@fabpot I have updated the changelog and the PR header.
I am not sure if the commits should be squashed or not. On one side the multiple commits can help understand the changes but on the other side that's a lot of small commits which could pollute history. I let you choose what to do.
This PR was merged into the master branch.
Commits
-------
e3086cc [Console] added some missing information in the phpdoc (closes#6464)
Discussion
----------
[Console] added some missing information in the phpdoc (closes#6464)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6464
| License | MIT
| Doc PR | n/a
This PR was merged into the master branch.
Commits
-------
ed64413 removed deprecated message in FieldType
Discussion
----------
removed deprecated messages coming for internal calls
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6407
| License | MIT
| Doc PR | n/a
It's probably not the cleanest code possible, but I don't see any other way to keep the type for BC and avoid the deprecated message when called internally.
That should fix the deprecated messages thrown by the Form and Validator components.
---------------------------------------------------------------------------
by stof at 2013-01-24T15:41:26Z
The cases where you should actually be warned about the deprecation of FieldType is when using ``field`` to create a field with the factory (which would not trigger the constructor)
---------------------------------------------------------------------------
by fabpot at 2013-01-24T15:46:23Z
@stof: what do you mean? That we can remove the `trigger_error()` call altogether?
---------------------------------------------------------------------------
by stof at 2013-01-24T15:49:31Z
Nobody will ever instantiate the FieldType directly as the framework is registering it (btw, you are missing the FrameworkBundle lazy registration here).
The constructor of a form type is not the right place to deprecate it as registering it does not mean it will be used in the app.
---------------------------------------------------------------------------
by fabpot at 2013-01-24T15:51:26Z
@stof: I've updated the PR to remove the `trigger_error` call.
This PR was merged into the master branch.
Commits
-------
8bfd7a7 Remove custom error handler for deprecations
efbff0c Change deprecated Min and Max constraint
c47f027 [Validator][Constraints] Update AllValidator using new Validator API
Discussion
----------
[Validator][Constraints] Update AllValidator using new Validator API
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
License of the code: MIT
This PR was merged into the master branch.
Commits
-------
9264431 Remove custom error handler for deprecations
c80c17e Change deprecated Min constraint to Range constraint
a39fdd8 Remove getPropertyPath in the tests
ffa4c6f [Validator][Constraints] CollectionValidator
Discussion
----------
[Validator][Constraints] Update CollectionValidator using new Validator API
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6648
License of the code: MIT
In the tests `$i = 1` is because in `validate` the first call to `$this->context` is `$this->context->getGroup();`, should I write this in a comment before each declaration?
---------------------------------------------------------------------------
by stof at 2013-01-15T21:50:41Z
You should also modify the CollectionValidator tests to use a different constraint than ``Min`` which is deprecated. Once it is done, these tests should not need to register a custom error handler catching deprecations anymore
---------------------------------------------------------------------------
by franmomu at 2013-01-15T22:33:43Z
Perfect, I'm going to do the same in #6743
This PR was merged into the master branch.
Commits
-------
2061cc0 Update src/Symfony/Component/Validator/Mapping/ClassMetadata.php
Discussion
----------
[Validator] ClassMetadata use deprecated methods
Bug fix: yes
Feature addition: no
Backwards compatibility break: maybe yes (I don't have the knowlegde)
Symfony2 tests pass: yes
Fixes the following tickets: ?
Todo: Nothing
License of the code: MIT
Documentation PR: Nothing
getValue() is deprecated since version 2.2 and will be removed in 2.3. Use getPropertyValue() instead.
ClassMetadata is still using the deprecated method, changed it to getPropertyValue to prevent a trigger error.
---------------------------------------------------------------------------
by fabpot at 2013-01-14T15:35:28Z
ping @bschussek
* 2.1:
[DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
[Security] PHPDoc in SecurityEvents
Fix typos in README
Added an error message in the DebugClassLoader when using / instead of \.
KNOWN_ISSUES with php 5.3.16
[FrameworkBundle] fixed Client::doRequest that must call its parent method (closes#6737)
[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
[Yaml] fixed#6773
[Yaml] fixed#6770
bumped Symfony version to 2.1.8-DEV
bumped Symfony version to 2.0.23-DEV
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Client.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was squashed before being merged into the master branch (closes#6734).
Commits
-------
4d51ec0 Fix for hardcode (#6384) in choice widget
Discussion
----------
Fix for hardcode (#6384) in choice widget
empty_value should not be disabled if field is not required!
#6384
---------------------------------------------------------------------------
by sstok at 2013-01-15T15:51:08Z
You need to revert the file mode changes (100644 → 100755)
---------------------------------------------------------------------------
by MaksSlesarenko at 2013-01-18T16:44:42Z
fixed tests
---------------------------------------------------------------------------
by MaksSlesarenko at 2013-01-21T15:36:59Z
ping @fabpot
---------------------------------------------------------------------------
by fabpot at 2013-01-21T15:58:26Z
ping @bschussek
---------------------------------------------------------------------------
by MaksSlesarenko at 2013-01-23T11:15:37Z
ping @fabpot @bschussek
---------------------------------------------------------------------------
by Tobion at 2013-01-23T12:08:19Z
I think it's good to squash and merge.
---------------------------------------------------------------------------
by fabpot at 2013-01-23T12:16:37Z
Can you rebase and squash before I merge? Thanks.
---------------------------------------------------------------------------
by MaksSlesarenko at 2013-01-23T19:51:36Z
@fabpot done
This PR was merged into the master branch.
Commits
-------
7944860 [DIC] Move PrependExtensionInterface to the Extension namespace
Discussion
----------
[DIC] Move PrependExtensionInterface to the Extension namespace
@fabpot Please merge before 2.2 (no BC break) /cc @lsmith77
The previous code allowed to pass null as a Request but that does not
really make sense as rendering a sub-request can only happen from a
master request. This was done to ease testing but that was a mistake.
* 2.0:
[DependencyInjection] fixed the creation of synthetic services in ContainerBuilder
[Security] PHPDoc in SecurityEvents
[FrameworkBundle] fixed Client::doRequest that must call its parent method (closes#6737)
[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
[Yaml] fixed#6773
[Yaml] fixed#6770
bumped Symfony version to 2.0.23-DEV
Conflicts:
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Yaml/Inline.php
src/Symfony/Component/Yaml/Tests/InlineTest.php
As explained in #6775, this has been done for the following reasons:
1. It's also Request::getHost()
2. The term hostname has been obsoleted in
http://tools.ietf.org/html/rfc3986#appendix-D.2 and uses the host only
3. hostname in the RFC was defined as the registered domain name, but we
probably also want to match IP-Adresses with the pattern which is the
host = IP-literal / IPv4address / reg-name for.
This PR was squashed before being merged into the 2.0 branch (closes#6818).
Commits
-------
598ae9d [Security] PHPDoc in SecurityEvents
Discussion
----------
[Security] PHPDoc in SecurityEvents
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I'm not sure about the description given.
This PR was merged into the master branch.
Commits
-------
aadefd3 [HttpKernel] refactored the HTTP content renderer to make it easier to extend
Discussion
----------
[HttpKernel] refactored the HTTP content renderer to make it easier to extend
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | kinda
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This makes the StreamedResponse logic reusable for other strategies and it also makes the RenderingStrategy interface less fuzzy about its contract.
That also makes features like #4470 easier to implement from the outside.
---------------------------------------------------------------------------
by stof at 2013-01-20T11:01:29Z
👍
This PR was merged into the master branch.
Commits
-------
32322a1 [TwigBridge] fixed format_file to include the line number even if the link text is passed
Discussion
----------
[TwigBridge] fixed format_file to include the line number even if the link text is passed
| 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
That fixes the logs in the profiler where lines were not displayed for deprecated calls.
---------------------------------------------------------------------------
by stof at 2013-01-20T10:58:58Z
shouldn't this be merged in older branches as it is a bugfix ?
---------------------------------------------------------------------------
by fabpot at 2013-01-20T15:14:50Z
It is a bug fix but people might rely on the current behavior. But then, nobody ever reported it. So, I prefer to keep it on 2.2 only.
This PR was merged into the master branch.
Commits
-------
fcabadf Fix JsonDecode to work on PHP 5.3, update the CHANGELOG.md
b6bdb45 Completly refactor the Serializer Options Pull Request to push context information directly and avoid state and dependencies between SerializerInterface and encoders/normalizers.
ef652e2 Added context to JsonEncoder
eacb7e2 Rename $options to $context, as it makes the intent much more clear.
8854b85 Fix CS issues, removed global options
9c54a4b [Serializer] Allow options to be passed to SerialiizerInterface#serialize and #unserialize. Thsee options are available to all encoders/decoders/normalizers that implement SerializerAwareInterface.
Discussion
----------
[2.2] [Serializer] Configurable Serializer
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #4907, #4938
License of the code: MIT
Todo:
This is an extension of GH-6574 that removes the context state in favor of passing this information around.
---------------------------------------------------------------------------
by beberlei at 2013-01-18T13:12:39Z
@fabpot @lsmith I think this is how it should work from an OOP/OOD perpesctive, avoiding the context state. This makes for a much cleaner code and dependency graph.
---------------------------------------------------------------------------
by lsmith77 at 2013-01-18T14:14:37Z
makes sense. anything fancier would lose this components simplicity which IMHO is the main benefit versus JMS serializer.
---------------------------------------------------------------------------
by fabpot at 2013-01-18T14:26:25Z
Looks very good. 👍
---------------------------------------------------------------------------
by beberlei at 2013-01-18T14:37:32Z
I need to fix the failures with the JsonEncoder and then this is good to merge
---------------------------------------------------------------------------
by stof at 2013-01-18T14:40:21Z
you also need to update the CHANGELOG of the component
---------------------------------------------------------------------------
by beberlei at 2013-01-18T23:17:57Z
Fixed, only the Redis Profiler problem still failing the Travis builds. Also I updated the CHANGELOG.md.
@fabpot Good to merge from my POV
---------------------------------------------------------------------------
by stof at 2013-01-18T23:27:59Z
@beberlei see #6804 for the Redis profiler issue
This PR was merged into the master branch.
Commits
-------
d5e73e5 [SecurityBundle] changed includes to use the new Twig notation
Discussion
----------
[SecurityBundle] changed includes to use the new Twig notation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no - couple of unrelated failures
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This PR was merged into the 2.0 branch.
Commits
-------
53ccc2c [Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
Discussion
----------
[Yaml] fixed ignored text when parsing an inlined mapping or sequence (closes#6786)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6786
| License | MIT
| Doc PR | n/a
This PR was squashed before being merged into the master branch (closes#6789).
Commits
-------
917f473 [Console] Removing unnecessary sprintf in Application->getHelp
Discussion
----------
[Console] Removing unnecessary sprintf in Application->getHelp
Minor change of the `Symfony\Component\Console\Application->getHelp()` method.
I have spotted:
1. an unnecessary `sprintf` call (no `args` arguments);
2. two ways of adding a new line in the help (an empty string as new entry of the array and a `\n` at the end of the string).
It seems to be there since the begining and it looks like a forgoten change to me, so I fixed them by removing the `sprintf` call and using a new array entry (empty string) instead of the `\n`.
| Q | A
| ------------- | ---
| License | MIT
This PR was merged into the 2.0 branch.
Commits
-------
fea20b7 [Yaml] fixed#6770
Discussion
----------
[Yaml] fixed parsing of negative integers (2.0 branch)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6770
| License | MIT
| Doc PR | n/a
Note that an unrelated test fixture for large integers had to be changed to work on systems with 64-bit integer support because of the change from `assertEquals()` to `assertSame()`. Please see the diff for clarification.
* 2.1:
[Yaml] fixed unneeded BC break
[DependencyInjection] fixed a bug in the YAML dumper where references where not converted to the @ notation
[Yaml] fixed typo
updated VERSION for 2.1.7
updated CHANGELOG for 2.1.7
updated VERSION for 2.0.22
update CONTRIBUTORS for 2.0.22
updated CHANGELOG for 2.0.22
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.0:
[Yaml] fixed unneeded BC break
[DependencyInjection] fixed a bug in the YAML dumper where references where not converted to the @ notation
[Yaml] fixed typo
updated VERSION for 2.0.22
update CONTRIBUTORS for 2.0.22
updated CHANGELOG for 2.0.22
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.1:
[Yaml] fixed default value
Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
added a way to enable/disable object support when parsing/dumping
added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
fixed CS
[Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`
fixes a bug when output/error output contains a % character
[Console] fixed input bug when the value of an option is empty (closes#6649, closes#6689)
[Profiler] [Redis] Fix sort of profiler rows.
Fix version_compare() calls for PHP 5.5.
Removed underscores from test method names to be consistent with other components.
[Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
Fix version_compare() calls for PHP 5.5.
Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
removed the .gitattributes files (closes#6605, reverts #5674)
[HttpKernel] Clarify misleading comment in ExceptionListener
Conflicts:
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig
src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php
src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
src/Symfony/Component/Process/Process.php
* 2.0:
[Yaml] fixed default value
Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
added a way to enable/disable object support when parsing/dumping
added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
[Console] fixed input bug when the value of an option is empty (closes#6649, closes#6689)
Conflicts:
src/Symfony/Component/Yaml/Dumper.php
src/Symfony/Component/Yaml/Parser.php
src/Symfony/Component/Yaml/Tests/DumperTest.php
src/Symfony/Component/Yaml/Tests/ParserTest.php
src/Symfony/Component/Yaml/Yaml.php
YAML does not specify an absolute indentation level, but a consistent indentation of nested nodes only: http://www.yaml.org/spec/1.2/spec.html#space/indentation/
Projects that are generally using 2 spaces for indentation should be able to retain consistency with their coding standards by supplying a custom value for the new $indent parameter added to Yaml::dump(), or the new Dumper::setIndentation() method.
The new parameter is a backwards-compatible API addition and defaults to the previous default of 4 (which was changed from 2 via PR #2242 only recently).
Conflicts:
src/Symfony/Component/Yaml/Dumper.php
src/Symfony/Component/Yaml/Yaml.php
By default, object support is disabled, and instead of throwing an
exception when an object is handled, null is returned.
If you do need object support, enable it via:
Yaml::dump($data, false, true);
If you want an exception to be thrown in case an invalid type is handled
(a PHP resource or a PHP object), pass true as the second argument:
Yaml::dump($data, true, true);
The same can be done when parsing:
Yaml::parse($data, 2, false, true);
PHP support when parsing a file has been disabled by default.
If you do need PHP support when parsing a YAML file, enable it via:
Yaml::setPhpParsing(true);
As of Symfony 2.1, PHP support is disabled by default, and support will
be removed in Symfony 2.3.
This PR was merged into the master branch.
Commits
-------
2a7ecf7 Merge branch 'master' of github:MaksSlesarenko/symfony into added-support-for-propel-enum-types-forms
3ae5b55 added support for propel enum types in PropelTypeGuesser
Discussion
----------
added support for propel enum types in PropelTypeGuesser
added support for propel enum and mysql enum field types
---------------------------------------------------------------------------
by willdurand at 2013-01-14T19:06:06Z
The build status is a Travis-CI issue. Should be green.
---------------------------------------------------------------------------
by MaksSlesarenko at 2013-01-16T23:11:52Z
"The build status is a Travis-CI issue. Should be green."
It definitely should...
PHPUnit 3.7.10 by Sebastian Bergmann.
Configuration read from ../symfony/symfony/src/Symfony/Bridge/Propel1/phpunit.xml.dist
.......................................
Time: 0 seconds, Memory: 8.50Mb
OK (39 tests, 96 assertions)
This PR was merged into the master branch.
Commits
-------
41d3953 Fix regression in WDT path/pattern naming
Discussion
----------
[WDT] Fix regression in WDT path/pattern naming
Bug fix: yes (master only)
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: ~
Todo: see below
License of the code: MIT
Documentation PR: ~
This fixes a regression in WDT where clicking routing panel triggers an error.
Let me know if this should be fixed in collector as well as it could be considered a regression.
---------------------------------------------------------------------------
by fabpot at 2013-01-16T16:12:27Z
It should be also fixed in the collector as the profiler data are not compatible between versions anyway.
---------------------------------------------------------------------------
by dlsniper at 2013-01-16T18:21:42Z
@fabpot everything needed seems to be done. Either that or I'm missing something, if you can point me in the right direction, let me know. Thank you!
This PR was merged into the master branch.
Commits
-------
1c5d74c Fixed coding standards issues in invalid-xml-resources.xlf file.
552a806 Fixed coding standards issues.
293991d [Translation] Added some tests to QtFileLoader.
Discussion
----------
[Translation] Added some tests to QtFileLoader.
Added one test for testing exception is thrown if resource is not local.
Added one test for testing exception is thrown if xml resource is invalid.
QtFileLoader has now 100% code coverage.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
This PR was merged into the master branch.
Commits
-------
68ac23f [Security] Added Danish translation
Discussion
----------
[Security] Added Danish translation
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the 2.1 branch.
Commits
-------
a62e04f [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`
Discussion
----------
[2.1][Process] Fix docblocks, remove `return` from `PhpProcess#start()`
This PR was merged into the master branch.
Commits
-------
9fc7def added the UPGRADE file for Symfony 3.0
e84cad2 [Routing] updated CHANGELOG
65eca8a [Routing] added new schemes and methods options to the annotation loader
5082994 [Routing] renamed pattern to path
b357caf [Routing] renamed hostname pattern to just hostname
e803f46 made schemes and methods available in XmlFileLoader
d374e70 made schemes and methods available in YamlFileLoader
2834e7e added scheme and method setter in RouteCollection
10183de make scheme and method requirements first-class citizen in Route
Discussion
----------
Routing options
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #5989, #5990, #6049
| License | MIT
In #5989, it has unanimously been decided to renamed `hostname_pattern` to `hostname` and `pattern` to `path`. That makes a lot of sense and I would like to do the renaming now as `hostname_pattern` is new in Symfony 2.2, so I'd like to avoid breaking BC just after the release. As we are modifying the route options, I've also included changes introduced by @Tobion in #6049 which were discussed in #5990.
As everything is BC, I think it's wise to include that in 2.2. What do you think?
---------------------------------------------------------------------------
by Tobion at 2013-01-14T18:25:53Z
I agree it should be done in 2.2. Thanks for working on it.
---------------------------------------------------------------------------
by vicb at 2013-01-14T23:11:12Z
@fabpot "Everything is BC" until it breaks BC in 3.0, that's why I'd like to see [deprecations in PR summary](https://github.com/symfony/symfony-docs/pull/2116) what do you think ?
---------------------------------------------------------------------------
by vicb at 2013-01-14T23:16:40Z
it would also be great to update the CHANGELOG with deprecations (it could also help people answering your question)
---------------------------------------------------------------------------
by fabpot at 2013-01-15T07:07:03Z
@vicb: I've just updated the CHANGELOG and created the UPGRADE file for 3.0.
---------------------------------------------------------------------------
by vicb at 2013-01-15T07:15:32Z
@fabpot thanks.
getValue() is deprecated since version 2.2 and will be removed in 2.3. Use getPropertyValue() instead.
ClassMetadata is still using the deprecated method, changed it to getPropertyValue to prevent a trigger error.
This PR was merged into the master branch.
Commits
-------
c1d5f16 Update src/Symfony/Component/HttpKernel/Tests/EventListener/RouterProxyListenerTest.php
Discussion
----------
Typo fix
Just a typo fix
This PR was merged into the master branch.
Commits
-------
fb52d94 Update src/Symfony/Component/Security/Resources/translations/security.es_CA.xlf
Discussion
----------
Update src/Symfony/Component/Security/Resources/translations/security.es...
..._CA.xlf
This PR was merged into the master branch.
Commits
-------
0a060ca Fix Russian and Ukrainian translations for Security component
Discussion
----------
[Security] Fix Russian and Ukrainian translations
This PR was merged into the 2.1 branch.
Commits
-------
4991607 Fix version_compare() calls for PHP 5.5.
34def9f Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
Discussion
----------
[Form] [Locale] PHP 5.5 compatibility fixes
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: None
License of the code: MIT
Documentation PR: N/A
IntlDateFormatter::setTimeZoneId() is deprecated in PHP 5.5, which results in E_DEPRECATED errors when using the date form type. This PR works around that.
Furthermore, the version_compare() tests used in locale to detect PHP 5.5 are broken with snapshot and Git builds of PHP. I've also committed a fix for those tests in this PR.
---------------------------------------------------------------------------
by stof at 2013-01-10T08:24:15Z
shouldn't it even be done in 2.0 as it is a bugfix ?
---------------------------------------------------------------------------
by LawnGnome at 2013-01-11T00:49:11Z
Possibly — I don't know enough about Symfony's release management to know whether this is appropriate for 2.0, and I was mostly scratching my own itch, honestly.
---------------------------------------------------------------------------
by stof at 2013-01-11T01:51:35Z
well, it is a bugfix and 2.0 is also impacted, so it should be done in it.
---------------------------------------------------------------------------
by LawnGnome at 2013-01-11T02:52:21Z
The diff for 2.0 looks like it'll be just the StubIntlDateFormatter.php changes — the deprecated method isn't called in DateType on that branch, and there aren't any StubIntlDateFormatter tests on 2.0. How do you want that submitted — as a separate PR against 2.0?
---------------------------------------------------------------------------
by fabpot at 2013-01-11T07:20:18Z
@LawnGnome A separate pull request would be good. Thanks.
---------------------------------------------------------------------------
by LawnGnome at 2013-01-11T08:29:48Z
2.0 PR added as #6699.
* 2.0:
Fix version_compare() calls for PHP 5.5.
[Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
Conflicts:
src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php
This PR was merged into the master branch.
Commits
-------
6b669fb Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf
Discussion
----------
Update src/Symfony/Component/Security/Resources/translations/security.nl.xlf
see #6668
Some more minor tweaks
This PR was merged into the master branch.
Commits
-------
f127781 Update src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
Discussion
----------
[FrameworkBundle] add missing use statement HttpKernelInterface for forward method
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
---------------------------------------------------------------------------
by lsmith77 at 2013-01-11T13:31:01Z
+1
This PR was merged into the master branch.
Commits
-------
83d0469 Create security.no.xlf
Discussion
----------
Norwegian Translation for Security
Norwegian Translation
This PR was merged into the master branch.
Commits
-------
2617cf6 Added Turkish translation for security component
Discussion
----------
Added Turkish translation for security component
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
This PR was merged into the master branch.
Commits
-------
d027f45 [PROFILER][REDIS] Support database, auth on redis connection
Discussion
----------
[PROFILER][REDIS] Support database, auth on redis connection
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Allow database and password on dsn:
```yml
framework:
profiler:
dsn: redis://127.0.0.1:6379
dsn: redis://127.0.0.1:6379/3
dsn: redis://user:password@127.0.0.1:6379/3
```
Since redis uses only password for authentification, user will not be used ...
---------------------------------------------------------------------------
by shouze at 2013-01-10T16:58:02Z
👍 db selection is a must have
This PR was merged into the master branch.
Commits
-------
76fefe3 updated CHANGELOG and UPGRADE files
f7da1f0 added some unit tests (and fixed some bugs)
f17f586 moved the container aware HTTP kernel to the HttpKernel component
2eea768 moved the deprecation logic calls outside the new HttpContentRenderer class
bd102c5 made the content renderer work even when ESI is disabled or when no templating engine is available (the latter being mostly useful when testing)
a8ea4e4 [FrameworkBundle] deprecated HttpKernel::forward() (it is only used once now and not part of any interface anyway)
1240690 [HttpKernel] made the strategy a regular parameter in HttpContentRenderer::render()
adc067e [FrameworkBundle] made some services private
1f1392d [HttpKernel] simplified and enhanced code managing the hinclude strategy
403bb06 [HttpKernel] added missing phpdoc and tweaked existing ones
892f00f [HttpKernel] added a URL signer mechanism for hincludes
a0c49c3 [TwigBridge] added a render_* function to ease usage of custom rendering strategies
9aaceb1 moved the logic from HttpKernel in FrameworkBundle to the HttpKernel component
Discussion
----------
[WIP] Kernel refactor
Currently, the handling of sub-requests (including ESI and hinclude) is mostly done in FrameworkBundle. It makes these important features harder to implement for people using only HttpKernel (like Drupal and Silex for instance).
This PR moves the code to HttpKernel instead. The code has also been refactored to allow easier integration of other rendering strategies (refs #6108).
The internal route has been re-introduced but it can only be used for trusted IPs (so for the internal rendering which is managed by Symfony itself, or by a trusted reverse proxy like Varnish for ESI handling). For the hinclude strategy, when using a controller, the URL is automatically signed (see #6463).
The usage of a listener instead of a controller to handle internal sub-requests speeds up things quite a lot as it saves one sub-request handling. In Symfony 2.0 and 2.1, the handling of a sub-request actually creates two sub-requests.
Rendering a sub-request from a controller can be done with the following code:
```jinja
{# default strategy #}
{{ render(path("partial")) }}
{{ render(controller("SomeBundle:Controller:partial")) }}
{# ESI strategy #}
{{ render(path("partial"), { strategy: 'esi' }) }}
{{ render(controller("SomeBundle:Controller:partial"), { strategy: 'esi' }) }}
{# hinclude strategy #}
{{ render(path("default1"), { strategy: 'hinclude' }) }}
```
The second commit allows to simplify the calls a little bit thanks to some nice syntactic sugar:
```jinja
{# default strategy #}
{{ render(path("partial")) }}
{{ render(controller("SomeBundle:Controller:partial")) }}
{# ESI strategy #}
{{ render_esi(path("partial")) }}
{{ render_esi(controller("SomeBundle:Controller:partial")) }}
{# hinclude strategy #}
{{ render_hinclude(path("default1")) }}
```
---------------------------------------------------------------------------
by fabpot at 2013-01-03T17:58:49Z
I've just pushed a new version of the code that actually works in my browser (but I've not yet written any unit tests). I've updated the PR description accordingly.
All comments welcome!
---------------------------------------------------------------------------
by Koc at 2013-01-03T20:11:43Z
what about `render(controller="SomeBundle:Controller:partial", strategy="esi")`?
---------------------------------------------------------------------------
by stof at 2013-01-04T09:01:01Z
shouldn't we have interfaces for the UriSigner and the HttpContentRenderer ?
---------------------------------------------------------------------------
by lsmith77 at 2013-01-04T19:28:09Z
btw .. as mentioned in #6213 i think it would make sense to refactor the HttpCache to use a cache layer to allow more flexibility in where to cache the data (including clustering) and better invalidation. as such if you are refactoring HttpKernel .. it might also make sense to explore splitting off HttpCache.
---------------------------------------------------------------------------
by fabpot at 2013-01-04T19:30:07Z
@lsmith77 This is a totally different topic. This PR is just about moving things from FrameworkBundle to HttpKernel to make them more reusable outside of the full-stack framework.
---------------------------------------------------------------------------
by fabpot at 2013-01-05T09:39:52Z
I think this PR is almost ready now. I still need to update the docs and add some unit tests. Any other comments on the whole approach? The class names? The `controller` function thingy? The URI signer mechanism? The proxy protection for the internal controller? The proxy to handle internal routes?
---------------------------------------------------------------------------
by sstok at 2013-01-05T10:08:25Z
Looks good to me 👍
---------------------------------------------------------------------------
by sdboyer at 2013-01-07T18:17:08Z
@Crell asked me to weigh in, since i'm one of the Drupal folks who's likely to work most with this.
i think i've grokked about 60% of the big picture here, and i'm generally happy with what i see. the assumption that the HInclude strategy makes about working with templates probably isn't one that we'll be able to use (and so, would need to write our own), but that's not a big deal since the whole goal here is to make strategies pluggable.
so, yeah. +1.
---------------------------------------------------------------------------
by winzou at 2013-01-09T20:21:44Z
Just for my information: will this PR be merged for 2.2 version? Thanks.
---------------------------------------------------------------------------
by stof at 2013-01-09T20:41:04Z
@winzou according to the blog post announcing the beta 1 release, yes. It is explicitly listed as being one of the reason to make it a beta instead of the first RC.
---------------------------------------------------------------------------
by winzou at 2013-01-09T20:49:36Z
OK thanks, I've totally skipped this blog post.
---------------------------------------------------------------------------
by fabpot at 2013-01-10T15:26:15Z
I've just added a bunch of unit tests and fix some bugs I found while writing the tests.
It is more common to use fully camel-cased names for test methods. Only some of the test methods are called with underscore notation. To avoid confusion it is better to be consistent.
This PR was merged into the master branch.
Commits
-------
6b1652e [PropertyAccess] Property path, small refactoring, read/writeProperty to read/write Property/Index.
1bae7b2 [PropertyAccess] Extracted PropertyAccess component out of Form
Discussion
----------
[PropertyAccess] Extracted PropertyAccess component out of Form
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
TODO: adapt DoctrineBundle/PropelBundle to pass the "property_accessor" service to EntityType/ModelType
Usage:
```php
$accessor = PropertyAccess::getPropertyAccessor();
// equivalent to $object->getFoo()->setBar('value')
$accessor->setValue($object, 'foo.bar', 'value');
// equivalent to $object->getFoo()->getBar()
$accessor->getValue($object, 'foo.bar');
// equivalent to $object->getFoo()['bar']
$accessor->getValue($object, 'foo[bar]');
// equivalent to $array['foo']->setBar('value')
$accessor->setValue($array, '[foo].bar', 'value');
// equivalent to $array['foo']['bar']
$accessor->getValue($array, '[foo][bar]');
```
Later on, once we have generation and caching of class-specific accessors, configuration will be something like this (consistent with the Form and Validator component):
```php
$accessor = PropertyAccess::getPropertyAccessorBuilder()
->setCacheDirectory(__DIR__ . '/cache')
->setCacheLifeTime(86400)
->enableMagicGetSet()
->enableMagicCall()
->getPropertyAccessor();
```
or
```php
$accessor = PropertyAccess::getPropertyAccessorBuilder()
->setCache($cache)
->getPropertyAccessor();
```
etc.
---------------------------------------------------------------------------
by Burgov at 2013-01-07T08:48:15Z
+1. I use this feature outside of the Form context a lot
---------------------------------------------------------------------------
by stof at 2013-01-07T08:49:34Z
The classes in the Form component should be kept for BC (and deprecated) for people using the feature
---------------------------------------------------------------------------
by michelsalib at 2013-01-07T10:02:19Z
YES YES YES 👍. Sorry for my enthusiasm, but I already copy pasted the PropertyPath class to some of my libraries to avoid linking to the whole Form component. I thus will be glad to officially use this component into my libraries via composer.
---------------------------------------------------------------------------
by norzechowicz at 2013-01-07T10:17:39Z
Same as @michelsalib to avoid linking full Form component I was using copied parts of code. Can't wait to use this component in my lib. 👍
---------------------------------------------------------------------------
by bschussek at 2013-01-07T10:43:41Z
I split away `getValue()` and `setValue()` from `PropertyPath` into a new class `ReflectionGraph`. The component is also named ReflectionGraph now.
---------------------------------------------------------------------------
by michelsalib at 2013-01-07T10:47:10Z
I am not found of the name. What do you intend to do in the component more than what PropertyPath does ?
---------------------------------------------------------------------------
by bschussek at 2013-01-07T10:58:59Z
@michelsalib A `PropertyPath` is simply a string like `foo.bar[baz]`. `getValue()` and `setValue()` interpret this path. There may be different interpretations for the same path, so these methods were split into a new class.
I chose the name `ReflectionGraph` because the functionality is very similar to `ReflectionProperty`.
```php
$reflProperty = new ReflectionProperty('Vendor/Class', 'property');
$reflProperty->setValue($object, 'foo');
$reflGraph = new ReflectionGraph();
$reflGraph->setValue($object, 'property.path', 'foo');
```
---------------------------------------------------------------------------
by michelsalib at 2013-01-07T11:00:42Z
What about naming it `Reflection`, maybe sometime we will want to add more reflection tools for classes, interfaces... ?
---------------------------------------------------------------------------
by bschussek at 2013-01-07T11:02:32Z
@michelsalib I doubt that we will do that. PHP's implementation is sufficient.
---------------------------------------------------------------------------
by vicb at 2013-01-07T11:03:57Z
> Backwards compatibility break: no
Really ?
---------------------------------------------------------------------------
by michelsalib at 2013-01-07T11:05:07Z
Well, that is just a suggestion. If I am the only one to oppose, I won't complain.
---------------------------------------------------------------------------
by bschussek at 2013-01-07T11:09:08Z
> Really ?
@vicb Would you please refrain from such meanginless comments in the future? I'm getting a bit tired of them. If you think that BC is broken somewhere, tell me where so that I can fix it.
---------------------------------------------------------------------------
by stof at 2013-01-07T11:09:43Z
@vicb There is no BC break as he kept deprecated classes for BC
---------------------------------------------------------------------------
by norzechowicz at 2013-01-07T11:13:12Z
@bschussek what do you think about some kind of factory for Reflection? This will prevent creating new Reflection objects each time you want to access properties values.
---------------------------------------------------------------------------
by vicb at 2013-01-07T11:18:47Z
@bschussek my point is that my comment is no more meaningless than closing #6453 because it will break BC.We could also keep BC by extending the classes in the new ns but in both cases BC will ultimately be broken (when the legacy classes are removed)
---------------------------------------------------------------------------
by vicb at 2013-01-07T12:23:45Z
@bschussek @stof I think that modifying the constructor signatures of `EntityChoiceList`, `FormType` are BC breaks (this is not an exhaustive list)
---------------------------------------------------------------------------
by bschussek at 2013-01-07T12:35:13Z
@vicb You are right. I added corresponding entries to the CHANGELOG and adapted the above description.
---------------------------------------------------------------------------
by vicb at 2013-01-08T13:39:13Z
@bschussek looking at this PR, I was wondering if an alternate syntax would make sense:
```php
<?php
$reflGraph = new ReflectionGraph($object);
// equivalent to $object->getFoo()->setBar('value')
$reflGraph['foo.bar'] = 'value';
// equivalent to $object->getFoo()->getBar()
$reflGraph['foo.bar'];
```
_Sorry for the off topic_
---------------------------------------------------------------------------
by vicb at 2013-01-08T13:49:46Z
The advantage of using such a `ReflectionGraph` factory is that it might be easier to return specialized reflection graphs, ie optimized instances (that would be cached).
---------------------------------------------------------------------------
by Toflar at 2013-01-08T14:49:54Z
I was also puzzled by the fact that there will be many `ReflectionGraph` instances although they don't have to. I'm with @vicb and I'd also vote for using the constructor to set the subject you're working on. Otherwise you'll repeat yourself over and over again by passing the subject - say `$object` - to `getValue()` or `setValue()`. If however you don't like the constructor thing then why do we have to have an instance of `ReflectionGraph` rather than just go for static methods and use `ReflectionGraph::getValue()` and `ReflectionGraph::setValue()`?
In my opinion there are a few methods that could be static anyway (especially some private ones) :)
But probably I misunderstood something as I'm just about to discover the SF components and don't have any experience working with them (so basically I just read the PR because of @bschussek's tweet :D)
Couldn't come up with any intuitive name for the component though :(
Generally when we talk about "getting" and "setting" values we call those things "mutators"...so `GraphMutator` might be more intuitive than the word `Reflection` :)
---------------------------------------------------------------------------
by Taluu at 2013-01-08T14:57:42Z
I like the last proposition made by @vicb (implementing `ArrayAccess` on `ReflectionGraph` - or whatever name will be chosen (`PathMutator` for example :D), and also specify which object should be worked on in the constructor rather than in each method).
Would this also be used in the `Validator` component ?
---------------------------------------------------------------------------
by stof at 2013-01-08T15:16:12Z
@Toflar A static ``ReflectionGraph::getValue()`` means you have a coupling to the implementation (as with any static call). The current implementation allows you to replace it with your own implementation as long as you implement the interface as it follows the DI pattern (as done in other places in Symfony).
@vicb The issue with ``$reflGraph = new ReflectionGraph($object);`` is that you cannot inject the ReflectionGraph anymore, as you need a new one each time. This would mean adding a ``ReflectionGraphFactory`` to be injected (and which could then be replaced by a factory using code generation). Using the constructor directly would not allow using a replacement based on code generation later. So the resulting code would more likely be
```php
$reflGraph = new ReflectionGraph();
$mutator = $reflGraph->getMutator($object);
// equivalent to $object->getFoo()->setBar('value')
$mutator['foo.bar'] = 'value';
// equivalent to $object->getFoo()->getBar()
$mutator['foo.bar'];
```
Btw, writing this, I find the naming Mutator suggested by @Taluu good when it concerns the setter, but quite weird when getting the value.
---------------------------------------------------------------------------
by Taluu at 2013-01-08T15:21:00Z
I was not the one to suggest though, it was @everzet. But then something like `PathAccessor`, as it is both a mutator and a getter ? I also like @stof suggestion, still in the idea of avoiding to have to put the object as an argument and also allowing to use an `ArrayAccess` interface..
---------------------------------------------------------------------------
by vicb at 2013-01-08T15:21:54Z
@stof your remark makes sense.
What about `Accessor`, the benefit being that it might well be the name of a coming PHP feature: https://wiki.php.net/rfc/propertygetsetsyntax-v1.2
---------------------------------------------------------------------------
by everzet at 2013-01-08T15:27:02Z
```php
$manager = new PropertyManager(new PropertyPath());
$num = $manager->getValue($object, 'foo.num');
$manager->setValue($object, 'foo.num', $num + 1);
$objectManager = new ObjectPropertyManager($object[, $manager]);
$num = $objectManager->getValue('foo.num');
$objectManager->setValue('foo.num', $num + 1);
$objectManager['foo.num'] += 1;
```
---------------------------------------------------------------------------
by bschussek at 2013-01-08T15:28:01Z
It might be me, but I don't like `ArrayAccess` to be misused for features like that. If I access a key in an array access structure, I expect it to be something like a collection, an associative array or a key value store. This class is neither.
Putting that aside, an accessor for a specific object might make sense, but I'm not sure about that yet.
```php
$reflObject->setValue('foo.bar', 'value');
$reflObject->getValue('foo.bar');
```
---------------------------------------------------------------------------
by stof at 2013-01-08T15:28:52Z
@vicb I would vote for PathAccessor then, as we are not doing simple accessor but accessors through a path in an object graph.
In my snippet above, we would then have a ReflectionGraph instance and a PathAccessor instance (``$mutator``).
Btw, I would also keep the methods ``setValue`` and ``getValue``. I find it more clear.
---------------------------------------------------------------------------
by bschussek at 2013-01-08T15:32:07Z
@stof But then we're rather left with the question of ReflectionGraph **vs.** PathAccessor. I don't think that the tiny interface difference (one global, one object-based) justifies the big naming difference.
---------------------------------------------------------------------------
by vicb at 2013-01-08T15:33:24Z
> This class is neither.
It might be `$pa['foo.bar[baz]'] = $pa['foo.bar']['baz'];` I don't know if it would help though.
---------------------------------------------------------------------------
by stof at 2013-01-08T15:35:51Z
@bschussek In my suggestion, ``ReflectionGraph`` is a factory for the PathAccessor objects. It is not accessing anymore itself (which would probably continue to cause issues to implement it with code generation). But the naming could indeed be changed to something else.
This PR was merged into the master branch.
Commits
-------
1edf302 Fixed some translation typos
Discussion
----------
Fixed translation typos on the Security componente
Hi,
In my last PR I've introduced some translation typos on the Security component messages for the Spanish translation.
So sorry.
Christian.
This PR was merged into the master branch.
Commits
-------
77545a2 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf
Discussion
----------
Update src/Symfony/Component/Security/Resources/translations/security.es...
....xlf
---------------------------------------------------------------------------
by mweimerskirch at 2013-01-10T17:43:38Z
Duplicate of #6684?
This PR was merged into the master branch.
Commits
-------
a1ef9d8 Fixed 2 typos in French translation
Discussion
----------
Fixed 2 typos in French translation
This PR was merged into the master branch.
Commits
-------
b92973c Fixed German translations for security component
Discussion
----------
Fixed German translations for security component
authentication != authorisation
plus a few other minor things
This PR was merged into the master branch.
Commits
-------
9471a1c Added Luxembourgish translation for security component
Discussion
----------
Added Luxembourgish translation for security component
This PR was merged into the master branch.
Commits
-------
67d7423 Remove use of deprecated HttpKernel LoggerInterface
dca4528 [HttpKernel] Extend psr/log's NullLogger class
1e5a890 [Monolog] Mark old non-PSR3 methods as deprecated
91a86f8 [HttpKernel][Monolog] Add PSR-3 support to the LoggerInterface
Discussion
----------
[HttpKernel][MonologBridge] PSR-3 support
This enables PSR-3 support and monolog 1.3+. The first commit is the main part. The rest deals with deprecation of short-hand methods (warn/err/crit/emerg) that are fully expanded in PSR-3 (warning/error/critical/emergency).
The downside of deprecating them is that for bundles it's a bit harder to support older and newer versions. If that is too much of a hassle you can drop that for now and cherry pick the first commit.
The upside is that it forces people to move towards PSR-3 compatible stuff, which means eventually we could completely drop the LoggerInterface from the framework. In any case I think the documentation should only mention the `Psr\Log\LoggerInterface` and people should start hinting against that. The change should be done in core as well I suppose.
Anyway I wanted to throw this out there as it is to get feedback.
---------------------------------------------------------------------------
by stof at 2013-01-09T09:15:15Z
@Seldaek I also think you should change the typehint to use the PSR LoggerInterface in all classes using the logger
---------------------------------------------------------------------------
by Seldaek at 2013-01-09T09:54:55Z
OK updated according to all the feedback. I tested it in an app and it still seems to work so there shouldn't be any major issues.
---------------------------------------------------------------------------
by Seldaek at 2013-01-09T09:59:55Z
@fabpot if you merge please merge also the bundle PR, otherwise it won't be possible to update without conflict.
---------------------------------------------------------------------------
by frosas at 2013-01-10T14:59:20Z
I'm trying to understand why a `composer update` of a Symfony 2.1.* resulted in a fatal error. Shouldn't a stable version don't break like this?
As @olaurendeau points, why Symfony depends 1.* instead of 1.2.*? Or why Monolog 1.3 breaks its public interface (EDIT: I'm not sure about it)? Or why isn't this PR being merged (into branch 2.1) at the same time Monolog 1.3 is released?
Please, understand I'm not looking for who to blame, it's just I want to know if this situation is unexpected or if otherwise a `composer update` on a stable branch is not as innocent as it seems.
---------------------------------------------------------------------------
by stof at 2013-01-10T15:06:51Z
@frosas it cannot be merged into 2.1 as it is a BC break. The 2.1 branch has been updated to forbid Monolog 1.3 already
---------------------------------------------------------------------------
by Seldaek at 2013-01-10T15:11:58Z
@frosas you can blame me for releasing as 1.3.0 and not 2.0, but technically for monolog this isn't really a BC break, I just added an interface. The problem is due to the way it's used in symfony, it ended up as a fatal error. In any case the situation is now sorted out I think.
---------------------------------------------------------------------------
by frosas at 2013-01-10T15:26:43Z
@stof now I see this `>=1.0,<1.3-dev` change in the 2.1 branch. Now, shouldn't a new (2.1.7) version be released for all of us not in the dev minimum-stability?
@Seldaek then do you see feasible to rely only in X.Y.* versions to avoid this kind of errors?
---------------------------------------------------------------------------
by Seldaek at 2013-01-10T15:45:22Z
@frosas relying on X.Y.* is painful because you always need to wait until someone updates the constraint to get the new version. Of course using ~1.3 like in this PR means if I fuck up and break BC people will update to it, but that's a less likely occurrence than the alternative I think, so I would rather not use X.Y.*
---------------------------------------------------------------------------
by frosas at 2013-01-10T15:50:50Z
@Seldaek you are right about this, but I was thinking more in changing it only for the stable versions. EDIT: I mean, how often do you need a new feature in a branch you only apply fixes to?
---------------------------------------------------------------------------
by stof at 2013-01-10T15:57:32Z
@frosas Monolog and Symfony have separate release cycles. Foorcing Symfony users to use an old version of Monolog until they update to a new version of Symfony whereas the newer Monolog is compatible is a bad idea. Thus, as Monolog keeps BC, it does not maintain bugfix releases for all older versions (just like Twig does too). So it would also forbid you to get the fixes done in newer Monolog versions.
The incompatibility between Symfony 2.1 LoggerInterface and PSR-3 (whereas they expect exactly the same behavior and signature for methods with the same name) is unfortunate and is the reason why we get some issues here.
---------------------------------------------------------------------------
by frosas at 2013-01-10T16:21:06Z
@stof I appreciate you prefer to allow newer versions at the price of having to be constantly monitoring its changes to avoid breaks.
Another similar but safer strategy would be to stick to X.Y.* versions and upgrade to X.Y+1.* once the new version integration is tested, but I understand this is discutible in projects as close to Symfony as Monolog.
Returning to the issue, what do you say to release this 2.1.7 version? Or is it only me who is having issues here?
---------------------------------------------------------------------------
by stof at 2013-01-10T16:26:20Z
@frosas a minor release should not break BC when following smeantic versionning (Symfony warned about the fact it is not strictly followed for the first releases of 2.x). But as far as monolog is concerned, 1.3 is BC with 1.2.
---------------------------------------------------------------------------
by Seldaek at 2013-01-10T16:49:55Z
@frosas sorry I didn't get you still had the problem. I tagged a 2.1.7 of monologbundle which hopefully fixes your issue.
This PR was merged into the master branch.
Commits
-------
0b75f67 Security component Polish message translations
Discussion
----------
[Security] Polish message translations
Security component messages translated from English to Polish.
This PR was merged into the master branch.
Commits
-------
c06e627 Fixed some typos
Discussion
----------
FIxed some typos in the Spainsh translation of the Security component messages
Hi,
In order to show the most clear and less _"robotic"_ messages in Spanish, I've fixed some typos and some incorrect translations in the Spanish translation file of the Security component.
Christian.
This PR was merged into the master branch.
Commits
-------
e84a8d0 fixed some small issues with grammar and used terminology
Discussion
----------
fixed some small issues with grammar and used terminology
This PR was merged into the master branch.
Commits
-------
d5825aa slovenian translations of security component added
Discussion
----------
Slovenian translations of security component added
This PR was merged into the master branch.
Commits
-------
d6f972b Created Slovak translation to Security
Discussion
----------
[security][tranlation] Created Slovak translation to Security
This PR was merged into the master branch.
Commits
-------
6ae8ca8 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf
Discussion
----------
Update src/Symfony/Component/Security/Resources/translations/security.es...
....xlf
This PR was merged into the master branch.
Commits
-------
9b8428d [security][tranlation]Fixed spanish translation
Discussion
----------
[security][tranlation]Fixed spanish translation
This PR was merged into the master branch.
Commits
-------
0b5177b added italian translations
Discussion
----------
added italian translations for the security component
---------------------------------------------------------------------------
by matteosister at 2013-01-10T14:22:54Z
not sure if the file should be named **security.it_IT.xlf** or **security.it.xlf**
---------------------------------------------------------------------------
by fabpot at 2013-01-10T14:25:49Z
security.it.xlf
---------------------------------------------------------------------------
by matteosister at 2013-01-10T14:31:14Z
ok, renamed the files, and squashed the pr to a single commit!
Thanks @fabpot!
This PR was squashed before being merged into the master branch (closes#6660).
Commits
-------
45c8682 [Security][Translation]Created fr translation for Security
Discussion
----------
[Security][Translation]Created fr translation for Security
adds french translations for the security component
This PR was merged into the master branch.
Commits
-------
c3a6659 [Security] added Hungarian translations for exception messages
Discussion
----------
[Security] added Hungarian translations for exception messages
This PR was merged into the master branch.
Commits
-------
2f51961 Created de translation for Security
Discussion
----------
[Security][Translation]Created de translation for Security
This PR was merged into the master branch.
Commits
-------
e35998f Translated to Romanian
Discussion
----------
[Security] Translated to Romanian
Added Romanian version for Security messages.
Thanks!
This PR was merged into the master branch.
Commits
-------
68257d3 Enhanced the triggering of E_USER_DEPRECATED errors
Discussion
----------
Enhanced the triggering of E_USER_DEPRECATED errors
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: none
- Removed useless error handlers around FormEvent as the triggering has
been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
method provide some user logic needing to be converted to a new way.
For instance, AbstractType should trigger the error when the type extending it overwrites the deprecated methods instead of ``setDefaultOptions``, which was not the case previously.
- Enhanced the deprecation messages to mention the replacement whenever
possible.
---------------------------------------------------------------------------
by stof at 2013-01-10T01:23:49Z
@fabpot should I remove ``Symfony\Component\Form\Test\DeprecationErrorHandler::getFormEvent`` ? It is not used anymore in the testsuite and is not needed anymore as the constructor of FormEvent does not trigger the deprecation erronously.
---------------------------------------------------------------------------
by fabpot at 2013-01-10T07:24:02Z
@stof: yes, remove it then. Thanks.
---------------------------------------------------------------------------
by stof at 2013-01-10T08:23:14Z
done
This PR was merged into the master branch.
Commits
-------
73db84f [Security] Move translations file to 'security' domain
324703a [Security] Switch to English messages as message keys
aa74769 [Security] Fix CS + unreachable code
2d7a7ba [Security] Fix `AuthenticationException` serialization
50d5724 [Security] Introduced `UsernameNotFoundException#get/setUsername`
39da27a [Security] Removed `get/setExtraInformation`, added `get/set(Token|User)`
837ae15 [Security] Add note about changed constructor to changelog
d6c57cf [FrameworkBundle] Register security exception translations
d7129b9 [Security] Fix exception constructors called in `UserChecker`
0038fbb [Security] Add initial translations for AccountStatusException childs
50e2cfc [Security] Add custom `getMessageKey` AccountStatusException childs
1147977 [Security] Fix InsufficientAuthenticationException constructor calls
79430b8 [Security] Fix AuthenticationServiceException constructor calls
42cced4 [Security] Fix AuthenticationException constructor calls
963a1d7 [Security] Add initial translations for the exceptions
ed6eed4 [Security] Add `getMessageKey` and `getMessageData` to auth exceptions
694c47c [Security] Change signature of `AuthenticationException` to match `\Exception`
Discussion
----------
[2.2][Security] AuthenticationException enhancements
Bug fix: semi
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=issue-837)](http://travis-ci.org/asm89/symfony)
Fixes the following tickets: #837
License of the code: MIT
This PR adds the functionality discussed in #837 and changes the constructor of the `AuthenticationException` to match that of `\Exception`. This PR will allow developers to show a translated (save) authentication exception message to the user. :)
*Todo:*
- Add some functional test to check that the exceptions can indeed be translated?
- Get feedback on the current English messages
---------------------------------------------------------------------------
by asm89 at 2012-07-15T14:04:11Z
ping @schmittjoh
---------------------------------------------------------------------------
by schmittjoh at 2012-07-15T14:57:32Z
Looks good to me.
While you are at the exceptions, I think we can also get rid of the "extra information" thing and replace it by explicit getters/setters. Mostly that will mean adding set/getToken, set/getUser, set/getUsername. Bundles might add custom exceptions which have other data. This will make it a bit more useful and predictable.
---------------------------------------------------------------------------
by asm89 at 2012-07-15T15:40:45Z
@schmittjoh I removed the `get/setExtraInformation` and added the more explicit getters/setters as you suggested.
---------------------------------------------------------------------------
by asm89 at 2012-07-15T19:33:15Z
@fabpot Did you reschedule this for 2.2? Why? It was originally a 2.1 ticket. I think it is an important one because at the moment there is no reliable way to show users the cause of an `AuthenticationException` without the threat of exposing sensitive information. This issue has been around for a while, see the original issue this PR refers to, or for example [this TODO comment in FOSUB](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Controller/SecurityController.php#L37).
The PR itself is ready to merge now. My only question that remains is about whether the actual translations should be functional tested?
---------------------------------------------------------------------------
by fabpot at 2012-07-15T19:43:19Z
We need to stop at some point. If not, we never release anything. beta3 was scheduled for today and I don't plan any other one before the first RC and I won't have time to review this PR next week. So, if you, @schmittjoh, @vicb, @stof, and a few other core devs "validate" this PR, I might consider merging it before 2.1.
---------------------------------------------------------------------------
by asm89 at 2012-07-15T19:46:09Z
@fabpot I totally agree with your point of view. I just have been trying to pickup some security issues that were still open. :)
---------------------------------------------------------------------------
by stof at 2012-07-15T19:50:29Z
This looks good to me
---------------------------------------------------------------------------
by asm89 at 2012-08-12T09:06:24Z
Since the beta period is over I assume the window was missed to get this security related PR in 2.1. If I have feedback from @fabpot I'll still try to make it mergeable asap though.
---------------------------------------------------------------------------
by fabpot at 2012-08-13T10:10:32Z
@asm89 This would indeed be considered for merging in 2.2.
---------------------------------------------------------------------------
by Antek88 at 2012-10-03T10:30:46Z
+1
---------------------------------------------------------------------------
by stof at 2012-10-04T21:27:15Z
@asm89 could you rebase this PR ? It conflicts with master
---------------------------------------------------------------------------
by fabpot at 2012-10-05T17:16:44Z
What's the status of this PR? @asm89 Have you taken all the feedback into account?
---------------------------------------------------------------------------
by stof at 2012-10-13T17:48:48Z
@asm89 ping
---------------------------------------------------------------------------
by fabpot at 2012-10-29T09:48:40Z
@asm89 If you don't have time, I can finish the work on this PR, but can you just tell me what's left?
---------------------------------------------------------------------------
by asm89 at 2012-10-29T10:02:22Z
I can pick this up, but I have two outstanding questions:
- One about adding `::create()`? https://github.com/symfony/symfony/pull/4935#discussion_r1358297
- And what is the final verdict on the messages? https://github.com/symfony/symfony/pull/4935#discussion_r1165701 The initial idea was that the exception itself have an exception message which is plain english and informative for the developer. If you want to display the 'safe' user messages you have the optional dependency on the translator. There is a comparison made with the Validator component, but in my opinion that's a different case because the violations always contain the message directed at the user and have no plain english message for the developer. Apart from that the Validator component contains it's own code for replacing `{{ }}` variables in messages (duplication? not as flexible as the translator). Concluding I'd opt for: optional dependency on translator component if you want to show 'safe' user messages + message keys.
@schmittjoh Any things to add?
---------------------------------------------------------------------------
by schmittjoh at 2012-10-29T10:14:09Z
Message keys sound good to me. I wouldn't add the ``create`` method for now.
On Mon, Oct 29, 2012 at 11:02 AM, Alexander <notifications@github.com>wrote:
> I can pick this up, but I have two outstanding questions:
>
> - One about adding ::create()? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1358297>
> - And what is the final verdict on the messages? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1165701>The initial idea was that the exception itself have an exception message
> which is plain english and informative for the developer. If you want to
> display the 'safe' user messages you have the optional dependency on the
> translator. There is a comparison made with the Validator component, but in
> my opinion that's a different case because the violations always contain
> the message directed at the user and have no plain english message for the
> developer. Apart from that the Validator component contains it's own code
> for replacing {{ }} variables in messages (duplication? not as
> flexible as the translator). Concluding I'd opt for: optional dependency on
> translator component if you want to show 'safe' user messages + message
> keys.
>
> @schmittjoh <https://github.com/schmittjoh> Any things to add?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-9861016>.
>
>
---------------------------------------------------------------------------
by fabpot at 2012-10-29T10:27:37Z
As I said in the discussion about the translations, I'm -1 for the message keys to be consistent with how we manage translations everywhere else in the framework.
---------------------------------------------------------------------------
by stof at 2012-10-29T10:30:50Z
@fabpot When we changed the English translation for the validation errors in 2.1, we had to tag the commit as a BC rbeak as it was changing the source for all other translations. And if you look at the state of the files now, you will see that we are *not* using the English as source anymore in some places as some validation errors have a pluralized translation but the source has not been changed.
So I think using a key is more future-proof.
---------------------------------------------------------------------------
by asm89 at 2012-10-30T19:44:49Z
Any final decision on this? On one hand I have @stof and @schmittjoh +1 on message keys, on the other @fabpot -1. I guess it's your call @fabpot.
Edit: also @vicb seemed to be +1 on message keys earlier on.
---------------------------------------------------------------------------
by drak at 2012-11-01T20:19:00Z
I am also -1, I agree with @fabpot
---------------------------------------------------------------------------
by asm89 at 2012-11-12T09:38:51Z
@fabpot Can you please give a definite answer on this? I personally think @stof and @vicb have good points to do message keys, but with all these different people +1 and -1'ing the PR I'm lost on what it should actually do.
---------------------------------------------------------------------------
by asm89 at 2012-11-14T09:59:06Z
ping @fabpot
---------------------------------------------------------------------------
by asm89 at 2012-11-26T10:01:27Z
ping @fabpot We talked about this in Berlin. Any final thoughts on the PR? :) One idea was to do message keys + opt depend on the translator component if you want to use them, or use your own implementation.
---------------------------------------------------------------------------
by fabpot at 2012-11-26T14:01:37Z
The conclusion is: keep using plain English.
On Mon, Nov 26, 2012 at 11:01 AM, Alexander <notifications@github.com>wrote:
> ping @fabpot <https://github.com/fabpot> We talked about this in Berlin.
> Any final thoughts on the PR? :) One idea was to do message keys + opt
> depend on the translator component if you want to use them, or use your own
> implementation.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-10709997>.
>
>
---------------------------------------------------------------------------
by Inori at 2012-11-26T15:00:22Z
is this final? if not, then +1 for message keys
---------------------------------------------------------------------------
by vicb at 2012-11-27T22:33:47Z
@fabpot I can't understand why we keep discussing this for months as this implementation use *both* keys and plain Englis, ie using keys is optional ( if it was not it would not be an issue according to #6129)
---------------------------------------------------------------------------
by asm89 at 2013-01-02T21:43:46Z
@fabpot @vicb I'll rebase this PR, fix the comments and refactor the message keys to use plain English + {{ }} syntax for the placeholders.
---------------------------------------------------------------------------
by asm89 at 2013-01-07T15:00:58Z
@fabpot If I fix this tonight, will it make the beta?
---------------------------------------------------------------------------
by fabpot at 2013-01-07T15:53:00Z
yes, definitely.
---------------------------------------------------------------------------
by asm89 at 2013-01-07T20:13:38Z
@fabpot I switched the implementation to English messages instead of message keys and fixed the final comments + rebased. Anything you want me to do after this?
Still happy with `getMessageKey()`?
- Removed useless error handlers around FormEvent as the triggering has
been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
method provide some user logic needing to be converted to a new way.
- Enhanced the deprecation messages to mention the replacement whenever
possible.
Here is the code you need to write when using the regular render
function for an ESI strategy:
{{ render(path('path'), { strategy: 'esi' })
}}
And the same with the new render_* function:
{{ render_esi(path('path')) }}
Until PHP 5.5 hits beta, the version number for Git builds is still 5.5.0-dev,
which is less than 5.5.0alpha1 according to version_compare(). This means that
the branches for 5.5 aren't being executed on 5.5 snapshots at present.
This PR was merged into the master branch.
Commits
-------
c1aff96 [Form] Fixed regression introduced when merging 2.1 into master
Discussion
----------
[Form] Fixed regression introduced when merging 2.1 into master
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the master branch.
Commits
-------
6703fb5 added changelog entries
1997e2e fix phpdoc of UrlGeneratorInterface that missed some exceptions and improve language of exception message
f0415ed [Routing] made reference type fully BC and improved phpdoc considerably
7db07d9 [Routing] added tests for generating relative paths and network paths
75f59eb [Routing] add support for path-relative and scheme-relative URL generation
Discussion
----------
[2.2] [Routing] add support for path-relative URL generation
Tests pass: yes
Feature addition: yes
BC break: <del>tiny (see below)</del> NO
deprecations: NO
At the moment the Routing component only supports absolute and domain-relative URLs, e.g.
`http://example.org/user-slug/article-slug/comments` and
`/user-slug/article-slug/comments`.
But there are two link types missing: schema-relative URLs and path-relative URLs.
schema-relative: e.g. `//example.org/user-slug/article-slug/comments`
path-relative: e.g. `comments`.
Both of them would now be possible with this PR. I think it closes a huge gap in the Routing component.
Use cases are pretty common. Schema-relative URLs are for example used when you want to include assets (scripts, images etc) in a secured website with HTTPS. Path-relative URLs are the only option when you want to generate static files (e.g. documentation) that can be downloaded as an HTML archive. Such use-cases are currently not possible with symfony.
The calculation of the relative path based on the request path and target path is hightly unit tested. So it is really equivalent. I found several implemenations on the internet but none of them worked in all cases. Mine is pretty short and works.
I also added an optional parameter to the twig `path` function, so this feature can also be used in twig templates.
Ref: This implements path-relative URLs as suggested in #3908.
<del>[BC BREAK] The signature of UrlGeneratorInterface::generate changed to support scheme-relative and path-relative URLs. The core UrlGenerator is BC and does not break anything, but users who implemented their own UrlGenerator need to be aware of this change. See UrlGenerator::convertReferenceType.</del>
---------------------------------------------------------------------------
by jalliot at 2012-04-16T09:56:56Z
@Tobion For completeness, you should add the option to the `url` and `asset` twig functions/template helpers.
---------------------------------------------------------------------------
by stof at 2012-04-16T10:46:06Z
@jalliot adding the option to ``url`` does not make any sense. The difference between ``path`` and ``url`` is that ``path`` generates a path and ``url`` generates an absolute url (thus including the scheme and the hostname)
---------------------------------------------------------------------------
by Tobion at 2012-04-16T12:27:49Z
@stof I guess jalliot meant we could then generate scheme-relative URLs with `url`. Otherwise this would have no equivalent in twig.
---------------------------------------------------------------------------
by jalliot at 2012-04-16T12:34:08Z
@stof Yep I meant what @Tobion said :)
---------------------------------------------------------------------------
by Tobion at 2012-04-18T11:57:04Z
The $relative parameter I added besides the existing $absolute parameter of the `->generate` method was not clear enough. So I merged those into a different parameter `referenceType`. I adjusted all parts of symfony to use the new signature. And also made the default `UrlGenerator` implementation BC with the old style. So almost nobody will recognize a change. The only BC break would be for somebody who implemented his own `UrlGenerator` and did not call the parent default generator.
Using `referenceType` instead of a simple Boolean is much more flexible. It will for example allow a custom generator to support a new reference type like http://en.wikipedia.org/wiki/CURIE
---------------------------------------------------------------------------
by Tobion at 2012-04-18T13:34:58Z
ping @schmittjoh considering your https://github.com/schmittjoh/JMSI18nRoutingBundle/blob/master/Router/I18nRouter.php would need a tiny change
---------------------------------------------------------------------------
by schmittjoh at 2012-04-18T13:37:39Z
Can you elaborate the necessary change?
---------------------------------------------------------------------------
by Tobion at 2012-04-18T13:51:10Z
This PR changes the signature of `generate` to be able to generate path-relative and scheme-relative URLs. So it needs to be
`public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)` and your implementation would need to change `if ($absolute && $this->hostMap) {` to `if (self::ABSOLUTE_URL === $referenceType && $this->hostMap) {`
I can do a PR if this gets merged.
---------------------------------------------------------------------------
by schmittjoh at 2012-04-18T13:52:14Z
If I understand correctly, the old parameter still works, no?
edit: Ah, ok I see what you mean now.
---------------------------------------------------------------------------
by Tobion at 2012-04-18T13:56:33Z
Yeah the old parameter still works but $absolute would also evaluate to true (a string) in your case for non-absolute URLs, i.e. paths.
---------------------------------------------------------------------------
by Tobion at 2012-04-19T21:09:46Z
ping @fabpot
---------------------------------------------------------------------------
by fabpot at 2012-04-20T04:30:18Z
Let's discuss that feature for 2.2.
---------------------------------------------------------------------------
by Tobion at 2012-04-20T10:40:59Z
What are your objections against it? It's already implemented, it works and it adds support for things that are part of a web standard. The BC break is tiny at the moment (almost nobody is affected) because the core UrlGenerator works as before. But if we waited for 2.2 it will be much harder to make the transition because 2.1 is LTS. So I think is makes sense to add it now. Furthermore it makes it much more future-proof as custom generators can more easiliy add support for other link types like CURIE. At the moment a Boolean for absolute URLs is simply too limited and also somehow inconsistent because $absolute = false stands for an absolute path. You see the awkwardness in this naming.
Btw, I added a note in the changelog. And I will add documentation of this feature in symfony-docs once this is merged.
---------------------------------------------------------------------------
by fabpot at 2012-04-20T12:14:32Z
nobody has ever said that 2.1 would be LTS. Actually, I think we are going to wait for 2.3 for LTS.
---------------------------------------------------------------------------
by Tobion at 2012-04-20T12:27:18Z
Well what I meant is, the longer we wait with this, the harder to apply it.
In 04ac1fdba2 you modified `generate` signature for better extensibility that is not even made use of. I think changing `$abolute` param goes in the same direction and has direct use.
I'd like to know your reason to wait for 2.2. Not enough time to review it, or afraid of breaking something, or marketing for 2.2?
---------------------------------------------------------------------------
by stof at 2012-04-20T16:28:27Z
@Tobion the issue is that merging new features forces to postpone the release so that it is tested by enough devs first to be sure there is no blocking bug in it. Big changes cannot be merged when we are hunting the remaining bugs to be able to release.
---------------------------------------------------------------------------
by schmittjoh at 2012-04-20T16:42:11Z
Considering the changes that have been made to the Form component, and are still being made, I think this is in comparison to that a fairly minor change.
Maybe a clearer guideline on the release process, or the direction would help, and avoid confusion, or wrong expectations on contributors' part.
---------------------------------------------------------------------------
by Tobion at 2012-10-05T13:52:11Z
@fabpot this is ready. So if you agree with it, I would create a documentation PR.
---------------------------------------------------------------------------
by stof at 2012-10-13T16:09:47Z
@fabpot what do you think about this PR ?
---------------------------------------------------------------------------
by Crell at 2012-11-01T16:05:01Z
This feels like it's overloading the generate() method to do double duty: One, make a URl based on a route. Two, make a URI based on a URI snippet. Those are two separate operations. Why not just add a second method that does the second operation and avoid the conditionals? (We're likely to do that in Drupal for our own generator as well.)
---------------------------------------------------------------------------
by Tobion at 2012-11-01T16:38:39Z
@crell: No, you must have misunderstood something. The generate method still only generates a URI based on a route. The returned URI reference can now also be a relative path and a network path. Thats all.
---------------------------------------------------------------------------
by Tobion at 2012-12-13T18:30:28Z
@fabpot this is ready. It is fully BC! I also improved phpdoc considerably.
---------------------------------------------------------------------------
by Tobion at 2012-12-14T20:51:38Z
@fabpot Do you want me to write documentation for it? I would also be interested to write about the new features of the routing component in general. I wanted to do that anyway and it would probably be a good fit for your "new in symfony" articles.
---------------------------------------------------------------------------
by fabpot at 2012-12-14T20:58:16Z
Im' going to review this PR in the next coming days. And to answer your second question, more documentation or better documentation is always a good thing, so go for it.
---------------------------------------------------------------------------
by Tobion at 2013-01-02T21:50:20Z
@fabpot ping. I added changelog entries.
This PR was merged into the master branch.
Commits
-------
36197dc Fixed typos
Discussion
----------
Fixed typos
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
This PR was merged into the master branch.
Commits
-------
586a16e [Validator] Changed DefaultTranslator::getLocale() to always return 'en'
58bfd60 [Validator] Improved the inline documentation of DefaultTranslator
cd662cc [Validator] Added ExceptionInterface, BadMethodCallException and InvalidArgumentException
e00e5ec [Validator] Fixed failing test
cc0df0a [Validator] Changed validator to support pluralized messages by default
56d61eb [Form][Validator] Added BC breaks in unstable code to the CHANGELOG
1e34e91 [Form] Added upgrade instructions to the UPGRADE file
b94a256 [DoctrineBridge] Adapted DoctrineBridge to translator integration in the validator
c96a051 [FrameworkBundle] Adapted FrameworkBundle to translator integration in the validator
92a3b27 [TwigBridge] Adapted TwigBridge to translator integration in the validator
e7eb5b0 [Form] Adapted Form component to translator integration in the validator
46f751c [Validator] Extracted message interpolation logic of ConstraintViolation and used the Translation component for that
Discussion
----------
[Validator] Integrated the Translator in the Validator component
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #5844, #6117
Todo: -
License of the code: MIT
Documentation PR: -
This PR allows to replace the default message substitution strategy in the validator (`strtr()`) by passing an implementation of `Symfony\Component\Translation\TranslatorInterface`. The motivation for this are both #5844 and the need to replace the translation strategy in Drupal's integration of the Validator.
In the stand-alone usage of the validator, both the translator and the default translation domain can now be passed to `ValidatorBuilderInterface`:
```php
$validator = Validation::createValidatorBuilder()
->setTranslator(new MyTranslator())
->setTranslationDomain('validators')
->getValidator();
```
References:
* #5844
* #6117
* #6129
* [Add a validation framework to Drupal 8](http://drupal.org/node/1845546)
* [Add the symfony validator component to core despite Symfony potentially releasing BC-breaking updates after 2.3.](http://drupal.org/node/1849564)
---------------------------------------------------------------------------
by Tobion at 2012-11-28T08:53:25Z
no BC break? Looking at ValidatorBuilderInterface there is definitely one.
---------------------------------------------------------------------------
by bschussek at 2012-11-28T08:55:01Z
ValidatorBuilderInterface is not part of the stable API. You are not supposed to implement this interface.
---------------------------------------------------------------------------
by Tobion at 2012-11-28T09:01:07Z
We're not only documenting bc breaks for stable API, otherwise we could remove 90% of the upgrade file since few methods are tagged with API.
An interface that nobody should implement?
---------------------------------------------------------------------------
by bschussek at 2012-11-28T09:30:02Z
The question is what to consider a BC break. Something will always break for someone. Should we consequently mark everything as BC break? I don't think so.
For example, since 2.1, you are supposed to use `Validation::createValidator*()` for creating a validator. Because of that, I won't consider changing the constructor signature of `Validator` a BC break anymore from 2.1 on.
The same for the unstable interfaces. These are currently meant to be used only, that is, type hint against them and call their methods. But we don't guarantee that we won't add methods to them.
---------------------------------------------------------------------------
by Tobion at 2012-11-28T09:38:19Z
I agree that almost any change could be considered a BC break. So we probably need to better define what a BC break is and what not. Otherwise Symfony will stop evolving after 2.3 because from then on Fabien wanted to prevent BC breaks which is almost impossible in a strict definition of bc break.
---------------------------------------------------------------------------
by fabpot at 2012-11-28T11:37:22Z
BC breaks should always be documented, and we guarantee BC only for things tagged with @api. I'm going to update the docs to make things clearer.
---------------------------------------------------------------------------
by bschussek at 2012-11-28T13:09:57Z
@fabpot I documented these changes now in the CHANGELOG: af99ebb1206ac92889b7193ba1ecc12bf2617e85
Are we sure we want to document *all* BC breaks from now on, even in non-@api code? This could rather scare people looking at our changelogs (lots of BC BREAKS there).
---------------------------------------------------------------------------
by fago at 2012-11-28T17:29:58Z
Unfortunately, it turns out the symfony translator interface does not mach the Drupal translation system as well as we initally thought, see http://drupal.org/node/1852106. Given that, this would integrating the validator component into Drupal even harder, because it introduces the dependency on the (unwanted) translation component. :(
---------------------------------------------------------------------------
by stof at 2012-11-28T18:19:36Z
If this does not help Drupal anyway, maybe #5844 is a better way to manage translations for people using the validator outside forms ?
and the Drupal guys would simply follow a similar approach, but based on their own translator instead of the symfony one.
---------------------------------------------------------------------------
by fago at 2012-11-28T18:50:12Z
Yeah. The only problem I see with the approach of #5844 is that *after* validation only the translated messages are available. We'd need to have access to the untranslated messages also.
---------------------------------------------------------------------------
by fago at 2012-11-29T09:49:47Z
As our translation system handles translating pluralized messages differently, the current ExecutionContextInterface::addViolation() method poses a problem also. We need to pass on - both the single and plural - message, as the message gets chosen during translation, see http://api.drupal.org/api/drupal/core!includes!common.inc/function/format_plural/8
So maybe, we could allow adding an already created ConstraintViolation object also? Then, we could implement a "PluralConstraintViolation" class that takes both message templates.
---------------------------------------------------------------------------
by bschussek at 2012-12-03T15:52:36Z
I updated this PR to support pluralized messages by default in the validator. This should solve the problem of the Drupal guys, because their implementation of `TranslatorInterface::transChoice($id, $number, ...)` can now simply split the $id by pipes (`|`) and pass the parts to their own `format_plural($count, $singular, $plural, ...)` function.
For us, it breaks BC because translation catalog sources had to be adapted.
---------------------------------------------------------------------------
by fabpot at 2012-12-03T16:25:52Z
Most of the XLF files are broken (the end is missing now).
IIUC, we now have a hard dependency on the Translation component, which is something we wanted to avoid.
---------------------------------------------------------------------------
by fabpot at 2012-12-03T16:27:56Z
Oops, clicked on the "comment" button too fast.
So, the dependency is hard (you need to install the dep) but light as we only rely on the translation interface from the component (when using the default translator). It looks acceptable to me, especially because we now use Composer to manage dependencies.
---------------------------------------------------------------------------
by bschussek at 2012-12-03T16:54:10Z
@fabpot Thanks for the hint. Going to fix this.
---------------------------------------------------------------------------
by bschussek at 2012-12-04T11:34:43Z
@fabpot Fixed.
---------------------------------------------------------------------------
by bschussek at 2012-12-07T12:40:24Z
Is there anything missing for this PR to be merged?
This PR was squashed before being merged into the 2.1 branch (closes#6611).
Commits
-------
bde5a7f [HttpKernel] Clarify misleading comment in ExceptionListener
Discussion
----------
[HttpKernel] Clarify misleading comment in ExceptionListener
Regression from 295860dfaf.
---------------------------------------------------------------------------
by fabpot at 2013-01-08T09:02:53Z
The comment is right. Returning without a Response will re-throw the exception (in HttpKernel).
---------------------------------------------------------------------------
by staabm at 2013-01-08T11:00:36Z
so the comment should point out, that the httpkernel will rethrow the exception in that case?
---------------------------------------------------------------------------
by igorw at 2013-01-08T13:38:43Z
I missed that on the commit I linked. I've updated the patch to re-introduce the comment but clarify that `throw` is in HttpKernel.
* 2.1:
[Console] Fix style escaping parsing
[Console] Make style formatter matching less greedy to avoid having to escape when not needed
[Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
[Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.
[Form] Fixed EntityChoiceList when loading objects with negative integer IDs
[TwigBundle] There is no CSS visibility of display, should be visible instead
[Form] corrected source node for a Danish translation
[DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)
[HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
[CssSelector] added css selector with empty string
[HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
[DependencyInjection] refactored code to avoid logic duplication
[Form] Deleted references in FormBuilder::getFormConfig() to improve performance
[HttpFoundation] Update docblock for non-working method
Conflicts:
src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig
src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig
* 2.0:
[Bundle] [FrameworkBundle] fixed indentation in esi.xml services file.
[TwigBundle] There is no CSS visibility of display, should be visible instead
[DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)
[HttpFoundation] Check if required shell functions for `FileBinaryMimeTypeGuesser` are not disabled
[CssSelector] added css selector with empty string
[HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
[DependencyInjection] refactored code to avoid logic duplication
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
This PR was merged into the 2.1 branch.
Commits
-------
2155719 [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class.
Discussion
----------
[2.1] [Component] [Security] fixed PSR-2 coding violation in ClassUtilsTest class
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
This was implemented in order to satisfy Drupal's requirements for a
singular and a plural message whenever a message is passed to their
implementation of transChoice().
This PR was merged into the 2.1 branch.
Commits
-------
55aa012 [Form] Fixed EntityChoiceList when loading objects with negative integer IDs
Discussion
----------
[Form] Fixed EntityChoiceList when loading objects with negative integer IDs
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6610
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by stof at 2013-01-08T10:21:57Z
wouldn't you need to do the opposite replacement when loading the result ? And shouldn't it be done in the propel bridge too ?
---------------------------------------------------------------------------
by bschussek at 2013-01-08T10:25:29Z
@stof No, indices aren't used for loading the result, just values. Yes this should be done for the propel bridge, but that bridge is missing even the tests for the ID-as-identifier usage. Do you want to create a PR?
This PR was merged into the 2.0 branch.
Commits
-------
1d362b8 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)
Discussion
----------
[DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)
This PR was merged into the 2.1 branch.
Commits
-------
8513777 [HttpFoundation] Update docblock for non-working method
Discussion
----------
[HttpFoundation] Update docblock for non-working method
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Rerences the following tickets: #6408
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by piotrpasich at 2012-12-19T21:32:24Z
I think that we shouldn't comment it as not working but add new methods called countFlashes and countFlashesTypes. CountFlashesTypes should return count($this->flashBag) and countFlashes should count all items in every array inside flashbag.
---------------------------------------------------------------------------
by drak at 2012-12-20T17:43:38Z
ping @fabpot
This PR was merged into the 2.1 branch.
Commits
-------
33e9d00 [Form] Deleted references in FormBuilder::getFormConfig() to improve performance
Discussion
----------
[Form] Deleted references in FormBuilder::getFormConfig() to improve performance
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6558
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by vicb at 2013-01-07T11:09:24Z
> Backwards compatibility break: no
Really ?
---------------------------------------------------------------------------
by vicb at 2013-01-07T12:27:37Z
Adding a public method is a BC break.
---------------------------------------------------------------------------
by bschussek at 2013-01-07T12:42:14Z
The method is inherited from the parent class, so the change should not affect BC.
---------------------------------------------------------------------------
by vicb at 2013-01-07T13:27:21Z
my bad.
This PR was squashed before being merged into the master branch (closes#6491).
Commits
-------
5d264ce [Routing] made RouteCompilerInterface::compile static
Discussion
----------
[Routing] made RouteCompilerInterface::compile static
bc break: yes but probably nobody affected
It makes much more sense that the compile method is static because having instances of a compiler is strange. Also the compiler could not use DI or anything anyway as the `Route` class was instantiating compiler instances itself and was assuming there are no constructor arguments.
This PR was squashed before being merged into the master branch (closes#6594).
Commits
-------
9d94fc7 [Console] Autocomplete cleanups/optimisations
Discussion
----------
[Console] Autocomplete cleanups/optimisations
I know the optimisations to this code are getting kinda ridiculous, but I found a few more things to tidy up.
This PR was merged into the 2.0 branch.
Commits
-------
666283c [HttpFoundation] Docblock for Request::isXmlHttpRequest() now points to Wikipedia
Discussion
----------
[2.0][HttpFoundation] Docblock for Request::isXmlHttpRequest()
Docblock now points to [Wikipedia entry](http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript) instead of pointing all known JS frameworks.
Replacement for #6444.
This PR was squashed before being merged into the 2.0 branch (closes#6271).
Commits
-------
dbafc2c [CssSelector] added css selector with empty string
Discussion
----------
[CssSelector] added css selector with empty string
---------------------------------------------------------------------------
by kosssi at 2012-12-14T18:29:40Z
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by stloyd at 2013-01-07T08:21:56Z
@fabpot ping
---------------------------------------------------------------------------
by fabpot at 2013-01-07T10:28:54Z
Sorry, but I don't understand the use case.
---------------------------------------------------------------------------
by kosssi at 2013-01-07T10:36:31Z
if you have this code :
\<img src="..." alt="">
you can find
$this->assertCount(1, $crawler->filter('img[alt=""]'));
---------------------------------------------------------------------------
by fabpot at 2013-01-07T10:40:12Z
Then, can you change the unit test with the real use case?
---------------------------------------------------------------------------
by kosssi at 2013-01-07T11:05:50Z
I don't know if it suits you
---------------------------------------------------------------------------
by fabpot at 2013-01-07T11:07:11Z
thanks
This PR was merged into the master branch.
Commits
-------
f5290b9 [FrameworkBundle] Force users to set "kernel.secret" to something different than default "ThisTokenIsNotSoSecretChangeIt"
Discussion
----------
[RFC][BC][FrameworkBundle] Force users to set "kernel.secret" to something unique
Bug fix: kinda*
Feature addition: no
BC break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #6480
License of the code: MIT
This PR is to show different approach for "fix" suggested in #6480, as IMO there is no real point for "yet another listener" =)
This PR also introduces BC break for all users that used default value for `kernel.secret`, but IMO it's worth it.
This PR was merged into the master branch.
Commits
-------
4bf82e0 Update Ukrainian translation for master branch
Discussion
----------
[Validator] Update Ukrainian translation for master branch
This PR was merged into the master branch.
Commits
-------
2b73975 Add new tests and fix problem with the second option being chosen on down arrow
8a0bcfb Use strpos in place of substr
9864d95 Not much use in blanking the array each time
a4d711c Enable arrow keys to browse matched autocomplete options
Discussion
----------
[Console] Enable arrow keys to browse matched autocomplete options
See notes in original autocomplete pull request: #6391
See also @bamarni's pull request implementing more or less the same stuff: #6561
---------------------------------------------------------------------------
by fabpot at 2013-01-05T10:12:47Z
Looks good to me. Can you add some unit tests?
---------------------------------------------------------------------------
by bamarni at 2013-01-05T12:51:51Z
1 line addition... you definitely got me on the diff!
That's what I had mind too, excepted for the default highlight, but as you said it's usually displayed in the question so it 's not necessary. 👍
---------------------------------------------------------------------------
by lmcd at 2013-01-06T04:07:02Z
@fabpot Added tests
* 2.1:
[Console] made Application::getTerminalDimensions() public
Revert "merged branch egeloen/f-2.0-terminal-width (PR #6571)"
[2.1] [Console] Added getTerminalDimensions() with fix for osx/freebsd
Restrict Monolog version to be in version `<1.3`. Because of conflict between `HttpKernel/Log/LoggerInterface` and `Psr\Log\LoggerInterface` (PSR-3)
Conflicts:
composer.json
This PR was merged into the master branch.
Commits
-------
e0b4480 [Form] Removed separator characters between choice or text fields in DateType
Discussion
----------
[Form] Removed separator characters between choice or text fields in DateType
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This commit was originally contained in #6217 (for 2.1) but then split away for master since it changes behavior.
This PR was merged into the master branch.
Commits
-------
184c8e5 Fixed @expectedException definitions to reference absolute exception paths
Discussion
----------
Added leading slashes to @expectedException definitions
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR adds leading backslashes `\` to `@expectedException` declarations.
The current version is inconsistent with other class references in doc blocks, which default to *relative* class names unless class name has a leading backslash.
```php
/**
* @param RelativeNs\Class $param1
* @param \AbsoluteNs\Class $param2
*/
but
/**
* @expectedException AbsoluteNs\Class
*/
```
Consequently, PHPStorm does not understand the current statements and marks them as erroneous (and correctly so IMO, even though PHPUnit's interpretation is more relaxed).
* 2.1:
Restrict Monolog version to be in version <1.3
[Console] Make getTerminalWith & getTerminalHeight public
[DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
[DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
[DependencyInjection] added some tests for PhpDumper when the container is compiled
[DependencyInjection] fixed CS
[Process] Do not reset stdout/stderr pipes on Interrupted system call
[Locale] Adjust `StubIntlDateFormatter` to have new methods added in PHP 5.5
use the right RequestMatcherInterface
[Locale] Fix failing `StubIntlDateFormatter` tests in PHP 5.5
[Locale] Fix failing `StubIntlDateFormatter` in PHP 5.5
[Form] Fix failing `MonthChoiceList` in PHP 5.5
Update .travis.yml
Conflicts:
src/Symfony/Bridge/Monolog/composer.json
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
* 2.0:
Restrict Monolog version to be in version <1.3
[Console] Make getTerminalWith & getTerminalHeight public
[DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
[DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
[DependencyInjection] added some tests for PhpDumper when the container is compiled
[DependencyInjection] fixed CS
[Locale] Adjust `StubIntlDateFormatter` to have new methods added in PHP 5.5
[Locale] Fix failing `StubIntlDateFormatter` tests in PHP 5.5
[Locale] Fix failing `StubIntlDateFormatter` in PHP 5.5
[Form] Fix failing `MonthChoiceList` in PHP 5.5
Update .travis.yml
Conflicts:
src/Symfony/Bridge/Monolog/composer.json
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php
tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services9.yml
This PR was merged into the 2.0 branch.
Commits
-------
e0923ae [DependencyInjection] fixed PhpDumper optimizations when an inlined service depends on the current one indirectly
cd15390 [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties
e939a42 [DependencyInjection] added some tests for PhpDumper when the container is compiled
3827e3e [DependencyInjection] fixed CS
Discussion
----------
[DependencyInjection] Fixed PhpDumper when compiling inlined services
This PR was merged into the master branch.
Commits
-------
97bc257 [Locale] Rolled back normalizeIcuVersion() method in unit tests.
Discussion
----------
[Locale] Rolled back normalizeIcuVersion() method in unit tests.
We just need to check if version is 4.4 or 4.8 and we do not need to know if it is 4.8.0 or 4.8.1.1 (at least for now there are no big differences between minor ICU versions).
This change basically rolls back modifications made in #6109 to fix#5288. Those modifications didn't really fix the issue since ICU>=4.9 wasn't handled properly. Part of the roll back was made in #6515 (2.1 branch).
This change makes master branch consistent with what we have in 2.0 and 2.1 (bespoke tests are passing in those branches).
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: one test fails in the Propel1 bridge
Fixes the following tickets: #5517
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the 2.0 branch.
Commits
-------
f299bd0 [Console] Make getTerminalWith & getTerminalHeight public
Discussion
----------
[Console] Make getTerminalWith & getTerminalHeight public
Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~
After demand in #6567, I open an other one on the 2.0 branch.
This makes it consistent with 2.0 and 2.1.
We just need to check if version is 4.4 or 4.8 and we do not need to know if it is 4.8.0 or 4.8.1.1 (at least for now there are no big differences between minor ICU versions).
This PR was merged into the 2.1 branch.
Commits
-------
fa6fb6f [Process] Do not reset stdout/stderr pipes on Interrupted system call
Discussion
----------
[Process][2.1] Do not reset stdout/stderr pipes on stream_select failure
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
When `stream_select` is called and failed, pipes are currently reset to an empty array. As a result, both error-output and output are empty whereas the exitcode is 0 (successful process).
There is no reason (at least I don't see it) to reset pipes when an error occurs.
---------------------------------------------------------------------------
by fabpot at 2013-01-04T08:18:03Z
This behavior was introduced by @Seldaek in bcf8cf91. Any reason?
---------------------------------------------------------------------------
by Seldaek at 2013-01-04T17:22:33Z
The rationale was that if stream_select failed, it will fail every time (maybe this is an incorrect assumption and I introduced a bug there). Since the while loop checks for $this->pipes being not empty, if the process dies off and stream_select() starts failing, it will be stuck in the while loop forever. That's what I was fixing there. As far as I can tell, your fix reintroduces that problem. Can you explain a bit more what you mean by "error-output and output are empty"? Maybe adding a test for the case you are seeing would help too?
---------------------------------------------------------------------------
by romainneutron at 2013-01-04T17:47:00Z
Hi !
I'm actually using `Process` in a amqp client using PhpAmqpLib. Sometimes both output and error-output of a process are empty whereas the process returned with an exitcode equal to 0.
By *empty*, I mean that the output of both `$process->getOuptut()` and `$process->getErrorOuptut()` are equal to `''`.
I removed the `@` before the `stream_select` and realized that some calls where failing :
```
stream_select(): unable to select [4]: Interrupted system call (max_fd=13) in .../vendor/symfony/process/Symfony/Component/Process/Process.php on line 341
```
With my patch, it appears that if a `stream_select` call fails one time, it can be called with success a second time.
Adding a test case that triggers this error does not seem easy as it seems system related.
What do you think about it ?
---------------------------------------------------------------------------
by Seldaek at 2013-01-04T17:52:04Z
Ok I see. So I guess your fix makes sense since stream_select can fail legitimately, but it's not the whole story. If it fails because the process died off (or whatever the cause was on windows) we shouldn't keep trying forever. Maybe just adding a limit of N retries that is reset whenever a call succeeds would be enough to go over the odd system call being interrupted without allowing infinite loops. Not sure what N makes sense.
---------------------------------------------------------------------------
by igorw at 2013-01-04T17:53:45Z
As per the `stream_select` manpage it can return false when interrupted by a system call. That does not indicate that something is broken. However, I'm not sure if it is possible to distinguish between actual errors and interrupts without capturing and parsing the error message.
---------------------------------------------------------------------------
by romainneutron at 2013-01-04T18:50:56Z
I've updated the PR to consider the error message as it's currently the only solution to find out why `stream_select` failed
---------------------------------------------------------------------------
by romainneutron at 2013-01-04T18:59:15Z
Merged fixes suggested by @stloyd and @Seldaek
When `stream_select` is called and return false because of an `Interrupted
system call`, pipes are currently reset to an empty array.
As a result, both error-output and output are empty whereas the
exitcode is 0 (successful process).
This PR was merged into the 2.0 branch.
Commits
-------
73d9cef [Locale] Adjust `StubIntlDateFormatter` to have new methods added in PHP 5.5
b2ce983 [Locale] Fix failing `StubIntlDateFormatter` tests in PHP 5.5
913b564 [Locale] Fix failing `StubIntlDateFormatter` in PHP 5.5
8ae773b [Form] Fix failing `MonthChoiceList` in PHP 5.5
f4ce2f1 Update .travis.yml
Discussion
----------
[2.0] Add testing of PHP 5.5 on Travis-CI & fix failing code
This PR was merged into the 2.1 branch.
Commits
-------
d601b13 use the right RequestMatcherInterface
Discussion
----------
use the right RequestMatcherInterface
this fixes#6470 by using the right interface
* 2.1: (24 commits)
updated license year
Update src/Symfony/Component/HttpFoundation/Response.php
[Form] Fixed inheritance of "error_bubbling" in RepeatedType
[Form] Fixed DateType when used with the intl extension disabled.
[HttpFoundation] fix return types and handling of zero in Response
[HttpFoundation] better fix for non-parseable Expires header date
Fixed missing plural message in portuguese validator
Fix Expires when the header is -1
[DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.
[Console] fixed unitialized properties (closes#5935)
[Process] Prevented test from failing when pcntl extension is not enabled.
Revert "[DoctrineBridge] Improved performance of the EntityType when used with the "query_builder" option"
[Form] Fixed failing tests for DateTimeToStringTransformer.
[Locale] Fixed the StubLocaleTest for ICU versions lower than 4.8.
[Bundle] [FrameworkBundle] fixed typo in phpdoc of the SessionListener.
[Form] Fixed test regression introduced in #6440
[Tests] Fix namespaces
Fixed php doc of GenericEvent::__construct
HttpUtils must handle RequestMatcher too
use preferred_choices in favor of preferred_query
...
Conflicts:
src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
* 2.0:
updated license year
Update src/Symfony/Component/HttpFoundation/Response.php
[Console] fixed unitialized properties (closes#5935)
[Bundle] [FrameworkBundle] fixed typo in phpdoc of the SessionListener.
bumped Symfony version to 2.0.21-DEV
updated VERSION for 2.0.21
updated CHANGELOG for 2.0.21
Conflicts:
src/Symfony/Bundle/SwiftmailerBundle/LICENSE
src/Symfony/Component/Filesystem/LICENSE
src/Symfony/Component/HttpFoundation/Response.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was squashed before being merged into the master branch (closes#6391).
Commits
-------
7bad0ef [Console] Add autocomplete as you type
Discussion
----------
[Console] Add autocomplete as you type
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
License of the code: MIT
Finally got around to reviving the console autocomplete code.
Is now up to date with Symfony master. Also changed backspace behaviour to remove one character instead of two.
stty stuff is a mystery to a lot of people, so I've commented verbosely.
See also: https://github.com/symfony/symfony/pull/2364
---------------------------------------------------------------------------
by lmcd at 2012-12-17T10:11:16Z
@stof - updated with a better solution
---------------------------------------------------------------------------
by Seldaek at 2012-12-17T10:25:15Z
Seems pretty cool, but could you replace all `/usr/bin/env stty` calls by simply `stty`? That way it would also work on windows - if you have mingw or cygwin installed and stty is in the path at least. I don't see the benefit of doing the /usr/bin/env trick here. That's good for shebang lines because you need an absolute path, but in an exec/shell_exec call, you can rely on the PATH and just type the command name.
---------------------------------------------------------------------------
by lmcd at 2012-12-17T18:33:06Z
@Seldaek makes sense. Changed.
---------------------------------------------------------------------------
by lmcd at 2012-12-17T21:32:17Z
Tested on Mac OS X 10.8 and Ubuntu 12.04. Would be great to hear from people on Windows, cygwin and those with exotic terminal setups.
I'll update my fork of SensioGeneratorBundle a little later with support for this.
@fabpot - is there still time for this to land in 2.2?
---------------------------------------------------------------------------
by fabpot at 2012-12-17T21:34:23Z
If we have good feedback from Windows users, yes it can land in 2.2. ping @pborreli
---------------------------------------------------------------------------
by michelsalib at 2012-12-17T23:39:50Z
A am about to try on windows 7 with cmd, powershell and cygwin. Any other way to test without writing a new command using the helper ?
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:01:42Z
I tried on Windows 7 with cmd, powershell and cygwin and got this error: `Le chemin d'accès spécifié est introuvable.`. You can translate it to `The specified path could not be found`.
---------------------------------------------------------------------------
by lmcd at 2012-12-18T00:01:43Z
I've updated SensioGeneratorBundle to support autocompletion on the `generate:doctrine:entity` command. It autocompletes bundle names, configuration formats and field types. See here: c627c67ce7
@michelsalib ping
---------------------------------------------------------------------------
by lmcd at 2012-12-18T00:03:43Z
@michelsalib - hmm. I imagine it's either a problem locating stty or some configuration issue on your end. Do you have file/line number?
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:04:41Z
Verbose mode did not help. Let me try with some dirty line by line check to see if I can give you a line.
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:09:54Z
My bad, I should have guessed that line 144 `exec('/usr/bin/env stty', $output, $exitcode);` cannot work on regular Windows environment. This should at least fails silently for users using cmd or powershell. Apparently cygwin users can activate stty. Let me investigate.
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:16:30Z
Ok, cygwin comes pre-bundled with stty. I applied the fix recommended by @Seldaek and it fixed the cygwin command.
The only remaining problem is that your redirect the output of the exec call to the console, in this case cmd and powershell output the error telling that stty is not defined in the system: `'stty' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.`.
---------------------------------------------------------------------------
by lmcd at 2012-12-18T00:17:41Z
Ah, I see you're running the unit tests. The `hasSttyAvailable` method was lifted from `DialogHelper` where it is also used in `askHiddenResponse`. Question: is `defined('PHP_WINDOWS_VERSION_BUILD')` true for cygwin?
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:22:14Z
I am not running test, I am actually running a homemade command:
```
$dialog = $this->getHelper('dialog');
$ask = $dialog->ask($output, 'Autocomplete example', null, array(
'French', 'English', 'Chineese',
));
$output->writeln($ask);
```
`hasSttyAvailable` is called in the ask function at line 80. The incriminated function is here : 9ebcd4bac9/src/Symfony/Component/Console/Helper/DialogHelper.php (L411).
Also `defined('PHP_WINDOWS_VERSION_BUILD')` is true in the three of my consoles.
---------------------------------------------------------------------------
by lmcd at 2012-12-18T00:27:16Z
@michelsalib see 7be142481c
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:28:20Z
Why keeping `/usr/bin/env` in your calls ? Cygwin cannot interpret it as long a stty is not in this folder.
---------------------------------------------------------------------------
by lmcd at 2012-12-18T00:29:30Z
@michelsalib `/usr/bin/env` was put there by someone else for the `askHiddenResponse` method. I can remove it, so long as it doesn't break something else.
---------------------------------------------------------------------------
by michelsalib at 2012-12-18T00:34:11Z
IMO users who want's to use stty should have it configured in the PATH, as @Seldaek said. Prefixing the folder where the stty "should" be is a nonsense to me. Moreover it might work well on *nix systems, but will never be compatible with cygwin.
I tested it locally (without the `/usr/bin/env` prefix) and now I have a nice autocomplete on Cygwin, and nothing on cmd or powershell. Which is just what I expected.
@lmcd very nice work :)
---------------------------------------------------------------------------
by lmcd at 2012-12-18T05:17:32Z
For anyone interested, you can scroll through available autocomplete options that match typed characters by using up and down arrow keys. This has been implemented in a seperate branch here: https://github.com/lmcd/symfony/tree/autocomplete-arrows
---------------------------------------------------------------------------
by drak at 2012-12-18T19:13:34Z
@lmcd - The console PRs never cease to amaze me. Really well done!
---------------------------------------------------------------------------
by fabpot at 2012-12-19T13:58:33Z
@lmcd Is it mergeable now?
---------------------------------------------------------------------------
by lmcd at 2012-12-19T17:59:09Z
@fabpot Yes.
---------------------------------------------------------------------------
by lmcd at 2012-12-19T20:03:31Z
Edit: commits squashed
---------------------------------------------------------------------------
by lmcd at 2012-12-19T21:29:07Z
@stloyd I have addressed the two things mentioned. I'm now using $i in place of strlen($ret) as it held the same value.
---------------------------------------------------------------------------
by fabpot at 2012-12-20T07:09:27Z
@lmcd: Thanks a lot for finishing this in time for 2.2. Before I can merge, there are two remaining tasks:
* add a note about the new feature in the CHANGELOG file of the Console component;
* create a PR on `symfony/symfony-docs` to explain the new feature.
Can you take care of that?
---------------------------------------------------------------------------
by lmcd at 2012-12-20T07:11:15Z
@fabpot sure
---------------------------------------------------------------------------
by stloyd at 2012-12-29T09:15:23Z
@lmcd You should squash your "merge" commit.
---------------------------------------------------------------------------
by lmcd at 2012-12-29T13:49:37Z
Well that screwed up. File Changed: 216 :S
Edit: hard reset to an earlier hash and reapplied the CHANGELOG commit. Should be good now ping @stloyd
---------------------------------------------------------------------------
by stloyd at 2012-12-29T14:33:58Z
@lmcd `ask()` method is quite long now, but in overall looks ok =)
---------------------------------------------------------------------------
by lmcd at 2013-01-02T20:49:49Z
Anything preventing this being merged? Ping @fabpot
This PR was merged into the master branch.
Commits
-------
29b9611 [Finder] Added support for GLOB patterns in the directories passed to the in() method.
Discussion
----------
[Finder] Added support for wildcard characters (GLOB patterns)
Added support for wildcard characters in the paths passed to the *in()* method. Each pattern has to resolve to at least one directory, otherwise exception is thrown (just like when path to an invalid directory is passed).
Example usage:
```php
$finder = new \Symfony\Component\Finder\Finder();
$files = $finder->files()
->name('validators.en.*')
->in(array(
'src/Symfony/*/*/Resources/translations',
));
foreach ($files as $file) {
var_dump($file->getRealPath());
}
```
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5450
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#2089
This PR was merged into the 2.1 branch.
Commits
-------
6c5e615 [Form] Fixed DateType when used with the intl extension disabled.
Discussion
----------
[Form] Fixed DateType when used with the intl extension disabled
DateType's month select box returns timestamps when used with intl extension disabled (see #6485).
The reason for this is that stubbed formats use *L* instead of *M* for month representation. My fix is simply taking this into account when building array for the select box.
I didn't provide unit tests since they're disabled when intl extension is not enabled. I've only manually verified if the months array contains correct data.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6485
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by bschussek at 2013-01-03T17:41:47Z
Doesn't this call for fixing the stub instead of changing the Form component?
---------------------------------------------------------------------------
by stof at 2013-01-03T17:50:49Z
@bschussek L and M are both valid for the month in Intl
---------------------------------------------------------------------------
by jakzal at 2013-01-03T17:52:41Z
[StubIntlDateFormatter uses FullTransformer](https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php#L206) to format the date. [FullTransformer supports both *L* and *M*](https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php#L50) formats. Both formats are treated interchangeably.
This PR was merged into the 2.1 branch.
Commits
-------
c282a2b [DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.
Discussion
----------
[DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.
[DoctrineBridge] Allowing memcache port to be 0 to support memcache unix domain sockets.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Fixes the following tickets: #6527
Todo: -
License of the code: MIT
Documentation PR: ~
This PR was merged into the 2.1 branch.
Commits
-------
bfccd28 HttpUtils must handle RequestMatcher too
Discussion
----------
HttpUtils must handle RequestMatcher too
2.1 introduced the RequestMatcher as alternative to UrlMatcher. but HttpUtils was not adjusted.
---------------------------------------------------------------------------
by lsmith77 at 2013-01-01T18:15:13Z
@fabpot could you have a look at this PR? would like to know if this will be addressed in core or if we need to find another solution inside the CMF routing.
This PR was merged into the 2.1 branch.
Commits
-------
ef6f241 [Locale] Fixed the StubLocaleTest for ICU versions lower than 4.8.
Discussion
----------
[Locale] Fixed the StubLocaleTest for ICU versions lower than 4.8
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no but for other reason in an another component
Fixes the following tickets: #5517
Todo: -
License of the code: MIT
Documentation PR: -
Symbol for Brazilian Real is BR$ only in ICU 4.8. All previous and later versions use R$.
Links to the relevant data files:
* http://source.icu-project.org/repos/icu/icu/tags/release-4-8/source/data/curr/en.txt
* http://source.icu-project.org/repos/icu/icu/tags/release-4-4/source/data/curr/en.txt
* http://source.icu-project.org/repos/icu/icu/tags/release-49-1/source/data/curr/en.txt
---------------------------------------------------------------------------
by jakzal at 2012-12-29T19:23:25Z
Note that currently *USE_ICU_DATA_VERSION* is required for some tests to pass. This is inconsistent with *Locale::getIcuDataVersion()* which returns *Locale::ICU_DATA_VERSION* if *USE_ICU_DATA_VERSION* is not set. Technically intl extension shouldn't be needed to run the stub tests.
Following code could fix the issue for StubLocale tests:
```php
class StubLocaleTest extends LocaleTestCase
{
// ...
protected function getIntlExtensionIcuVersion()
{
// Locale::getIcuDataVersion(), which is used to determine the directory of stubs,
// uses Locale::ICU_DATA_VERSION if USE_INTL_ICU_DATA_VERSION is not given
if (!getenv('USE_INTL_ICU_DATA_VERSION')) {
return Locale::ICU_DATA_VERSION;
}
return parent::getIntlExtensionIcuVersion();
}
}
```
This code cannot be placed in the LocaleTestCase as intl tests need the icu data version from the intl extension.
I'm not sure if this is desired and therefore I didn't include it in my PR. Let me know your thoughts and wether I should create another PR for this, use the current PR or forget about it.
This PR was merged into the 2.1 branch.
Commits
-------
81967f6 [Form] Fixed failing tests for DateTimeToStringTransformer.
Discussion
----------
[Form] Fixed failing tests for DateTimeToStringTransformer
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Tests were only failing at the end of the month. Since February was used in the test cases, date was being moved to the next month (February has less days than other months).
If a day is not passed, \DateTime's constructor will set it to the first day of the month:
```php
var_dump(new \DateTime('2010-02'));
object(DateTime)#1 (3) {
["date"]=>
string(19) "2010-02-01 00:00:00"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
```
\DateTime is used in the test assertions.
However, DateTimeToStringTransformer::reverseTransform() uses \DateTime::createFromFormat(), which sets a missing day to the current day:
```php
var_dump(\DateTime::createFromFormat("Y-m", '2010-02'));
object(DateTime)#1 (3) {
["date"]=>
string(19) "2010-03-01 20:09:26"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
```
I changed the date in the test case to avoid failures. If we need to be sure that month's not going to be changed, I'll update my PR.
This PR was merged into the master branch.
Commits
-------
5779262 Update src/Symfony/Component/HttpFoundation/Request.php
Discussion
----------
Update src/Symfony/Component/HttpFoundation/Request.php
[HttpFoundation][Request] Align const
Tests were only failing at the end of the month. PHP uses current day if it is not passed. Since February was used in the test cases, date was being moved to the next month (February has less days than other months).
Improve the timing safe comparison function to better handle cases where input is of different length.
Note that it is now important to always pass any string that the user can directly control to the second parameter of the function. Otherwise, length information may be leaked.
This PR was merged into the master branch.
Commits
-------
d5948f1 Use KernelEvents constants in TraceableEventDispatcher
Discussion
----------
[HttpKernel] Use KernelEvents constants in TraceableEventDispatcher
Can't see any reason why we're not using constants here.
This PR was merged into the master branch.
Commits
-------
7533deb [Form] Prevent trigger of E_USER_DEPRECATED for new API
Discussion
----------
[Form] Prevent trigger of E_USER_DEPRECATED for new API
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
---------------------------------------------------------------------------
by stof at 2012-12-19T13:54:33Z
This is wrong as FormEvent extends DataEvent and so is also an instance.
Thus, DataEvent should never be constructed anymore (Sf2 does not instantiate it asnd there is no reason to dispatch it elsewhere). The BC is for typehints, and so the useful E_USER_DEPRECATED would be when DataEvent is used as typehint (which is not possible to detect AFAIK)
---------------------------------------------------------------------------
by drak at 2012-12-19T14:07:33Z
So in that case I should check specifically for two class names. Remember the intention here is to NOT trigger an error when the NEW class `FormEvent` is used. I'll update the PR.
---------------------------------------------------------------------------
by Tobion at 2012-12-19T14:25:42Z
I like the solution with an overridden constructor more because using the new stuff will not have the performance penalty of calling `get_class` at all.
---------------------------------------------------------------------------
by stof at 2012-12-19T14:52:47Z
@drak and why not simply ``if (!$this instanceof FormEvent)`` ?
---------------------------------------------------------------------------
by drak at 2012-12-19T15:58:28Z
@stof - if that's ok - I was just assuming other classes might have inherited.
@Tobion - the problem is the private name property we have to call parent which will ultimately call the deprecated constructor.
---------------------------------------------------------------------------
by drak at 2012-12-19T15:59:25Z
How about this?
---------------------------------------------------------------------------
by stof at 2012-12-19T16:51:26Z
@drak if your class inherit from DataEvent instead of FormEvent, it is logical to get a deprecation warning
---------------------------------------------------------------------------
by stof at 2012-12-19T16:52:50Z
@drak I think this allows removing some special error catching in a few places in Form tests (and also in the Form class if it was added)
---------------------------------------------------------------------------
by drak at 2012-12-19T17:33:51Z
@stof - yes, the whole idea is, if you inherit from FormEvent, no warning. anything else, gives warning - that's what we want right?
PR squashed and ready from my side.
---------------------------------------------------------------------------
by drak at 2012-12-20T14:00:13Z
ping @fabpot
---------------------------------------------------------------------------
by bschussek at 2012-12-28T15:19:40Z
👍
This PR was merged into the master branch.
Commits
-------
16a196a [Form] Fix deprecated call method
Discussion
----------
[Form] Fix deprecated call method
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: -
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by stof at 2012-12-21T13:21:50Z
This is wrong as the typehint of the constructor is still typehinting the old interface, and so this method is not available.
But the typehint should be changed to use the new interface anyway
---------------------------------------------------------------------------
by francoispluchino at 2012-12-26T09:11:49Z
@fabpot It's OK for you?
(The failure of the Travis test is caused by the DateTime Form test only in PHP 5.3.3)
---------------------------------------------------------------------------
by bschussek at 2012-12-28T15:00:51Z
Can you please squash the commits?
---------------------------------------------------------------------------
by francoispluchino at 2012-12-28T15:57:47Z
@bschussek OK, it's done.
This PR was merged into the master branch.
Commits
-------
828eb90 Fix a tag name typo (</ësh> to </target>)
Discussion
----------
[Validator] Fix a tag name typo (</ësh> to </target>) in validators.sq.xlf
Replace </ësh> by </target> line 139.
This PR was merged into the master branch.
Commits
-------
d2a1e4e Update src/Symfony/Component/Validator/Resources/translations/validators.it.xlf
Discussion
----------
[Validator] Fix structure error in validators.it.xlf
Fix structure error in validators.it.xlf.
Probably a copy-cut that didn't work correctly.
---------------------------------------------------------------------------
by stof at 2012-12-28T17:04:17Z
I suspect a bad resolution of a merge conflict
---------------------------------------------------------------------------
by tgalopin at 2012-12-28T17:06:17Z
Indeed, probably.
This PR was merged into the master branch.
Commits
-------
0a42501 [HttpKernel] tweaked logging in the exception listener
1a6c9b3 [HttpKernel] refactored logging in the exception listener
Discussion
----------
[HttpKernel] refactored logging in the exception listener
* avoid code duplication
* allow easier overloading of the default behavior
This PR was merged into the master branch.
Commits
-------
6cd1fd4 [DependencyInjection] removed hard dependency on the Config component
Discussion
----------
[DependencyInjection] removed hard dependency on the Config component
The Config component is a hard dependency for the loaders (but loaders
themselves are optional); all other classes should not have a hard dep
on Config. The introduction of a new flag allows to remove this
dependency.
This commit also fixes skipped test dependencies.
---------------------------------------------------------------------------
by fabpot at 2012-12-28T09:47:13Z
As there is only one location where we are directly using a class from the Config component (`ContainerBuilder::addObjectResource()`), we can also just test this case and do nothing if the class does not exist instead of adding a flag, but that looks dirty.
```php
public function addObjectResource($object)
{
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
return $this;
}
$parent = new \ReflectionObject($object);
do {
$this->addResource(new FileResource($parent->getFileName()));
} while ($parent = $parent->getParentClass());
return $this;
}
```
What do you think?
The Config component is a hard dependency for the loaders (but loaders
themselves are optional); all other classes should not have a hard dep
on Config. The introduction of a new flag allows to remove this
dependency.
This commit also fixes skipped test dependencies.
This PR was merged into the 2.1 branch.
Commits
-------
05fca6d use preferred_choices in favor of preferred_query
6855cff add preferred_query option to ModelType
Discussion
----------
[Propel1] add preferred_choices option to ModelType
This enables the ModelChoiceList to use 'preferred_choices' of the parent ChoiceType.
Ping @willdurand
---------------------------------------------------------------------------
by willdurand at 2012-12-22T09:39:39Z
👍
This PR was merged into the master branch.
Commits
-------
18daa10 [Routing] Used static to call constant in XmlFileLoader
Discussion
----------
[2.2][Routing] Used static to call constant in XmlFileLoader
It is more complicated to override XmlFileLoader if contants are called with `self`.
This PR replace `self` to `static`.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by piotrpasich at 2012-12-21T08:17:14Z
+1
This allows to have a meaningful information in the WDT when the route
in the Request is not the route name but the route object (like in
Drupal for instance).
This PR was merged into the master branch.
Commits
-------
0fa7378 [Validator] Card validation - Italian translations
Discussion
----------
[Validator] Card validation - Italian translations
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no
* 2.1:
bumped Symfony version to 2.1.7-DEV
updated VERSION for 2.1.6
updated CHANGELOG for 2.1.6
[Form] Fix for `DateTimeToStringTransformer`
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.1 branch.
Commits
-------
8beee64 [Form] Fix for `DateTimeToStringTransformer`
Discussion
----------
[Form] Fix for `DateTimeToStringTransformer`
Closes: #6429
---------------------------------------------------------------------------
by stloyd at 2012-12-21T08:19:11Z
@fabpot @bschussek Could you review this ? Thanks =)
---------------------------------------------------------------------------
by stloyd at 2012-12-23T13:51:36Z
Ping @fabpot (without this every PR gets false fail results from Travis-CI)
This PR was merged into the master branch.
Commits
-------
a50e2a4 Albanian translation
Discussion
----------
Albanian translation
Albanian translation of the Validator Component
This PR was merged into the master branch.
Commits
-------
5e359d3 made the kernel optional in all data collectors
Discussion
----------
made the kernel optional in all data collectors
This PR was merged into the master branch.
Commits
-------
bf9e238 [Form] Add options with_minutes to DateTimeType & TimeType
Discussion
----------
[Form] Add option with_minutes to the DateTimeType & TimeType
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
Hey,
One of my project requires the datetime usage only with hours. I have submit a patch allowing to disable minutes like seconds are disabled.
---------------------------------------------------------------------------
by stloyd at 2012-04-09T16:26:11Z
You should also extend tests for those `Types`
---------------------------------------------------------------------------
by egeloen at 2012-04-09T16:31:51Z
Oups, I have looked at tests but I didn't find it at my first reading. I will do it :)
---------------------------------------------------------------------------
by stloyd at 2012-04-09T16:34:42Z
@egeloen Here you can find tests for Form Types: https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Form/Tests/Extension/Core/Type
---------------------------------------------------------------------------
by egeloen at 2012-04-09T16:42:42Z
@stloyd I have added tests. Can you give me some feedbacks ?
---------------------------------------------------------------------------
by stloyd at 2012-04-09T16:46:33Z
@egeloen I'm not sure if we should allow user to set `with_minutes=false` and `with_seconds=true`. But in overall seems quite ok.
---------------------------------------------------------------------------
by egeloen at 2012-04-09T16:51:37Z
Yes, you're right. But I'm unsure how can I do this following the good way.
---------------------------------------------------------------------------
by inanimatt at 2012-05-03T15:46:02Z
Just make it throw an InvalidConfigurationException.php exception, no? :)
---------------------------------------------------------------------------
by egeloen at 2012-06-09T18:27:41Z
I have updated the PR in order to throw an ``InvalidConfigurationException`` if we enable seconds & disable minutes.
---------------------------------------------------------------------------
by egeloen at 2012-07-09T19:08:11Z
@bschussek I have removed the useless code.
I think I have found an issue about my PR. I have added 3 tests in order to show it. It seems if we disable minutes, the text widget is broken.
---------------------------------------------------------------------------
by stof at 2012-10-13T16:00:43Z
@egeloen can you rebase your PR as it conflicts with master ?
---------------------------------------------------------------------------
by egeloen at 2012-10-13T17:15:22Z
@stof rebase
Like explain previously, my PR is still failling if we disable minutes & use the text widget.
---------------------------------------------------------------------------
by egeloen at 2012-10-13T18:09:03Z
I have fixed the last issue. IMO, the PR can now be merge.
---------------------------------------------------------------------------
by stof at 2012-10-13T18:20:00Z
@bschussek @fabpot ping
---------------------------------------------------------------------------
by egeloen at 2012-10-16T18:13:00Z
@bschussek Do yo think this PR can be merge?
---------------------------------------------------------------------------
by egeloen at 2012-10-30T19:14:00Z
@fabpot is there something missing before merging?
---------------------------------------------------------------------------
by fabpot at 2012-10-31T08:22:55Z
I'm waiting for @bschussek approval.
---------------------------------------------------------------------------
by geoffrey-brier at 2012-11-13T10:49:52Z
I really need the `with_minute => false` enhancement on a project as I don't want to write CSS/JS hacks, could @bschussek approve/disapprove it so that I can make a decision?
---------------------------------------------------------------------------
by henrikbjorn at 2012-11-13T10:52:12Z
@geoffrey-brier you could do you own FieldType that extends the current one and add the option your self.
---------------------------------------------------------------------------
by egeloen at 2012-11-13T13:20:44Z
@bschussek Yes... :) I have updated the PR according to your feedback.
I needed to update the `DateTimeToStringTransformer` because it tries to create a `DateTime` only from the value (with no format). In my case, the `'03'` value is not enougt to create it. So, if the date time creation fails, it then try to create the datetime from the format. I don't know if it is the best approach but it works well.
By the way, why does it first try to create a `DateTime` without format, **then only** try to use the format ?
---------------------------------------------------------------------------
by bschussek at 2012-11-13T14:20:13Z
@egeloen Good question, I think the transformer is a bit flawed there. I'm working on that. The rest of the PR looks good. Thank you!
---------------------------------------------------------------------------
by bschussek at 2012-12-13T18:14:58Z
I fixed the transformer in #6333. Once that is merged into 2.1, and once 2.1 is merged into master after that, you can rebase this PR on master. Then we can merge it.
---------------------------------------------------------------------------
by egeloen at 2012-12-22T14:54:38Z
I have rebased & squashed commits. The PR is ready to merge. ping @fabpot
If you want your code to work on both version, use the following syntax:
{% render url('foo') with {}, {'bar': 1} %}
where the empty array is not used in 2.2.
* 2.1:
fixed typo
[FrameworkBundle] fixed ESI calls
[FrameworkBundle] fixed ESI calls
bumped Symfony version to 2.1.6-DEV
updated VERSION for 2.1.5
updated CHANGELOG for 2.1.5
bumped Symfony version to 2.0.21-DEV
[FrameworkBundle] fixed trusted_proxies configuration for some edge cases
[FrameworkBundle] fixed XSD for the trusted-proxies setting
updated VERSION for 2.0.20
update CONTRIBUTORS for 2.0.20
updated CHANGELOG for 2.0.20
Conflicts:
src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.0:
bumped Symfony version to 2.0.21-DEV
[FrameworkBundle] fixed trusted_proxies configuration for some edge cases
[FrameworkBundle] fixed XSD for the trusted-proxies setting
updated VERSION for 2.0.20
update CONTRIBUTORS for 2.0.20
updated CHANGELOG for 2.0.20
Conflicts:
CONTRIBUTORS.md
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Commits
-------
2a2c468 Update src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php
Discussion
----------
[Form] BC change for `preg_match` and old PCRE versions.
Fix `preg_match` in `DateTimeToStringTransformer` to work with older PCRE.
This PR was merged into the master branch.
Commits
-------
ad6a6c8 [Finder] Re-enable BsdFindAdapter for Darwin shells and fix it
Discussion
----------
[Finder] Re-enable BsdFindAdapter for Darwin shell and fix it
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (tested both Mac OS X and Debian)
Fixes the following tickets: #6412
----
BSD find command needs "-E" switch to evaluate POSIX regex.
Added the ability to Command to insert bits at a given index.
On some systems (Mac OS X for example) php's function
sys_get_temp_dir() returns a directory that is a symlink.
This causes tests failures because expected paths are different
from path returned by the adapter. So, has been added a realpath.
The building of sorting command has been totally moved on the adapter so
the sorting command for BsdFindAdapter has been fixed.
The building of content filtering command has been moved on the adapter.
In BsdFindAdapter version, -r switch has been replaced with initial grep
that srips out blank lines, this way is compatible with BSD shell.
* 2.1:
[FrameworkBundle] added support for URIs as an argument to HttpKernel::render()
[FrameworkBundle] restricted the type of controllers that can be executed by InternalController
[Process] Allow non-blocking start with PhpProcess
Making it easier to grab the PR template.
[Locale] fixed a test
Fixed failing test
fix double-decoding in the routing system
Conflicts:
src/Symfony/Component/Process/PhpProcess.php
* 2.0:
[FrameworkBundle] added support for URIs as an argument to HttpKernel::render()
[FrameworkBundle] restricted the type of controllers that can be executed by InternalController
Making it easier to grab the PR template.
fix double-decoding in the routing system
Conflicts:
README.md
src/Symfony/Bundle/FrameworkBundle/EventListener/RouterListener.php
src/Symfony/Component/Security/Http/HttpUtils.php
This PR was merged into the 2.0 branch.
Commits
-------
8b2c17f fix double-decoding in the routing system
Discussion
----------
fix double-decoding in the routing system
@fabpot @vicb This should fix it. You know what ;) Don't want to leak more information.
And the good thing, it's no hack nor does it break BC.
BSD find command needs "-E" switch to evaluate POSIX regex.
Added the ability to Command to insert bits at a given index.
On some systems (Mac OS X for example) php's function
sys_get_temp_dir() returns a directory that is a symlink.
This causes tests failures because expected paths are different
from path returned by the adapter. So, has been added a realpath.
The building of sorting command has been totally moved on the adapter so
the sorting command for BsdFindAdapter has been fixed.
The building of content filtering command has been moved on the adapter.
In BsdFindAdapter version, -r switch has been replaced with initial grep
that srips out blank lines, this way is compatible with BSD shell.
This PR was merged into the master branch.
Commits
-------
cda1621 Move FormInterface too
0544351 Move DeprecationErrorHandler to Test folder so it's not removed when building the zip file
f56a2b9Fix#6374 move FormBuilderInterface from Tests to Test
Discussion
----------
Fix#6374 move FormBuilderInterface from Tests to Test
---------------------------------------------------------------------------
by fabpot at 2012-12-16T07:47:55Z
Are there any other classes in the tests that might be useful for testing userland forms? ping @bschussek
---------------------------------------------------------------------------
by colinfrei at 2012-12-16T08:24:51Z
The DeprecationErrorHandler will need to be in the Test directory as well, as its handleBC method is used for handling BC code that's not in tests.
---------------------------------------------------------------------------
by colinfrei at 2012-12-16T09:06:51Z
Wanted to make a pull request to tvlooy's branch with the DeprecationErrorHandler stuff, but can't figure out how to do that - the commit is here: ec56379042
---------------------------------------------------------------------------
by stof at 2012-12-16T19:53:59Z
@fabpot The other extending interfaces provided for mocking purpose (as mocking an interface extending ``Traversable`` directly does not work). So we have FormInterface too at least
This PR was merged into the master branch.
Commits
-------
163564b [WebProfilerBundle] replaced yaml_dump by json_encode to make the Web Profiler independent from the YAML component
1c92307 [WebProfilerBundle] fixed exception panel when no exception is thrown
00e08be [WebProfilerBundle] replaced usage of the render tag by the render function (to decouple the bundle from TwigBundle)
0e2418c [TwigBundle] added the HttpKernel extension to the default Twig loaded extensions
f0d9be0 [TwigBridge] added an extension for the HttpKernel component
Discussion
----------
Added an HttpKernelExtension in Twig bridge and used it in the WebProfiler
The first commit introduces a new HttpKernelExtension in the Twig bridge that allows the rendering of a sub-request from a template (the code mostly comes from Silex, and will replace the code there at some point).
The name `render` is probably not the best one as it does not really tell you what it does (the same goes for the `render` tag we have in Symfony2 by the way).
Here is a list of possible names:
* `render()`
* `render_request()`
* `request()`
* `subrequest()`
* `include_request()`
I don't really like the last one, but it is (perhaps) consistent with the `include` tag/function in Twig.
This new `render()` function is also a first step towards replacing the `render` tag (with support for ESI, SSI, ...). But it won't happen before we refactor the way it's managed now (a lot of the code is in the FrameworkBundle right now and that prevents Silex or Drupal to reuse it).
The other commits make use of this new extension to make the Web Profiler truly independent from TwigBundle and FrameworkBundle.
This PR was merged into the master branch.
Commits
-------
6efae29 [TwigBundle] fixed configuration to avoid key normalizations for paths and globals (closes#5998)
e31d4f1 [Config] allowed the disabling of key normalization on some array nodes
Discussion
----------
Config key normalization
This is a quick proof-of-concept for a better fix of #6086, where key normalizations can be disabled on specific nodes. The previous patch was not really useful as you were only able to disable key normalization globally for a configuration.
ping @lolautruche
The second commit fixes#5998.
---------------------------------------------------------------------------
by lolautruche at 2012-12-15T15:39:00Z
+1
The approach is neat and much better than my workaround. Gives better control and avoids magic 😃 (even if this *normalization* is still a bit obscure to me).
This PR was merged into the master branch.
Commits
-------
a498261 [Webprofiler] increased hitboxSize of the close button the webprofiler toolbar. Otherwise it's very hard to close it on a tablet
Discussion
----------
[Webprofiler] increased hitboxSize of the close button the webprofiler
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
Increased the hitbox Size of the close button on webprofiler, otherwise it's very hard to close it on a tablet. Apple recommends 40x40 pixels for touch stuff
see issue https://github.com/symfony/symfony/issues/6264
---------------------------------------------------------------------------
by nicam at 2012-12-16T13:45:36Z
@stloyd done
This PR was merged into the master branch.
Commits
-------
5a73d55 Added small test to check if time limit works
7f6e99b Fixed MongoDB storage missing time range. Fixed UI not searching properly. Removed unnecessary time query.
3a0ed58 Added ability to search by time when using the profiler
Discussion
----------
[WebProfilerBundle] [HttpKernel][Profiler] Added ability to search by time when using the profiler
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
This PR adds the ability to search in a certain time range for profiles.
---------------------------------------------------------------------------
by fabpot at 2012-12-11T14:36:21Z
Anyone willing to help for the MongoDB support? ping @jmikola
---------------------------------------------------------------------------
by jmikola at 2012-12-11T18:42:00Z
Totally. I'm flying between Turkey and New York tomorrow and if I have wifi on the plane (good chance) I'll check this out. Otherwise, later in the week.
---------------------------------------------------------------------------
by dlsniper at 2012-12-11T22:42:19Z
I could have a look on this matter as well tomorrow but I'm not really sure about my schedule. Any help would be greatly appreciated. Thanks!
---------------------------------------------------------------------------
by jmikola at 2012-12-13T21:56:26Z
@dlsniper: Had no wifi on the plane, but I'm available to work on this now. How can we go about it?
Should I submit a PR against your branch? Then you can accept that and my commit should show up in this PR.
---------------------------------------------------------------------------
by dlsniper at 2012-12-13T22:05:21Z
@jmikola I haven't had too much time either but yes, that would be great.
The change should go here: b631cd989c/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php (L172) but I clearly lack the skill of making the necessary changes for it.
Thank you very much!
---------------------------------------------------------------------------
by dlsniper at 2012-12-15T21:39:39Z
I've fixed MongoDB driver, adjusted search by time like @jmikola suggested and fixed a UI bug. Can someone please validate this over?
Thanks!
---------------------------------------------------------------------------
by dlsniper at 2012-12-15T21:55:51Z
The tests seem to be failing because of some locale changes not related to these commits. I encounter the same problem on my laptop and I could try and fix it into a different branch but last time I've tried to fix it it was ok on my side and failing on Travis. Any hints for that?
This PR was merged into the master branch.
Commits
-------
2f6507b [Form] Fixed failing test
Discussion
----------
[Form] Fixed failing test
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
* 2.1:
[FrameworkBundle] fixed broken tests
[FrameworkBundle] Fixed logic under test environment.
[Session] Added exception to save method
[Session] Fixed a bug with the TestListener
Added comment
[FrameworkBundle] Added tests for trusted_proxies configuration.
[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()
checked for a potentially missing key
[FrameworkBundle] used the new method for trusted proxies
remove realpath call
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
* 2.0:
Added comment
[FrameworkBundle] Added tests for trusted_proxies configuration.
[FrameworkBundle] Added a check on file mime type for CodeHelper::fileExcerpt()
checked for a potentially missing key
[FrameworkBundle] used the new method for trusted proxies
remove realpath call
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
This PR was merged into the 2.0 branch.
Commits
-------
f0743b1 Merge pull request #1 from pylebecq/2.0
555e777 [FrameworkBundle] Added tests for trusted_proxies configuration.
a0e2391 [FrameworkBundle] used the new method for trusted proxies
Discussion
----------
[FrameworkBundle] used the new method for trusted proxies
This makes the framework bundle using the new method from the request class.
---------------------------------------------------------------------------
by fabpot at 2012-12-05T10:38:20Z
As this is a sensitive issue, can you add some tests? Thanks.
---------------------------------------------------------------------------
by bamarni at 2012-12-06T13:00:24Z
Well I don't know why it fails on travis, I can't run the full test suite locally because of a segfault but ```phpunit src/Symfony/Bundle/``` marks all the tests as passing.
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:08:11Z
But it looks like the failing tests come from what you've changed.
---------------------------------------------------------------------------
by bamarni at 2012-12-06T13:29:33Z
Yes, I'm not saying it's not my fault but I can't reproduce this as locally it tells me they pass, I'll try to fix this this evening.
---------------------------------------------------------------------------
by bamarni at 2012-12-06T17:49:28Z
Apparently it fails only when running the whole testsuite, looking at other travis builds I can see this one on 2.0 : https://travis-ci.org/symfony/symfony/jobs/3495511 which fails in a similar way than here (https://travis-ci.org/symfony/symfony/jobs/3530928). Because of a place trying to access an undefined $_SERVER key : ```PHP Notice: Undefined index: SCRIPT_NAME ...``` but I can't find where, and the stack trace references some phpunit classes.
I'd be happy if someone could give me some pointers in here as I don't have any clue about how to fix this..
---------------------------------------------------------------------------
by bamarni at 2012-12-06T18:00:57Z
As a consulsion I'd say I can't run the whole testsuite locally (it fails even when I revert my commit), so there is no reliable way for me to fix this, if anyone is up for continuing this feel free.
---------------------------------------------------------------------------
by fabpot at 2012-12-11T09:47:48Z
@bamarni Can you just update this PR with the code change and no tests at all? I will then finish the PR. Thanks.
---------------------------------------------------------------------------
by bamarni at 2012-12-11T16:58:17Z
@fabpot: thanks for helping me out on this, hope you won't run into the same issue!
This PR was merged into the master branch.
Commits
-------
320fb6c [Translation] changed the MetadataAwareInterface method signatures
11ff433 [Translation] fixed CS in unit tests
c40db35 [Translation] removed some code that is not done anywhere else in Symfony
63719a0 [Translation] created a new interface to avoid breaking BC
23e9e65 [Translation] fixed name
5607732 [Translation] added Metadata to MessageCatalogue
Discussion
----------
[MessageCatalogue] Add Metadata to MessageCatalogue
rework of #4399
For improving the Gettext tools (PO, MO File Loader/Dumper) we need at least storage for their meta data.
This patch allows for issues below to store and process ie Po Header, Po Header Pluralisation rule.
Open
- [[WIP]: Allow Drupal to use Translate component](https://github.com/symfony/symfony/pull/4249)
- [[2.1][Translator] Symfony translation process & gettext](https://github.com/symfony/symfony/issues/4245)
Closed:
- [[Translation] Po/MoFileLoader parse plurization rules](https://github.com/symfony/symfony/pull/3023)
It has 1 TODO regarding addCatalogue: it now just override old values with new.
This PR was merged into the 2.1 branch.
Commits
-------
098b593 [Session] Added exception to save method
6b9ee87 [Session] Fixed a bug with the TestListener
Discussion
----------
[Session] Fixed bug with TestListener
Fixed a bug where an unstarted mock session would be emptied with a save. Here are the steps to reproduce:
Use the test client from Symfony\Bundle\FrameworkBundle\Test\WebTestCase::createClient(), and add something to its session. (I actually had it authenticate against a firewall).
Take the cookies of this first test client and add them to a second test client
Have the second test client request a URL that results in a 404
Since the 404 does not need to start the session, hence when save is called (automatically), the mock session is overwritten with an empty array. This does not happen with the other session handlers.
The added unit test in this PR shows this problem. If this PR gets accepted, will it also get merged into the 2.1.x-dev branch?
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes (The broken test seems to be unrelated to this change)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This is a follow up PR since my original one (https://github.com/symfony/symfony/pull/6342) was against the wrong upstream branch.
This PR was merged into the master branch.
Commits
-------
9071676 create oneof constraint and add deprecation messages in choice, also make choice extend new oneOf constraint to avoid duplicate code
Discussion
----------
[Validator] Rename "Choice" to "OneOf"
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6324
Todo:
License of the code: MIT
Documentation PR: https://github.com/symfony/symfony-docs/issues/2025
---------------------------------------------------------------------------
by bschussek at 2012-12-14T18:20:56Z
Can you let `Choice` and `ChoiceValidator` extend the renamed classes? Then we avoid the code duplication. You can also remove `ChoiceValidatorTest` then.
---------------------------------------------------------------------------
by ricardclau at 2012-12-14T18:26:58Z
For sure! BTW there seems to be a problem with SF2 build when testing BR currency :S maybe it is the new ICU version supported, I guess you are aware of this but just in case!
---------------------------------------------------------------------------
by stof at 2012-12-14T21:14:04Z
the ``Choice`` constraint should trigger a ``E_USER_DEPRECATED`` in its constructor (and calling the parent constructor) as we agreed on this. The PR adding these calls everywhere is not merged yet, but it would avoid missing it when merging the PRs separately
---------------------------------------------------------------------------
by bschussek at 2012-12-14T21:19:45Z
Things missing:
* add a deprecation note to the Validator's CHANGELOG
* add a block in UPGRADE-2.2 under the Validator's "Deprecations" section that explains how to upgrade with a before/after sample
* add `trigger_error()` calls to the constructors of `Choice` and `ChoiceValidator`
See #6180 for more information about how to call `trigger_error()`.
---------------------------------------------------------------------------
by ricardclau at 2012-12-14T22:45:55Z
Sorry I was not aware of the trigger_error() agreement, absolutely +1 on it.
I hope I understood everything properly, if there is something else or some other errors please tell me!
---------------------------------------------------------------------------
by bschussek at 2012-12-15T08:46:51Z
The entry in the CHANGELOG is still missing.
---------------------------------------------------------------------------
by ricardclau at 2012-12-15T09:36:28Z
By the CHANGELOG you mean what I just added right? Hope now it is ok!
---------------------------------------------------------------------------
by bschussek at 2012-12-15T09:45:16Z
Awesome! 👍
This PR was merged into the master branch.
Commits
-------
6b10550 Merge branch 'master' of github.com:symfony/symfony into deprecationErrors
1d82112 [Form] Fix two cases where deprecated methods were being used
b8cdbdc [Form] Catch deprecation errors that are caused by BC code
ebcb432 [Form] [FrameworkBundle] catch deprecation errors in tests
c21b12e [Form] handle BC use of deprecated stuff in non-test-methods.
fc2be6d [Form] catch deprecated errors in tests
800a032 [Form] replace bindRequest() with bind(), as bindRequest is deprecated
d5b2638 [Form] Trigger errors for deprecated methods in Form Component
f3d6966 [Validator] Stop using deprecated methods
d57ad32 [Form] Catch deprecation errors when using deprecated methods/classes in tests
3241157 [Validator] Trigger errors for deprecations
1f9eb7f return value of handleError
b35de9e Handle errors using a custom error handler
f49704b trigger errors for deprecated methods in HttpFoundation component
Discussion
----------
trigger_error() for deprecations
See also #6173 and #6139.
Started triggering errors in the HttpFoundation component.
It seems as if most of the time the error is just duplicating the text in the @deprecation comment.
Any opinions on if duplicating the text is acceptable, or if fetching the comment text to output the error makes sense?
---------------------------------------------------------------------------
by Seldaek at 2012-12-04T13:39:42Z
IMO it's fine to just duplicate the `@deprecated` note in the message, since anyway this code is meant to be completely deleted, this duplication should not do much harm.
---------------------------------------------------------------------------
by fabpot at 2012-12-06T08:22:21Z
@colinfrei I've merged PR #6173. Do you have time to implement the `trigger_error()` call everywhere? Thanks.
---------------------------------------------------------------------------
by colinfrei at 2012-12-06T08:36:55Z
Yep I'll finish that, probably until the beginning of next week.
---------------------------------------------------------------------------
by bschussek at 2012-12-10T10:15:12Z
Thank you for working on this!
---------------------------------------------------------------------------
by fabpot at 2012-12-12T11:08:53Z
@colinfrei: Is this PR finished? Can I merge it?
---------------------------------------------------------------------------
by colinfrei at 2012-12-12T12:09:19Z
@fabpot not quite - I lost some work due to a computer crash over the weekend. The only thing open is fixing the tests for the Form Component and catching the cases where the Form Component intentionally uses deprecated stuff.
---------------------------------------------------------------------------
by colinfrei at 2012-12-15T07:32:28Z
@fabpot - finished adding trigger_errors and catching them in Tests and as needed.
Travis is failing, but that seems to be master being broken due to the Finder changes?
I changed a few cases where the code was using deprecated methods which wasn't necessary in my eyes, specifically 1d8211249b, 800a032f07, f3d696636a
This PR was merged into the master branch.
Commits
-------
45aab0f [Config] Added parameter to check prefix in an element or an attribute name in XmlUtils::convertDomElementToArray
7f5a7fd [DependencyInjection] Using class from Config component to loading XML files
d6f0880 [Validator] Added dependency to Config component to loading XML files
34471a6 [Routing] Using class from Config component to loading XML files
fa8b0d8 [Config] Added a utils class for XML manipulations
Discussion
----------
[Config] Added a utils class for XML manipulations
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by fabpot at 2012-12-14T13:59:59Z
Looks good to me. Can you rebase on master as there is a conflict right now? Thanks.
---------------------------------------------------------------------------
by hason at 2012-12-14T14:44:11Z
Done.
This PR was merged into the master branch.
Commits
-------
74a8fcf [FrameworkBundle] Added support for default templates per render tag
Discussion
----------
[FrameworkBundle] Added support for default templates per render tag
This commit allows you to specify default templates per render tag when using hinclude.
E.G:
The following will use the specific default template for the render:
```` {% render "AcmeDemoBundle:Controller:action" with {}, {"standalone" : "js", "default" : "AcmeDemoBundle:Default:content.html.twig"} %}````
or if you don't want to use a template for the default content but just a string, you can do the following
```` {% render "AcmeDemoBundle:Controller:action" with {}, {"standalone" : "js", "default" : "Loading..."} %}````
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: #3356
Todo: -
Documentation
---------------------------------------------------------------------------
by fabpot at 2012-12-14T12:25:40Z
Looks good to me. Can you add a note in the CHANGELOG of the component and send a PR on symfony/symfony-docs about this new feature? Thanks.
---------------------------------------------------------------------------
by pierredup at 2012-12-14T14:30:00Z
@fabpot done, documentation PR symfony/symfony-docs#2021
This PR was merged into the master branch.
Commits
-------
4c833ac Added Galician translation
Discussion
----------
[Form] [Validator] added Galician translation
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the master branch.
Commits
-------
8729ff8 [Validator] Updated Slovak translations (collections and cards)
Discussion
----------
[Validator] Updated Slovak translations (collections and cards)
This PR was merged into the master branch.
Commits
-------
d7db2c3 Add two zh_CN thans-unit in validators
Discussion
----------
Add 2 zh_CN thans-unit in validators
I 've added 2 zh_CN thans-unit in validators, Please review it
This PR was merged into the master branch.
Commits
-------
7511a50 [Validator] Card validation - French translations
Discussion
----------
[Validator] Card validation - French translations
This PR was merged into the 2.1 branch.
Commits
-------
f24e3d7 [HttpKernel] Revise MongoDbProfilerStorage::write() return value
78c5273 [Session] Document Mongo|MongoClient argument type instead of "object"
de19a81 [HttpKernel] Support MongoClient and Mongo connection classes
b28af77 [Session] Support MongoClient and Mongo connection classes
20e93bf [Session] Utilize MongoDB::selectCollection()
Discussion
----------
[2.1] Support PHP MongoDB driver 1.3.0+ in profiler/session classes
> Bug fix: yes
> Feature addition: yes
> Backwards compatibility break: no
> Symfony2 tests pass: yes
> Fixes the following tickets: #6130
> License of the code: MIT
I don't believe this is a BC break, but just to confirm: the MongoDbSessionHandler constructor signature changed, as I removed the `Mongo` type hint.
Bug fix entails allowing MongoClient to be used by default if the new driver is available, since the original Mongo class is deprecated. I also removed the assumption about `MongoCollection::update()`'s return value, since it may be a status array now.
---------------------------------------------------------------------------
by jmikola at 2012-12-13T22:04:47Z
Lots of test failures, but they appear to be unrelated.
MongoClient defaults its write concern to w=1 (i.e. "safe" writes), which means update() may return an array instead of boolean true. Check for this before returning from write().
This PR was merged into the master branch.
Commits
-------
74a06f8 QtTranslationsLoader class renamed to QtFileLoader.
Discussion
----------
[Translation] QtTranslationsLoader class renamed to QtFileLoader.
QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3.
Fixes#6332.
This PR was merged into the 2.1 branch.
Commits
-------
b20c5ca [Form] Fixed reverse transformation of values in DateTimeToStringTransformer
Discussion
----------
[Form] Fixed reverse transformation of values in DateTimeToStringTransformer
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing
"2012-05-18"
now results in the date
"2012-05-18 00:00:00 UTC"
instead of
"2012-05-18 12:58:27 UTC"
as before, where the time part corresponded to the local server time.
Another example: When parsing with the format "H:i:s", parsing
"12:58:27"
now results in
"1970-01-01 12:58:27 UTC"
instead of
"2012-12-13 12:58:27 UTC"
as before, where again the date part corresponded to the local server time.
This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
This PR was merged into the master branch.
Commits
-------
2196810 Added QtTranslationsLoader tests.
201818bFixed#5797.
Discussion
----------
[Translation] Fixed#5797.
This should fix issue #5797.
What I did is prevented `Translator` to throw `NotFoundResourceException` if resource is not found and there are fallback locales to process. This happens for locales like `en_GB`, `fr_FR`...
I also tested this fix against real application which uses Validation component without full stack framework and I was able to use `en_GB` locale without any errors only after this fix.
The parts not given in the format are reset to the corresponding values of
the UNIX base timestamp. For example, when parsing with the format "Y-m-d",
parsing
"2012-05-18"
now results in the date
"2012-05-18 00:00:00 UTC"
instead of
"2012-05-18 12:58:27 UTC"
as before, where the time part corresponded to the local server time.
Another example: When parsing with the format "H:i:s", parsing
"12:58:27"
now results in
"1970-01-01 12:58:27 UTC"
instead of
"2012-12-13 12:58:27 UTC"
as before, where again the date part corresponded to the local server time.
This behavior is now consistent with DateTimeToArrayTransformer and
DateTimeToLocalizedStringTransformer.
* 2.1:
[Console] Add support for parsing terminal width/height on localized windows, fixes#5742
[Form] Fixed treatment of countables and traversables in Form::isEmpty()
refactor ControllerNameParser
[Form] Fixed FileType not to throw an exception when bound empty
- Test undefined index #
Maintain array structure
Check if key # is defined in $value
Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
This PR was merged into the master branch.
Commits
-------
aab60e3 [HttpKernel] fix public Kernel::stripComments()
Discussion
----------
[HttpKernel] fix public Kernel::stripComments()
Needs fix as the method is public.
---------------------------------------------------------------------------
by fabpot at 2012-12-13T17:01:52Z
Can you explain what you mean by "Needs fix as the method is public."?
---------------------------------------------------------------------------
by vicb at 2012-12-13T17:15:05Z
@fabpot One can argue that the fix could not be reached if the method was private.
This PR was merged into the master branch.
Commits
-------
142cffb fixed unit tests
fc444f1 fixed support for Twig loaders when they do not extend Twig_ExistsLoaderInterface
f005649 [WebProfilerBundle] decoupled the bundle from TwigBundle
35d63df removed the dependency on the container for exception handling
Discussion
----------
Webprofiler refactor
This PR removes two hard dependencies from WebProfilerBundle:
* The dependency on the DIC;
* The dependency on TwigBundle.
It also removes the dependency on the DIC in the exception controller from TwigBundle for more consistency.
This PR was merged into the master branch.
Commits
-------
81bdab8 [Validator] Fixed: Arrays are validated recursively by default
Discussion
----------
[Validator] Arrays are validated recursively now by default
Bug fix: yes
Feature addition: yes?
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #6246
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the master branch.
Commits
-------
77ffdad Finnish Validator translations updated.
Discussion
----------
Finnish Validator translations updated.
This PR contains an updated Validator translation file for Finnish language.
This PR was merged into the master branch.
Commits
-------
34d0c6b [Translation] uniformized the way exception are thrown in LoaderInterface::load()
Discussion
----------
[Translation] uniformized the way exception are thrown in LoaderInterface::load()
---------------------------------------------------------------------------
by fabpot at 2012-12-12T19:44:36Z
followup for #6301 (cc @umpirsky)
---------------------------------------------------------------------------
by umpirsky at 2012-12-12T19:59:05Z
Does this means that we will catch this exception in `Translator` in order to fix#5797?
If yes, maybe we should add new `TranslationResourceNotFoundException` or something similar?
---------------------------------------------------------------------------
by fabpot at 2012-12-13T10:01:23Z
I've created two new exception classes: `NotFoundResourceException` for when the resource does not exist and `InvalidResourceException` when a problem occurs when loading the resource. That should give us everything we need to fix#5797.
---------------------------------------------------------------------------
by umpirsky at 2012-12-13T10:05:08Z
Perfect, thanks.
I'll give it a try later today.
---------------------------------------------------------------------------
by umpirsky at 2012-12-13T11:58:37Z
@fabpot Will you merge or I should fork your branch?
This PR was merged into the master branch.
Commits
-------
29595d1 added slovenian translations
Discussion
----------
[Validator] Added Slovenian translations for card validation
This PR was merged into the master branch.
Commits
-------
6c6bf53 first translation to Welsh
Discussion
----------
[Validator][Resources] added new Welsh translation file
Added a Welsh (cy) version of src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
This PR was merged into the master branch.
Commits
-------
58f9d00 Updated Romanian translations
Discussion
----------
Updated Romanian translations
Added Romanian translation for card validation
This PR was merged into the master branch.
Commits
-------
a1fb945 CS fixes.
ac58681 Fix loaders to check if resource exists.
Discussion
----------
[Translation] Fix loaders to check if resource exists.
This was mentioned in #5797.
The problem is that some translation loaders throw exception when translation resource is not found, some produce warnings and some ignore this and return empty catalog.
After this fix, all of them will throw exception in such case. But still, some of them will throw `RuntimeException` and some `InvalidArgumentException` which is not perfect, but still one step in right direction.
This PR was merged into the master branch.
Commits
-------
57e70a7 Small cleanup in Finder tests.
Discussion
----------
[Finder] Small cleanup in tests.
This PR was merged into the master branch.
Commits
-------
12a890f Issue 5288 fix
Discussion
----------
Issue #5288 fix
I only have the test failing on
php -v
5.4.6-1ubuntu1
ICU version 4.8.1.1
Test results
1) Symfony\Component\Locale\Tests\Stub\StubLocaleTest::testGetCurrenciesData
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$'
+'R$'
It looks like the check $this->isSameAsIcuVersion('4.8') on line is to strict.
It was added here https://github.com/symfony/symfony/commit/90d6dc37 but I don't how to test the fix on icu version 4.8.0.x
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5288
Todo: Check older version of the ICU lib are still working. Because I could not test that.
This PR was merged into the master branch.
Commits
-------
082e8b9 [Validation] Added more Indonesian translation.
Discussion
----------
[Validation] Added more Indonesian translation.
- Added Indonesian translation for translation unit no. 57 and 58.
---------------------------------------------------------------------------
by bertzzie at 2012-12-12T16:16:09Z
This is to add some more translation I missed from the pull request before, here:
https://github.com/symfony/symfony/pull/6289#issuecomment-11291990
Thanks.
This PR was merged into the master branch.
Commits
-------
00422dc [Validator] Card validation - German translation
Discussion
----------
[Validator] Card validation - German translation
This PR was merged into the master branch.
Commits
-------
ada0875 Added farsi translation for card valdiation
Discussion
----------
[Validator] Added farsi translation for card valdiation
This PR was merged into the master branch.
Commits
-------
d52f8f7 Turkish Language File Translated
Discussion
----------
Turkish Language File Translated
This PR was merged into the master branch.
Commits
-------
ab58c7f [Validator] Card validation - Norwegian translation unit 54-48
Discussion
----------
[Validator] Card validation - Norwegian translation unit 54-58
This PR was merged into the master branch.
Commits
-------
34df35d Added validation messages for Afrikaans
Discussion
----------
[Validator] Validation messages - Afrikaans translatios
This PR was merged into the master branch.
Commits
-------
08f2631 [Validation] Improve Indonesian translation.
Discussion
----------
[Validation] Improve Indonesian translation.
- Improve some translation's grammar.
- Added translation unit no. 49 - 56.
This PR was merged into the master branch.
Commits
-------
89181a8 [Validator] added Hungarian translations for card validation
Discussion
----------
[Validator] added Hungarian translations for card validation
This PR was merged into the master branch.
Commits
-------
5cc4390 Updated catalan translations for validators
Discussion
----------
Updated catalan translations for validators
This PR was merged into the master branch.
Commits
-------
b2ff4d8 [Validator] Card validation - Italian translations
Discussion
----------
[Validator] Card validation - Italian translations
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: n/a
Todo: n/a
License of the code: MIT
Documentation PR: n/a
This PR was merged into the master branch.
Commits
-------
3a6372d Updated spanish translations for validators
Discussion
----------
Updated spanish translations for validators
Added translations for credit card related messages
This PR was merged into the master branch.
Commits
-------
2f07966 [Yaml] Add test showing that dates before 01 Jan 1970 are correctly parsed
Discussion
----------
[Yaml] Add test showing that dates before 01 Jan 1970 are correctly parsed
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Adds a test related to issue #6275, showing that the Yaml inline parsing supports ISO 8601 dates before 1980.
This PR was merged into the master branch.
Commits
-------
237bbd0 fixed and refactored YamlFileLoader in the same sense as the XmlFileLoader
392d785 removed covers annotation from loader tests and unneeded use statements
45987eb added tests for the previous XmlFileLoader fixes
b20d6a7 ensure id, pattern and resource are specified
8361b5a refactor the XMlFileLoader
83fc5ff fix namespace handling in xml loader; it could not handle prefixes
1a60a3c make resource and key attributes required in xsd
02e01b9 improve exception messages in xml loader
51fbffe remove unneeded cast
358e9c4 fix some phpdoc
Discussion
----------
[Routing] improve loaders
BC break: no
Main points:
- fixed Xml loader that could not handle namespace prefixes but is valid xml
- fixed Yaml loader where some nonsesense configs were not validated correctly like an imported resource with a pattern key.
Added tests for all. Some refactoring + a few tweaks like better exception messages and more consistency between Xml loader and yaml loader. See also commits.
---------------------------------------------------------------------------
by Tobion at 2012-12-07T18:16:08Z
@fabpot this is ready
---------------------------------------------------------------------------
by Tobion at 2012-12-11T17:30:10Z
@fabpot rebased. Please don't squash to one big commit where one does not see what changed why.
---------------------------------------------------------------------------
by fabpot at 2012-12-11T17:32:40Z
I only squash when most commits are CS fixes and feedback.
---------------------------------------------------------------------------
by Tobion at 2012-12-11T17:37:49Z
Well, you squashed #6022 so it's not possible to revert a specific deprecation.
This PR was merged into the master branch.
Commits
-------
d5426f0 [Form] Add tests to prove that label is not rendered when is marked as false
120547c [Form][TwigBridge] Don't set label attributes if is marked as not to be rendered [Form][FrameworkBundle] Add option to disable rendering of label for fields
36e4556 [Form] Option for not displaying a label by setting label to false. [Form] Fixed formatting & translation ..
Discussion
----------
[Form] Added option for not displaying a form-label by setting label to false
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Replaces: #5421
@fabpot @BenjaminBeck: I was just not sure what to do with "table based" forms, so I left `<td></td>` rendered when there is no label, because I'm not sure that we can hide it easily.
---------------------------------------------------------------------------
by XWB at 2012-12-11T09:30:14Z
👍
This PR was merged into the master branch.
Commits
-------
ea74610 jumping progress bar fix for windows & unix
6a0ee27 [Console] fixed progress bar jumping
Discussion
----------
[Console] fixed progress bar jumping for windows & unix env
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by pborreli at 2012-12-11T13:58:25Z
Good implementation but could you please check http://symfony.com/doc/current/contributing/code/standards.html
This PR was squashed before being merged into the master branch (closes#6022).
Commits
-------
8c7a169 [Routing] clean up of RouteCollection API
Discussion
----------
[Routing] clean up of RouteCollection API
BC break: only the internal behavior of addPrefix()
Deprecations:
- some params of addCollection and addPrefix that still work but should not be used anymore
- getPrefix (you cannot rely on it how my added test shows that failed previously but was fixed with https://github.com/symfony/symfony/pull/6120/files#L5L109
and it's also useless since we dont have a tree anymore)
Reasoning see commits and changelog.
---------------------------------------------------------------------------
by Tobion at 2012-12-06T19:15:53Z
@fabpot this is finished and rebased. I switched from `addConfigs` to addDefaults(), addRequirements(), and addOptions() as you suggested. I also deprecated getPrefix(). Reasoning see above and in the changelog.
This PR was squashed before being merged into the master branch (closes#6014).
Commits
-------
2b13760 [Filesystem] [mirror] added "delete" option
Discussion
----------
[Filesystem] [mirror] added "delete" option
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#123
I added a "delete" option to the mirror function. If set to true, then
files present in target dir and not in origin dir will be removed.
Added also unit test for these feature.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T00:58:19Z
Symfony2 code standard use lowercase `true` and `false`
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:25:19Z
I have problem to believe that the last commit (merging two if together) was to blame for the segfault on travis...
when I run the unit testing on my machine, I get:
I'm using PHP 5.4.7 by the way...
Time: 2 seconds, Memory: 3.25Mb
OK, but incomplete or skipped tests!
Tests: 80, Assertions: 106, Skipped: 14.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T20:38:40Z
Can you fix end-of-lines ?
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:52:37Z
I put UNIX line feed and UTF8 charset
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:53:59Z
Sorry, I add to clone the symfony repo with github and did small editing using pspad, I forgot to setup charset and line feed...
This PR was merged into the 2.0 branch.
Commits
-------
e6bb156 remove realpath call
Discussion
----------
[HttpKernel] remove realpath call
I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:
https://bugs.php.net/bug.php?id=52769
After this change, my archive works just like a normal app/console call
* 2.1:
fixed CS
fixed CS
[Security] fixed path info encoding (closes#6040, closes#5695)
[HttpFoundation] added some tests for the previous merge and removed dead code (closes#6037)
Improved Cache-Control header when no-cache is sent
removed unneeded comment
Fix to allow null values in labels array
fix date in changelog
removed the Travis icon (as this is not stable enough -- many false positive, closes#6186)
Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes#6224)
Fixed a typo
Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
[Form] Fix const inside an anonymous function
[Config] Loader::import must return imported data
[DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed
[Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
[HttpFoundation] fixed a small regression
Conflicts:
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
* 2.0:
fixed CS
removed the Travis icon (as this is not stable enough -- many false positive, closes#6186)
[Config] Loader::import must return imported data
[HttpFoundation] fixed a small regression
Conflicts:
README.md
src/Symfony/Bridge/Twig/Extension/FormExtension.php
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:
https://bugs.php.net/bug.php?id=52769
After this change, my archive works just like a normal app/console call
This PR was squashed before being merged into the master branch (closes#6232).
Commits
-------
7428bf9 [WebProfilerBundle] Some eye candy for deprecated calls
Discussion
----------
[WebProfilerBundle] Some eye candy for deprecated calls
![Ohhh](https://lh4.googleusercontent.com/-T9DKsHWf4YU/UMIRqT0g_II/AAAAAAAAJ84/tRDRP8IMwRM/s840/stack.jpg).
@fabpot is [`|raw`](https://github.com/symfony/symfony/pull/new/deprecated#L0R117) a twig defect ?
---------------------------------------------------------------------------
by Baachi at 2012-12-08T09:12:12Z
Really nice 👍
---------------------------------------------------------------------------
by vicb at 2012-12-11T10:00:24Z
should be ready now
This PR was merged into the master branch.
Commits
-------
5d98fb1 [HttpKernel] ExceptionHandler is actually displaying PHP errors
Discussion
----------
[HttpKernel] ExceptionHandler is actually displaying all PHP errors
So there is no need to set display_errors to true in that case.
Partially fixes#6254.
This PR was merged into the master branch.
Commits
-------
abe244f [TwigBundle] Fixed tests on windows
Discussion
----------
[TwigBundle] Fixed tests on windows
This PR was merged into the master branch.
Commits
-------
f48b22a Added configuration pass that adds Twig Loaders
Discussion
----------
[Twig] [DI Pass] Added configuration pass that adds Twig Loaders
Bug fix: [no]
Feature addition: [yes]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]
Todo: Documentation?
License of the code: MIT
- Defined new Chain loader service with symfony Filesystem loader added
by default.
- Added compiler class which picks up any services tagged "twig.loader"
- If there are any instances of "twig.loader" the "twig.loader" alias is
set to the Twig_Loader_Chain service ID instead of the filesystem
loader.
I think I still like the explicitness of the other pull request, but I defer to your judgment :) This is certainly much easier for the developer.
---------------------------------------------------------------------------
by dantleech at 2012-12-03T08:31:08Z
Will update the PR later today / tomorrow
---------------------------------------------------------------------------
by dantleech at 2012-12-03T18:19:09Z
ok, updated. I throw a `Symfony\Component\DependencyInjection\Exception\LogicException` if there are no loaders -- not sure if that is the best thing to do, or if that is the best exception.
---------------------------------------------------------------------------
by fabpot at 2012-12-05T15:28:24Z
Looks good to me. Can you add a note in the CHANGELOG about this new possibility and update the documentation accordingly? Thanks.
---------------------------------------------------------------------------
by dantleech at 2012-12-05T17:50:37Z
ok. updated change log and changed both count() comparisons to be strict. @fabpot which documentation should I update? or should I add `cookbook/templating/registering_multiple_loaders.rst`?
---------------------------------------------------------------------------
by stof at 2012-12-05T20:07:37Z
@dantleech at least the DIC tags reference need to be updated to mention the new tag. I'm not sure a dedicated article is needed for it (but @weaverryan will decide if it is worth it)
---------------------------------------------------------------------------
by dantleech at 2012-12-06T17:57:20Z
Made a PR for documentation: https://github.com/symfony/symfony-docs/pull/2005
---------------------------------------------------------------------------
by dantleech at 2012-12-07T16:44:00Z
ok. have updated the correct CHANGELOG and squashed to one commit
Since even fatal errors are catched and turned into exceptions by
ErrorHandler, all PHP errors can nicely be displayed by
ExceptionHandler. There is no need to set display_errors to true
anymore then.
Partially fixes#6254 on github.
This PR was squashed before being merged into the master branch (closes#6253).
Commits
-------
e62b5f7 [Finder] cleanup, fixes, improvements
Discussion
----------
[Finder] cleanup, fixes, improvements
This PR was merged into the master branch.
Commits
-------
e458600 [DependencyInjection] Add deleted argument in Extension::processConfiguration
Discussion
----------
[DependencyInjection] Add deleted argument in Extension::processConfigur...
...ation
This PR was merged into the master branch.
Commits
-------
76e5bce no need to set the compiled route to null when cloning
Discussion
----------
[Routing] no need to set the compiled route to null when cloning
The compiled reference can be reused when cloning. When the route is changed, the compiled reference is set to null anyway. So if you just clone the route, this improves performance as it does not need to recompile.
When having a Cache-Control header like:
max-age="0"
isset($match[2]) is true but $match[2] containing: "0", it is evaluated
as false and 'true' will be set to "max-age" entry instead of "0".
This PR was merged into the master branch.
Commits
-------
cc0be8e [Finder] fluid, calling in() not required after append()
Discussion
----------
[Finder] fluid, calling in() not required after append()
- Added compiler class which picks up any services tagged "twig.loader"
- If there is one loader registered we set the alias to this loader
- If there is more than one we set the alias to a chain loader and all
the loaders to it
- If there is no loaders we throw an Exception
This PR was merged into the 2.1 branch.
Commits
-------
6e7e08f [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
Discussion
----------
[Form] Fixed the "format" option in DateType
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6141
Todo: -
License of the code: MIT
Documentation PR: -
This PR fixes a regression introduced in #4839. To quote that PR:
> This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".
In reality, the "format" option now defaults to the HTML5 format always, not just when "widget" is "single_text". This is fixed here.
The second commit in this PR removes special characters between select/text fields. What, with German locale, was
```
<day input>.<month input>.<year input>
```
before is now
```
<day input><month input><year input>
```
This is the way date fields are represented on the majority of websites. If you *need* separators, you can have them by setting the "format" option to a custom value:
```php
$builder->add('myDate', 'date', array(
'format' => 'dd.MM.yyyy',
));
```
---------------------------------------------------------------------------
by fabpot at 2012-12-07T08:52:21Z
The second commit should probably be done on master and it changes the behavior.
---------------------------------------------------------------------------
by bschussek at 2012-12-07T12:23:22Z
Ok, I removed the second commit now and removed the entries from the CHANGELOG.
This PR was merged into the master branch.
Commits
-------
d7a1154 make it possible for bundles extensions to prepend settings into the application configuration of any Bundle
Discussion
----------
[2.2] add possibility for bundles extensions to prepend the app configs
Bug fix: #4652
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
As can be seen in the patch the extensions that should prepend the configuration are enabled automatically if they implement ``PrependExtensionInterface``.
Just as an example, here an extension, which checks if SonataAdminBundle is available and if not disables integration with it in several Bundles. It also sets some default settings for ``document_class`` and ``default_document_manager_name``:
```
diff --git a/DependencyInjection/SymfonyCmfCoreExtension.php b/DependencyInjection/SymfonyCmfCoreExtension.php
index 9f92410..c0a8dbb 100644
--- a/DependencyInjection/SymfonyCmfCoreExtension.php
+++ b/DependencyInjection/SymfonyCmfCoreExtension.php
@@ -3,11 +3,12 @@
namespace Symfony\Cmf\Bundle\CoreBundle\DependencyInjection;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\\DependencyInjection\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\Config\FileLocator;
-class SymfonyCmfCoreExtension extends Extension
+class SymfonyCmfCoreExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
{
@@ -15,4 +16,45 @@ class SymfonyCmfCoreExtension extends Extension
$loader->load('config.xml');
$loader->load('services.xml');
}
+
+ public function prepend(ContainerBuilder $container)
+ {
+ $bundles = $container->getParameter('kernel.bundles');
+ if (!isset($bundles['SonataDoctrinePHPCRAdminBundle'])) {
+ // disable SonataDoctrinePHPCRAdminBundle admin support in Bundles
+ $config = array('use_sonata_admin' => false);
+ foreach ($container->getExtensions() as $name => $extension) {
+ switch ($name) {
+ case 'symfony_cmf_menu':
+ case 'symfony_cmf_routing_extra':
+ case 'symfony_cmf_simple_cms':
+ $container->prependExtensionConfig($name, $config);
+ break;
+ }
+ }
+ }
+
+ // process the configuration of SymfonyCmfCoreExtension
+ $configs = $container->getExtensionConfig($this->getAlias());
+ $config = $this->processConfiguration(new Configuration(), $configs);
+ // add the default configs to various Bundles
+ foreach ($container->getExtensions() as $name => $extension) {
+ switch ($name) {
+ case 'symfony_cmf_content':
+ case 'symfony_cmf_simple_cms':
+ $container->prependExtensionConfig($name, $config);
+ break;
+ }
+ }
+ }
}
```
---------------------------------------------------------------------------
by stof at 2012-09-21T21:10:00Z
I think you are giving too much power to bundles here: a bundle becomes able to modify all the config defined explicitly by the user if it wants to do it.
I think it would be safer to give them the possibility to load an additional config file which would be prepended (so that user-defined config would still win). Giving the ability to load files means passing the loader used by the kernel, and it should then be called before calling the load method on the kernel itself (to respect the order of loaded files)
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T05:50:08Z
Not sure how a config file helps solve anything. I mean they can load as many config files as they want already. The key is being able to automatically apply configuration to multiple Bundles as well as enabling/disabling features based on if certain Bundles are registered.
BTW the end result in my examples is also prepended, so that user config wins. However yes this would be up to the person implementing the Bundle. We could however provide a dedicated method for prepending in addition to or instead of ``setExtensionConfig``.
---------------------------------------------------------------------------
by stof at 2012-09-22T11:40:29Z
@lsmith77 If you can load a file with the main loader, this file can provide some app-level configuration (be it for your own bundle or others).
And your code example is indeed prepending. But imagine what would occur when someone uses this feature without knowing well how the component works: he will likely call ``setExtensionConfig`` in a first implementation, thus dropping all userland config for the bundle. Your setup does not only allow to make a file win over the userland config but makes it even easier to remove the userland config.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T18:11:29Z
but i dont get how that would help. the point is to be able for one bundle to configure other bundles before the load as this is obviously alot cleaner than trying to do the same via a compiler pass. so imho this is what is needed to encourage decoupled bundles. otherwise for example CMS or other reuseable and extensible apps will be forced to always put everything in one bundle.
---------------------------------------------------------------------------
by stof at 2012-09-22T19:23:45Z
@lsmith77 I agree about the feature, not about the way to implement it. If you allow bundles to load a file as it it were some app-level config, they would become able to provide some config for other bundles (and you could load several files depending of which bundles are enabled), but without allowing bundles to remove the userland config.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T19:50:19Z
sorry but i dont understand what you suggest. more over i dont see the problem. its already possible to seriously break stuff with compiler passes which cannot be easily enabled/disabled. this is just convenience. if it doesnt work because of some obscure combo then simply dont use it for the app since it needs to be explicitly enabled in the kernel.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-24T09:25:10Z
@stof thought about your comments, are you suggesting for a Bundle to be able to generate a config file that is prepended? in that case the current behavior would already be that if we change ``setExtensionConfig`` to just be a ``prependExtensionConfig`` .. however i am not sure if we really need this limitation since as i point out this would still by far be less dangerous than compiler passes and also i expect this to be used mainly by open source applications on top of Symfony2 rather than standard bundles.
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T13:28:29Z
@lolautruche i also think this is relevant for you guys. this way you could start preconfiguring 3rd party bundles as part of your main ezPublish bundle.
---------------------------------------------------------------------------
by lolautruche at 2012-10-13T13:57:09Z
While I suspect a nice feature, the implementation looks obscure to me...
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T17:43:02Z
The implementation of the example extension or the implementation of the actual changes proposed in this PR?
---------------------------------------------------------------------------
by lolautruche at 2012-10-13T17:46:57Z
The example, sorry 😃
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T17:50:38Z
The example was fairly quickly hacked together. The basic thing you need to do is fetch the config for the bundle you want to change, manipulate the config (usually by appending an array to the array of configs so that you dont affect explicit configuration) and then set it again.
As I explained to @stof it would alternative/additionally be possible to support a method that pushes a config array to the top of the array of config stack. Such a method might make the necessary code simpler.
---------------------------------------------------------------------------
by stof at 2012-10-13T21:39:07Z
@fabpot what do you think about it ?
---------------------------------------------------------------------------
by jrobeson at 2012-10-20T15:45:18Z
I've been porting much of an existing framework over to use more symfony components and bundles. I think that this might help some of the problems i've been having. I would really appreciate some better examples as how to one would use it (same for the cmf router, but that's another story).
---------------------------------------------------------------------------
by lsmith77 at 2012-10-21T07:28:52Z
not really sure what other examples i could give. the process is quite simple:
1) determine what configuration options to add to other Bundles
for example with the following code I determine that SonataAdmin for PHPCR is not installed (which means i should disable using it in other Bundles):
```
$bundles = $container->getParameter('kernel.bundles');
if (!isset($bundles['SonataDoctrinePHPCRAdminBundle'])) {
```
alternatively I could simply already process the configuration and then pick all or some of these configuration options:
```
$configs = $container->getExtensionConfig($this->getAlias());
$config = $this->processConfiguration(new Configuration(), $configs);
```
2) then add these configuration to what other Bundles I feel should get these options
usually I will add these to the top of the config array stack. this means that if the user would manually set the same setting in most cases the user setting will override what the pre-processor set.
```
$container->unshiftExtensionConfig($name, array('use_sonata_admin' => false));
```
---------------------------------------------------------------------------
by lsmith77 at 2012-10-24T12:52:38Z
added ``ContainerBuilder::unshiftExtensionConfig`` since this is the usual use case. with this method added it could be discussed if ``ContainerBuilder::setExtensionConfig`` is still needed or not.
---------------------------------------------------------------------------
by lsmith77 at 2012-11-24T14:48:44Z
I spoke to @fabpot today and he said that since this patch just allows you to set defaults and not really "process" the actual configuration I shouldn't call it "preProcess" so I renamed it to "prepend".
Furthermore as its just prepending @fabpot said there isnt really a need to require manually enabling it, so here is a patch to auto-enable the prepending logic:
```
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index b890fbf..7374b87 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -701,8 +701,8 @@ abstract class Kernel implements KernelInterface, TerminableInterface
*/
protected function prependExtensionConfigs(ContainerBuilder $container)
{
- foreach ($this->getPrependingExtensions() as $name) {
- $extension = $container->getExtension($name);
+ foreach ($this->bundles as $bundle) {
+ $extension = $bundle->getContainerExtension();
if ($extension instanceof PrependExtensionInterface) {
$extension->prepend($container);
}
@@ -710,16 +710,6 @@ abstract class Kernel implements KernelInterface, TerminableInterface
}
/**
- * Returns the ordered list of extensions that may prepend extension configurations.
- *
- * @return array
- */
- protected function getPrependingExtensions()
- {
- return array();
- }
-
- /**
* Gets a new ContainerBuilder instance used to build the service container.
*
* @return ContainerBuilder
```
---------------------------------------------------------------------------
by lsmith77 at 2012-11-25T19:31:01Z
ok .. i pondered the code some more and now i have enabled registering of the prepending extensions by default, since its now quite easy to just override the ``prependExtensionConfigs()`` method since there is almost no logic in there anymore.
@fabpot i am not 100% sure with the naming yet ..
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T14:03:43Z
@fabpot if you are ok with the PR as it is now, i can do the rebase so you can merge this?
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T18:30:29Z
@fabpot all good now? then i will squash the commits ..
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T18:34:50Z
actually looking at the full change set again i am no longer sure if it makes sense to have ``PrependExtensionInterface`` in the DI rather than the HttpKernel.
---------------------------------------------------------------------------
by lsmith77 at 2012-12-07T09:21:14Z
@fabpot all good now?
---------------------------------------------------------------------------
by fabpot at 2012-12-07T09:37:52Z
The code looks good to me now. There are two remaining task before merging:
* Is it something we need to add somewhere in the documentation?
* Can you add a note in the DI component CHANGELOG?
Thanks.
---------------------------------------------------------------------------
by lsmith77 at 2012-12-07T09:49:17Z
i have added a changelog entry and squashed the commits.
i will also work on a documentation entry, i guess i will make it a cookbook entry. not sure if it should be included in http://symfony.com/doc/2.0/cookbook/bundles/extension.html .. but imho it would better be a separate entry.
* 2.1:
[HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes#5878, closes#6185)
[HttpFoundation] added a check for the host header value
[DoctrineBridge] Improved performance of the EntityType when used with the "query_builder" option
[DoctrineBridge] Improved exception message
[DoctrineBridge] Fixed: Exception is thrown if the entity class is not known to Doctrine
Removed useless branch alias for dev-master in composer.json
Conflicts:
composer.json
src/Symfony/Bridge/Doctrine/composer.json
src/Symfony/Bridge/Monolog/composer.json
src/Symfony/Bridge/Propel1/composer.json
src/Symfony/Bridge/Swiftmailer/composer.json
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Bundle/TwigBundle/composer.json
src/Symfony/Bundle/WebProfilerBundle/composer.json
src/Symfony/Component/BrowserKit/composer.json
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/Config/composer.json
src/Symfony/Component/Console/composer.json
src/Symfony/Component/CssSelector/composer.json
src/Symfony/Component/DependencyInjection/composer.json
src/Symfony/Component/DomCrawler/composer.json
src/Symfony/Component/EventDispatcher/composer.json
src/Symfony/Component/Filesystem/composer.json
src/Symfony/Component/Finder/composer.json
src/Symfony/Component/Form/composer.json
src/Symfony/Component/HttpFoundation/composer.json
src/Symfony/Component/HttpKernel/composer.json
src/Symfony/Component/Locale/composer.json
src/Symfony/Component/OptionsResolver/composer.json
src/Symfony/Component/Process/composer.json
src/Symfony/Component/Routing/composer.json
src/Symfony/Component/Security/composer.json
src/Symfony/Component/Serializer/composer.json
src/Symfony/Component/Templating/composer.json
src/Symfony/Component/Translation/composer.json
src/Symfony/Component/Validator/composer.json
src/Symfony/Component/Yaml/composer.json
* 2.0:
[HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes#5878, closes#6185)
[HttpFoundation] added a check for the host header value
Conflicts:
src/Symfony/Component/HttpFoundation/File/File.php
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
This PR was merged into the 2.0 branch.
Commits
-------
0489799 [HttpFoundation] added a check for the host header value
Discussion
----------
[HttpFoundation] added a check for the host header value
alternative for #3865
This PR was squashed before being merged into the master branch (closes#6005).
Commits
-------
577ee80 [HttpFoundation] Move IP check methods to a HttpUtils class for reuse
Discussion
----------
[HttpFoundation] Move IP check methods to a HttpUtils class for reuse
---------------------------------------------------------------------------
by vicb at 2012-11-13T18:05:18Z
Thanks @stof ! (didn't get my copy paste error as PHP allow calling non static method w/o a warning).
---------------------------------------------------------------------------
by GromNaN at 2012-11-17T23:19:29Z
Having an `Utils` class with mixed functions doesn't seem to be a good practice. I think the class should be called something like `Symfony\Component\HttpFoundation\IpAddress`.
---------------------------------------------------------------------------
by vicb at 2012-11-27T09:37:20Z
@fabpot could this be merged if `HttpUtils` is renamed to `IpUtils` ?
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:35:28Z
Renaming the class to `IpUtils` is indeed a good idea.
---------------------------------------------------------------------------
by vicb at 2012-12-06T14:07:59Z
ready !
---------------------------------------------------------------------------
by fabpot at 2012-12-06T14:39:19Z
Can you add an entry in the CHANGELOG?
---------------------------------------------------------------------------
by vicb at 2012-12-06T14:53:09Z
done, thanks for the reminder !
This PR was merged into the 2.1 branch.
Commits
-------
b604eb7 [DoctrineBridge] Improved performance of the EntityType when used with the "query_builder" option
db2ee54 [DoctrineBridge] Improved exception message
99321cb [DoctrineBridge] Fixed: Exception is thrown if the entity class is not known to Doctrine
Discussion
----------
[DoctrineBridge] fixed caching when EntityType is used with the "query_builder" option
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR was squashed before being merged into the master branch (closes#6207).
Commits
-------
57e9d28 [DI] Add a base class for extension
Discussion
----------
[DI] Add a base class for extension
depends on #6148
@fabpot should we change `addClassesToCompile` & the likes (thinking of traits).
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:05:05Z
Can you rebase?
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:06:43Z
hmmm, now that I see the result, I'm not sure it is worth it as the Extension class in the DI component depends on the Config one.
---------------------------------------------------------------------------
by vicb at 2012-12-06T13:23:29Z
No pb, I can remove it, should I remove the `ContainerBuilder` altogether ?
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:37:18Z
I would keep everything that is strictly in the DI namespace in the DI extension class and everything else in the HttpKernel class as it is now.
---------------------------------------------------------------------------
by vicb at 2012-12-06T13:38:59Z
But this change is **great** if you need the DI without the full stack.
What about my other comment ?
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:55:30Z
Which other comment? This one? "should I remove the ContainerBuilder altogether?" In which case, I don't understand what it means.
What about adding 2 classes in the DI component: the base one and another one with the dependency on the config component? Is it overkill?
---------------------------------------------------------------------------
by vicb at 2012-12-06T14:06:43Z
> "should I remove the ContainerBuilder altogether?"
I mean that the **widely used** (ie loaders) `ContainerBuilder` also depends on Config - that was kind of a joke !
I was refering to my first comment here
> should we change addClassesToCompile & the likes (thinking of traits).
Overkill I don't know but useless for sure: the `ExtensionInterface` depends on `ContainerBuilder` which depends on `Config`.
This PR was squashed before being merged into the master branch (closes#5853).
Commits
-------
63b0059 [Process] Add ability to reset arguments on ProcessBuilder
Discussion
----------
[Process] Add ability to reset arguments on ProcessBuilder
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
This PR adds the ability to "reset" the arguments set on a `ProcessBuilder`. This allows the builder to be re-used without having to set things like custom environment variables, current working directory etc again.
This PR was squashed before being merged into the master branch (closes#5860).
Commits
-------
d0057d0 Added failure_path_parameter to mirror target_path_parameter
Discussion
----------
Added failure_path_parameter to mirror target_path_parameter
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Enable login failure redirect path can be assigned in a form field just like target path.
---------------------------------------------------------------------------
by stof at 2012-10-29T09:40:17Z
Please also open a PR to the doc repo to document this new feature
---------------------------------------------------------------------------
by leevigraham at 2012-10-29T09:56:29Z
@stof @fabpot Done.
This PR was merged into the master branch.
Commits
-------
7f16c1f [HttpKernel] Add DI extension configs as ressources when possible
Discussion
----------
[HttpKernel] Add DI extension configs as ressources when possible
/cc @rdohms @richardmiller
---------------------------------------------------------------------------
by vicb at 2012-11-30T11:57:48Z
btw @fabpot what about having a base class for `Extension` in the DI ? Would make it easier to re-use it when using standalone components, Di and (the suggested) Config as the greatest part of the class is not HttpKernel specific.
---------------------------------------------------------------------------
by fabpot at 2012-12-06T08:47:28Z
@vicb your suggestion makes sense.
Can you also explain the goal of this PR?
---------------------------------------------------------------------------
by vicb at 2012-12-06T09:01:58Z
The goal of this PR is to avoid having to sfcc when you modify a DI extension configuration. I think @rdohms got trapped.
---------------------------------------------------------------------------
by vicb at 2012-12-06T09:08:08Z
see https://twitter.com/rdohms/status/274059267428978688
---------------------------------------------------------------------------
by stof at 2012-12-06T09:20:54Z
I thought about it several times but never took time to implement it. It is annoying to have to clear the cache when you modify a default value in the Configuration class. So +1
This PR was squashed before being merged into the master branch (closes#6083).
Commits
-------
6236c18 [FrameworkBundle] Added caching to TemplateController
Discussion
----------
[FrameworkBundle] Added caching to TemplateController
Because the main purpose for the `TemplateController` seems to be to render static pages like "disclaimer" and such, it seems useful to allow caching.
imprint:
pattern: /imprint
defaults:
_controller: SymfonyFrameworkBundle:Template:template
template: "::pages/imprint.html.twig"
maxAge: 86400
---------------------------------------------------------------------------
by pierredup at 2012-11-21T20:24:53Z
IMHO I think the caching should be allowed to be set optionally
---------------------------------------------------------------------------
by KingCrunch at 2012-11-21T20:38:54Z
I wrote it this way, because I assume, that it will cover more use-cases, than the other way round, but you are right, that this will change the current behaviour. Would like to hear other opinions, because I don't think one uses this action for anything else than fully-static content (means: The current behaviour doesn't feel very useful to me).
---------------------------------------------------------------------------
by pierredup at 2012-11-21T20:48:19Z
I totally agree, but I would then suggest keep the caching on by default, but have the option to turn it off if necessary
---------------------------------------------------------------------------
by pierredup at 2012-11-21T20:52:01Z
Actually I think to have caching permanently enabled for static content would probably be the best scenario, but I like to think in terms of flexibility and specific user requirements. It would be great to get some opinions from others on this
---------------------------------------------------------------------------
by KingCrunch at 2012-11-23T21:12:45Z
I thought about it and I come to the conclusion, that it is probably a not so good idea to enable caching by default, because ... well, it's not possible to disable it again. I guess something like this
{{ render '@AcmeBundle:ArticleController:latest' with {count: 1} }}
may be not so uncommon as I suggested in the first commit.
---------------------------------------------------------------------------
by fabpot at 2012-12-03T22:18:51Z
Can you make a PR for the docs? (symfony/symfony-docs). Thanks.
This PR was squashed before being merged into the master branch (closes#6173).
Commits
-------
4878ec0 [HttpKernel] [WebProfilerBundle] Better handling of deprecated methods
Discussion
----------
[HttpKernel] [WebProfilerBundle] Better handling of deprecated methods
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes, if you were expecting E_USER_DEPRECATED or E_DEPRECATED to throw an exception
Symfony2 tests pass: yes
Fixes the following tickets: #6139 partly, I'd go through and add the actual trigger_error() calls in another (or possibly one per component) PR
Todo: call trigger_error()
License of the code: MIT
Documentation PR: -
I added the deprecation count with the Exception icon in the Profiler Toolbar, and changed the color of it to be yellow for deprecations and red for exceptions (was yellow for exceptions).
---------------------------------------------------------------------------
by fabpot at 2012-12-03T09:43:09Z
Adding trigger_error calls should be done in one PR to ease the merging. thanks.
This PR was merged into the master branch.
Commits
-------
a3a832c Fix CS in the whole Propel1 bridge
86ab4b3 Add typehint to isInteger(), fix tests
a26a690 remove useless ColumnMap
ffd8759 fix some formatting issue
6fb9536 fix indentation problem
e5e3341 oups. It seems that here, we need \PDO
36d6c40 fix indentation problem
6f8cd9d Removed the PropelColumnTypes.php copy
8125163 removed the TODO mention. Will keep the Propel code here so it can work with older version of Propel
0e4419b I found the error in my latest commit. This pass the test suite.
cf8a6c0 Fix my code and also fix the test suite.
737b596 Merge remote-tracking branch 'upstream/master'
972e503 Fix problem when 1 column identifier in propel is a string.
Discussion
----------
Fix ModelChoiceList problem with string key
Replaces #6150
---------------------------------------------------------------------------
by willdurand at 2012-12-05T20:51:44Z
Note that 5f54ed1 is a "CS fix" commit. I don't want to open a PR just for that. Let me know if I should to remove it.
Also, I'm 👍 on this PR. Review has been made already, so it seems mergeable.
This PR was merged into the master branch.
Commits
-------
51223c0 added upgrade instructions
50e6259 adjusted tests
98f3ca8 [Routing] removed tree structure from RouteCollection
Discussion
----------
[Routing] removed tree structure from RouteCollection
BC break: yes (see below)
Deprecations: RouteCollection::getParent(); RouteCollection::getRoot()
tests pass: yes
The reason for this is so quite simple. The RouteCollection has been designed as a tree structure, but it cannot at all be used as one. There is no getter for a sub-collection at all. So you cannot access a sub-collection after you added it to the tree with `addCollection(new RouteCollection())`. In contrast to the form component, e.g. `$form->get('child')->get('grandchild')`.
So you can see the RouteCollection cannot be used as a tree and it should not, as the same can be achieved with a flat array!
Using a flat array removes all the need for recursive traversal and makes the code much faster, much lighter, less memory (big problem in CMS with many routes) and less error-prone.
BC break: there is only a BC break if somebody used the PHP API for defining RouteCollection and also added a Route to a collection after it has been added to another collection.
So
```
$rootCollection = new RouteCollection();
$subCollection = new RouteCollection();
$rootCollection->addCollection($subCollection);
$subCollection->add('foo', new Route('/foo'));
```
must be updated to the following (otherwise the 'foo' Route is not imported to the rootCollection)
```
$rootCollection = new RouteCollection();
$subCollection = new RouteCollection();
$subCollection->add('foo', new Route('/foo'));
$rootCollection->addCollection($subCollection);
```
Also one must call addCollection from the bottom to the top. So the correct sequence is the following (and not the reverse)
```
$childCollection->->addCollection($grandchildCollection);
$rootCollection->addCollection($childCollection);
```
Remeber, this is only needed when using PHP for defining routes and calling methods in a special order. There is no change required when using XML or YAML for definitions. Also, I'm pretty sure that neither the CMF, nor Drupal routing, nor Silex is relying on the tree stuff. So they should also still work.
cc @fabpot @crell @dbu
One more thing: RouteCollection wasn't an appropriate name for a tree anyway as a collection of routes (that it now is) is definitely not a tree.
Yet another point: The XML declaration of routes uses the `<import>` element, which is excatly what the new implementation of addCollection without the need of a tree does. So this is now also more analogous.
---------------------------------------------------------------------------
by Koc at 2012-11-26T17:34:15Z
What benefit of this?
---------------------------------------------------------------------------
by Tobion at 2012-11-26T17:56:53Z
@Koc Why did you not simply wait for the description? ^^
---------------------------------------------------------------------------
by dbu at 2012-11-26T18:33:09Z
i love PR that remove more code than they add whithout removing functionality.
---------------------------------------------------------------------------
by Crell at 2012-11-26T18:49:52Z
There's an issue somewhere in Drupal where we're trying to use addCollection() as a shorthand for iterating over one collection and calling add() on the other for each item. We can't do that, however, because the subcollections are not flattened properly when reading back and our current dumper can't cope with that. So this change would not harm Drupal at all, and would mean I don't have fix a bug in our dumper. :-) I cannot speak for any other projects, of course.
---------------------------------------------------------------------------
by Tobion at 2012-11-27T19:06:34Z
Ok, this is ready.
This PR was merged into the master branch.
Commits
-------
acfc750#2042 initial implementation of fatal error handler
Discussion
----------
Display traces for fatal errors
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: looks like yes
Fixes the following tickets: #2042 (partly)
License of the code: MIT
Output looks like on screen http://easycaptures.com/fs/uploaded/737/1191436899.png . I've added one line to css to prevent displaying standard xdebug trace http://easycaptures.com/fs/uploaded/737/5939488074.png
---------------------------------------------------------------------------
by Koc at 2012-11-08T21:55:41Z
So, community please advice me, how can I trigger `KernelEvents::EXCEPTION` event in `ErrorHandler` or `ExceptionHandler`? Or should I provide other event for this?
---------------------------------------------------------------------------
by stof at 2012-11-08T22:03:23Z
@Koc Don't. the exception handler is there to be the safe guard when developing, and does not depend on the kernel (which would be required to trigger the event). If you were triggering the listener again, it would mean that any exception thrown in a listener would lead to a loop.
And if it is for the fatal error handling, you simply cannot be sure the kernel is still available (and even less in a wokring state) at this point.
---------------------------------------------------------------------------
by Koc at 2012-11-08T22:06:31Z
But how can I notify logger (which will send me mail or just log this situation)?
---------------------------------------------------------------------------
by fabpot at 2012-11-09T07:33:41Z
The error handler is only registered when in debug mode in the Kernel and can be triggered very early in the handling of a request (even before we have access to the dispatcher or anything else). So, the current PR looks fine to me (apart from the typo and the lack of unit tests).
---------------------------------------------------------------------------
by Koc at 2012-11-09T09:13:03Z
> The error handler is only registered when in debug mode
Ooh! I haven't see that before. But the goal - be notified about errors by email or log-file. Like now exceptions with traces from site emails to me.
---------------------------------------------------------------------------
by fabpot at 2012-11-09T09:20:54Z
I think there are two goals. The first one being to have nice pages in the development environment when a fatal error occurs. And this PR addresses that feature quite nicely. The second can be addressed in another PR.
---------------------------------------------------------------------------
by henrikbjorn at 2012-11-14T11:50:22Z
I have some questions about the ErrorHandler. Is there a reason for it only to be registered in an debug environment (which prod is not). Would assume that if i enable the ErrorHandler in productions aswell Monolog would log thoose instead of them just vanishing?
---------------------------------------------------------------------------
by Koc at 2012-11-14T12:01:50Z
I am thinking about it too. But as Fabien says it will another PR
---------------------------------------------------------------------------
by GromNaN at 2012-11-18T10:38:09Z
You should add a memory reserve to be able to handle "Out of memory" errors.
An example is here :
513d628966/lib/Raven/ErrorHandler.php (L91)513d628966/lib/Raven/ErrorHandler.php (L62)
---------------------------------------------------------------------------
by fabpot at 2012-11-28T11:35:21Z
@Koc can you finish this PR (probably by integrating the memory reserve as explained by @GromNaN)?
---------------------------------------------------------------------------
by Koc at 2012-11-28T11:46:12Z
of course, on this weekend
---------------------------------------------------------------------------
by Koc at 2012-12-02T17:44:44Z
@fabpot done
This PR was squashed before being merged into the master branch (closes#6100).
Commits
-------
0e3671b [WiP] Split urlmatcher for easier overriding
Discussion
----------
[WiP] Split urlmatcher for easier overriding
Based on discussion in https://github.com/symfony-cmf/Routing/pull/30, this PR splits the matchCollection() method of UrlMatcher into two methods. The reason is to allow Symfony CMF and Drupal to override just one of them, while leaving the actual meat of the class intact.
Additionally, it switches $routes from private to protected for the same reason: It makes it possible for us to extend the class cleanly.
Marking as WIP in case further discussion in CMF suggests other/different changes, but review and a conceptual go/no-go would be appreciated now.
---------------------------------------------------------------------------
by dbu at 2012-11-25T12:57:46Z
i think this variant really just extracts part of the logic into a separate method whithout changing any behaviour or concept. it would help a lot for the cmf to have it this way so we can extend and tweak the logic. is this now good or anybody has more input?
---------------------------------------------------------------------------
by dbu at 2012-11-27T19:42:04Z
sorry for being pushy about this one, but we need to know if this change is ok or not, if we need to improve something. if there is some problem we did not think of, we have to find different solutions for the cmf/drupal matchers.
---------------------------------------------------------------------------
by fabpot at 2012-11-28T14:29:10Z
`PhpMatcherDumper` should probably also be updated to call the new `getAttributes()` method; but that won't be possible as the Route is not accessible when using this dumper. Adding a feature that can only be used by the standard `UrlMatcher` and not by the other matchers does not sound good to me.
---------------------------------------------------------------------------
by dbu at 2012-11-28T17:18:09Z
in the context of the cmf, our problem is that we have too many routes to hold in memory. i think the dumper is not of interest for that use case - @Crell correct me please if i am wrong. if we need any caching we would need to write our own dumper probably. but currently we just extend the UrlMatcher
---------------------------------------------------------------------------
by Crell at 2012-11-30T05:47:39Z
Correct. In both the CMF case and Drupal case we have our own dumpers, because the current ones don't work for us anyway. (1000 routes and all that. :-) ) This isn't a new public method. It's just a small refactor of UrlMatcher itself to make it easier to extend. If you're using a dumped PhpMatcher, I don't know why you'd be using something like NestedMatcher in the first place.
This PR was merged into the master branch.
Commits
-------
918bad6 fix phpdoc in ExecutionContextInterface
Discussion
----------
fix phpdoc in ExecutionContextInterface
This PR was merged into the master branch.
Commits
-------
3d0c70e made ExecutionContext more consistent
Discussion
----------
[Validator] made ExecutionContext more consistent
BC break: no
The default should be an empty string instead of null because
1. a string is expected according to phpdoc
2. its more consistent with `validate($value, $groups = null, $subPath = '', $traverse = false, $deep = false)` and `validateValue($value, $constraints, $groups = null, $subPath = '')` that both have `''` as default for subPath
---------------------------------------------------------------------------
by bschussek at 2012-12-03T21:14:49Z
👍
Without the custom handler, assertions after the first failure wouldn't be executed. This catches E_USER_DEPRECATED errors and passes everything else on to the phpunit error handler.
* 2.1:
[TwigBundle] Moved the registration of the app global to the environment
needs to use simpleContent in xsd to allow empty elements
bumped Symfony version to 2.1.5-DEV
bumped Symfony version to 2.0.19-DEV
removed wrong routing xsd statement `mixed="true"`
removed unused attribute from routing.xsd
[HttpFoundation] added a small comment about the meaning of Request::hasSession() as this is a recurrent question (refs #4541)
updated VERSION for 2.1.4
updated CHANGELOG for 2.1.4
updated VERSION for 2.0.19
update CONTRIBUTORS for 2.0.19
updated CHANGELOG for 2.0.19
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd
* 2.0:
[TwigBundle] Moved the registration of the app global to the environment
needs to use simpleContent in xsd to allow empty elements
bumped Symfony version to 2.0.19-DEV
removed wrong routing xsd statement `mixed="true"`
removed unused attribute from routing.xsd
updated VERSION for 2.0.19
update CONTRIBUTORS for 2.0.19
updated CHANGELOG for 2.0.19
Conflicts:
CONTRIBUTORS.md
src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
src/Symfony/Bundle/TwigBundle/TwigEngine.php
src/Symfony/Component/HttpKernel/Kernel.php
This makes the app global variable available also when accessing the Twig
environment directly instead of using the TwigEngine.
Conflicts:
src/Symfony/Bridge/Twig/CHANGELOG.md
src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
src/Symfony/Bundle/TwigBundle/TwigEngine.php
Swapped arguments $groups and $subPath in ExecutionContext::validate and ExecutionContext::validateValue, so they match their interface signatures again.
This PR was merged into the 2.0 branch.
Commits
-------
57edf56 removed wrong routing xsd statement `mixed="true"`
Discussion
----------
removed wrong routing xsd statement `mixed="true"`
mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
This PR was merged into the 2.0 branch.
Commits
-------
d5623b4 removed unused attribute from routing.xsd
Discussion
----------
removed unused attribute from routing.xsd
This PR was merged into the master branch.
Commits
-------
20dbe47 added annotation
c73cb8a add default for pattern for clarity
ddd8918 make id attribute required
62536e5 refactor to an xsd:group
451dcdc it should be possible to define the defaults, req. and options in any order, just like in YAML
Discussion
----------
improve routing xml scheme
bc break: no
Main points:
- the xml scheme only allowed defaults, requirements and options in this specific order. but the XmlFileLoader does not have the restriction and the YAML definions does not have such an restriction either. this is now fixed. so you can use
```
<requirement key="_locale">en</requirement>
<default key="_controller">Foo</default>
```
Before it had the be first all defaults, then all requirements, then all options.
- make id attribute required
For more changes see commits.
This PR was merged into the master branch.
Commits
-------
373be62 Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices
Discussion
----------
Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6055
Todo: -
License of the code: MIT
By a mistake setting of new cookies did not work for other RememberMe services than PersistentTokenBasedRememberMeServices
---------------------------------------------------------------------------
by TerjeBr at 2012-12-01T17:28:08Z
Ping. Any feedback on this?
mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
* 2.1:
replaced magic strings by proper constants
refactored tests for Request
fixed the logic in Request::isSecure() (if the information comes from a source that we trust, don't check other ones)
added a way to configure the X-Forwarded-XXX header names and a way to disable trusting them
fixed algorithm used to determine the trusted client IP
removed the non-standard Client-IP HTTP header
Conflicts:
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
* 2.0:
replaced magic strings by proper constants
refactored tests for Request
fixed the logic in Request::isSecure() (if the information comes from a source that we trust, don't check other ones)
added a way to configure the X-Forwarded-XXX header names and a way to disable trusting them
fixed algorithm used to determine the trusted client IP
removed the non-standard Client-IP HTTP header
Conflicts:
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
* 2.1: (29 commits)
[DependencyInjection] fixed composer.json
[Validator] Fix typos in validators.ru.xlf
Edited some minor grammar and style errors in russian validation file
Updated Bulgarian translation
[Form] improve error message with a "hasser" hint for PropertyAccessDeniedException
[Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6
[Form] simplified a test from previous merge
Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php
fixed CS
Xliff with other node than source or target are ignored
small fix of #5984 when the container param is not set
Filesystem Component mirror symlinked directory fix
[Process][Tests] fixed chainedCommandsOutput tests
fixed CS
Use better default ports in urlRedirectAction
Add tests for urlRedirectAction
info about session namespace
fix upgrade info about locale
Update src/Symfony/Component/DomCrawler/Tests/FormTest.php
Update src/Symfony/Component/DomCrawler/Form.php
...
* 2.0:
[DependencyInjection] fixed composer.json
[Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6
fixed CS
small fix of #5984 when the container param is not set
fixed CS
Use better default ports in urlRedirectAction
Add tests for urlRedirectAction
Update src/Symfony/Component/DomCrawler/Tests/FormTest.php
Update src/Symfony/Component/DomCrawler/Form.php
[Security] remove escape charters from username provided by Digest DigestAuthenticationListener
[Security] added test extra for digest authentication
fixed CS
[Security] Fixed digest authentication
[Security] Fixed digest authentication
[SecurityBundle] Convert Http method to uppercase in the config
Use Norm Data instead of Data
Conflicts:
src/Symfony/Bridge/Doctrine/Form/EventListener/MergeCollectionListener.php
src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php
src/Symfony/Component/DependencyInjection/composer.json
This PR was merged into the master branch.
Commits
-------
c8e65a2 [FrameworkBundle][Routing] Resolve placeholders in hostnamePattern rules
Discussion
----------
[FrameworkBundle][Routing] Resolve placeholders in hostnamePattern rules
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6135
License of the code: MIT
Currently the placeholders in the `hostname_pattern` rule are not resolved, so that's why this PR is it for.
---------------------------------------------------------------------------
by nomack84 at 2012-11-28T14:18:02Z
@fabpot Could you please merge this? I really need this fix to be solve.
Thanks!
This PR was merged into the master branch.
Commits
-------
0a380cf [HttpFoundation] disabled Request _method feature by default (should now be explicitely enabled via a call to enableHttpMethodOverride())
Discussion
----------
[HttpFoundation] disabled Request _method feature by default
It should now be explicitely enabled via a call to enableHttpMethodOverride())
This PR was merged into the master branch.
Commits
-------
431d593 [TwigBundle] Renames twig.loader to twig.loader.filesystem.
Discussion
----------
[TwigBundle] Renames twig.loader to twig.loader.filesystem.
In the previous form of twig's service definitions, it was impossible to
use a chain loader correctly because the TwigBundle was registering paths
on the twig.loader service. This patch fixes that by creating a
twig.loader.filesystem definition and an alias twig.loader that points
to twig.loader.filesystem by default.
---------------------------------------------------------------------------
by marcw at 2012-11-27T21:05:53Z
Failed build seems unrelated to this PR.
In the previous form of twig's service definitions, it was impossible to
use a chain loader correctly because the TwigBundle was registering paths
on the twig.loader service. This patch fixes that by creating a
twig.loader.filesystem definition and an alias twig.loader that points
to twig.loader.filesystem by default.
This PR was merged into the 2.1 branch.
Commits
-------
06ee53b [Form] improve error message with a "hasser" hint for PropertyAccessDeniedException
Discussion
----------
[Form] improve error msg w/ a "hasser" hint for PropertyAccessDeniedException
"Hasser" support was added under the 2.1 branch of the Form component
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no, but fails exactly the same as without this fix
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#1958
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no, but fails exactly the same as without this fix
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#1958
This PR was merged into the master branch.
Commits
-------
1858b96 [Form] Adapted FormValidator to latest changes in the Validator
1f752e8 [DoctrineBridge] Adapted UniqueValidator to latest changes in the Validator
efe42cb [Validator] Refactored the GraphWalker into an implementation of the Visitor design pattern.
Discussion
----------
[Validator] Refactored the Validator for use in Drupal
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: TODO
Drupal wants to use the Symfony Validator component in their next version. I was talking to @fago recently about the changes that we'd need to make and implemented these changes in this PR. I don't want to rush this, but the deadline is tight, since Drupal feature freeze is on December 1st and @fago needs at least a couple of days to integrate the Validator into Drupal.
This PR introduces two significant changes:
* Interfaces were created for all classes that constitute the Validator's API. This is were the PR breaks BC, because `ConstraintValidatorInterface::initialize()` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext`.
* The graph walker was refactored into an implementation of the Visitor pattern. This way, the validator was decoupled from the structure of the metadata (class → properties and getter methods) and makes it possible to implement a different metadata structure, as is required by the Drupal Entity API.
As a consequence of the API change, custom validation code is now much easier to write, because `ValidatorInterface` and `ExecutionContextInterface` share the following set of methods:
```php
interface ValidatorInterface
{
public function validate($value, $groups = null, $traverse = false, $deep = false);
public function validateValue($value, $constraints, $groups = null);
public function getMetadataFor($value);
}
interface ExecutionContextInterface
{
public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false);
public function validateValue($value, $constraints, $subPath = '', $groups = null);
public function getMetadataFor($value);
}
```
No more juggling with property paths, no more fiddling with the graph walker. Just call on the execution context what you'd call on the validator and you're done.
There are two controversial things to discuss and decide (cc @fabpot):
* I moved the `@api` tags of all implementations to the respective interfaces. Is this ok?
* I would like to deprecate `ValidatorInterface::getMetadataFactory()` (tagged as `@api`) in favor of the added `ValidatorInterface::getMetadataFor()`, which offers the exact same functionality, but with a different API and better encapsulation, which makes it easier to maintain for us. We can tag `getMetadataFor()` as `@api`, as I don't expect it to change. Can we do this or should we leave the old method in?
I would like to decide the major issues of this PR until **Sunday November 25th** in order to give @fago enough room for his implementation.
Let me hear your thoughts.
This PR was merged into the master branch.
Commits
-------
d1b5093 Try to make sure cookies get deleted from the TokenProvider when no longer in use
Discussion
----------
Delete cookies from the TokenProvider that is no longer in use
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Todo: -
License of the code: MIT
When the user logs in, or login fails for some reason, the old "remember me" cookie should be deleted from the TokenProvider if you are using the PersistentTokenBasedRememberMeServices.
As the code is now, the token is only deleted on logout.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-20T13:45:54Z
So, anything else that needs to be done before this is merged?
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T10:30:53Z
Ok, I have corrected the typo in the comment and squashed the commit.
---------------------------------------------------------------------------
by schmittjoh at 2012-11-21T10:36:29Z
btw, ``canceled`` (more American) and ``cancelled`` (more British) are both
correct English forms.
On Wed, Nov 21, 2012 at 11:30 AM, Terje Bråten <notifications@github.com>wrote:
> Ok, I have corrected the typo in the comment and squashed the commit.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/6055#issuecomment-10592112>.
>
>
---------------------------------------------------------------------------
by schmittjoh at 2012-11-21T10:40:24Z
As a side-note have you verified that this does not break the cookie theft protection?
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T10:51:10Z
Yes, cookie theft protection is still there and is functioning well.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T11:14:04Z
I am using this together with the DoctrineTokenProvider in issue #6057 in my own project and done some extensive testing on it.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-23T10:30:34Z
Is this ready to be merged now?
This PR was squashed before being merged into the master branch (closes#6080).
Commits
-------
e477a2e Handle case of static controller method and controllers using magic __call() method
Discussion
----------
Handle case of static controller method and controllers using magic __call() method
Improve collecting controller details for edge cases where:
- controller is array, but contains class name and static method
- method doesn't exist, but is handled by magic __call() method
---------------------------------------------------------------------------
by fabpot at 2012-11-21T08:12:08Z
Can you add some unit tests?
---------------------------------------------------------------------------
by sli-systems at 2012-11-21T22:19:17Z
@pierredup
I disagree with the your comment about is_callable() only working with objects. The PHP docs state that the first argument is a callable, so it can be a string, array, closure, and perhaps more.
The test I added also shows that the code works as is :)
I've thought about your suggestion of adding reflection to look up the location of __call(). However, I think this doesn't really add a lot and only complicates matters. Also, as you can see in the new test, there is also __callStatic() to consider.
The fact that file/line are n/a is correct, because the most typical case will be that __call() and __callStatic() will delegate to some other method that might not even be in the same class/file (a subclass I would expect), IMHO.
@fabpot
Good catch about the '/'. I hope the test is complete enough. Looks more like an exercise on PHP callables than anything else, tho ;)
---------------------------------------------------------------------------
by pierredup at 2012-11-22T04:56:18Z
True that ````is_callable```` takes any callable argument, except in the one specific case where you have a ````__call()```` method, and pass an array with the first paramater as a string.
Take the following example:
class Controller {
public function __call($method, $arguments) {}
}
$controller = array('Controller', 'action');
var_dump(is_callable($controller));
Here ````is_callable($controller)```` will actually return ````false````, where if you have ````$controller = array(new Controller, 'action');```` it would return true.
Of course if you have a ````__callStatic```` method, then it would always return true.
Your tests doesn't seem to cover this use case
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:27:05Z
Hmm, maybe. I have to admin that I do not know about this case. OTOH, if is_callable returns false is it really callable then? I would think this more of a PHP bug then?
I think I might have come across this case during coding, but then dismissed it because in that case FilterControllerEvent failed already before the data collector code is reached.
In FilterControllerEvent there is a check on is_callable and a LogicException is thrown if $controller is not callable.
So, is FilterControllerEvent wrong too then?
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:41:14Z
One would think that if is_callable returns false, then the controller isn't callable, but in the case I mentioned above, the controller is in fact callable. I also thought it was a bug with php, but the php-internals don't seem to think so.
The problem is, if you specify the class as a string, php looks for a static method, even if you have a __call method, it won't be registered.
I will have a look at the FilterControllerEvent to see if this use case applies there as well.
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:50:32Z
Rather strange - if that is the case then using is_callable seems pretty pointless and the only way would be to try to execute the controller to find out if it is, in fact, callable...
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:51:07Z
Okay so it actually seems that the case above isn't callable after all. If the controller is specified as a string, then a static method need to exist. Hence why it works with __callStatic. Only when an instance of the class is specified, will it handle the __call method.
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:57:55Z
So the tests are sufficient then?
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:59:22Z
Yes it is.
This happens when you just assume something without actually testing it :)
Sorry for the hassle
With this refactoring comes a decoupling of the validator from the structure of
the underlying metadata. This way it is possible for Drupal to use the validator
for validating their Entity API by using their own metadata layer, which is not
modeled as classes and properties/getter methods.
This PR was merged into the 2.1 branch.
Commits
-------
82334d2 Force loader to be null or a EntityLoaderInterface
Discussion
----------
Force loader to be null or a EntityLoaderInterface
This PR was merged into the 2.0 branch.
Commits
-------
2d9a6fc Use Norm Data instead of Data
Discussion
----------
[Form] Use Norm Data instead of App Data
This listener is triggered when normalized data are binded.
We have to use $event->getForm()->getNormData() instead of $event->getForm()->getData().
I have made a new FormType having 'entity' as parent and having a NormTransformer. I encountered a problem in MergeCollectionListener when the request is binded.
My commit fix it.
This PR was merged into the 2.1 branch.
Commits
-------
84635bd [Form] allowed no type guesser to be registered
Discussion
----------
[Form] made the factory builder pass null when no type guesser registered
reopened#5422 against 2.1 as it's a bug fix
---------------------------------------------------------------------------
by stof at 2012-10-13T21:23:34Z
@fabpot anything left for this PR ?
---------------------------------------------------------------------------
by fabpot at 2012-10-14T09:41:29Z
@bamarni Can you add some unit tests and also update the FormExtensionInterface interface phpdoc as `getTypeGuesser` can now return `null`? Thanks. ping @bschussek
---------------------------------------------------------------------------
by bamarni at 2012-10-14T17:10:27Z
I've added a few tests covering this.
@fabpot : the phpdoc is already correct, it currently can return null, this only occurs with this convenient class.
---------------------------------------------------------------------------
by bschussek at 2012-10-16T07:43:41Z
This PR breaks FormFactory::createBuilderForProperty(), which expects a guesser to be present. Can you check the component for other uses of the guesser and add a null-check there?
---------------------------------------------------------------------------
by bamarni at 2012-10-16T10:57:54Z
I cannot find other places than the factory (searching for 'getTypeGuesser').
---------------------------------------------------------------------------
by bschussek at 2012-11-08T16:58:37Z
You should also adapt `FormRegistry::getTypeGuesser()` not to build a `FormTypeGuesserChain` if the array of guessers is empty. In that case it will return now `null` (adapt the doc block). We also need a different was of checking if the type guessers have already been parsed in FormRegistry. Otherwise the first if condition in `FormRegistry::getTypeGuesser()` will never become false. You could for example initialize the property `$guesser` to `false` and only set it to `null` after the first run of `getTypeGuesser()`.
---------------------------------------------------------------------------
by bamarni at 2012-11-08T18:40:00Z
good catch I had missed it! I've applied your suggestion in the latest commit. Do you see anything else before I squash?
---------------------------------------------------------------------------
by bschussek at 2012-11-08T18:45:15Z
A test for `FormRegistry::getTypeGuesser()` would of course be awesome.
---------------------------------------------------------------------------
by bamarni at 2012-11-08T18:52:13Z
Then it was already awesome! (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Tests/FormRegistryTest.php#L252)
I've also added one for the null case if it's what you meant.
This PR was merged into the master branch.
Commits
-------
e2a50ef [OptionsResolver] fix normalizer without corresponding option
5a53821 [OptionsResolver] fix removing normalizers
Discussion
----------
OptionsResolver: normalizer fix
setNormalizer() -> replace() -> all() would generate an error.
---------------------------------------------------------------------------
by bschussek at 2012-07-29T16:09:20Z
Thank you for the fix! Could you please add a test case?
---------------------------------------------------------------------------
by Tobion at 2012-07-30T15:42:26Z
There is another problem: setNormalizer() (without setting an option) -> all()
I suggest to simply ignore normalizers that have no corresponding option. Do you agree?
---------------------------------------------------------------------------
by Tobion at 2012-07-30T16:19:24Z
On the other hand, one could argue that a normalizer without option should also work like this:
```
$this->options->setNormalizer('foo', function (Options $options) {
return '';
});
$this->assertEquals(array('foo' => ''), $this->options->all());
```
But when having a normalizer that wants a previous value as param, it does not work (because there is none).
---------------------------------------------------------------------------
by stof at 2012-07-30T16:30:34Z
@Tobion according to github, this need to be rebased
---------------------------------------------------------------------------
by bschussek at 2012-07-30T19:16:48Z
I guess setNormalizer() should check whether the option is set and fail otherwise. The second possibility, as you say, is to ignore them in all(). I'd prefer whatever is more efficient.
---------------------------------------------------------------------------
by bschussek at 2012-07-30T19:17:27Z
But setting a normalizer without setting an option, and having that option appear in the final options, does not make sense if you ask me.
---------------------------------------------------------------------------
by Tobion at 2012-07-30T21:23:46Z
Well it could make sense. If you want to override/normalize an option to a given value however it has been overloaded by others or just not overloaded at all. This is what normalizers do. I think its more consistent than the other solutions.
Raising exception in setNormalizer would make the Class dependent on the order you call the methods, e.g. `setNormalizer(); set()` would not work. But the other way round would be ok.
Ignoring some normalizers in `all` would be strange because they are there but not applied under some circumstances.
---------------------------------------------------------------------------
by Tobion at 2012-07-30T21:42:40Z
Added the fix. If you disagree tell me.
---------------------------------------------------------------------------
by bschussek at 2012-08-04T09:30:18Z
> Raising exception in setNormalizer would make the Class dependent on the order you call the methods, e.g. `setNormalizer(); set()` would not work. But the other way round would be ok.
I think this would be a better solution. I dislike if the normalizer magically adds an option that does not exist. This could hide implementation error, e.g. when a refactoring removes an option, but the normalizer is forgotten. Can you throw an exception in this case?
Should we find use cases that rely on this to work, we can soften the behavior and remove the exception.
---------------------------------------------------------------------------
by Tobion at 2012-08-04T15:02:51Z
Well, that would also make it impossible to set a normalizer for on optional option in OptionsResolver.
So `setOptional` + `setNormalizers` would throw an exception which sounds counter-intuitive. Are you sure about that?
---------------------------------------------------------------------------
by Tobion at 2012-08-17T11:47:58Z
ping @bschussek
---------------------------------------------------------------------------
by Tobion at 2012-10-07T22:31:44Z
@bschussek ping
---------------------------------------------------------------------------
by stof at 2012-10-13T18:04:30Z
@bschussek ping
---------------------------------------------------------------------------
by Tobion at 2012-11-08T09:55:15Z
@bschussek please let's get this finished.
this can happen when the config for the router is unset, but this method
does not need to depend on routing. reading an unset config would raise an exception.
This PR was merged into the 2.0 branch.
Commits
-------
64b54dc Use better default ports in urlRedirectAction
64216f2 Add tests for urlRedirectAction
Discussion
----------
Default to current port in urlRedirectAction
I was a bit surprised when I used urlRedirectAction from a non-standard port (8000) it redirected me to port 80. I would argue that the default should be to use the current port instead. This is a simple patch to change that. This should only break in the case someone is relying on the current default to redirect from a non-standard port to the standard port, which should be a really rare case...
---------------------------------------------------------------------------
by Tobion at 2012-11-11T20:29:54Z
The idea is right but the implementation not. Seems this patch is not as "simple" as you said.
When you're on HTTPS and want to redirect to $scheme = HTTP, then it still uses the current HTTPS port which is wrong.
---------------------------------------------------------------------------
by flojon at 2012-11-11T20:36:47Z
Ah, I see the problem. So I guess the correct behavior would be to use the current port if staying with the same scheme or go to standard port if switching scheme. Unless the user has specified a port which will always override...
---------------------------------------------------------------------------
by Tobion at 2012-11-11T20:42:18Z
That would be the best solution that is currently possible but not the best solution that should be possible.
Because if you switch scheme but the other scheme does not use the standard port, it still doesn't work.
Ideally the Request class had an option that allows to define the ports symfony should use for HTTP and HTTPS.
This logic is in RequestContext, but it's not used here.
---------------------------------------------------------------------------
by flojon at 2012-11-11T21:32:55Z
Bummer, I forgot to check if the current port is a standard port...
---------------------------------------------------------------------------
by Tobion at 2012-11-11T21:35:13Z
add some tests
---------------------------------------------------------------------------
by flojon at 2012-11-11T23:28:18Z
Added tests and fixed my previous error
---------------------------------------------------------------------------
by flojon at 2012-11-15T18:25:12Z
@Tobion is there anything else I needed for this?
---------------------------------------------------------------------------
by fabpot at 2012-11-19T12:56:04Z
To be consistent with how we manage HTTP ports elsewhere, I'd rather use the values of the `request_listener.http_port` and `request_listener.https_port`:
```php
if (null === $httpPort) {
$httpPort = $this->container->getParameter('request_listener.http_port');
}
if (null === $httpsPort) {
$httpsPort = $this->container->getParameter('request_listener.https_port');
}
```
This is done in the `security.authentication.retry_entry_point` service and for the `router_listener` listener.
The parameter name is probably not the best one, but that could be changed then in master.
---------------------------------------------------------------------------
by flojon at 2012-11-19T13:49:18Z
@fabpot But then you would need to set that parameter manually right? It wouldn't automatically redirect you to the same port, which was what I wanted to achieve...
Could this be the right order of preference:
If a value was specified in the route use that.
Otherwise use the current port
unless switching scheme then use the parameter value
---------------------------------------------------------------------------
by fabpot at 2012-11-19T13:52:17Z
Your order of preference looks good to me.
---------------------------------------------------------------------------
by flojon at 2012-11-19T19:13:19Z
Man this was more involved than I thought... :)
Changed the logic to use the parameters when not using the current port. Also tried clean up the tests a little bit... Enjoy!
They should normally be initialized anyway in the constructor. But when extending the Route (like in CMF) and using an ORM/ODM to persist them in the DB, the constructor is not called. Then a new property that is not saved like hostnamePattern stays null which in turn makes the RouteCompiler fails as it expects '' instead of null.
This PR was merged into the 2.0 branch.
Commits
-------
f2cbea3 [Security] remove escape charters from username provided by Digest DigestAuthenticationListener
80f6992 [Security] added test extra for digest authentication
d66b03c fixed CS
694697d [Security] Fixed digest authentication
c067586 [Security] Fixed digest authentication
Discussion
----------
Fix digest authentication
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: -
Replaces: #5485
This adds the missing fixes.
My only concerns is the ```\"``` removing.
```\"``` is only needed for the HTTP transport, but keeping them would require to also store the username with the escapes as well.
---------------------------------------------------------------------------
by fabpot at 2012-10-30T11:25:28Z
The digest authentication mechanism is not that widespread due to its limitation. And the transport is not HTTP, I think we are talking about very few cases.
---------------------------------------------------------------------------
by sstok at 2012-10-30T12:49:14Z
Apache seems to remove (ignore) escape characters.
```c
if (auth_line[0] == '=') {
auth_line++;
while (apr_isspace(auth_line[0])) {
auth_line++;
}
vv = 0;
if (auth_line[0] == '\"') { /* quoted string */
auth_line++;
while (auth_line[0] != '\"' && auth_line[0] != '\0') {
if (auth_line[0] == '\\' && auth_line[1] != '\0') {
auth_line++; /* escaped char */
}
value[vv++] = *auth_line++;
}
if (auth_line[0] != '\0') {
auth_line++;
}
}
else { /* token */
while (auth_line[0] != ',' && auth_line[0] != '\0'
&& !apr_isspace(auth_line[0])) {
value[vv++] = *auth_line++;
}
}
value[vv] = '\0';
}
```
But would this change be a BC break for people already using quotes but without a comma and thus they never hit this bug?
The change it self is minimum, just calling ```str_replace('\\\\', '\\', str_replace('\\"', '"', $value))``` when getting the username.
---------------------------------------------------------------------------
by fabpot at 2012-11-13T13:00:12Z
@sstok Doing the same as Apache seems the best option here (just document the BC break).
---------------------------------------------------------------------------
by sstok at 2012-11-15T16:05:00Z
Hopefully I did this correct, but the needed escapes seem correctly removed.
`\"` is changed to `"` `\\` is changed to `\`
`\'` it kept as it is, as this needs no correcting.
@Vincent-Simonin Can you verify please.
---------------------------------------------------------------------------
by Vincent-Simonin at 2012-11-19T09:28:18Z
Authentication didn't work with this configuration :
```
providers:
in_memory:
name: in_memory
users:
te"st: { password: test, roles: [ 'ROLE_USER' ] }
```
`te"st` was set in authentication form's user field.
(Must we also escape `"` in configuration file ?)
Tests were performed with nginx.
---------------------------------------------------------------------------
by sstok at 2012-11-19T09:33:34Z
Yes. YAML escapes using an duplicate quote, like SQL.
```yaml
providers:
in_memory:
name: in_memory
users:
"te""st": { password: test, roles: [ 'ROLE_USER' ] }
```
This PR was squashed before being merged into the master branch (closes#5888).
Commits
-------
2379d86 CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
Discussion
----------
CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no (but tests doesn't pass on master too). See Travis.
License of the code: MIT
Documentation PR: Not Applicable
Status: Finished
To improve support of the eclipse PDT pluggin (for autocompletion), I propose to change the array notation in PHPDoc blocks to match the phpDocumentor notation for "array of type".
Modifications are made for the following components:
- BrowserKit
- ClassLoader
- Config
- Console
- CssSelector
- DependencyInjection
- DomCrawler
- EventDispatcher (no changes)
- Filesystem (no changes)
- Finder
- Form
- HttpFoundation
- HttpKernel
- Locale
- OptionResolver (no changes)
- Process (no changes)
- Routing (no changes)
- Serializer (no changes)
- Templating
- Translation
- Validator
- Yaml (no changes)
- Security
- Stopwatch (no changes)
See Proposal https://github.com/symfony/symfony/pull/5852
---------------------------------------------------------------------------
by pborreli at 2012-11-01T15:19:27Z
will you make a PR for each component ? why not only one PR with one commit for each component instead ?
---------------------------------------------------------------------------
by raziel057 at 2012-11-01T15:32:39Z
Ok, I'm going try to do it.
---------------------------------------------------------------------------
by raziel057 at 2012-11-01T16:12:56Z
I would like to rename my branch from COMPONENT_Form to changes-phpdoc (as all modifications would be commited in only one branch), so I tried to execute the following command but I have an error.
git remote rename COMPONENT_Form changes-phpdoc
error: Could not rename config section 'remote.COMPONENT_Form' to 'remote.changes-phpdoc'
Do you know how to do it?
---------------------------------------------------------------------------
by pborreli at 2012-11-01T16:14:26Z
don't rename it, you will have to close and make another PR which is useless here, just edit the title.
---------------------------------------------------------------------------
by stof at 2012-11-01T16:16:17Z
and ``git remote rename`` is about renaming a remote repo, not a branch
---------------------------------------------------------------------------
by raziel057 at 2012-11-03T11:36:02Z
Is it normal that all my commit are duplicated? I would like just update my master and merge with my branch.
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:22:55Z
@raziel057 Can you rebase on master? That should fix your problem.
---------------------------------------------------------------------------
by fabpot at 2012-11-09T13:28:53Z
@raziel057 Can you finish this PR?
---------------------------------------------------------------------------
by Tobion at 2012-11-09T13:34:45Z
I'll do it for the routing component this evening because I know it by heart. ^^
---------------------------------------------------------------------------
by raziel057 at 2012-11-09T15:06:26Z
@Tobion ok Thanks!
@fabpot Yes, I will try to finish it this week end.
---------------------------------------------------------------------------
by raziel057 at 2012-11-11T13:04:07Z
@Tobion Did you already change PHPDoc in the Routing component?
---------------------------------------------------------------------------
by Tobion at 2012-11-11T15:21:18Z
@raziel057 Yes I'm working on it.
---------------------------------------------------------------------------
by Tobion at 2012-11-12T15:16:31Z
@raziel057 Done. See #5994
This PR was merged into the 2.0 branch.
Commits
-------
32dc31e [SecurityBundle] Convert Http method to uppercase in the config
Discussion
----------
[SecurityBundle] Convert Http method to uppercase in the config
This is not striclty required as method names would be converted to uppercase by the matcher after #5988.
However I think it is better to always use uppercase for http method names.
The config UT has also been improved as part of this PR.
This is good to propagate to 2.1 & 2.2 also.
This PR was merged into the master branch.
Commits
-------
824a0f3 [Routing] compatibility with older PCRE (pre 8)
Discussion
----------
[Routing] compatibility with older PCRE (pre 8)
#6062 for master
This PR was merged into the 2.1 branch.
Commits
-------
1daefa5 [Routing] made it compatible with older PCRE version (pre 8)
Discussion
----------
[Routing] compatibility with older PCRE version (pre 8)
fixes#4093
Ok I changed my mind about this issue.
1. I figured more people are affected than I thought and CentOS is stubborn.
2. Symfony still uses the old regex style `?P<param>` in several other components. So also doing so in the routing makes it more consistent.
3. Even if it's definitely not good to use an over 6 year old PCRE version with a recent PHP version, we can still try to provide the best experience. It doesn't mean we support outdated software stacks of custom PHP compilations as we won't and cannot specifically test against it.
@fabpot: I will do a seperate PR on master when you merged this because the code changed alot in master so it cannot easily be merged I guess. I will also convert the symfony requirement for PCRE in the requirements check to a recommendation.
This PR was merged into the master branch.
Commits
-------
acbb393 Renamed variable for consistency
Discussion
----------
[SecurityBundle] Renamed variable for consistency
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the master branch.
Commits
-------
966e7d6 [DI] removed unneeded is_object() calls
Discussion
----------
[DI] removed unneeded is_object() calls
I searched through all of symfony for occurences of the coding style `(is_object($value) && $value instanceof Object)` with a regex like `is_object\(\$[a-zA-z0-9]+\) && \$[a-zA-z0-9]+ instanceof `.
The `is_object` calls are not needed in this case. Only the DI component made such duplicate checks.
This PR was squashed before being merged into the master branch (closes#6030).
Commits
-------
749dac1 Improve docBlock
Discussion
----------
Improve docBlock
This is just a minor change documenting the return type of `SerializerInterface::deserialize()`.
This PR was merged into the master branch.
Commits
-------
644de74 Fix docblock in Doctrine Bridge
Discussion
----------
Fix docblocks in Doctrine Bridge
This PR was merged into the master branch.
Commits
-------
83b37ff [DependencyInjection] Return self for add...
Discussion
----------
[DependencyInjection] Return self for add...
Bug fix: no
Forget fix: yes
Feature addition: no
Symfony2 tests pass: yes
License of the code: MIT
Return self instance when call an ADD something method.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T13:24:45Z
Please fix PHPDoc accordingly
---------------------------------------------------------------------------
by ruian at 2012-11-16T13:38:41Z
@pborreli done.
This PR was merged into the master branch.
Commits
-------
97f6a1b [Form] Update password type trimming to false
Discussion
----------
[Form] Update password trimming to false by default
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~
Hey!
Today, I realize that the password type is by default trimmed. IMHO, this is not the expected behavior. By default, the password type should not trim the input value.
Regards
---------------------------------------------------------------------------
by nomack84 at 2012-11-13T19:16:29Z
👍
---------------------------------------------------------------------------
by mvrhov at 2012-11-13T19:57:29Z
IMHO password and username fields should be trimmed. whitespace at the beginning and at the end of those fields are not wanted. At least I don't want to deal with a user support where WS on those fields is not trimmed.
---------------------------------------------------------------------------
by egeloen at 2012-11-13T20:08:08Z
@mvrhov I agree with you about username fields and other "text" fields but in case of a password field, if the end user specifies white space at the begin/end of his password, it should not be trimmed. It should simply let it as it is. I open this PR due to two customers who reports me this behavior.
---------------------------------------------------------------------------
by clemherreman at 2012-11-14T10:06:15Z
@mvrhov I agree, username shouldn't be trimmed, however password are kind of special. They should be used *"as is"*, as lots of users have wicked passwords.
Moreover, usually the password is asked twice, so if there are spaces, they are most likely wanted by the end user.
So 👍
---------------------------------------------------------------------------
by clemherreman at 2012-11-14T10:07:27Z
Also Travis status on this PR is **failed** because of an error when downloading the deps.
---------------------------------------------------------------------------
by geoffrey-brier at 2012-11-14T10:34:56Z
👍
---------------------------------------------------------------------------
by bschussek at 2012-11-14T15:01:43Z
Could you please add a test case to PasswordTypeTest?
Please also reference this PR in the test
(= add the comment `// https://github.com/symfony/symfony/pull/6007` before the test)
---------------------------------------------------------------------------
by egeloen at 2012-11-14T15:10:36Z
@bschussek I have updated the PR.
---------------------------------------------------------------------------
by bschussek at 2012-11-14T15:24:34Z
Thanks! Could you please squash the commits?
---------------------------------------------------------------------------
by egeloen at 2012-11-14T15:30:11Z
@bschussek Done.
---------------------------------------------------------------------------
by stloyd at 2012-11-14T15:39:47Z
Should this be noted in `UPGRADE` file ? (as this is change of actually BC break =))
---------------------------------------------------------------------------
by egeloen at 2012-11-15T22:59:45Z
@stloyd Where can I put it? In the [UPGRADE-2.2](https://github.com/symfony/symfony/blob/master/UPGRADE-2.2.md) file?
---------------------------------------------------------------------------
by stloyd at 2012-11-15T23:02:51Z
@egeloen IMO yes, according this will go to `master` (which is actual _dev_ branch for `2.2`)
---------------------------------------------------------------------------
by egeloen at 2012-11-16T13:54:04Z
@fabpot I have removed the comment & added an entry in the `UPGRADE-2.2` file.
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
License of the code: MIT
Return self instance when call an ADD something method.
This PR was squashed before being merged into the master branch (closes#6018).
Commits
-------
6334343 [Routing] removed getHostnamePattern from RouteCollection
Discussion
----------
[Routing] removed getHostnamePattern from RouteCollection
this method is not useful and can introduce inconsistencies when a sub-route has a different hostname, which already has a getter for the hostname
This PR was merged into the master branch.
Commits
-------
f4b630d [HttpFoundation] fix#6002
Discussion
----------
[HttpFoundation] fix#6002
---------------------------------------------------------------------------
by fabpot at 2012-11-13T17:02:45Z
Can you add a test?
---------------------------------------------------------------------------
by Tobion at 2012-11-13T17:04:23Z
hehe see #6004 there is also a test
---------------------------------------------------------------------------
by vicb at 2012-11-13T17:05:06Z
There is a test in the original PR, no need for 6004.
---------------------------------------------------------------------------
by vicb at 2012-11-13T17:05:20Z
Which is why is was failing btw
---------------------------------------------------------------------------
by Tobion at 2012-11-13T17:06:36Z
The test in 6002 did not fail for me without your patch.
---------------------------------------------------------------------------
by fabpot at 2012-11-14T12:47:46Z
@Tobion @vicb What do we do? Just revert #6002 or merge this PR?
---------------------------------------------------------------------------
by vicb at 2012-11-14T13:25:51Z
Merge. Go go go :)
----- Reply message -----
De : "Fabien Potencier" <notifications@github.com>
Pour : "symfony/symfony" <symfony@noreply.github.com>
Cc : "Victor Berchet" <victor@suumit.com>
Objet : [symfony] [HttpFoundation] fix#6002 (#6003)
Date : mer., nov. 14, 2012 13:47
@Tobion @vicb What do we do? Just revert #6002 or merge this PR?
—
Reply to this email directly or view it on GitHub.
---------------------------------------------------------------------------
by Tobion at 2012-11-14T13:31:22Z
@vicb can you explain what it fixes? As I said, your test does not cover something that would fail without the patch. So I don't see the bug.
---------------------------------------------------------------------------
by vicb at 2012-11-14T15:30:55Z
@Tobion php.net states: The `current()` function simply returns the value of the array element that's currently being pointed to by the internal pointer and `reset()` returns the value of the first array element.
I have no clue what the "element that's currently being pointed to by the internal pointer" in this method so `reset()` is probably what you want.
Validated ?
---------------------------------------------------------------------------
by Tobion at 2012-11-14T16:12:03Z
I agree `reset()` is more explicit here. But `current()` should work just as well in this case because the array pointer can only be at the first item when calling the method. Anyway, this is good to merge. I just hoped there was a unit test that ensures this on my machine. This is why I added the test in my patch. Maybe Fabien can just merge the second commit on #6004
---------------------------------------------------------------------------
by vicb at 2012-11-14T16:20:57Z
As explained in #6004, there is already a test from my first PR that made Travis go red.
This PR was merged into the master branch.
Commits
-------
9f1cd84 moved most static assets directly into the templates
Discussion
----------
moved most static assets directly into the templates
This has been done for several reasons:
* for consistency with the way we already manage the WDT and the
profiler icons;
* it makes the Exception independent from the location of the assets
(and from the asset() function)
* this is the second step to make the WebProfiler useable outside the
full-stack framework
see dbcd171dd3
---------------------------------------------------------------------------
by stof at 2012-11-13T17:52:39Z
the images blue_picto_more and blue_picto_less are also used in DoctrineBundle (and probably in JMSDebuggingBundle but I haven't checked). Could you submit a PR inlining the images too before removing them ?
---------------------------------------------------------------------------
by fabpot at 2012-11-13T18:02:18Z
Any image useful for other bundles should not be deleted. So, if DoctrineBundle is using the blue_pico_* images, I'm going to revert their deletion.
---------------------------------------------------------------------------
by schmittjoh at 2012-11-13T18:07:02Z
I'm using them in two bundles, JMSDebuggingBundle and JMSJobQueueBundle (same for the exception related templates).
---------------------------------------------------------------------------
by dlsniper at 2012-11-13T22:22:29Z
Wouldn't it be better to have the encoded icons in a separate CSS file as different classes/background images?
---------------------------------------------------------------------------
by fabpot at 2012-11-14T11:28:24Z
ok, I've reverted the removal of the images that might be useful in third-party bundles.
This has been done for several reasons:
* for consistency with the way we already manage the WDT and the
profiler icons;
* it makes the Exception independent from the location of the assets
(and from the asset() function)
* this is the second step to make the WebProfiler useable outside the
full-stack framework
see dbcd171dd3
This PR was merged into the master branch.
Commits
-------
395c004 [HttpFoundation] Fix AcceptHeader
Discussion
----------
[HttpFoundation] Fix AcceptHeader
The important lines are:
```php
<?php
- return !empty($this->items) ? current($this->items) : null;
+ return !empty($this->items) ? $this->items[0] : null;
```
(and the corresponding test).
The commit has some code re-org to make reading tests easier (providers defined close the the corresponding test). This might be personal preferences only, let me know if it should be reverted.
* 2.1:
fixed comment. The parent ACL is not accessed in this method.
[HttpFoundation] Make host & methods really case insensitive in the RequestMacther
[Validator] fixed Ukrainian language code (closes#5972)
Fixed case of php function
* 2.0:
fixed comment. The parent ACL is not accessed in this method.
[HttpFoundation] Make host & methods really case insensitive in the RequestMacther
[Validator] fixed Ukrainian language code (closes#5972)
Fixed case of php function
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.uk.xliff
src/Symfony/Component/HttpFoundation/RequestMatcher.php
* 2.1: (24 commits)
forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3
[Routing] removed irrelevant string cast in Route
Fixed typo
Make YamlFileLoader and XmlFileLoader file loading extensible
[HttpKernel] fix typo
Fixed singularization of "prices"
[Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.
[HttpKernel] fixed Client when using StreamedResponses (closes#5370)
fixed PDO session handler for Oracle (closes#5829)
[HttpFoundation] fixed PDO session handler for Oracle (closes#5829)
[Locale] removed a check that is done too early (and it is done twice anyways)
Update src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
Adding new localized strings for farsi validation.
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
[Form] Fixed forms not to be marked invalid if their children are already marked invalid
[Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
added missing tests from previous merge
[Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
Fix export-ignore on Windows
Show correct class name InputArgument in error message
...
Conflicts:
.travis.yml
src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
This PR was merged into the master branch.
Commits
-------
0159358 refactored CSS, images, templates included in the built-in bundles
812b9b1 replace _ in stylesheets (ids and classes) by - (should be consistent across the whole framework now)
983b2b5 uniformized styles
e0aab40 renamed sf-exceptionreset to sf-reset
Discussion
----------
Public resources refactoring
The first 3 commits are just cosmetic ones.
The last one refactors CSS, images, and templates included in the built-in bundles. Right now, everything is tied to the exception pages, but the code can be used standalone.
So, the goal is to make things more decoupled and more reusable across different bundles. That way, a bundle can provide pages that look like the other ones in Symfony without the need to duplicate code.
See the associated PR for the distribution bundle to see an example.
If you want to have a look at the last commit (not sure if it is worth it), you probably want to append ?w=1 to the URL to avoid too much whitespace noise.
---------------------------------------------------------------------------
by pborreli at 2012-11-13T09:38:00Z
congrats ! #6000
---------------------------------------------------------------------------
by fabpot at 2012-11-13T09:38:39Z
A simple usage example:
```jinja
{% extends "TwigBundle::layout.html.twig" %}
{% block body %}
<div class="block">
FOOBAR
</div>
{% endblock %}
```
This PR was squashed before being merged into the master branch (closes#5879).
Commits
-------
07bd5c6 Make non-instantiable utils classes consistent with each other
Discussion
----------
Make non-instantiable utils classes consistent with each other
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
As per discussion in #5875 turned out that we don't have a consistent way to define non-instantiatable classes.
I don't like `final` as it removes flexibility with no visible gain.
I don't like `abstract` since it's not specifically clear what is meant by that. Is this class not complete? Should it be extended?
This PR was merged into the 2.0 branch.
Commits
-------
b3a8efd fixed comment. The parent ACL is not accessed in this method.
Discussion
----------
fixed comment. The parent ACL is not accessed in this method.
Just fixed a comment on PermissionGrantingStrategy.
hasSufficientPermissions() is not accessing the parent ACL. That's done in isGranted().
This PR was merged into the master branch.
Commits
-------
50e41d2 one space too much
5d9a36f small fix and enhancement
1e1cb13 [Routing] added more phpdoc and replaced 'array of type' by 'Type[]'
Discussion
----------
[Routing] added more phpdoc and replaced 'array of type' by 'Type[]'
---------------------------------------------------------------------------
by Tobion at 2012-11-12T17:03:01Z
@fabpot you should squash with your great merging tool ;)
The goal is to make things more decoupled and more reusable across
different bundles.
There will be a PR for the distribution bundle too to simplify the code
based on this PR.
This PR was merged into the master branch.
Commits
-------
56fe8d1 duplicated the code helper code to the Twig bundle
Discussion
----------
moved code helper code to the Twig bundle
These helpers are very specific and are only used in TwigBundle for the
profiler and the exception templates.
---------------------------------------------------------------------------
by schmittjoh at 2012-11-12T09:12:56Z
Is there a reason for this BC break other than a cosmetical tweak?
If not strictly necessary, I'd like to see these kind of changes being scheduled for 3.0.
---------------------------------------------------------------------------
by fabpot at 2012-11-12T09:29:35Z
Of course, I don't want to make this change without a reason and indeed, I forgot to mention the why of this change. Let me explain.
I've been working on the integration of the Symfony web profiler into other OSS that use HttpKernel like Silex and Drupal for quite some time now. That's why I developed the new namespace feature in Twig, that's why I've refactored the web profiler to only use Twig and not the templating component. One of the last step is this PR, which reduces the number of dependencies to be able to use the WebProfiler bundle.
So, this change is not cosmetic, but one more step towards the goal of making the web profiler more reusable.
---------------------------------------------------------------------------
by schmittjoh at 2012-11-12T13:22:28Z
I see, makes sense. How about duplicating the code for now?
After looking through the history, it doesn't seem like it changes often
(the last real code change was a year ago). So, it should not be much more
maintenance effort, and we could keep BC here.
On Mon, Nov 12, 2012 at 10:29 AM, Fabien Potencier <notifications@github.com
> wrote:
> Of course, I don't want to make this change without a reason and indeed, I
> forgot to mention the why of this change. Let me explain.
>
> I've been working on the integration of the Symfony web profiler into
> other OSS that use HttpKernel like Silex and Drupal for quite some time
> now. That's why I developed the new namespace feature in Twig, that's why
> I've refactored the web profiler to only use Twig and not the templating
> component. One of the last step is this PR, which reduces the number of
> dependencies to be able to use the WebProfiler bundle.
>
> So, this change is not cosmetic, but one more step towards the goal of
> making the web profiler more reusable.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/5986#issuecomment-10281201>.
>
>
---------------------------------------------------------------------------
by fabpot at 2012-11-12T13:32:33Z
Of course, that's a possibility. But what for? I doubt that people are using this code. Are you using this code somewhere?
---------------------------------------------------------------------------
by schmittjoh at 2012-11-12T13:37:24Z
Yes, I believe that I'm using it both in JMSDebuggingBundle, and
JMSJobQueueBundle as both are rendering exception stack traces at some
point.
On Mon, Nov 12, 2012 at 2:32 PM, Fabien Potencier
<notifications@github.com>wrote:
> Of course, that's a possibility. But what for? I doubt that people are
> using this code. Are you using this code somewhere?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/5986#issuecomment-10287353>.
>
>
---------------------------------------------------------------------------
by fabpot at 2012-11-12T14:11:50Z
ok, fair enough. The code is now in the framework bundle as well.
The code has been duplicated and not moved for BC reasons.
This code has been duplicated in the Twig bundle to be able to decouple
the web profiler and the exception templates.
we don't need the logic to merge numeric keys, as we don't have them. I could also improve the genrated code by PhpMatcherDumper a little by saving a function call.
This PR was squashed before being merged into the master branch (closes#5928).
Commits
-------
6a033f3 setData method also accepts objects. Doc should reflect this.
Discussion
----------
setData method also accepts objects. Doc should reflect this.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: NA
Todo: None
License of the code: MIT
Documentation PR: None
This PR was squashed before being merged into the master branch (closes#5904).
Commits
-------
84adcb1 [2.2][Routing] Added support for default attributes with default values of method params
Discussion
----------
[2.2][Routing] Added support for default attributes with default values of method params
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
With this patch, you can configure your default values likes this:
``` php
/**
* @Route("/hi/{name}", name="hi")
*/
public function hiAction($name = "Bob")
{
return new Response($name);
}
```
---------------------------------------------------------------------------
by Tobion at 2012-11-03T23:15:32Z
I'm unsure. How does one know if that param defines a default value or a requirement? It's too vague.
---------------------------------------------------------------------------
by lyrixx at 2012-11-03T23:35:27Z
It's only a default value, not a requirement.
It's just a shortcut to avoid `defaults={"name"="bob"}`
---------------------------------------------------------------------------
by Tobion at 2012-11-03T23:43:51Z
Yes, but its not clear. It could also be a shortcut to `requirements={"name"="bob"}`, which has totally different meaning. So it's not self-explanatory.
-1 for me.
---------------------------------------------------------------------------
by lyrixx at 2012-11-03T23:48:21Z
it is the default php behavior. It's a default value for a variable...
---------------------------------------------------------------------------
by stof at 2012-11-04T00:22:58Z
@Tobion using the default value of the method to set a requirement does not make any sense. I don't see why someone would expect this behavior
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:12:05Z
@lyrixx Can you add some unit tests?
---------------------------------------------------------------------------
by Tobion at 2012-11-06T10:28:42Z
Oh I misunderstood the PR. I thought this makes the `name` param default to `hi`. `@Route("/hi/{name}", name="hi")`. But it's just the name of the route. Your example was easy to misinterpret as you used `name` everywhere.
---------------------------------------------------------------------------
by fabpot at 2012-11-10T08:33:13Z
@lyrixx Can you finish this PR?
---------------------------------------------------------------------------
by lyrixx at 2012-11-10T13:16:34Z
@fabpot Yes i will as soon as possible.
---------------------------------------------------------------------------
by lyrixx at 2012-11-10T18:34:07Z
I rebase and amend my commit. (I changed doc in commit message to be less confusing)
I will try to add tests.
But for now, `AnnotationClassLoader::load` is not really tested, and `AnnotationClassLoader::addRoute` is absolutely not tested. So I think I should add tests for these methods ? And then add tests for my patch.
I will try tomorrow.
---------------------------------------------------------------------------
by lyrixx at 2012-11-11T18:23:41Z
@fabpot I added new tests. I tried to made very atomic commits.
This PR was merged into the master branch.
Commits
-------
bdf0334 Fixed the lap method. Added upgrade notes. Some CS fixes
Discussion
----------
Fixed the lap method. Added upgrade notes. Some CS fixes
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
This adds some type-hinting to the Stopwatch components.
I've also split the Section class to its own file, I know it's not a must as per coding standards used by Symfony but it complies with most of the other classes in the framework.
I've updated the UPGRADE-2.2.md file as well.
There's a bug fix which I'm not sure it if should have been done in this branch or not.
Let me know if I should make this PR against an older version of the framework.
Thanks.
This PR was merged into the master branch.
Commits
-------
c7a8f7a [Routing] fixed possible parameters conflict in apache url matcher
Discussion
----------
[Routing] fixed possible parameters conflict in apache url matcher
Bug fix: yes
Feature addition: no
Backwards compatibility break: no (as long as rewrite rules are generated after upgrading)
Symfony2 tests pass: yes
- This fixes a conflict in route parameters:
The rewrite rules currently pass route informations through environment variables:
`_ROUTING_DEFAULT_x`: passes the default value of parameter x
`_ROUTING__allow_x`: passes the information that method x was allowed for this route
`_ROUTING_x`: passes the value of parameter x
The problem is that naming a route parameter `DEFAULT_*` or `_allow_*` would not behave as expected.
I fixed this by namespacing all environment variables; e.g. parameters are in `_ROUTING_param_*`, defaults in `_ROUTING_default_*`, etc.
- The PR fixes a second issue: sometimes the variables are prefixed with multiple REDIRECT_. This PR handles this case by ignoring them all.
- This also improves performance a little:
Matching a route with two parameters and two default parameters 100K times: (`$_SERVER` was copied from a real request, so with many non `_ROUTING_` variables)
master: 6.6s
this branch: 4.7s
---------------------------------------------------------------------------
by fabpot at 2012-10-27T13:37:24Z
Any news on this PR? Is it mergeable?
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-27T14:50:08Z
There is an issue with default parameter values, I can't find how to fix that in a simple way. Before this PR, default values are never used (if a parameter is an optional not present in the url, the parameter's value is the empty string); after this PR, when a parameter is present and empty (e.g. a requirement like `.*`), its value is set to its default value.
---------------------------------------------------------------------------
by Tobion at 2012-10-29T01:36:08Z
The problem is, it's not consistent with the default php matcher. So one cannot safely exchange it with the apache matcher because it behaves differently under some (special) circumstances.
---------------------------------------------------------------------------
by fabpot at 2012-11-05T08:05:54Z
We need to move forward as I want to merge the hostname support in the routing ASAP to have plenty of time for feedback before the 2.2 release.
Does it sound reasonable to merge this PR as is an open a ticket about the remaining issue (which should not occur that often anyways)?
---------------------------------------------------------------------------
by arnaud-lb at 2012-11-05T09:22:02Z
@fabpot it sounds reasonable to me. Also, I've the hostname support branch is currently rebased so that it can be merged without this one.
---------------------------------------------------------------------------
by Tobion at 2012-11-11T21:50:20Z
Btw, does the ApacheMatcherDumper handle the _scheme requirement? It doesn't look like it. This would be another bug.
Anyway, we can probably merge this PR and open new issues for the remaining bugs.
This PR was merged into the master branch.
Commits
-------
d0e5ef1 [FrameworkBundle] move change note to changelog of FrameworkBundle instead of master UPGRADE-2.2
e77ecc9 [FrameworkBundle] switch to parameter for base url to make it configurable for tests and cli as done for host and scheme in d30943c2e8
Discussion
----------
[FrameworkBundle] switch to parameter for base url
This will make it configurable the same way we have it for host and scheme done for 2.1 in d30943c2e8
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: (no new test breakage)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: (none yet. if this is merged, i will happily PR against doc if somebody can point me to the right place)
---------------------------------------------------------------------------
by dbu at 2012-11-11T18:44:33Z
doc will go here once its merged: http://symfony.com/doc/current/cookbook/console/generating_urls.html
---------------------------------------------------------------------------
by dbu at 2012-11-11T20:12:41Z
ok, moved to the FrameworkBundle changelog
---------------------------------------------------------------------------
by Tobion at 2012-11-11T20:34:28Z
unfortunately is naming is so wrong in many places of the Request class and the routing.
`base_url` is just an example. It's not an "URL" at all. It's a path only.
---------------------------------------------------------------------------
by dbu at 2012-11-12T07:47:55Z
@Tobion i saw that, but i chose to be consistent with the method name of RequestContext even if it is a wrong name.
This PR was merged into the master branch.
Commits
-------
e32ca2b [HttpKernel] Fix Symfony2 full framework tests
Discussion
----------
[HttpKernel] Fix Symfony2 full framework tests
Fix the path when the full framework is used
---------------------------------------------------------------------------
by fabpot at 2012-11-12T09:08:06Z
When is it broken?
---------------------------------------------------------------------------
by vicb at 2012-11-12T09:18:01Z
now, https://travis-ci.org/symfony/symfony/jobs/3159326
This PR was squashed before being merged into the master branch (closes#5970).
Commits
-------
d0433b6 [Stopwatch] Get the "real size" used & minor tweaks
Discussion
----------
[Stopwatch] Get the "real size" used & minor tweaks
---------------------------------------------------------------------------
by vicb at 2012-11-11T09:45:50Z
@fabpot @maoueh thanks for your feedback, integrated.
This PR was merged into the master branch.
Commits
-------
fc300ec [FrameworkBundle] Router class tweak
Discussion
----------
[FrameworkBundle] Router class tweak
This PR was merged into the master branch.
Commits
-------
4c0c588 [MemoryDataCollector] Stop being optimistic about memory usage
Discussion
----------
[MemoryDataCollector] Stop being optimistic about memory usage
Take into account the memory used in the kernel.terminate listeners
This PR was merged into the master branch.
Commits
-------
b27b749 made usage of Composer autoloader for subtree-split unit tests
Discussion
----------
made usage of Composer autoloader for subtree-split unit tests
This PR also normalizes the way components are tested.
---------------------------------------------------------------------------
by stof at 2012-11-09T23:14:22Z
👍
This PR was merged into the 2.1 branch.
Commits
-------
84b760b [HttpKernel] fixed Client when using StreamedResponses (closes#5370)
Discussion
----------
[HttpKernel] fixed Client when using StreamedResponses (closes#5370)
This PR was merged into the 2.1 branch.
Commits
-------
e34fb41 [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
Discussion
----------
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
This PR was merged into the 2.1 branch.
Commits
-------
646a714 Fix export-ignore on Windows
Discussion
----------
Fix export-ignore on Windows
Rules:
Tests/ export-ignore
don't work on Windows. My proposition is:
/Tests export-ignore
This PR was merged into the 2.1 branch.
Commits
-------
4909bc3 [Form] Fixed forms not to be marked invalid if their children are already marked invalid
Discussion
----------
[Form] Fixed forms not to be marked invalid if their children are already marked invalid
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4359
Todo: -
License of the code: MIT
Documentation PR: -
This PR prevents unsynchronized forms from being marked invalid if any of their children is also unsynchronized (and thus also marked invalid). Displaying an invalid message twice does not help the user and, if used in conjunction with error bubbling, may lead to duplicate errors (see #4359).
This PR was merged into the master branch.
Commits
-------
380cf4f [HttpKernel] added memory information in the Stopwatch
Discussion
----------
[HttpKernel] added memory information in the Stopwatch
* 2.0:
[Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
Show correct class name InputArgument in error message
shows correct class name InputOption in error message
The exception message should say which field is not mapped
[HttpFoundation] Fix name sanitization after perfoming move
Add check to Store::unlock to ensure file exists
Conflicts:
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
tests/Symfony/Tests/Component/Console/Input/InputArgumentTest.php
tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php
tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php
tests/Symfony/Tests/Component/HttpKernel/HttpCache/StoreTest.php
This PR was merged into the master branch.
Commits
-------
af87c2b changed the Firewall to be a proper subscriber
02bd359 changed the remember-me listener to be a proper subscriber
Discussion
----------
Changed some security classes to implement the EventSubscriberInterface interface
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:11:28Z
That could also be done in 2.1. What do you think?
This PR was merged into the master branch.
Commits
-------
55a0fef Float support added for transchoice in the Translation Component
Discussion
----------
Float support added for transchoice in the Translation Component
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by pborreli at 2012-11-01T23:22:50Z
👍 nice PR
* Default to _id for storing session ID
* Use MongoDate instead of MongoTimestamp (BC break)
* Rename default field names ("sess_" is redundant)
* "justOne" is redundant for session removal
* Assert true return values in method tests
* Add note about TTL collections for gc()
* Don't set identifier in upsert (invalid behavior)
This PR was merged into the master branch.
Commits
-------
e193590 [Security] removed the 401 error custom status message
Discussion
----------
[Security] removed the 401 error custom status message
see fabpot/Silex#496
---------------------------------------------------------------------------
by pborreli at 2012-10-31T17:29:24Z
@fabpot please fix the test suite, if you don't know how to do it, read http://symfony.com/doc/current/contributing/code/tests.html, thx 😸
This PR was merged into the master branch.
Commits
-------
73bb47b [Console] Fix#5897 - Console component require Shell component
Discussion
----------
[Console] Fix#5897 - Console component require Shell component
When setting the process isolation of a shell to true:
`setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5897
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by alias-mac at 2012-11-04T17:07:59Z
I noticed that there is no Unit Testing for the Shell class. Shall I create one with the test for this fix/bug request?
---------------------------------------------------------------------------
by alias-mac at 2012-11-06T01:58:40Z
Updated based on @stof comments.
---------------------------------------------------------------------------
by alias-mac at 2012-11-06T02:11:20Z
The travis-ci build failure as nothing to do with the code. See:
https://travis-ci.org/#!/symfony/symfony/jobs/3076345
When setting the process isolation of a shell to true:
`setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.
This PR was squashed before being merged into the master branch (closes#5841).
Commits
-------
6b601bd [http-foudation] Better accept header parsing
Discussion
----------
[http-foudation] Better accept header parsing
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
**Quality:**
The special `q` item attribute represents its quality. I had to make some choices:
* if I set `q` attribute, it's assigned to quality property, but not to attributes
* the `__toString()` method only render `q` attribute if quality is less than 1
**BC break:**
The return of `Request::splitHttpAcceptHeader()` has changed. It's result was an array of qualities indexed by an accept value, it now returns an array of `AcceptHeaderItem` indexed by its value.
---------------------------------------------------------------------------
by jfsimon at 2012-10-26T08:35:55Z
As dicussed in https://github.com/symfony/symfony/pull/5711.
---------------------------------------------------------------------------
by Seldaek at 2012-10-27T10:35:49Z
Maybe you can pull 5e8a5267f6 into your branch (for some reason I can't send a PR to your repo, it doesn't show up in github's repo selector.. looks like they don't like projects with too many forks). It allows you to use usort() which hopefully is faster than your merge sort, though I did not bench it. I also added tests to confirm the functionality.
---------------------------------------------------------------------------
by Seldaek at 2012-10-27T10:40:27Z
Sorry please check 376dd93c56 instead, I missed a few tests in the RequestTest class.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:26:03Z
@fabpot do you think the introduced BC break is acceptable?
---------------------------------------------------------------------------
by fabpot at 2012-10-29T16:37:06Z
@jfsimon Are all getAccept*() method BC?
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:39:26Z
@fabpot nope, just `Request::splitHttpAcceptHeader()`
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:43:18Z
@fabpot I think missunderstood... only `Request::splitHttpAcceptHeader()` breaks BC.
---------------------------------------------------------------------------
by fabpot at 2012-10-29T16:53:22Z
So, a BC break on just splitHttpAcceptHeader is possible... but should be documented properly. Another option would be to deprecate the current method (and keep it as is), and just use the new version everywhere. Sounds better as it won"t introduce any BC breaks.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:55:57Z
@fabpot Okay, I'll update this PR according to your second option.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T20:14:46Z
@fabpot done.
As you can see here: https://github.com/symfony/symfony/pull/5841/files#L5L1029 value returned by `Request::splitHttpAcceptHeader()` is not **exactly** the same as before because all attributes are present (not only those before the `q` one).
---------------------------------------------------------------------------
by fabpot at 2012-10-30T06:16:23Z
The last thing missing before I can merge is a PR to update the documentation (should probably be just a note somewhere with the example you have in the UPGRADE file).
---------------------------------------------------------------------------
by jfsimon at 2012-10-30T07:07:08Z
@fabpot I could add this example here: http://symfony.com/doc/current/components/http_foundation/introduction.html#request after `Accessing the session`, what do you think?
---------------------------------------------------------------------------
by fabpot at 2012-10-30T07:14:10Z
Yes, looks good to me.
* 2.1:
removed unused use statements
[Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket
[2.1][HttpFoundation] Fixed Php doc in Request::get
bumped Symfony version to 2.1.4-DEV
updated VERSION for 2.1.3
update CONTRIBUTORS for 2.1.3
updated CHANGELOG for 2.1.3
merged branch jakzal/yamlDoubleQuotesDumperFix (PR #4320)
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.1 branch.
Commits
-------
b9f6cac [2.1][HttpFoundation] Fixed Php doc in Request::get
Discussion
----------
[2.1][HttpFoundation] Fixed Php doc in Request::get
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
According to php code, `Request::get` method does not seek in cookies.
---------------------------------------------------------------------------
by pborreli at 2012-11-02T11:02:26Z
your PR is full of reSquest typo :)
---------------------------------------------------------------------------
by lyrixx at 2012-11-02T11:25:31Z
@pborreli Fixed
Commits
-------
b631073 [Yaml] Fixed double quotes escaping in Dumper.
Discussion
----------
[Yaml] Fixed double quotes escaping in Dumper
Issue #4308 is caused by Dumper::escapeWithDoubleQuotes() which uses [str_replace()](http://php.net/str_replace).
From the php docs:
> Because str_replace() replaces left to right, it might replace a previously inserted value when doing multiple replacements.
We should be very careful in deciding about the order of elements in $escapees array. I'd really appreciate if someone reviewed my fix. Tests say I didn't break anything but I'm not sure what percentage of Yaml specification is covered by tests.
Bug fix: yes
Feature addition: no
Backwards compatibility break: not that I know
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=yamlDoubleQuotesDumperFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4308
---------------------------------------------------------------------------
by travisbot at 2012-05-18T08:53:51Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1364279) (merged 5192722c into a04acc89).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T23:19:49Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1371539) (merged ecaa1aab into fc3c609b).
---------------------------------------------------------------------------
by dinamic at 2012-05-19T07:35:21Z
Something is really wrong with this method. You can see clearly that multiple characters would fail proper escaping.
Here's an example:
```
$value = '\\\\"some value\n \"some quoted string\" and \'some single quotes one\'"';
var_dump(Escaper::escapeWithDoubleQuotes($value));
string(72) ""\\\"some value\n \\some quoted string\\ and 'some single quotes one'\"""
```
To begin with the backslash - in the initial value you have 2 (escaped ones), that after escaping should result in 4, not in 1 (escaped). I guess this behavior has to be verified with the importer, but imho it does not seem right.
Does anyone know why this escaping wasn't done using a regular expression in first place?
---------------------------------------------------------------------------
by clemens-tolboom at 2012-05-19T10:18:58Z
Searching for https://duckduckgo.com/?q=what+is+\xc2\x85 the table on http://stackoverflow.com/questions/6609895/efficiently-replace-bad-characters is interesting enough to decide we need way more documentation on this file.
\xc2\x85 seems to be triple dot (ellipses)
\xe2\x80\xa9 seems to be paragraph separator see http://drupal.org/node/914360#comment-3468550
Conflicts:
src/Symfony/Component/Yaml/Escaper.php
This PR was merged into the master branch.
Commits
-------
2f7bbbf [HttpFoundation] Added BinaryFileResponse.
Discussion
----------
[2.2] [HttpFoundation] Added BinaryFileResponse.
Another stab at #3602, based on @stealth35's code at https://gist.github.com/1472230.
- Move things around a little, clean things up, looking how it has been done in StreamedResponse.
- Add tests.
- Make functions chainable.
- Add a flag whether or not to trust the X-Sendfile-Type header.
---------------------------------------------------------------------------
by Partugal at 2012-06-10T19:56:43Z
What about support X-Accel-Redirect (nginx)?
---------------------------------------------------------------------------
by niklasf at 2012-06-10T20:41:10Z
@Partugal: So we support X-Sendfile-Type to pick the X-Sendfile header. What else would be needed to support X-Accel-Redirect (which we should definitely do)?
---------------------------------------------------------------------------
by Partugal at 2012-06-10T21:29:41Z
@niklasf Because nginx not use full file path, this need X-Accel-Mapping header (http://rack.rubyforge.org/doc/Rack/Sendfile.html)
---------------------------------------------------------------------------
by niklasf at 2012-06-10T22:45:38Z
@Partugal: Alright. Doing such a substitution now. Also added a test for that.
---------------------------------------------------------------------------
by stealth35 at 2012-06-11T07:47:35Z
I think the MIME should be base on the extensions map, for an example with `xlsx` that send an `application/zip` or a `xlsx` file MIME is `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
Client to server : Reverve MIME => libmagic
Server to client : MIME => MIME map
---------------------------------------------------------------------------
by niklasf at 2012-06-11T14:40:00Z
@partugal: Thanks! Also added tests. Any e-mail you want to have in your credits?
---------------------------------------------------------------------------
by niklasf at 2012-06-11T14:41:39Z
@stealth35: Yeah ... makes sense. How would I get that information?
---------------------------------------------------------------------------
by stealth35 at 2012-06-11T14:47:36Z
use the `Symfony\Component\HttpFoundation\File\Mimetype\MimeTypeExtensionGuesser` it's the same map as Apache
and if the extension don't exists use `$this->getMimeType` and finaly `application/octet-stream`
---------------------------------------------------------------------------
by Partugal at 2012-06-11T15:46:41Z
@niklasf Thanks you for your work
If needed you may use linniksa@gmail.com
---------------------------------------------------------------------------
by niklasf at 2012-06-14T10:58:19Z
@stealth35: Sorry. I have to ask again.
- So the first step would be using the map in `MimeTypeExtensionGuesser`? I don't see how I can access that, because the `guess()` method it has, is for guessing extensions from mime types, not the reverse.
- Then, by `$this->getMimeType` you mean the getMimeType() method of the file? Sounds good.
- `application/octet-stream` as the fallback. Alright.
---------------------------------------------------------------------------
by stealth35 at 2012-06-14T11:00:33Z
Yeah sorry `MimeTypeExtensionGuesser` is for getting an extension with the Mime, forget about this, i'll take care aboute all MIME intégration later
---------------------------------------------------------------------------
by niklasf at 2012-06-14T13:12:22Z
@stealth35: Awesome. Thanks a lot.
---------------------------------------------------------------------------
by jalliot at 2012-08-07T20:53:54Z
@niklasf You should backport the changes from 532334d23d and 3f51bc0a3d
---------------------------------------------------------------------------
by niklasf at 2012-08-07T21:07:10Z
@jalliot Thanks. Fixed.
This PR was merged into the master branch.
Commits
-------
2817a47 [Finder] Fixed filename containing space bug in gnu adapter.
9bf7cb0 [Finder] Added filename containing space to tests.
Discussion
----------
[Finder] Fixed filename containing space bug in gnu find adapter.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes: #5851
`GNU find` adapter now uses `cut` instead of `awk`.
This PR was merged into the master branch.
Commits
-------
3e58893 [Security] Tweak UsernamePasswordFormAuthenticationListener
Discussion
----------
[Security] Tweak UsernamePasswordFormAuthenticationListener
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Improvements:
- Do not check twice for the ```only_post``` condition. The condition in the ```attemptAuthentication``` method is useless as this method will never be called if the previous ```requiresAuthentication``` call returns false.
- If the expected request is ```only_post```, check only the POST variables for the username and password parameters. Otherwise, query params and attributes are checked before.
- Use POST instead of post for correctness
This PR was merged into the master branch.
Commits
-------
aecc9b1 fixed tests when OpenSsl is not enabled in PHP, renamed a missnamed test, added missing license doc blocks
ca567b5 fixed CS
5cdf696 added a SecureRandomInterface
234f725 rename String to StringUtils
5849855 moved the secure random dep for remember me as a constructor argument
248703f renamed Prng to SecureRandom
c0c8972 simplified the Prng code
e5dc7af moved the secure random class from JMSSecurityExtraBundle to Symfony (closes#3595)
Discussion
----------
[2.2][Security] Add a PRNG (closes#3595)
As per #3595, I have moved the secure random class from JMSSecurityExtraBundle to Symfony.
It has more impact than I expected ;)
As you will see, the implementation has been refactored a bit. The most notable change is that Doctrine support has been moved to the bridge with the addition of a proper Doctrine seed provider (Doctrine is not a special case anymore).
The Doctrine configuration has been moved to the DoctrineBundle: doctrine/DoctrineBundle#91schmittjoh/JMSSecurityExtraBundle#65 removes the code that has been moved.
---------------------------------------------------------------------------
by Seldaek at 2012-07-05T13:26:01Z
I'm all for more security features, and both the String class & the Prng class for wrapping openssl make a lot of sense IMO, but I fail to see the use of the rest.
If we just want a seed to have a fallback in case openssl is missing, I'd rather have a secret in the config.yml than a million classes to store the same secret in the DB. Maybe I'm missing something though? /cc @schmittjoh
---------------------------------------------------------------------------
by schmittjoh at 2012-07-05T16:32:10Z
Having the configuration in different places (SecurityBundle & DoctrineBundle) feels a bit weird. I would prefer an approach similar to ACL, or the user provider/firewall section with factories. The latter being a bit more work to implement and the former potentially asking for complaints about too tight coupling to Doctrine.
Regarding testing, we probably need to move the disableOpenSsl method to the SecureRandom class in order to allow OpenSSL to be disabled for testing and we also need to change the byte generation algorithm to produce the same output for the same starting seed. I agree that it does not make sense to introduce an interface for SecureRandom as only the seed providers should be replaced.
As for the seed itself, it is constantly updated and does not stay the same as in the beginning. Thus, we need a provider that we can write to, and not only read from. I'm also not sure about using OpenSSL on Windows as I have read enough resources which claimed that the entropy on Windows is not always good (including OpenSSL docs). Always using the custom seed provider at least always ensured proper entropy even if OpenSSL's speed issues have been fixed in newer PHP versions.
---------------------------------------------------------------------------
by stof at 2012-07-05T16:44:24Z
@schmittjoh everything is in SecurityBundle now as it does not use a database anymore
---------------------------------------------------------------------------
by stof at 2012-07-05T16:44:59Z
and there is no seed provider anymore either
---------------------------------------------------------------------------
by schmittjoh at 2012-07-05T16:53:39Z
Not having a seed provider is not such a good idea, but having a file-based seed provider is.
---------------------------------------------------------------------------
by Seldaek at 2012-07-05T17:01:18Z
@schmittjoh why would you need to replace the seed provider? Don't you think that people serious about security to the point that they would want a stronger seed provider would enable openssl instead?
---------------------------------------------------------------------------
by stof at 2012-07-05T17:06:50Z
Well, what I meant is that there is no interchangeable provider anymore. The Prng class uses the file directly.
And btw, I think the Prng class should be mockable for tests, so it should either have an interface or not be final (I vote for adding an interface)
---------------------------------------------------------------------------
by jalliot at 2012-07-09T18:46:12Z
@fabpot @schmittjoh What about using more fallbacks for `openssl_random_pseudo_bytes` like in @Seldaek's post ["Unpredictable hashes for humans"](http://seld.be/notes/unpredictable-hashes-for-humans)?
Trying `mcrypt_create_iv` first might also be faster.
---------------------------------------------------------------------------
by Seldaek at 2012-07-10T08:52:46Z
@jalliot I think mcrypt should be after if you make it use /dev/urandom, not 100% sure but openssl is probably higher quality than urandom.
---------------------------------------------------------------------------
by schmittjoh at 2012-07-10T09:12:07Z
The fallback algorithm that I added should be enough (it passes the
statistical randomness tests).
On Tue, Jul 10, 2012 at 10:52 AM, Jordi Boggiano <
reply@reply.github.com
> wrote:
> @jalliot I think mcrypt should be after if you make it use /dev/urandom,
> not 100% sure but openssl is probably higher quality than urandom.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/4763#issuecomment-6870145
>
---------------------------------------------------------------------------
by stof at 2012-10-13T17:20:06Z
@fabpot please send a PR to the doc so that this can be merged 😃
---------------------------------------------------------------------------
by stof at 2012-10-13T17:22:08Z
hmm, actually, some comments have not been taken into account yet so it is not ready to be merged
---------------------------------------------------------------------------
by stof at 2012-10-27T07:14:43Z
you forgot the SecureRandom file
---------------------------------------------------------------------------
by fabpot at 2012-10-27T08:49:54Z
I think I've addressed all the comments. If everyone agree with the current implementation, I'm going to start updating the documentation.
---------------------------------------------------------------------------
by fabpot at 2012-10-27T10:51:15Z
I've fixed the remaining CS issues.
---------------------------------------------------------------------------
by fabpot at 2012-10-28T07:00:31Z
Documentation is here: symfony/symfony-docs#1858
This PR was squashed before being merged into the master branch (closes#5847).
Commits
-------
00d2823 Improve comments in ProfilerController
Discussion
----------
Improve comments in ProfilerController
---------------------------------------------------------------------------
by raziel057 at 2012-10-27T21:55:17Z
It's fixed.
This PR was squashed before being merged into the master branch (closes#5032).
Commits
-------
afba15f [2.2] Translatable field type for Propel i18n columns
Discussion
----------
[2.2] Translatable field type for Propel i18n columns
A field type which allows to automatically generate the correct fields for propels i18n behavior.
Usage example:
$builder->add('pageI18ns', 'translatable_collection', array(
'i18n_class' => '\foo\barBundle\Model\PageI18n',
'languages' => array('de', 'fr'),
'label' => 'Translations',
'columns' => array(
'title' => array(
'label' => 'Custom title',
),
'description' => array(
'type' => 'textarea'
)
)
));
With this configuration the field automatically generates the correct fields for the title and description column for the given languages.
---------------------------------------------------------------------------
by stof at 2012-07-24T14:37:27Z
tests are also missing
---------------------------------------------------------------------------
by kufi at 2012-07-27T08:50:05Z
Ok. Moved the Listeners into own classes. Changed the names of the types. Fixed the TranslationCollectionType which now is a Subclass of AbstractType and has the parent collection.
Edit:
The syntax changed slighty for the form:
$builder->add('pageI18ns', new \Symfony\Bridge\Propel1\Form\Type\TranslationCollectionType(), array(
'languages' => array('de', 'fr', 'en'),
'label' => 'Translations',
'options' => array(
'data_class' => 'foo\bar\Modell\PageI18n',
'columns' => array(
'title' => array(
'label' => 'Custom title',
),
'description' => array(
'type' => 'textarea'
)
)
)
));
---------------------------------------------------------------------------
by stof at 2012-07-27T08:55:07Z
tests are still missing, and you have some CS issue (which can probably all be fixed by running the [PHP-CS-Fixer](http://cs.sensiolabs.org/) on your classes)
---------------------------------------------------------------------------
by sindro88 at 2012-08-13T13:27:46Z
I followed step by step the implementation but the form type return an error "Could not load type propel1_translation".
---------------------------------------------------------------------------
by kufi at 2012-08-14T06:21:40Z
Could you try again. The problem was that the type propel1_translation_collection relied on a registered form type propel1_translation. I removed this one and replaced it with the actual form class.
---------------------------------------------------------------------------
by sindro88 at 2012-08-14T06:35:33Z
I replaced with the class and now it work, thank you so much!
---------------------------------------------------------------------------
by fabpot at 2012-09-18T16:53:21Z
ping @willdurand
---------------------------------------------------------------------------
by stof at 2012-10-13T17:56:16Z
@willdurand ping
---------------------------------------------------------------------------
by willdurand at 2012-10-23T12:03:22Z
There are a few comments by @stloyd to fix, but I'm 👍 on this PR.
---------------------------------------------------------------------------
by fabpot at 2012-10-23T13:18:59Z
@kufi Can you add a note in the CHANGELOG of the Propel bridge before I merge this PR? Thanks.
---------------------------------------------------------------------------
by kufi at 2012-10-23T13:32:31Z
@fabpot Sure. Does this belong to Version 2.1.0 or the upcoming 2.2.0?
---------------------------------------------------------------------------
by fabpot at 2012-10-23T13:59:04Z
2.2