Commit Graph

48 Commits

Author SHA1 Message Date
Robin Chalas 127af5765c
[DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider 2016-11-17 00:18:19 +01:00
Lesnykh Ilia 201603137c
Added single quotes for upgrade guides. 2016-11-08 16:51:01 +03:00
Zdeněk Drahoš 5f506d96ff Mention generating absolute urls in UPGRADE files and CHANGELOG 2016-06-17 16:58:54 +02:00
Javier Eguiluz 6ea28e64aa Mentioned the deprecation of deep parameters in UPGRADE files 2016-03-08 22:54:24 +01:00
Christian Flothmann 0efb137492 [Form] fix option name in upgrade file 2016-01-30 21:06:33 +01:00
Fabien Potencier e66d33f0cb minor #17403 [Form][Security] update upgrade files with CSRF related option info (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form][Security] update upgrade files with CSRF related option info

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

Commits
-------

1ecbb32 update upgrade files with CSRF related option info
2016-01-25 14:16:43 +01:00
Fabien Potencier 0c28d753e2 bug #16822 [FrameworkBundle][Validator] Fix apc cache service deprecation (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][Validator] Fix apc cache service deprecation

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

Related to #16795

I guess the deprecation was on the wrong service.
Also, no deprecation notice was triggered about using `"apc"` as the value of the `framework.validation.cache` configuration option. This PR adds the missing deprecation.

> 📝 _NOTE_: The standard edition will need to be updated [here](https://github.com/symfony/symfony-standard/blob/2.8/app/config/config_prod.yml#L6).

Commits
-------

907bbec [FrameworkBundle][Validator] Fix apc cache service deprecation
2016-01-21 08:28:13 +01:00
Christian Flothmann 1ecbb32c3a update upgrade files with CSRF related option info 2016-01-16 19:20:58 +01:00
Fabien Potencier eae9e1cedc minor #17061 Upgrade for 2.8: ContainerAware was deprecated in favour of ContainerAwareTrait (pamil)
This PR was merged into the 2.8 branch.

Discussion
----------

Upgrade for 2.8: ContainerAware was deprecated in favour of ContainerAwareTrait

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

Commits
-------

825409e Upgrade for 2.8: ContainerAware was deprecated in favour of ContainerAwareTrait [ci skip]
2015-12-18 17:39:44 +01:00
Nicolas Grekas d1a8e50292 minor #16849 Upgrade information for the choice_value option (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

Upgrade information for the choice_value option

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

Relates to #14825 and #14377. The behaviour was changed with #16681 so a not in the upgrade information makes sense to me.

Commits
-------

28675c9 Reflected the change of the choice_value option in the Upgrade information
2015-12-18 11:02:23 +01:00
Peter Rehm 28675c990b Reflected the change of the choice_value option in the Upgrade information 2015-12-18 10:53:04 +01:00
Kamil Kokot 825409ec38 Upgrade for 2.8: ContainerAware was deprecated in favour of ContainerAwareTrait [ci skip] 2015-12-18 10:21:34 +01:00
ogizanagi 907bbece01 [FrameworkBundle][Validator] Fix apc cache service deprecation 2015-12-06 22:50:37 +01:00
Alexander M. Turek af4f5c5407 Added a note about the new requirement iconv. 2015-12-05 12:34:07 +01:00
Fabien Potencier 0055887cbd minor #16659 Added the renamed options of the collection type to the upgrade information (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

Added the renamed options of the collection type to the upgrade information

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

Commits
-------

7aac273 Added the renamed options of the collection type to the upgrade information
2015-11-30 15:53:58 +01:00
Christian Flothmann 346943e2f5 add subject variable to expression context 2015-11-30 11:54:38 +01:00
Fabien Potencier 5486c689cf feature #16722 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention (jakzal)
This PR was squashed before being merged into the 2.8 branch (closes #16722).

Discussion
----------

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention

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

Commits
-------

0450865 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention
2015-11-28 16:40:59 +01:00
Jakub Zalas 04508658b5 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention 2015-11-28 16:40:40 +01:00
Fabien Potencier 06279791c5 minor #16662 [Yaml] more fixes to changelog and upgrade files (Christian Flothmann)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] more fixes to changelog and upgrade files

| Q             | A
| ------------- | ---
| Fixed tickets | #16433, #16654
| License       | MIT

Commits
-------

273ed25 [Yaml] more fixes to changelog and upgrade files
2015-11-28 11:18:42 +01:00
Christian Flothmann 273ed25573 [Yaml] more fixes to changelog and upgrade files 2015-11-27 22:31:42 +01:00
Fabien Potencier b29691067d feature #16690 [Form] Deprecated ArrayKeyChoiceList (webmozart)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Deprecated ArrayKeyChoiceList

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

Commits
-------

5386752 [Form] Deprecated ArrayKeyChoiceList
2015-11-27 10:03:43 +01:00
Fabien Potencier 6dacdc4ebd feature #16687 [Form] Deprecated TimezoneType::getTimezones() (webmozart)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Deprecated TimezoneType::getTimezones()

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

This method is useless as of https://github.com/symfony/symfony/pull/16681. It needs to be deprecated before we can remove it since it is public.

Commits
-------

41df3fc [Form] Deprecated TimezoneType::getTimezones()
2015-11-27 10:01:47 +01:00
Bernhard Schussek 5386752bf9 [Form] Deprecated ArrayKeyChoiceList 2015-11-26 18:38:25 +01:00
Bernhard Schussek 41df3fce32 [Form] Deprecated TimezoneType::getTimezones() 2015-11-26 18:08:26 +01:00
Nicolas Grekas a58df11244 feature #16601 [Security] Deprecate "AbstractVoter" in favor of "Voter" (nicolas-grekas, lyrixx)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Deprecate "AbstractVoter" in favor of "Voter"

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

Commits
-------

fd8b87c [Security] Deprecate "AbstractVoter" in favor of "Voter"
d3c6d93 [Security] Revert changes made between 2.7 and 2.8-beta
2015-11-26 15:48:43 +01:00
Peter Rehm 7aac273701 Added the renamed options of the collection type to the upgrade information 2015-11-26 09:44:24 +01:00
Christian Flothmann 062d707820 [Yaml] sync changelog and upgrade files 2015-11-24 22:06:14 +01:00
Grégoire Pineau fd8b87c498 [Security] Deprecate "AbstractVoter" in favor of "Voter" 2015-11-24 16:56:59 +01:00
Nicolas Grekas d3c6d93dff [Security] Revert changes made between 2.7 and 2.8-beta 2015-11-24 14:34:07 +01:00
WouterJ e3aa5226e4 [2.8][Form] Deprecate alias tag option 2015-10-01 17:36:27 +02:00
Javier Eguiluz 83b2d7c53b Remove profiler storages 2015-09-30 11:11:05 +02:00
Fabien Potencier d60428c9ca feature #15738 Implement service-based Resource (cache) validation (mpdude)
This PR was squashed before being merged into the 2.8 branch (closes #15738).

Discussion
----------

Implement service-based Resource (cache) validation

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #7230, #15692, #7782
| License       | MIT
| Doc PR        | symfony/symfony-docs#5136

### Overview

Currently, any metadata passed to `ConfigCache` (namely implementations of `ResourceInterface`) is serialized to disk. When the `ConfigCache` is validated, the metadata is unserialized and queried through `ResourceInterface::isFresh()` to determine whether the cache is fresh. That way, `ResourceInterface` implementations cannot interact with services, for example a database connection.

This PR introduces the new concept of `ResourceCheckers`. Services implementing `ResourceCheckerInterface` can be tagged as `config_cache.resource_checker` with an optional priority.

Clients that wish to use `ConfigCache` can then obtain an instance from the `config_cache_factory` service (which implements `ConfigCacheFactoryInterface`). The factory will take care of injecting resource checkers into the `ConfigCache` instance so that they can be used for cache validation.

Checking cache metadata is easy for `ResourceCheckers`:
* First, the `ResourceCheckerInterface::supports()` implementation is passed the metadata object in question. If the checker cannot handle the type of resource passed, `supports()` should return `false`.
* Otherwise, the `ResourceCheckerInterface::isFresh()` method will be called and given the resource as well as the timestamp at which the cache was initialized. If that method returns `false`, the cache is considered stale. If it returns `true`, the resource is considered unchanged and will *not* be passed to any additional checkers.

### BC and migration path

This PR does not (intend to) break BC but it comes with deprecations. The main reason is that `ResourceInterface` contains an `isFresh()` method that does not make sense in the general case of resources.

Thus, `ResourceInterface::isFresh()` is marked as deprecated and should be removed in Symfony 3.0. Resource implementations that can (or wish to) be validated in that simple manner can implement the `SelfCheckingResourceInterface` sub-interface that still contains (and will keep) the `isFresh()` method. The change should be as simple as changing the `extends` list.

Apart from that, `ResourceInterface` will be kept as the base interface for resource implementations. It is used in several `@api` interfaces and thus cannot easily be substituted.

For the Symfony 2.x series, a `BCResourceInterfaceChecker` will be kept that performs validation through `ResourceInterface::isFresh()` but will trigger a deprecation warning. The remedy is to either implement a custom ResourceChecker with a priority higher than -1000; or to switch to the aforementioned `SelfCheckingResourceInterface` which is used at a priority of -990 (without deprecation warning).

The `ConfigCache` and `ConfigCacheFactory` classes can be used as previously but do not feature checker-based cache validation.

### Outlook and closing remarks:

This PR supersedes #7230, #15692 and works at least in parts towards the goal of #7176.

The `ResourceCheckerInterface`, `...ConfigCache` and `...ConfigCacheFactory` no longer need to be aware of the `debug` flag. The different validation rules applied previously are now just a matter of `ResourceChecker` configuration (i. e. "no checkers" in `prod`).

It might be possible to remove the `debug` flag from Symfony's `Router` and/or `Translator` classes in the future as well because it was only passed on to the `ConfigCache` there.

Commits
-------

20d3722 Implement service-based Resource (cache) validation
2015-09-25 08:33:07 +02:00
Matthias Pigulla 20d3722120 Implement service-based Resource (cache) validation 2015-09-25 08:31:17 +02:00
Ryan Weaver 948ccec1ea Updating AbstractVoter so that the method receives the TokenInterface 2015-09-24 08:33:58 +02:00
Christophe Coevoet 8826d39e0f Validate the extended type for lazy-loaded type extensions 2015-09-15 12:07:24 +02:00
Fabien Potencier 0383559f95 feature #15709 [WebProfilerBundle] deprecated import/export commands (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] deprecated import/export commands

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

Commits
-------

943fec9 [HtppKernel] deprecated Profiler::import/export
17e00b9 [WebProfilerBundle] deprecated import/export commands
2015-09-09 23:21:50 +02:00
Christian Flothmann e1818bd5d9 move feature description to changelog file 2015-09-08 08:37:45 +02:00
Fabien Potencier 17e00b9b8e [WebProfilerBundle] deprecated import/export commands 2015-09-07 15:21:37 +02:00
Javier Eguiluz 68f0818a6c Allow to define Enum nodes with 1 single element 2015-08-03 10:27:53 +02:00
Fabien Potencier 8d049c51d3 fixed typos 2015-08-01 08:45:26 +02:00
Fabien Potencier 5b38d74128 feature #15079 [Form] Deprecated FormTypeInterface::getName() and passing of type instances (webmozart)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Deprecated FormTypeInterface::getName() and passing of type instances

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

#### Type Names

This PR deprecates the definition of the `getName()` method of form types. See #15008 for a more detailed description.

Before:

```php
class MyType extends AbstractType
{
    public function getName()
    {
        return 'mytype';
    }

    // ...
}
```

After:

```php
class MyType extends AbstractType
{
    // ...
}
```

You should always reference other types by their fully-qualified class names. Thanks to PHP 5.5, that's easy:

Before:

```php
$form = $this->createFormBuilder()
    ->add('name', 'text')
    ->add('age', 'integer')
    ->getForm();
```

After:

```php
$form = $this->createFormBuilder()
    ->add('name', TextType::class)
    ->add('age', IntegerType::class)
    ->getForm();
```

#### Type Instances

Furthermore, passing of type instances is deprecated.

Before:

```php
$form = $this->createForm(new AuthorType());
```

After:

```php
$form = $this->createForm(AuthorType::class);
```

#### DIC Aliases

When registering a type in the DIC, you should omit the "alias" attribute now.

Before:

```xml
<service id="my.type" class="Vendor\Type\MyType">
    <tag name="form.type" alias="mytype" />
    <argument type="service" id="some.service.id" />
</service>
```

After:

```xml
<service id="my.type" class="Vendor\Type\MyType">
    <tag name="form.type" />
    <argument type="service" id="some.service.id" />
</service>
```

Types without dependencies don't need to be registered in the DIC as they can be instantiated right away.

#### Template Block Prefixes

By default, the class name of the type in underscore notation minus "Type" suffix is used as Twig template block prefix (e.g. `UserProfileType` => `user_profile_*`). If you want to customize that, overwrite the new `getBlockPrefix()` method in your type:

```php
class UserProfileType extends AbstractType
{
    public function getBlockPrefix()
    {
        return 'profile';
    }

    // ...
}
```

Commits
-------

3d9e5de [Form] Deprecated FormTypeInterface::getName() and passing of type instances
2015-08-01 08:44:19 +02:00
Fabien Potencier ce5363aee0 feature #15372 [FrameworkBundle] Change the default value of cookie_httponly (jderusse)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Change the default value of cookie_httponly

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

Commits
-------

a7bef1e Change the default value of cookie_httponly to fix #15303
2015-08-01 08:15:28 +02:00
Javier Eguiluz 9df0f8b4b8 Added some upgrade notes about the new toolbar design 2015-07-31 12:12:25 +02:00
Jérémy Derussé a7bef1eb2d Change the default value of cookie_httponly to fix #15303 2015-07-28 13:20:34 +02:00
Bernhard Schussek 3d9e5de2b9 [Form] Deprecated FormTypeInterface::getName() and passing of type instances 2015-07-02 10:02:46 +02:00
Diego Saint Esteben 6c4a676d09 Add "shared" flag and deprecate scopes concept 2015-06-24 12:32:32 -03:00
Bernhard Schussek 6c554c6c1a [Form] Deprecated "cascade_validation" 2015-06-17 20:03:11 +02:00
Abdellatif Ait boudad 2869a32cf1 [Translator] deprecate getMessages in favor of getCatalogue. 2015-05-06 09:17:03 +00:00