minor #32533 fix some deprecations and add upgrade instructions (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

fix some deprecations and add upgrade instructions

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

Commits
-------

fa317f23f5 fix some deprecations and add upgrade instructions
This commit is contained in:
Fabien Potencier 2019-07-15 08:33:42 +02:00
commit 06930acc1a
19 changed files with 58 additions and 23 deletions

View File

@ -71,6 +71,7 @@ Form
FrameworkBundle
---------------
* Deprecated booting the kernel before running `WebTestCase::createClient()`.
* Deprecated support for `templating` engine in `TemplateController`, use Twig instead
* The `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()`
has been deprecated.
@ -90,8 +91,16 @@ HttpFoundation
HttpKernel
----------
* Implementing the `BundleInterface` without implementing the `getPublicDir()` method is deprecated.
This method will be added to the interface in 5.0.
* The `DebugHandlersListener` class has been marked as `final`
Lock
----
* Deprecated `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
`Symfony\Component\Lock\PersistStoreInterface`.
Messenger
---------
@ -143,3 +152,8 @@ WebProfilerBundle
* Deprecated the `ExceptionController::templateExists()` method
* Deprecated the `TemplateManager::templateExists()` method
WebServerBundle
---------------
* The bundle is deprecated and will be removed in 5.0.

View File

@ -208,6 +208,8 @@ Form
FrameworkBundle
---------------
* Dropped support for booting the kernel before running `WebTestCase::createClient()`. `createClient()` will throw an
exception if the kernel was already booted before.
* Removed the `framework.templating` option, use Twig instead.
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
@ -274,6 +276,7 @@ HttpFoundation
HttpKernel
----------
* The `getPublicDir()` method has been added to the `BundleInterface`.
* Removed `Client`, use `HttpKernelBrowser` instead
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been removed
* The `KernelInterface::getName()` and the `kernel.name` parameter have been removed
@ -299,6 +302,12 @@ Intl
* Removed `Intl::getLocaleBundle()`, use `Locales` instead
* Removed `Intl::getRegionBundle()`, use `Countries` instead
Lock
----
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
`Symfony\Component\Lock\PersistStoreInterface`.
Messenger
---------
@ -560,3 +569,8 @@ Yaml
* The parser is now stricter and will throw a `ParseException` when a
mapping is found inside a multi-line string.
WebServerBundle
---------------
* The bundle has been removed.

View File

@ -40,7 +40,7 @@ abstract class WebTestCase extends KernelTestCase
protected static function createClient(array $options = [], array $server = [])
{
if (true === static::$booted) {
@trigger_error(sprintf('Booting the kernel before calling %s::%s is deprecated and will throw in Symfony 5.0, the kernel should only be booted once.', __CLASS__, __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('Booting the kernel before calling %s() is deprecated and will throw in Symfony 5.0, the kernel should only be booted once.', __METHOD__), E_USER_DEPRECATED);
}
$kernel = static::bootKernel($options);

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
4.4.0
---------------
* The bundle is deprecated and will be removed in 5.0.
4.2.0
-----

View File

@ -26,7 +26,7 @@ use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
/**
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class ServerLogCommand extends Command
{
@ -80,7 +80,7 @@ EOF
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
$filter = $input->getOption('filter');
if ($filter) {

View File

@ -27,7 +27,7 @@ use Symfony\Component\Process\Process;
*
* @author Michał Pipa <michal.pipa.xsolve@gmail.com>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class ServerRunCommand extends Command
{
@ -92,7 +92,7 @@ EOF
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);

View File

@ -27,7 +27,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class ServerStartCommand extends Command
{
@ -92,7 +92,7 @@ EOF
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);

View File

@ -26,7 +26,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class ServerStatusCommand extends Command
{
@ -74,7 +74,7 @@ EOF
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
$server = new WebServer($this->pidFileDirectory);

View File

@ -24,7 +24,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
*
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class ServerStopCommand extends Command
{
@ -63,7 +63,7 @@ EOF
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);

View File

@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
/**
* @author Robin Chalas <robin.chalas@gmail.com>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class WebServerExtension extends Extension
{
@ -43,7 +43,7 @@ class WebServerExtension extends Extension
$container->removeDefinition('web_server.command.server_log');
}
@trigger_error('Using the WebserverBundle is deprecated since 4.3, the new symfony local server has more feature, you should use it instead.');
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4, the new symfony local server has more feature, you should use it instead.', E_USER_DEPRECATED);
}
private function getPublicDirectory(ContainerBuilder $container)

View File

@ -20,7 +20,7 @@ use Symfony\Component\Process\Process;
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class WebServer
{

View File

@ -14,12 +14,12 @@ namespace Symfony\Bundle\WebServerBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class WebServerBundle extends Bundle
{
public function boot()
{
@trigger_error('Using the WebserverBundle is deprecated since 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
@trigger_error('Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.', E_USER_DEPRECATED);
}
}

View File

@ -14,7 +14,7 @@ namespace Symfony\Bundle\WebServerBundle;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
*/
class WebServerConfig
{

View File

@ -4,7 +4,9 @@ CHANGELOG
4.4.0
-----
* The `DebugHandlersListener` class has been marked as `final`
* Implementing the `BundleInterface` without implementing the `getPublicDir()` method is deprecated.
This method will be added to the interface in 5.0.
* The `DebugHandlersListener` class has been marked as `final`
4.3.0
-----

View File

@ -98,7 +98,7 @@ class CombinedStore implements StoreInterface, LoggerAwareInterface
*/
public function waitAndSave(Key $key)
{
@trigger_error(sprintf('%s::%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', \get_class($this), __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
}

View File

@ -74,7 +74,7 @@ class MemcachedStore implements StoreInterface
*/
public function waitAndSave(Key $key)
{
@trigger_error(sprintf('%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
}

View File

@ -145,7 +145,7 @@ class PdoStore implements StoreInterface
*/
public function waitAndSave(Key $key)
{
@trigger_error(sprintf('%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', __METHOD__));
}

View File

@ -77,7 +77,7 @@ class RedisStore implements StoreInterface
*/
public function waitAndSave(Key $key)
{
@trigger_error(sprintf('%s::%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', \get_class($this), __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
}

View File

@ -87,7 +87,7 @@ class ZookeeperStore implements StoreInterface
*/
public function waitAndSave(Key $key)
{
@trigger_error(sprintf('%s::%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', \get_class($this), __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
throw new NotSupportedException();
}