Commit Graph

35998 Commits

Author SHA1 Message Date
Boris Vujicic cb9c92d065 [Security] added userChecker to SimpleAuthenticationProvider 2018-03-19 21:02:10 +01:00
Nicolas Grekas bd49884804 bug #26569 [BrowserKit] Fix cookie path handling when $domain is null (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[BrowserKit] Fix cookie path handling when $domain is null

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The bug is highlighted by the new test: there is an inconsistency in the path handling regarding if a domain is set or not. If it is set, and the cookie is set to a subpath of the passed path, the cookie is returned. However if no domain is set, it is not. This PR fixes this bug.

Commits
-------

acc20fc [BrowserKit] Fix cookie path handling when $domain is null
2018-03-19 21:00:51 +01:00
Nicolas Grekas ee47236a4c [Debug] fix test 2018-03-19 19:37:04 +01:00
Nicolas Grekas cddfaabb16 minor #26602 Fix typo in test method name (kubk)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26602).

Discussion
----------

Fix typo in test method name

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT
| Doc PR        | no

Method test**Cach**WithInvalidCallback replaced with test**Cache**WithInvalidCallback

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

cc38c6b Fix typo in test method name
2018-03-19 19:30:35 +01:00
Egor Gorbachev cc38c6bb62 Fix typo in test method name 2018-03-19 19:30:35 +01:00
Nicolas Grekas 887cba28f4 minor #26297 [Config] Backport string|null api for node names (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

 [Config] Backport string|null api for node names

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

