Commit Graph

23293 Commits

Author SHA1 Message Date
Nicolas Grekas
5075e6c976 [appveyor] Fix command line 2015-10-02 09:16:19 +02:00
Nicolas Grekas
2ff0f97c60 Merge branch '2.7' into 2.8
* 2.7:
  [appveyor] Fix command line
  [Yaml] Fix improper comments removal inside strings
2015-10-02 08:55:39 +02:00
Nicolas Grekas
9b0fa548c1 Merge branch '2.3' into 2.7
* 2.3:
  [appveyor] Fix command line
  [Yaml] Fix improper comments removal inside strings
2015-10-02 08:55:14 +02:00
Nicolas Grekas
17edafd7e3 minor #16061 [appveyor] Fix command line (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[appveyor] Fix command line

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

Discovery the joy of cmd programming...

Commits
-------

bdcbde9 [appveyor] Fix command line
2015-10-02 08:53:52 +02:00
Nicolas Grekas
bdcbde91b9 [appveyor] Fix command line 2015-10-02 08:28:33 +02:00
Fabien Potencier
150f52f3aa bug #15860 [Yaml] Fix improper comments removal (ogizanagi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Fix improper comments removal

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

This tries to fix #15857 .

Honestly, I don't have any idea of the regressions it might introduce. Tests are passing, so if this code had any reason to exist, tests covering it are certainly missing :/

Any hint ?

Commits
-------

0e24fc5 [Yaml] Fix improper comments removal inside strings
2015-10-01 23:11:01 +02:00
Fabien Potencier
aa7d4e63d7 feature #16020 [CssSelector] removed the deprecated CssSelector class (fabpot)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[CssSelector] removed the deprecated CssSelector 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        | n/a

Commits
-------

3ffa422 [CssSelector] removed the deprecated CssSelector class
2015-10-01 22:58:33 +02:00
Fabien Potencier
99745e12a7 feature #15742 Using a service as a router resource (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #15742).

Discussion
----------

Using a service as a router resource

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

Hi guys!

This adds the ability to use a service as a routing resource. In other words, instead of loading `routing.yml`, you could load `my_route_loader`, and then a method would be called on your service to return a RouteCollection.

Specifically, I'm interested in this because it would allow a user to point their main router resource to the kernel itself, making it possible to load routes inside the kernel (making a single-file full-stack app more possible).

Thanks!

Commits
-------

79e210f Using a service as a router resource
2015-10-01 22:34:27 +02:00
Ryan Weaver
79e210f86c Using a service as a router resource 2015-10-01 22:34:24 +02:00
Fabien Potencier
54e3d71c03 feature #15778 Fluid interface for building routes in PHP (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #15778).

Discussion
----------

Fluid interface for building routes in PHP

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

This - along with #15742 - attempts to making adding routes in PHP (via an actual class+method) not only possible, but also useful.

The two classes - `Route` and `RouteCollectionBuilder` are based off of Silex's `Controller` and `ControllerCollection`. The `RouteCollectionBuilder` is basically a `RouteCollection` that's able to import other resources. Here are the goals:

A) Import routes easily

```php
$routes->import('routing.yml');
```

B) Fluid addition of routes into the collection

```php
$routes->add('/admin', 'AppBundle:Admin:index', 'admin_index')
    ->setMethods(['GET']);
```

C) Ability to create routes with auto-generating names

D) Ability to add a "sub-collection" (kind of like an import, without pointing to another file). Included is the ability to set the controller class:

```php
$blogRoutes = $routes->createBuilder('/blog')
   ->setControllerClass('AppBundle\Controller\BlogController');
$blogRoutes->add('/', 'indexAction');
$blogRoutes->add('/{id}', 'editAction');
$routes->addBuilder($blogRoutes);
```

