Skip to content

Removed deprecated features and notices #8622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 12, 2017

Conversation

javiereguiluz
Copy link
Member

@javiereguiluz javiereguiluz commented Nov 11, 2017

@xabbuh and @weaverryan to avoid a nightmare or rebases and problems, could we please give top priority to merging this PR? Thanks! It doesn't have to be perfect or 100% completed. We can do more fixes in another PR. Thanks!


Some articles explain things that are removed. Instead of removing those articles entirely and to avoid user confusion, I propose to keep those articles but explain that those features no longer exist. For example, security/acl.rst now contains the following:

.. index::
   single: Security; Access Control Lists (ACLs)

How to Use Access Control Lists (ACLs)
======================================

.. caution::

    ACL support was removed in Symfony 4.0. Install the `Symfony ACL bundle`_
    and refer to its documentation if you want to keep using ACL.

.. _`Symfony ACL bundle`: https://github.com/symfony/acl-bundle

Articles like this one:

  • security/acl.rst
  • security/acl_advanced.rst
  • components/event_dispatcher/container_aware_dispatcher.rst

We can remove all these deprecated articles in 4.1


@iltar could you please create a PR to update the changes related to "controller arguments" in these two articles? Thanks!

  • components/http_kernel.rst
  • create_framework/http_kernel_controller_resolver.rst

I don't understand the changes well (ControllerResolverInterface removed getArguments())


@HeahDude could you please create a PR to update the changes needed about the deprecation of using false in property_path instead of mapped in reference/forms/types/options/property_path.rst.inc? Thanks!


There is a pending deprecation message in security/multiple_user_providers.rst ... but that's fixed in the pending PR #8612.


A final question: I've removed the explanation of the deprecated kernel.root_dir in reference/configuration/kernel.rst and kept only kernel.project_dir. Would you instead prefer to keep a reference to the still heavily used kernel.root_dir to explain that it's deprecated?

@linaori
Copy link
Contributor

linaori commented Nov 11, 2017

I'll take a look on Monday

Copy link
Member

@wouterj wouterj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments, but can be done after merging.

@@ -129,17 +129,10 @@ read more about it, see the ":doc:`/bundles/configuration`" article.
Adding Classes to Compile
-------------------------

.. versionadded:: 3.3
This technique is discouraged and the ``addClassesToCompile()`` method was
deprecated in Symfony 3.3 because modern PHP versions make it unnecessary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm wrong, this versionadded says "Don't use what's descriped below." (so it's more a .. caution:: than versionadded). This means the article should be removed (as the feature got removed in Symfony 4).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though the same ... but only addClassesToCompile() is deprecated/removed. addAnnotatedClassesToCompile() is still valid and used in Sf4.

third-party bundles without using :doc:`/bundles/inheritance`, which is
deprecated since Symfony 3.4.
third-party bundles without using :doc:`/bundles/inheritance`, which was
removed in Symfony 4.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this description generic to not require any more updates in later versions (and thus merge conflicts), e.g:

When using another bundle, you might want to customize or override some of its features. This document describes ways of overriding the most common features of a bundle.


Listeners receive a
:class:`Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent` event::

use Symfony\Component\Console\Event\ConsoleExceptionEvent;
use Symfony\Component\Console\ConsoleEvents;

$dispatcher->addListener(ConsoleEvents::EXCEPTION, function (ConsoleExceptionEvent $event) {
$dispatcher->addListener(ConsoleEvents::ERROR, function (ConsoleExceptionEvent $event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typehint should be ConsoleErrorEvent

@@ -117,19 +114,6 @@ Listeners receive a
$event->setException(new \LogicException('Caught exception', $exitCode, $event->getException()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$event->getError()

}
}
The ``ContainerAwareEventDispatcher`` was removed in Symfony 4.0. Use
``EventDispatcher`` with closure-proxy injection instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reference article/section about closure-proxy injection?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment. Is there an article that we could link to in this comment? Or are you suggesting to create a new article? Thanks!

),
));
The possibility to use a matcher to enable the profiler conditionally was
removed in Symfony 4.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add information about doing $profiler->disable() in your controller explicitly if you need this functionality.

@wouterj wouterj added this to the 4.0 milestone Nov 12, 2017
@weaverryan
Copy link
Member

+1 for removing kernel.root_dir entirely. It will be easy for people to find it on the internet anyways.

@weaverryan weaverryan merged commit 02c676a into symfony:master Nov 12, 2017
weaverryan added a commit that referenced this pull request Nov 12, 2017
… weaverryan)

This PR was merged into the master branch.

Discussion
----------

Removed deprecated features and notices

@xabbuh and @weaverryan to avoid a nightmare or rebases and problems, could we please give top priority to merging this PR? Thanks! It doesn't have to be perfect or 100% completed. We can do more fixes in another PR. Thanks!

-----

Some articles explain things that are removed. Instead of removing those articles entirely and to avoid user confusion, I propose to keep those articles but explain that those features no longer exist. For example, `security/acl.rst` now contains the following:

```rst
.. index::
   single: Security; Access Control Lists (ACLs)

How to Use Access Control Lists (ACLs)
======================================

.. caution::

    ACL support was removed in Symfony 4.0. Install the `Symfony ACL bundle`_
    and refer to its documentation if you want to keep using ACL.

.. _`Symfony ACL bundle`: https://github.com/symfony/acl-bundle
```

Articles like this one:

* security/acl.rst
* security/acl_advanced.rst
* components/event_dispatcher/container_aware_dispatcher.rst

We can remove all these deprecated articles in 4.1

-----

@iltar could you please create a PR to update the changes related to "controller arguments" in these two articles? Thanks!

* `components/http_kernel.rst`
* `create_framework/http_kernel_controller_resolver.rst`

I don't understand the changes well (`ControllerResolverInterface` removed `getArguments()`)

-----

@HeahDude could you please create a PR to update the changes needed about the deprecation of using `false` in `property_path` instead of `mapped` in `reference/forms/types/options/property_path.rst.inc`? Thanks!

-----

There is a pending deprecation message in `security/multiple_user_providers.rst` ... but that's fixed in the pending PR #8612.

-----

A final question: I've removed the explanation of the deprecated `kernel.root_dir` in `reference/configuration/kernel.rst` and kept only `kernel.project_dir`.  Would you instead prefer to keep a reference to the still heavily used `kernel.root_dir` to explain that it's deprecated?

Commits
-------

02c676a fixing old reference
eb53f14 Fixing test failure
47a224a Fixed ater Wouter's review
597b75b Removed more references about profiler.matcher option
0266046 Removed deprecated features and notices
@weaverryan
Copy link
Member

I've just merged this so we can keep conflicts low and keep moving quickly (thanks Wouter for the fast review). I did get the tests passing.

If anyone does see any issues, please open a separate PR!

@javiereguiluz can you open separate issues on the 4.0 milestone for the other things that you needed done by other people?

Thanks!

@javiereguiluz
Copy link
Member Author

Done! Thanks for your great and quick reviews and for merging this. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants