Commit Graph

22346 Commits

Author SHA1 Message Date
Diego Saint Esteben
7c4f921664 Remove deprecated code 2015-08-05 00:10:41 -03:00
Michaël Perrin
f5ca270e75 [Console] Handle false return value from readline
"readline()" returns "false" when the user presses CTRL+D.
2015-08-04 17:59:05 +02:00
Fabien Potencier
0064d9ebf4 bug #15445 do not remove space between attributes (greg0ire)
This PR was merged into the 2.3 branch.

Discussion
----------

do not remove space between attributes

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

This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.

Commits
-------

8d2b888 do not remove space between attributes
2015-08-04 14:17:43 +02:00
Nicolas Grekas
af0b8eb26c [Debug] Enhance DebugClassLoader performance on MacOSX 2015-08-04 12:48:55 +02:00
Grégoire Paris
8d2b8881f5 do not remove space between attributes
This piece of code adds a space then removes it immediately. One could think that only the space after the last element of the loop is removed, but this is not the case. Space between loop elements are also removed.
2015-08-04 12:17:13 +02:00
Christophe Coevoet
328ec0133e bug #15263 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() (axiac)
This PR was squashed before being merged into the 2.3 branch (closes #15263).

Discussion
----------

[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()

| Q             | A
| ------------- | ---
| Fixed tickets | #15262
| License       | MIT

'proxy-revalidate' is not a header on its own but a 'Cache-Control' directive
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

Commits
-------

6c22f0a [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
2015-08-03 19:22:19 +02:00
Valentin VALCIU
6c22f0af24 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() 2015-08-03 19:22:14 +02:00
Fabien Potencier
64d050769b feature #15433 Allow to define Enum nodes with 1 single element (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15433).

Discussion
----------

Allow to define Enum nodes with 1 single element

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

Commits
-------

68f0818 Allow to define Enum nodes with 1 single element
2015-08-03 10:27:56 +02:00
Javier Eguiluz
68f0818a6c Allow to define Enum nodes with 1 single element 2015-08-03 10:27:53 +02:00
Nicolas Grekas
6888c1f256 Merge branch '2.7' into 2.8
* 2.7:
  [Locale] Fix Intl requirement
  Better Iban Validation

Conflicts:
	src/Symfony/Component/Locale/composer.json
	src/Symfony/Component/Validator/Constraints/Iban.php
2015-08-02 10:31:38 +02:00
Nicolas Grekas
eb08baa9fc Fix "[Form] Add flexibility for EntityType"
This fixes commit e0a1294a44.
2015-08-02 10:01:14 +02:00
Tobias Schultze
a5a9385dbb minor #15429 Remove the duplicated rendering of deprecation messages in the profiler (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove the duplicated rendering of deprecation messages in the profiler

| 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

The issue was already fixed in the 2.7 branch in https://github.com/symfony/symfony/pull/14990 but the fix was lost in 2.8 because of a wrong conflict resolution when merging branches.

Commits
-------

4fefd3d Remove the duplicated rendering of deprecation messages in the profiler
2015-08-01 23:22:00 -05:00
Tobias Schultze
e5909bea2c bug #15425 [Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader (wdalmut, stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader

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

This takes the test submitted in #13690 and implements the fix for this bug

Commits
-------

73c5eff Fix the retrieval of the default value for variadic arguments
9b7d4c7 Annotated routes with a variadic parameter
2015-08-01 23:19:31 -05:00
Christophe Coevoet
4fefd3d1e7 Remove the duplicated rendering of deprecation messages in the profiler 2015-08-02 01:52:06 +02:00
Christophe Coevoet
704760b276 Add support for variadic arguments in the GetSetNormalizer 2015-08-01 21:55:55 +02:00
Christophe Coevoet
73c5eff44d Fix the retrieval of the default value for variadic arguments 2015-08-01 21:33:42 +02:00
Walter Dal Mut
9b7d4c7613 Annotated routes with a variadic parameter
There are no variadic default values and that generate a fatal error.
2015-08-01 21:19:19 +02:00
Nicolas Grekas
e23eb56ffe [Locale] Fix Intl requirement 2015-08-01 18:50:08 +02:00
Fabien Potencier
69171d48ea bug #15074 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? (nuncanada)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15074).

Discussion
----------

Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?

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

Commits
-------

c314659 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
2015-08-01 16:15:14 +02:00
nuncanada
c3146592d9 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? 2015-08-01 16:15:13 +02:00
Fabien Potencier
041c489548 minor #15080 Update EngineInterface.php (johnnypeck)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15080).

Discussion
----------

Update EngineInterface.php

Grammer in doc comment.

Commits
-------

d60b2bb Update EngineInterface.php
2015-08-01 16:10:55 +02:00
Johnny Peck
d60b2bba60 Update EngineInterface.php
Grammer in doc comment.
2015-08-01 16:10:55 +02:00
Fabien Potencier
a4100f95e7 bug #13828 [Validator] Improve Iban Validation (afurculita)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Improve Iban Validation

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

This PR adds 2 more checks for better IBAN validation: the validation of the country code (represented by the first 2 letters) and the format validation according to the country format regex based on http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf.

Commits
-------

07b38de Better Iban Validation
2015-08-01 14:02:04 +02:00
Fabien Potencier
317d30b6ef feature #13990 [Form] Add flexibility for EntityType (raziel057)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #13990).

Discussion
----------

[Form] Add flexibility for EntityType

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

Sometimes it can be usefull to return null rather than a QueryBuilder from the closure attached to the ``query_builder`` attribute of an EntityType.

For example, if I have the following method in a "DelegateRepository", which can return a QueryBuilder or null:

```php
public function getQbForOfficers()
{
    $permanentMeeting = $this->getEntityManager()->getRepository('MyBundle:PermanentMeeting')->findOneBy(array());

    if ($permanentMeeting === null || $permanentMeeting->getMeeting() === null) {
        return null;
    }

    $qb = $this->getEntityManager()->createQueryBuilder();
    $qb->select('p')
        ->from('MyBundle:Delegate', 'p')
        ->andWhere('p.meeting = :meetingId')
        ->setParameter('meetingId', $permanentMeeting->getMeeting()->getId());

    return $qb;
}
```

To be able to present a list without entries when creating an entity field like this:

```php
$event->getForm()->add('officers', 'entity', array(
	'class' => 'MyBundle:Delegate',
	'property' => 'fullName',
	'query_builder' => function(EntityRepository $er) use ($meeting, $delegationId) {
	    return $er->getQbForOfficers();
	}
)));
```

Rather than using the "choices" attributes (more verbose and which requires the injection of the entityManager):

```php
$qb = $this->entityManager->getRepository('PTCNoventoBundle:Delegate')->getQbForOfficers();

$officers = ($qb !== null) ? $qb->getQuery()->getResult() : array();

$event->getForm()->add('officers', 'entity', array(
	'class' => 'PTCNoventoBundle:Delegate',
	'property' => 'fullName',
	'choices' => $officers,
));
```

Commits
-------

e0a1294 [Form] Add flexibility for EntityType
2015-08-01 14:00:55 +02:00
Thomas Lallement
e0a1294a44 [Form] Add flexibility for EntityType 2015-08-01 14:00:54 +02:00
Fabien Potencier
c856a010a2 feature #15382 [Console] Use readline for user input when available #DX (michaelperrin)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Use readline for user input when available #DX

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

Given I am entering data in an user input
When I use left and right keys to make some changes in what I have typed
Then the cursor should move accordingly instead of adding characters at the end of the line

To make it simple: using the arrow keys (←  →)  to make changes to what I already typed would be much handier than getting `^[[D` and `^[[C` characters in the terminal and having to delete all chars to type everything again.

I could not add any extra tests to this as the STDIN can't be used during tests. But they are not breaking and I tried again all types of questions (text, choices, hidden) by myself.

Note that `readline` can't be used for hidden questions, as `stty -echo` is not taken into account.

Commits
-------

0534899 [Console] Fix Symfony coding standards violations
8b63d62 [Console] Use readline for user input when available
2015-08-01 13:59:20 +02:00
Nicolas Grekas
9fea451295 Fix typo 2015-08-01 12:36:55 +02:00
Nicolas Grekas
ac9998f0c6 Merge branch '2.8'
* 2.8:
  [Locale] Add missing @group legacy annotations
  [Form] Add missing @group legacy annotations
  [Form] Use FQCN form types
  Fix security-acl deps
  Fix typo
  [Security] Removed security-acl from the core
  fixed typos
  Fix doctrine mapping validation type error
  Remove skipping of tests based on ICU data version whenever possible
  Fix the handling of null as locale in the stub intl classes
  do not dump leading backslashes in class names
  fix issue #15377
  Skip ::class constant
  [Config] type specific check for emptiness
  [Form] Deprecated FormTypeInterface::getName() and passing of type instances

Conflicts:
	UPGRADE-2.8.md
	composer.json
	src/Symfony/Bridge/Doctrine/composer.json
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/SecurityBundle/composer.json
	src/Symfony/Component/ClassLoader/ClassMapGenerator.php
	src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
	src/Symfony/Component/Form/Tests/AbstractExtensionTest.php
	src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
	src/Symfony/Component/Form/Tests/SimpleFormTest.php
	src/Symfony/Component/Locale/Tests/LocaleTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
	src/Symfony/Component/Security/Acl/README.md
	src/Symfony/Component/Security/Acl/composer.json
2015-08-01 12:05:47 +02:00
Nicolas Grekas
5b29f90a1a Fix typo 2015-08-01 11:55:24 +02:00
Michaël Perrin
05348991c2 [Console] Fix Symfony coding standards violations 2015-08-01 11:47:02 +02:00
Michaël Perrin
8b63d6209d [Console] Use readline for user input when available
This allows to use arrow keys in the terminal instead of having weird characters
2015-08-01 11:46:56 +02:00
Nicolas Grekas
48aa3e1453 Merge branch '2.7' into 2.8
* 2.7:
  [Locale] Add missing @group legacy annotations
  Fix security-acl deps
  Fix doctrine mapping validation type error
  Remove skipping of tests based on ICU data version whenever possible
  Fix the handling of null as locale in the stub intl classes
  do not dump leading backslashes in class names
  fix issue #15377
  Skip ::class constant
  [Config] type specific check for emptiness

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/SecurityBundle/composer.json
	src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
2015-08-01 11:43:59 +02:00
Nicolas Grekas
07fb308225 [Locale] Add missing @group legacy annotations 2015-08-01 11:35:48 +02:00
Nicolas Grekas
9fdf314cfa [Form] Add missing @group legacy annotations 2015-08-01 11:27:02 +02:00
Nicolas Grekas
2abdd50414 [Form] Use FQCN form types 2015-08-01 11:22:02 +02:00
Alexandru Furculita
07b38dea1f Better Iban Validation
Added more country-based tests, added new error type

The error type `NOT_SUPPORTED_COUNTRY_CODE_ERROR` has been added for the
IBANs from unsupported countries, for which we don't have defined a
format. We will not check anymore if a country code against the Intl
component.
The tests have been completed with more tests for each contry we have
formats defined.

The  4 character length check and the case check has been removed. The message code constants

`TOO_SHORT_ERROR` and `INVALID_CASE_ERROR` has been deprecated
2015-08-01 12:20:04 +03:00
Nicolas Grekas
3d7d378cbc Merge branch '2.3' into 2.7
* 2.3:
  Fix security-acl deps
  Fix doctrine mapping validation type error
  Remove skipping of tests based on ICU data version whenever possible
  Fix the handling of null as locale in the stub intl classes
  do not dump leading backslashes in class names
  Skip ::class constant
  [Config] type specific check for emptiness

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/SecurityBundle/composer.json
	src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
	src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
	src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
	src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php
	src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
	src/Symfony/Component/Locale/Tests/LocaleTest.php
	src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
2015-08-01 11:05:17 +02:00
Nicolas Grekas
1270e72560 Fix security-acl deps 2015-08-01 10:11:30 +02:00
Fabien Potencier
2966cd2b89 minor #15412 Remove skipping of tests based on ICU data version whenever possible (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Remove skipping of tests based on ICU data version whenever possible

| 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

Many tests being skipped based on the ICU data version don't actually need it. They might be testing code paths not relying on Intl, or not performing assertions on the values depending on the ICU data and so not dependant on the exact ICU version being used.

this is somewhat related to https://github.com/symfony/symfony/issues/14259 as it allows to reduce the number of tests not running on Travis.

Commits
-------

7994513 Remove skipping of tests based on ICU data version whenever possible
2015-08-01 09:51:56 +02:00
Fabien Potencier
c73e0a333e feature #15422 [Debug] Remove deprecated ExceptionHandler::createResponse (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Debug] Remove deprecated ExceptionHandler::createResponse

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

Commits
-------

df4e983 [Debug] Remove deprecated ExceptionHandler::createResponse
2015-08-01 09:48:46 +02:00
Fabien Potencier
c309289e90 minor #15423 Remove code for PHP <5.5.9 (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

Remove code for PHP <5.5.9

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

Commits
-------

8797711 Remove code for PHP <5.5.9
2015-08-01 09:47:46 +02:00
Fabien Potencier
f1fa4238b7 bug #15380 do not dump leading backslashes in class names (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

do not dump leading backslashes in class names

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

Commits
-------

ad6cb10 do not dump leading backslashes in class names
2015-08-01 09:45:23 +02:00
Nicolas Grekas
df4e983e40 [Debug] Remove deprecated ExceptionHandler::createResponse 2015-08-01 09:41:30 +02:00
Fabien Potencier
3b6d2a3fa3 bug #15376 [ClassMapGenerator] Skip ::class constant (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassMapGenerator] Skip ::class constant

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

Commits
-------

a336f0e Skip ::class constant
2015-08-01 09:35:45 +02:00
Nicolas Grekas
879771170e Remove code for PHP <5.5.9 2015-08-01 09:26:17 +02:00
Nicolas Grekas
3d12946d0d Fix typo 2015-08-01 09:19:20 +02:00
Fabien Potencier
bffca95112 feature #15013 [Security] Removed security-acl from the core (iltar)
This PR was squashed before being merged into the 2.8 branch (closes #15013).

Discussion
----------

[Security] Removed security-acl from the core

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

The `Security\Acl` is removed from the core and is loaded from its own repository. All tests were passing and this is fully backwards compatible. I have removed all but the Test files in the first step and added the dependency to verify the Test were still working with the package dependency. The second step was to remove the remaining test files and tests are still running for both the Bundle and the Framework. Once the Read-Only repository is a full standalone repository, this PR can be merged.

- [x] Remove component from the core
- [ ] Remove read-only from https://github.com/symfony/security-acl

Once this PR is merged, I can start working on splitting the SecurityBundle and extracting the ACL part to the AclBundle.

/cc @fabpot

Commits
-------

b26a449 [Security] Removed security-acl from the core
2015-08-01 09:18:32 +02:00
Iltar van der Berg
b26a449d46 [Security] Removed security-acl from the core 2015-08-01 09:17:24 +02:00
Fabien Potencier
4c649dcb26 bug #15389 [securityBundle] Compare roles strictly when computing inherited roles (bokonet)
This PR was merged into the 2.7 branch.

Discussion
----------

[securityBundle] Compare roles strictly when computing inherited roles

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

Commits
-------

5179acc fix issue #15377
2015-08-01 08:58:26 +02:00
Nicolas Grekas
dda085e8c4 Merge branch '2.8'
* 2.8: (63 commits)
  [Debug] Deprecate ExceptionHandler::createResponse
  [Debug] cleanup ExceptionHandlerTest
  Reordered the toolbar elements via service priorities
  bumped Symfony version to 2.7.4
  Increased the z-index of .sf-toolbar-info
  Removed an unused media query
  updated VERSION for 2.7.3
  updated CHANGELOG for 2.7.3
  Redesigned "abbr" elements
  Restored the old behavior for toolbars with lots of elements
  Tweaks and bug fixes
  Added some upgrade notes about the new toolbar design
  fixed typo in translation keys
  Fix the return value on error for intl methods returning arrays
  Removed an useless CSS class and added styles for <hr>
  Added a new profiler_markup_version to improve BC of the new toolbar
  Fix merge
  Removed an unused import
  Reverted the feature to display different toolbar versions
  Minor JavaScript optimizations
  ...

Conflicts:
	CHANGELOG-2.7.md
	UPGRADE-2.8.md
	src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml
	src/Symfony/Component/Debug/composer.json
	src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
2015-08-01 08:48:35 +02:00