Commit Graph

4569 Commits

Author SHA1 Message Date
Fabien Potencier
ef80873d06 [FrameworkBundle] changed some default configs from canBeEnabled to canBeDisabled 2017-01-07 14:17:04 -08:00
Fabien Potencier
98ce21a351 [FrameworkBundle] changed the default value of annotation setting based on the existence of Doctrine Annotations 2017-01-06 16:42:03 -08:00
Nicolas Grekas
36aedd8b2c Merge branch '3.2'
* 3.2:
  [Bridge/PhpUnit] Relax expectedDeprecation for forward compat
  [FrameworkBundle] Remove Response* from classes to compile
  [Workflow] Removed twig from composer.json (dev section, not used)
2017-01-06 18:58:22 +01:00
Nicolas Grekas
9ab59824a1 [FrameworkBundle] Remove Response* from classes to compile 2017-01-06 17:22:25 +01:00
Fabien Potencier
6f6100a8e1 feature #20547 [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files (tifabien)
This PR was squashed before being merged into the 3.3-dev branch (closes #20547).

Discussion
----------

[FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files

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

When we have a symlink folder in app/Resources/translations, files inside this symlink are not handled.

Commits
-------

4874e43a4c [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files
2017-01-06 07:23:52 -08:00
Fabien Lucas
4874e43a4c [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files 2017-01-06 07:23:44 -08:00
Fabien Potencier
dda376032d feature #20735 Deprecate ClassCollectionLoader and Kernel::loadClassCache (dbrumann)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Deprecate ClassCollectionLoader and Kernel::loadClassCache

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

As suggested by @nicolas-grekas in #20668 I added deprecation notices to ClassCollectionLoader and Kernel::loadClassCache.

Commits
-------

660d79a186 Deprecates ClassCache-cache warmer.
2017-01-06 07:22:02 -08:00
Fabien Potencier
be85fcc2b8 feature #21039 Web server bundle (fabpot)
This PR was squashed before being merged into the 3.3-dev branch (closes #21039).

Discussion
----------

Web server bundle

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

Moved the `server:*` commands to a new bundle. It makes them more easily discoverable and more decoupled. Discoverability is important when not using symfony/symfony. In that case, the commands are not available unless you have the symfony/process component installed. With a dedicated bundle, installing the bundle also installs the dependency, making the whole process easier.

Usage is the same as the current commands for basic usage:

To start a web server in the foreground:

```
bin/console server:run
```

To manage a background server:

```
bin/console server:start
bin/console server:stop
bin/console server:status
```

The big difference is that port is auto-determined if something is already listening on port 8000.

Usage is **different** if you pass options:

```
bin/console server:start 127.0.0.1:8888
bin/console server:stop # no need to pass the address again
bin/console server:status # no need to pass the address again
```

That's possible as the web server now stores its address in a pid file stored in the current directory.

Commits
-------

f39b32735b [WebServerBundle] switched auto-run of server:start to off by default
961d1cea55 [WebServerBundle] fixed server:start when already running
126f4d9ec4 [WebServerBundle] added support for port auto-detection
6f689d6597 [WebServerBundle] changed the way we keep track of the web server
585d4451c8 [WebServerBundle] tweaked command docs
fa7ebc57de [WebServerBundle] moved most of the logic in a new class
951a1a227d [WebServerBundle] changed wording
ac1ba7700e made the router configurable via env vars
48dd2b0dbe removed obsolete check
132902c621 moved server:* command to a new bundle
2017-01-05 19:09:35 -08:00
Fabien Potencier
0d1f53f48b Merge branch '3.2'
* 3.2:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
  Fix the priority order of compiler pass trait
2017-01-04 11:58:57 -08:00
Fabien Potencier
be882c4663 Merge branch '3.1' into 3.2
* 3.1:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:58:34 -08:00
Fabien Potencier
8f82bf7076 Merge branch '2.8' into 3.1
* 2.8:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:57:42 -08:00
Fabien Potencier
829b6bd475 Merge branch '2.7' into 2.8
* 2.7:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:55:18 -08:00
Robin Chalas
fef3146b3b
Fix serializer/translations/validator resources loading for bundles overriding getPath() 2017-01-04 20:27:15 +01:00
Robin Chalas
cd4b15e605 [FrameworkBundle] Display original definition for aliases in debug:container 2017-01-04 14:20:26 +01:00
Nicolas Grekas
601648e0e8 feature #21108 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter (nicolas-grekas, robfrawley)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Add DSN, createClient & better error reporting to MemcachedAdapter

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

Replaces #20863
ping @robfrawley: would you mind opening a doc PR for this?

Commits
-------

87030b4 [cache] Add tests for MemcachedAdapter::createClient()
e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
2017-01-04 07:51:37 +01:00
Fabien Potencier
f71c699289 Merge branch '3.2'
* 3.2:
  updated LICENSE year
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
  [Yaml] add missing indicator character
2017-01-02 12:33:09 -08:00
Fabien Potencier
3f4e6cce8c Merge branch '3.1' into 3.2
* 3.1:
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:32:22 -08:00
Fabien Potencier
d05e9e03cb Merge branch '2.8' into 3.1
* 2.8:
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:31:54 -08:00
Fabien Potencier
ed70281d49 Merge branch '2.7' into 2.8
* 2.7:
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:30:24 -08:00
Fabien Potencier
9879c8193f updated LICENSE year 2017-01-02 12:30:00 -08:00
Fabien Potencier
cbcc6ca726 feature #20809 [FrameworkBundle] Display the controller class name in 'debug:router' (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Display the controller class name in 'debug:router'

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

---

Before:
![screenshot7](https://cloud.githubusercontent.com/assets/408368/21152351/318af764-c166-11e6-8245-1729779e9809.png)

After:
![screenshot3](https://cloud.githubusercontent.com/assets/408368/21563210/02cf043e-ce80-11e6-94be-34736d85bb3b.png)

Commits
-------

157a8306a2 [FrameworkBundle] Display the controller class name in 'debug:router'
2017-01-02 12:07:21 -08:00
Nicolas Grekas
e10943814e [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter 2017-01-02 17:22:30 +01:00
Nicolas Grekas
3e7ff2194e Merge branch '3.2'
* 3.2:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  fixed @return when returning this or static
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  fix merge
  [cache] Bump RedisAdapter timeout to 5s
  fixed @return when returning this or static
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
  remove is_writable check on filesystem cache
2017-01-02 15:58:37 +01:00
Nicolas Grekas
8df0540c9f Merge branch '3.1' into 3.2
* 3.1:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  fixed @return when returning this or static
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  fix merge
  [cache] Bump RedisAdapter timeout to 5s
  fixed @return when returning this or static
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
  remove is_writable check on filesystem cache
2017-01-02 15:57:35 +01:00
Nicolas Grekas
0dbc5cec7f Merge branch '2.8' into 3.1
* 2.8:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2017-01-02 15:50:07 +01:00
Nicolas Grekas
23590eb51a Merge branch '2.7' into 2.8
* 2.7:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2017-01-02 15:44:49 +01:00
Christian Flothmann
97b7fabf51 do not depend on a fixed date in layout tests
By default, the `DateType` as well as the `DateTimeType` set the choices
being available for the year to a range starting five years in the past.
After some time, this will make tests fail when the year of the fixed
date being used as the initial data is before the first year being part
of the choices.
2017-01-01 13:43:56 +01:00
Grégoire Pineau
157a8306a2 [FrameworkBundle] Display the controller class name in 'debug:router' 2016-12-30 11:47:35 +01:00
Fabien Potencier
132902c621 moved server:* command to a new bundle 2016-12-30 08:54:28 +01:00
Fabien Potencier
d0e8476afc Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  [FrameworkBundle] Allow multiple transactions with the same name
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:45:09 +01:00
Fabien Potencier
f4a635957e Merge branch '3.1' into 3.2
* 3.1:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:44:30 +01:00
Fabien Potencier
4c453f617d Merge branch '2.8' into 3.1
* 2.8:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:43:25 +01:00
Nicolas Grekas
59dc976caf bug #20959 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer (fancyweb)
This PR was squashed before being merged into the 3.2 branch (closes #20959).

Discussion
----------

[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer

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

I ran into a case that led to an `AnnotationException` in the `AnnotationsCacheWarmer`. I deduced that these exceptions should be ignored to not break the cache warming process.

The case :
* You have a controller in your `AppBundle\Controller\` directory.
* You have an annotation in this controller that will never be found (because you made a mistake in the class / annotation name) or not every time : for example your controller is only used in dev env and it uses an annotation that is defined in a vendor bundle that is only under the `require-dev` key in your `composer.json` because you don't need it in your production deployment. So in production, your controller exists but will never be used. However the vendor bundle does not exist.
* You dump your autoload files with composer using the `--optimize` option.
* You end up with an `AnnotationException`.

Why :
* In the [`FrameworkExtension`](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L189), the `**Bundle\Controller\` pattern is added as an "annotated class to compile".
* In the [`AddClassesToCachePass`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php#L50), all the classes defined in the `autoload_classmap.php` file are matched against the previous pattern.
* Your controller will match. So even if you don't use it at all in your application, the annotation will still be read and the exception will be thrown.

Commits
-------

6749569 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
2016-12-27 10:59:18 +01:00
Thomas Calvet
67495693a4 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer 2016-12-27 10:59:17 +01:00
Fabien Potencier
085171fc50 bug #20795 [FrameworkBundle] Allow multiple transitions with the same name (Padam87)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Allow multiple transitions with the same name

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

Commits
-------

7c86e16 [FrameworkBundle] Allow multiple transactions with the same name
2016-12-26 21:42:16 +01:00
Fabien Potencier
e5ce4c9383 removed unneeded comment 2016-12-23 22:13:36 +01:00
Kévin Dunglas
89ccbc450c
[FrameworkBundle] Make TemplateController working without the Templating component 2016-12-23 16:30:22 +01:00
Fabien Potencier
e618ff3ecb fixed tests 2016-12-19 17:18:40 +01:00
Fabien Potencier
ab520a13c6 fixed tests 2016-12-19 17:17:38 +01:00
Fabien Potencier
2819a57172 fixed obsolete getMock() usage 2016-12-19 17:14:19 +01:00
Fabien Potencier
6126018b9f Merge branch '3.2'
* 3.2:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 17:13:57 +01:00
Fabien Potencier
0a9e391f36 fixed obsolete getMock() usage 2016-12-19 17:09:34 +01:00
Fabien Potencier
3f96468942 Merge branch '3.1' into 3.2
* 3.1:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 17:07:36 +01:00
Fabien Potencier
a3058245db fixed obsolete getMock() usage 2016-12-19 17:00:11 +01:00
Fabien Potencier
7ae26ed5f1 Merge branch '2.8' into 3.1
* 2.8:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 16:53:49 +01:00
Fabien Potencier
0f9a7287c3 fixed obsolete getMock() usage 2016-12-19 16:48:05 +01:00
Fabien Potencier
84e75a78b3 Merge branch '2.7' into 2.8
* 2.7:
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
2016-12-19 16:38:44 +01:00
Fabien Potencier
71d059cad1 fixed obsolete getMock() usage 2016-12-19 16:22:46 +01:00
Nicolas Grekas
c885d23a39 Merge branch '3.2'
* 3.2:
  [Security] Fix test
  [Validator] phpize default option values
  test for the Validator component to be present
  [Serializer] Fix MaxDepth annotation exceptions
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [HttpFoundation] Fix cookie to string conversion for raw cookies
  Fix misresolved parameters in debug:config on 3.2
  [Console] fixed BC issue with static closures
  [TwigBundle] Config is now a hard dependency
  [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-17 11:47:22 +01:00
Nicolas Grekas
b9a74f35ba Merge branch '3.1' into 3.2
* 3.1:
  [Security] Fix test
  [Validator] phpize default option values
  test for the Validator component to be present
  [Serializer] Fix MaxDepth annotation exceptions
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [HttpFoundation] Fix cookie to string conversion for raw cookies
  [Console] fixed BC issue with static closures
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-17 11:46:44 +01:00