E) The collection options can be set before or after the routes. With `RouteCollection`, if you set something - e.g. a prefix or a default - and THEN add more routes, those options are not passed to those routes. This is by design, but not ideal for building routes (e.g. in the previous code example, the controllerClass would not be applied using the opposite logic, since it's set before adding the routes).

Thanks!

Commits
-------

15ba2e8 Fluid interface for building routes in PHP
2015-10-01 22:32:51 +02:00
Ryan Weaver
15ba2e87a4 Fluid interface for building routes in PHP 2015-10-01 22:32:48 +02:00
Fabien Potencier
905245ff06 bug #16046 [WIP][3.0][Form] Removed usage of deprecated form tag attributes (WouterJ)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[WIP][3.0][Form] Removed usage of deprecated form tag attributes

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

WIP because it needs some adjustments after https://github.com/symfony/symfony/pull/15926 is merged

Commits
-------

215fdbe Removed alias attribute usages
2015-10-01 22:29:56 +02:00
Fabien Potencier
238419fb5f minor #15983 Updated the styles of the container commands (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15983).

Discussion
----------

Updated the styles of the container commands

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

This PR uses comment() which hasn't been merged yet. WIP PR at #15964

This command defines a lot of options, so I don't know if I've updated all the possible outputs:

![container_params](https://cloud.githubusercontent.com/assets/73419/10148240/a4265ed4-6632-11e5-97c6-56d9d5fc496b.png)

![container_tags](https://cloud.githubusercontent.com/assets/73419/10148244/a68f392a-6632-11e5-925d-60eec7d659af.png)

![container_one_service](https://cloud.githubusercontent.com/assets/73419/10148224/8708c7b0-6632-11e5-9a4e-efd3c8206bc1.png)

![container_select_service](https://cloud.githubusercontent.com/assets/73419/10148225/88e88d9a-6632-11e5-969a-57a1f6efc17f.png)

![container_one_parameter](https://cloud.githubusercontent.com/assets/73419/10148227/8c92d342-6632-11e5-9d95-53bb71b6f67d.png)

![container_tagged_services](https://cloud.githubusercontent.com/assets/73419/10148229/9070a002-6632-11e5-8af9-e1d0579d539e.png)

Commits
-------

d209a4e Updated the styles of the container commands
2015-10-01 21:15:02 +02:00
Javier Eguiluz
d209a4ebac Updated the styles of the container commands 2015-10-01 21:14:59 +02:00
Fabien Potencier
ffddafc99f feature #15196 [HttpKernel] make RequestStack parameter required (Tobion)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[HttpKernel] make RequestStack parameter required

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

Continuation of #14634, #8904

Commits
-------

a2e154d [HttpKernel] make RequestStack parameter required for classes that need it
2015-10-01 21:13:32 +02:00
Fabien Potencier
02b99dbed4 minor #16052 [CssSelector] synchronize tests for static and non-static API (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[CssSelector] synchronize tests for static and non-static API

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

Synchronizing the classes ensures that no tests are lost when the legacy
API is removed in #16020 for Symfony 3.0, thus mitigating the risk of
future regressions.

Commits
-------

2b29a40 synchronize tests for static and non-static API
2015-10-01 21:11:23 +02:00
WouterJ
215fdbe18d Removed alias attribute usages 2015-10-01 21:10:13 +02:00
Tobias Schultze
aff5af6ab4 fix wrong merge 2015-10-01 20:22:56 +02:00
Tobias Schultze
311029b9a2 fix tests after twig commands style changes 2015-10-01 20:15:01 +02:00
Christian Flothmann
2b29a405be synchronize tests for static and non-static API
Synchronizing the classes ensures that no tests are lost when the legacy
API is removed in #16020 for Symfony 3.0, thus mitigating the risk of
future regressions.
2015-10-01 19:39:35 +02:00
Fabien Potencier
09ff9f851d bug #16051 [DomCrawler] fix deprecation triggers (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] fix deprecation triggers

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

On HHVM, the SplObjectStorage class performs calls to its method
internally. These method calls must not lead to triggered deprecation
notices.

Commits
-------

aca6bd9 [DomCrawler] fix deprecation triggers
2015-10-01 19:38:01 +02:00
Tobias Schultze
a2e154db30 [HttpKernel] make RequestStack parameter required for classes that need it 2015-10-01 19:33:52 +02:00
Christian Flothmann
40e0dc8084 use PHP_OS instead of php_uname('s')
The php_uname() function may be disabled for security reasons.
2015-10-01 19:06:54 +02:00
Tobias Schultze
721a267cb0 Merge branch '2.8'
Conflicts:
	UPGRADE-2.8.md
	src/Symfony/Bridge/Twig/Command/LintCommand.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml
	src/Symfony/Bundle/FrameworkBundle/Resources/config/form_debug.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.xml
	src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php
	src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php
	src/Symfony/Component/Routing/Loader/YamlFileLoader.php
2015-10-01 18:50:30 +02:00
Christian Flothmann
aca6bd9bd6 [DomCrawler] fix deprecation triggers
The SplObjectStorage class performs calls to its own methods. These
method calls must not lead to triggered deprecation notices.
2015-10-01 18:34:33 +02:00
Tobias Schultze
9f17026ba9 fix cs 2015-10-01 17:38:05 +02:00
Tobias Schultze
e7325b721e minor #15926 [2.8][Form] Deprecate alias tag option (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #15926).

Discussion
----------

[2.8][Form] Deprecate alias tag option

FQCN should be used since 2.8 instead, so a deprecation error should be triggered when the `alias` setting is used.

Furthermore, the name of the option doesn't make much sense for form types (as it's the alias of the field it applies to), so I renamed it to `extended_type`. I'm open to any other suggestions.

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

Commits
-------

e3aa522 [2.8][Form] Deprecate alias tag option
2015-10-01 17:36:34 +02:00
WouterJ
e3aa5226e4 [2.8][Form] Deprecate alias tag option 2015-10-01 17:36:27 +02:00
Tobias Schultze
c434bbd5f3 Merge branch '2.7' into 2.8 2015-10-01 17:32:55 +02:00
Tobias Schultze
4b0e4c4ee0 Merge branch '2.3' into 2.7
Conflicts:
	src/Symfony/Bundle/TwigBundle/Tests/Controller/ExceptionControllerTest.php
2015-10-01 17:31:29 +02:00
Fabien Potencier
1309cfbe9d minor #15989 Updated the styles of the Twig commands (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15989).

Discussion
----------

Updated the styles of the Twig commands

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

![twig_1](https://cloud.githubusercontent.com/assets/73419/10158152/5d1668d2-6690-11e5-9399-8a9a89b4e919.png)

![twig_2](https://cloud.githubusercontent.com/assets/73419/10158156/60dbd470-6690-11e5-9a4e-1e702c961fa6.png)

![twig_3](https://cloud.githubusercontent.com/assets/73419/10158160/66030dba-6690-11e5-890f-09dd9579aa9a.png)

![twig_4](https://cloud.githubusercontent.com/assets/73419/10158172/71ed2ffc-6690-11e5-8c5c-8190c5e6c235.png)

Commits
-------

fdeccd5 Updated the styles of the Twig commands
2015-10-01 17:07:36 +02:00
Javier Eguiluz
fdeccd5849 Updated the styles of the Twig commands 2015-10-01 17:07:33 +02:00
Fabien Potencier
74af02a771 bug #16050 [TwigBundle] fix useless and failing test (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] fix useless and failing test

| 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

This test is failing in php 7, see https://travis-ci.org/symfony/symfony/jobs/83107755#L2015
But it also doesn't test anything. So it's useless in it's current form.

In 2.7 we have more tests that are actually useful. So the class is not untested.

Commits
-------

d94dd16 [TwigBundle] fix useless and failing test
2015-10-01 17:03:00 +02:00
Fabien Potencier
48d11693b5 feature #16024 [Validator] removed deprecated features in Validator and Form (fabpot)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Validator] removed deprecated features in Validator and Form

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

33f3400 [Form] removed deprecated features
582f3a3 [Form] removed deprecated FormType::getName()
bfba6ca [Form] removed precision option
17cedd3 [Form] removed usage of Validator deprecated features
8fd32ba [Validator] remove the API_VERSION
2a6b629 [Validator] removed deprecated methods
925ecaf [Validator] removed deprecated features in Constraints
2015-10-01 17:00:24 +02:00
Tobias Schultze
d94dd1679a [TwigBundle] fix useless and failing test 2015-10-01 16:53:49 +02:00
Fabien Potencier
33f3400a81 [Form] removed deprecated features 2015-10-01 16:20:48 +02:00
Fabien Potencier
582f3a39b7 [Form] removed deprecated FormType::getName() 2015-10-01 16:20:48 +02:00
Fabien Potencier
bfba6caebf [Form] removed precision option 2015-10-01 16:20:48 +02:00
Fabien Potencier
17cedd3435 [Form] removed usage of Validator deprecated features 2015-10-01 16:20:47 +02:00
Fabien Potencier
8fd32ba9fe [Validator] remove the API_VERSION 2015-10-01 16:20:47 +02:00
Fabien Potencier
2a6b629e39 [Validator] removed deprecated methods 2015-10-01 16:20:47 +02:00
Fabien Potencier
925ecafba8 [Validator] removed deprecated features in Constraints 2015-10-01 16:20:47 +02:00
Fabien Potencier
7bab31701c feature #15900 [3.0][DoctrineBridge] Removed deprecated features (WouterJ)
This PR was squashed before being merged into the 3.0-dev branch (closes #15900).

Discussion
----------

[3.0][DoctrineBridge] Removed deprecated features

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

Commits
-------

6dc3cf9 [3.0][DoctrineBridge] Removed deprecated features
2015-10-01 16:19:52 +02:00
WouterJ
6dc3cf9200 [3.0][DoctrineBridge] Removed deprecated features 2015-10-01 16:19:50 +02:00
Fabien Potencier
56fa973514 minor #15980 Updated the styles of the config parameters (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15980).

Discussion
----------

Updated the styles of the config parameters

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

This PR uses comment() which hasn't been merged yet. WIP PR at #15964

**I have a question**: is it mandatory that the output of this command is a valid YAML or XML file? If not, we can keep the changes in the title of the command. Otherwise, I'll revert those changes.

![config_1](https://cloud.githubusercontent.com/assets/73419/10144197/9018a138-661c-11e5-8c9d-dc1b721533b8.png)

![config_2](https://cloud.githubusercontent.com/assets/73419/10144199/925e5604-661c-11e5-8597-8e01013c2e86.png)

Commits
-------

fdaa513 Updated the styles of the config parameters
2015-10-01 15:57:17 +02:00
Javier Eguiluz
fdaa513cbb Updated the styles of the config parameters 2015-10-01 15:57:15 +02:00
Fabien Potencier
d226d35154 feature #15904 [3.0][FrameworkBundle] Removed deprecated features (WouterJ)
This PR was squashed before being merged into the 3.0-dev branch (closes #15904).

Discussion
----------

[3.0][FrameworkBundle] Removed deprecated features

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

Commits
-------

fc41cf0 [3.0][FrameworkBundle] Removed deprecated features
2015-10-01 15:52:49 +02:00
WouterJ
fc41cf0985 [3.0][FrameworkBundle] Removed deprecated features 2015-10-01 15:52:48 +02:00
Fabien Potencier
bee1faaa95 minor #15969 Updated the style of the translation commands (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15969).

Discussion
----------

Updated the style of the translation commands

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

@ogizanagi did a great job updating the styles of these commands. This is just a bit of tweaking here and there:

(Left = old; Right = new)

![comparison_1](https://cloud.githubusercontent.com/assets/73419/10136622/b2d049d2-65f5-11e5-9efe-ae74d546298d.png)

![comparison_2](https://cloud.githubusercontent.com/assets/73419/10136625/b8f96e24-65f5-11e5-8726-f092fc10ac38.png)

![comparison_3](https://cloud.githubusercontent.com/assets/73419/10136626/bb34a6cc-65f5-11e5-8312-0f084f04f0df.png)

![comparison_4](https://cloud.githubusercontent.com/assets/73419/10136630/bd851fd8-65f5-11e5-8ef0-71cce64fd2d7.png)

![comparison_5](https://cloud.githubusercontent.com/assets/73419/10136635/bf6173e2-65f5-11e5-9a25-8f04664cfe5a.png)

Commits
-------

8bcb9fc Updated the style of the translation commands
2015-10-01 15:46:30 +02:00
Javier Eguiluz
8bcb9fc3f8 Updated the style of the translation commands 2015-10-01 15:46:29 +02:00