fe586ac [Config] Backport string|null api for node names
2018-03-19 18:44:39 +01:00
Nicolas Grekas 5e5216017a Merge branch '4.0'
* 4.0: (28 commits)
  [DI] Add tests for EnvVarProcessor
  typo
  [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners
  Make sure we always render errors. Eventhough labels are disabled
  Make sure form errors is valid HTML
  [HttpKernel] Allow generators in registerBundle
  [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
  Extra line to bootstrap 3 horizontal layout
  [Serializer] Remove const override
  Update Client.php
  [PhpUnitBridge] Ability to use different composer.json file
  [DomCrawler] FormField: remove an useless return statement
  [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
  Display the Welcome Page when there is no homepage defined
  [DI] Remove dead dumper check
  Make KernelInterface docblock more fit for bundle-less environment
  fix regression when extending the Container class without a constructor
  fix the updating of timestamp in the MemcachedSessionHandler
  [SecurityBundle] Make extra character non mandatory in regex
  [Config] Add characters to the regex
  ...
2018-03-19 18:34:12 +01:00
Nicolas Grekas 72041c8821 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  [DI] Add tests for EnvVarProcessor
  [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners
  Make sure we always render errors. Eventhough labels are disabled
  Make sure form errors is valid HTML
  [HttpKernel] Allow generators in registerBundle
  [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
  Extra line to bootstrap 3 horizontal layout
  [Serializer] Remove const override
  Update Client.php
  [PhpUnitBridge] Ability to use different composer.json file
  [DomCrawler] FormField: remove an useless return statement
  [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
  Display the Welcome Page when there is no homepage defined
  fix regression when extending the Container class without a constructor
  fix the updating of timestamp in the MemcachedSessionHandler
  [SecurityBundle] Make extra character non mandatory in regex
  [Config] Add characters to the regex
  bumped Symfony version to 3.4.7
  updated VERSION for 3.4.6
  updated CHANGELOG for 3.4.6
  ...
2018-03-19 18:30:36 +01:00
Nicolas Grekas 7ae529291f bug #26273 [Security][Profiler] Display the original expression in 'Access decision log' (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security][Profiler] Display the original expression in 'Access decision log'

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

---

before:

![screenshot at 2018-02-22 18-22-28](https://user-images.githubusercontent.com/408368/36553752-798001ba-17fd-11e8-9539-254a25a01e60.png)

after:

![after](https://user-images.githubusercontent.com/408368/36553856-b7449fe2-17fd-11e8-94cb-ddaf4f033511.png)

Commits
-------

8f16c2e [Security][Profiler] Display the original expression in 'Access decision log'
2018-03-19 18:03:08 +01:00
Nicolas Grekas 6059bdc80e feature #26308 [Config] Introduce BuilderAwareInterface (ro0NL)
This PR was squashed before being merged into the 4.1-dev branch (closes #26308).

Discussion
----------

[Config] Introduce BuilderAwareInterface

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Split `ParentNodeDefinitionInterface` into `BuilderAwareInterface`.

Use case is custom node definition  (extended from VariableNodeDef) with a corresponding prototyped array node.

To set the actual prototype i need the builder at definition level, provided by `ParentNodeDefinitionInterface`. However i don't implement `children()` + `append()`, i solely need the builder scope.

To go after #26297

Commits
-------

1353694 [Config] Introduce BuilderAwareInterface
2018-03-19 17:48:53 +01:00
Roland Franssen 1353694bfd [Config] Introduce BuilderAwareInterface 2018-03-19 17:48:47 +01:00
Nicolas Grekas ba2e6edb8a bug #26427 [DependencyInjection] fix regression when extending the Container class without a constructor (lsmith77)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix regression when extending the Container class without a constructor

| Q             | A
| ------------- | ---
| Branch?       | 3.4+
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26397
| License       | MIT
| Doc PR        | -

fix regression introduced in c026ec63e3 (diff-f7b23d463cba27ac5e4cb677f2be7623R985)

Commits
-------

0beb64a fix regression when extending the Container class without a constructor
2018-03-19 17:17:44 +01:00
Nicolas Grekas d818636019 minor #26542 [DI] Add tests for EnvVarProcessor (mcfedr)
This PR was squashed before being merged into the 3.4 branch (closes #26542).

Discussion
----------

[DI] Add tests for EnvVarProcessor

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

Add tests for the `EnvVarProcessor` as it doesn't have any at the moment.

Originally from this PR against master, https://github.com/symfony/symfony/pull/26498

Commits
-------

2992bb3 [DI] Add tests for EnvVarProcessor
2018-03-19 15:53:29 +01:00
Fred Cox 2992bb3fd3 [DI] Add tests for EnvVarProcessor 2018-03-19 15:53:26 +01:00
Nicolas Grekas 5d00aa3961 bug #26562 [Bridge\PhpUnit] Cannot autoload class "\Symfony\Bridge\PhpUnit\SymfonyTestsListener" (Jake Bishop)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge\PhpUnit] Cannot autoload class "\Symfony\Bridge\PhpUnit\SymfonyTestsListener"

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26430
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Allows composer to discover the class for autoloading when using `composer install --classmap-authoritative`

Commits
-------

6b6fdab [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners
2018-03-19 15:48:02 +01:00
Nicolas Grekas 0222fde005 bug #26598 Fixes #26563 (open_basedir restriction in effect) (temperatur)
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes #26598).

Discussion
----------

Fixes #26563 (open_basedir restriction in effect)

If the open_basedir is set is_file(PHP_BINARY) is false.

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

If we are using cli we already used the binary so there is no need to check if the file exists.

Commits
-------

7a04976 Fixes #26563 (open_basedir restriction in effect)
2018-03-19 15:39:18 +01:00
temperatur 7a049769bf Fixes #26563 (open_basedir restriction in effect)
If the open_basedir is set is_file(PHP_BINARY) is false.
2018-03-19 15:39:02 +01:00
Nicolas Grekas 609b56a3c3 minor #26578 [HttpKernel] Allow generators in registerBundle (ostrolucky)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Allow generators in registerBundle

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

Flex recipe [utilizes generator in Kernel.php](a067bebf03/symfony/framework-bundle/3.3/src/Kernel.php (L33)). This needs to be explicitly allowed in interface.

Commits
-------

f36cfd4 [HttpKernel] Allow generators in registerBundle
2018-03-19 14:14:15 +01:00
Nicolas Grekas 1e38f41f18 minor #26582 [Validator] Fix docblock of ClassMetadata#members (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix docblock of ClassMetadata#members

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

Structure of this array is in reality array<string, array<int, PropertyMetadata>>, so MemberMetadata is 2 levels deep in this array, instead of one

Commits
-------

44008c4 [Validator] Fix docblock of ClassMetadata#members
2018-03-19 14:13:22 +01:00
Nicolas Grekas 9446fa01c4 minor #26592 [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock (hacfi)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Use `a::b` notation in ControllerTrait docblock

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26085
| License       | MIT
| Doc PR        | already documented

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Replaced the deprecated the bundle notation with the new `a::b` notation in the docblock of `ControllerTrait::forward`

Commits
-------

973c5ec [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
2018-03-19 13:53:48 +01:00
Nicolas Grekas b79f29ed4f bug #26538 [Routing] remove capturing groups from requirements, they break the merged regex (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] remove capturing groups from requirements, they break the merged regex

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

Group positions are now used to extract variables. Capturing groups in requirements break them for now.

Commits
-------

8444022 [Routing] remove capturing groups from requirements, they break the merged regex
2018-03-19 13:48:11 +01:00
Nicolas Grekas 8444022426 [Routing] remove capturing groups from requirements, they break the merged regex 2018-03-19 13:47:01 +01:00
Nicolas Grekas 0f9246fcfe feature #26518 [Routing] Allow inline definition of requirements and defaults (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] Allow inline definition of requirements and defaults

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

```
{bar} -- no requirement, no default value
{bar<.*>} -- with requirement, no default value
{bar?default_value} -- no requirement, with default value
{bar<.*>?default_value} -- with requirement and default value
{bar?} -- no requirement, with default value of null
{bar<.*>?} -- with requirement and default value of null
```

Details:

* Requirements and default values are not escaped in any way. This is valid -> `@Route("/foo/{bar<>>?<>}")` (requirements = `>`  and default value = `<>`)
* Because of the lack of escaping, you can't use a closing brace (`}`) inside the default value (wrong -> `@Route("/foo/{bar<\d+>?aa}bb}")`) but you can use it inside requirements (correct -> `@Route("/foo/{bar<\d{3}>}")`).
* PHP constants are not supported (use the traditional `defaults` syntax for that)
* ...

Commits
-------

67559e1 [Routing] Allow inline definition of requirements and defaults
2018-03-19 13:12:13 +01:00
Nicolas Grekas f6066532ea typo 2018-03-19 13:09:45 +01:00
Nicolas Grekas 567cbaaa21 bug #26568 [Debug] Reset previous exception handler earlier to prevent infinite loop (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Reset previous exception handler earlier to prevent infinite loop

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

Commits
-------

f7e1bb0 [Debug] Reset previous exception handler ealier to prevent infinite loop
2018-03-19 13:01:48 +01:00
Nicolas Grekas e32c1da628 bug #26597 [Routing] Fix name-prefixing when using PHP DSL (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] Fix name-prefixing when using PHP DSL

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

Fixes bad implem merged in #25178

Commits
-------

0053eee [Routing] Fix name-prefixing when using PHP DSL
2018-03-19 12:54:18 +01:00
Nicolas Grekas 0053eeefcf [Routing] Fix name-prefixing when using PHP DSL 2018-03-19 12:40:52 +01:00
Nicolas Grekas f7e1bb05e2 [Debug] Reset previous exception handler ealier to prevent infinite loop 2018-03-19 11:28:44 +01:00
Nicolas Grekas 67559e1f97 [Routing] Allow inline definition of requirements and defaults 2018-03-19 10:05:56 +01:00
Jake Bishop 6b6fdab562 [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners 2018-03-19 09:37:57 +01:00
Nicolas Grekas b2fafc6a0f feature #26143 [Routing] Implement i18n routing (frankdejonge, nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing]  Implement i18n routing

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

This PR introduces support for I18N routing into core. This is a port from a bundle I've made recently, now merged into the default implementation. While it's ok to have this as a bundle, it was suggested by @nicolas-grekas to create a PR for this so it can be included into the core.

## New usages

### YAML

```yaml
contact:
    controller: ContactController::formAction
    path:
        en: /send-us-an-email
        nl: /stuur-ons-een-email
```

Will be effectively the same as declaring:

```yaml
contact.en:
    controller: ContactController::formAction
    path: /send-us-an-email
    defaults:
        _locale: en

contact.nl:
    controller: ContactController::formAction
    path: /stuur-ons-een-email
    defaults:
        _locale: nl
```

### Annotation usage:

```php
<?php

use Symfony\Component\Routing\Annotation\Route;

class ContactController
{
    /**
     * @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
     */
    public function formAction()
    {

    }
}

/**
 * @Route("/contact")
 */
class PrefixedContactController
{
    /**
     * @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
     */
    public function formAction()
    {

    }
}
```

### Route generation

```php
<?php
/** @var UrlGeneratorInterface $urlGenerator */
$urlWithCurrentLocale = $urlGenerator->generate('contact');
$urlWithSpecifiedLocale = $urlGenerator->generate('contact', ['_locale' => 'nl']);
```

Route generation is based on your request locale. When not available it falls back on a configured default. This way of route generation means you have a "route locale switcher" out of the box, but generate the current route with another locale for most cases.

## Advantages

Having i18n routes defined like this has some advantages:

* Less error prone.
* No need to keep `requirements` or `defaults` in sync with other definitions.
* No need to `{_locale}` in the path (bad for route matching performance).
* Better developer experience.

### Next steps

I've ported all the things the bundle supported, before moving on I'd like to discuss this first in order not to waste our collective time. This initial PR should give a clear enough picture to see what/how/why this is done.

If and when accepted I/we can move forward to implement the XML loader and @nicolas-grekas mentioned there should be a `Configurator` implemented for this as well. He opted to help with this (for which I'm very thankful).

- [x] Yaml Loader
- [x] Annotation Loader
- [x] XML Loader
- [x] PHP Loader?
- [ ] Documentation

Commits
-------

4ae66dc [Routing] Handle "_canonical_route"
e32c414 [Routing] Implement i18n routing
2018-03-19 09:25:11 +01:00
Fabien Potencier ae16d779f4 minor #26570 [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4 (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes
| Fixed tickets | #24616, #25659
| License       | MIT
| Doc PR        | -

This is a follow up for https://github.com/symfony/symfony/pull/26553 as it seems impossible to fix the BC break in a clean way for everyone.

ping @nicolas-grekas @Tobion

Commits
-------

47a3d7a084 [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
2018-03-18 20:26:55 +01:00
Fabien Potencier 6c81b6df3c bug #26590 Make sure form errors is valid HTML (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

Make sure form errors is valid HTML

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

Using `<div>` and `<ul>` in a `<label>` is not valid HTML. This PR uses `<span>`s instead and some Bootstrap 4 classes to make it look just like before.

Commits
-------

5dcaaadb5e Make sure form errors is valid HTML
2018-03-18 20:24:00 +01:00
Fabien Potencier 2fb2ed0220 bug #26567 [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore (fancyweb)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26543
| License       | MIT
| Doc PR        | -

Discussion and explanations in the linked issue https://github.com/symfony/symfony/issues/26543

Commits
-------

f656dc2082 [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
2018-03-18 20:21:19 +01:00
Fabien Potencier ceffe76a77 feature #26564 [HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false (fmata)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false

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

Commits
-------

4110d57da1 [HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false
2018-03-18 20:19:04 +01:00
Fabien Potencier 2c838f94b3 feature #26408 Readd 'form_label_errors' block to disable errors on form labels (birkof)
This PR was merged into the 3.4 branch.

Discussion
----------

Readd 'form_label_errors' block to disable errors on form labels

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| License       | MIT

Re-added **form_label_errors** block on bootstrap 4 form themes.
You can disable errors shown on form labels by simply extend bootstrap4 layout and empty **form_label_errors** block. See below:
```
{% use "bootstrap_4_layout.html.twig" %}

{# Disable errors shown on form labels #}
{% block form_label_errors %}{% endblock form_label_errors %}
```
Block previously removed [here](b375957c8b (diff-62cb2a10f5a37db0e87e3bd81609b17dR186)) by @nicolas-grekas.
cc @Nyholm

Commits
-------

5b4354f46c Readd 'form_label_errors' block to disable errors on form labels
2018-03-18 20:12:33 +01:00
Fabien Potencier c59bbc554f bug #26591 [TwigBridge] Make sure we always render errors. Eventhough labels are disabled (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Make sure we always render errors. Eventhough labels are disabled

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

If one use form type with `'label'=>false` then no errors where visible. This PR make sure we always print errors.

Commits
-------

d8f3de91d5 Make sure we always render errors. Eventhough labels are disabled
2018-03-18 20:01:56 +01:00
Philipp Wahala 973c5ec995 [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock 2018-03-18 18:57:30 +01:00
Fabien Potencier f638f42da7 minor #26580 Add hint in Github pull request template (fmata)
This PR was merged into the 2.7 branch.

Discussion
----------

Add hint in Github pull request template

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

I added a deprecation in the code base but I forgot to update the CHANGELOG.md file of the component although I double checked the pull request template of this case.

It's trivial but I think it can be a way to save some time for next distracted contributors :)

Commits
-------

986f9151fe add hint in Github pull request template
2018-03-18 17:05:31 +01:00
Florent Mata 986f9151fe add hint in Github pull request template 2018-03-18 17:01:38 +01:00
Nyholm d8f3de91d5 Make sure we always render errors. Eventhough labels are disabled 2018-03-18 15:50:20 +01:00
Nyholm 5dcaaadb5e Make sure form errors is valid HTML 2018-03-18 15:29:46 +01:00
Gabriel Ostrolucký 2b3c37a2d8 Make ProgressBar::setMaxSteps public
This is useful in cases when target of tracking
changes its size during progress advancement.
2018-03-18 12:42:09 +01:00
Gabriel Ostrolucký 44008c4047
[Validator] Fix docblock of ClassMetadata#members
Structure of this array is in reality <string, array<int, PropertyMetadata>>, so MemberMetadata is 2 levels deep in this array, instead of one
2018-03-17 23:42:44 +01:00
Fabien Potencier 0cfc00e717 feature #25456 [Console] Make pretty the `box` style table (maidmaid)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] Make pretty the `box` style table

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

The console component is the 2nd most popular Symfony component with 70M of downloads. I think such composant has to provide faultless tables, with perfect management of borders, especially since the new `box` style table has been merged (cf https://github.com/symfony/symfony/pull/25301).

![screenshot from 2017-12-12 18-47-34](https://user-images.githubusercontent.com/4578773/33876488-6e1dc81c-df71-11e7-924f-d5e8078d957f.png)

Commits
-------

41f52b3a09 Make pretty the `box` style table
2018-03-17 08:08:46 -07:00
Florent Mata 4110d57da1 [HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false 2018-03-17 16:02:11 +01:00
Gabriel Ostrolucký f36cfd4fc8
[HttpKernel] Allow generators in registerBundle 2018-03-17 13:20:09 +01:00
Dany Maillard 41f52b3a09 Make pretty the `box` style table 2018-03-17 18:56:16 +10:00
Kévin Dunglas acc20fc755
[BrowserKit] Fix cookie path handling when $domain is null 2018-03-16 19:29:50 +01:00
Fabien Potencier 1390529b0f minor #26566 [BrowserKit] Improves CookieJar::get (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[BrowserKit] Improves CookieJar::get

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      |no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

* change a call to `substr` + `strlen` to a single `strpos`

Commits
-------

57993143a9 [BrowserKit] Improves CookieJar::get
2018-03-16 11:26:57 -07:00