Skip to content

Commit fa317f2

Browse files
committed
fix some deprecations and add upgrade instructions
1 parent 24b7fef commit fa317f2

19 files changed

+58
-23
lines changed

UPGRADE-4.4.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Form
7171
FrameworkBundle
7272
---------------
7373

74+
* Deprecated booting the kernel before running `WebTestCase::createClient()`.
7475
* Deprecated support for `templating` engine in `TemplateController`, use Twig instead
7576
* The `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()`
7677
has been deprecated.
@@ -90,8 +91,16 @@ HttpFoundation
9091
HttpKernel
9192
----------
9293

94+
* Implementing the `BundleInterface` without implementing the `getPublicDir()` method is deprecated.
95+
This method will be added to the interface in 5.0.
9396
* The `DebugHandlersListener` class has been marked as `final`
9497

98+
Lock
99+
----
100+
101+
* Deprecated `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
102+
`Symfony\Component\Lock\PersistStoreInterface`.
103+
95104
Messenger
96105
---------
97106

@@ -143,3 +152,8 @@ WebProfilerBundle
143152

144153
* Deprecated the `ExceptionController::templateExists()` method
145154
* Deprecated the `TemplateManager::templateExists()` method
155+
156+
WebServerBundle
157+
---------------
158+
159+
* The bundle is deprecated and will be removed in 5.0.

UPGRADE-5.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ Form
208208
FrameworkBundle
209209
---------------
210210

211+
* Dropped support for booting the kernel before running `WebTestCase::createClient()`. `createClient()` will throw an
212+
exception if the kernel was already booted before.
211213
* Removed the `framework.templating` option, use Twig instead.
212214
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
213215
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
@@ -274,6 +276,7 @@ HttpFoundation
274276
HttpKernel
275277
----------
276278

279+
* The `getPublicDir()` method has been added to the `BundleInterface`.
277280
* Removed `Client`, use `HttpKernelBrowser` instead
278281
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been removed
279282
* The `KernelInterface::getName()` and the `kernel.name` parameter have been removed
@@ -299,6 +302,12 @@ Intl
299302
* Removed `Intl::getLocaleBundle()`, use `Locales` instead
300303
* Removed `Intl::getRegionBundle()`, use `Countries` instead
301304

305+
Lock
306+
----
307+
308+
* Removed `Symfony\Component\Lock\StoreInterface` in favor of `Symfony\Component\Lock\BlockingStoreInterface` and
309+
`Symfony\Component\Lock\PersistStoreInterface`.
310+
302311
Messenger
303312
---------
304313

@@ -560,3 +569,8 @@ Yaml
560569

561570
* The parser is now stricter and will throw a `ParseException` when a
562571
mapping is found inside a multi-line string.
572+
573+
WebServerBundle
574+
---------------
575+
576+
* The bundle has been removed.

src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function doTearDown(): void
4040
protected static function createClient(array $options = [], array $server = [])
4141
{
4242
if (true === static::$booted) {
43-
@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);
43+
@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);
4444
}
4545

4646
$kernel = static::bootKernel($options);

src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.4.0
5+
---------------
6+
7+
* The bundle is deprecated and will be removed in 5.0.
8+
49
4.2.0
510
-----
611

src/Symfony/Bundle/WebServerBundle/Command/ServerLogCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2828
*
29-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
29+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
3030
*/
3131
class ServerLogCommand extends Command
3232
{
@@ -80,7 +80,7 @@ protected function configure()
8080

8181
protected function execute(InputInterface $input, OutputInterface $output)
8282
{
83-
@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);
83+
@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);
8484

8585
$filter = $input->getOption('filter');
8686
if ($filter) {

src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @author Michał Pipa <michal.pipa.xsolve@gmail.com>
2929
*
30-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
30+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
3131
*/
3232
class ServerRunCommand extends Command
3333
{
@@ -92,7 +92,7 @@ protected function configure()
9292
*/
9393
protected function execute(InputInterface $input, OutputInterface $output)
9494
{
95-
@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);
95+
@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);
9696

9797
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9898

src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
2929
*
30-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
30+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
3131
*/
3232
class ServerStartCommand extends Command
3333
{
@@ -92,7 +92,7 @@ protected function configure()
9292
*/
9393
protected function execute(InputInterface $input, OutputInterface $output)
9494
{
95-
@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);
95+
@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);
9696

9797
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
9898

src/Symfony/Bundle/WebServerBundle/Command/ServerStatusCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
2828
*
29-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
29+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
3030
*/
3131
class ServerStatusCommand extends Command
3232
{
@@ -74,7 +74,7 @@ protected function configure()
7474
*/
7575
protected function execute(InputInterface $input, OutputInterface $output)
7676
{
77-
@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);
77+
@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);
7878

7979
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
8080
$server = new WebServer($this->pidFileDirectory);

src/Symfony/Bundle/WebServerBundle/Command/ServerStopCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
2626
*
27-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
27+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2828
*/
2929
class ServerStopCommand extends Command
3030
{
@@ -63,7 +63,7 @@ protected function configure()
6363
*/
6464
protected function execute(InputInterface $input, OutputInterface $output)
6565
{
66-
@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);
66+
@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);
6767

6868
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
6969

src/Symfony/Bundle/WebServerBundle/DependencyInjection/WebServerExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @author Robin Chalas <robin.chalas@gmail.com>
2222
*
23-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
23+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2424
*/
2525
class WebServerExtension extends Extension
2626
{
@@ -43,7 +43,7 @@ public function load(array $configs, ContainerBuilder $container)
4343
$container->removeDefinition('web_server.command.server_log');
4444
}
4545

46-
@trigger_error('Using the WebserverBundle is deprecated since 4.3, the new symfony local server has more feature, you should use it instead.');
46+
@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);
4747
}
4848

4949
private function getPublicDirectory(ContainerBuilder $container)

src/Symfony/Bundle/WebServerBundle/WebServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
2222
*
23-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
23+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
2424
*/
2525
class WebServer
2626
{

src/Symfony/Bundle/WebServerBundle/WebServerBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
use Symfony\Component\HttpKernel\Bundle\Bundle;
1515

1616
/**
17-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
17+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
1818
*/
1919
class WebServerBundle extends Bundle
2020
{
2121
public function boot()
2222
{
23-
@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);
23+
@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);
2424
}
2525
}

src/Symfony/Bundle/WebServerBundle/WebServerConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Fabien Potencier <fabien@symfony.com>
1616
*
17-
* @deprecated since version 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
17+
* @deprecated since Symfony 4.4, to be removed in 5.0; the new Symfony local server has more features, you can use it instead.
1818
*/
1919
class WebServerConfig
2020
{

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ CHANGELOG
44
4.4.0
55
-----
66

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

911
4.3.0
1012
-----

src/Symfony/Component/Lock/Store/CombinedStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function save(Key $key)
9898
*/
9999
public function waitAndSave(Key $key)
100100
{
101-
@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);
101+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
102102
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
103103
}
104104

src/Symfony/Component/Lock/Store/MemcachedStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function save(Key $key)
7474
*/
7575
public function waitAndSave(Key $key)
7676
{
77-
@trigger_error(sprintf('%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
77+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
7878
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
7979
}
8080

src/Symfony/Component/Lock/Store/PdoStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function save(Key $key)
145145
*/
146146
public function waitAndSave(Key $key)
147147
{
148-
@trigger_error(sprintf('%s has been deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
148+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__));
149149
throw new NotSupportedException(sprintf('The store "%s" does not supports blocking locks.', __METHOD__));
150150
}
151151

src/Symfony/Component/Lock/Store/RedisStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function save(Key $key)
7777
*/
7878
public function waitAndSave(Key $key)
7979
{
80-
@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);
80+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
8181
throw new InvalidArgumentException(sprintf('The store "%s" does not supports blocking locks.', \get_class($this)));
8282
}
8383

src/Symfony/Component/Lock/Store/ZookeeperStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function exists(Key $key): bool
8787
*/
8888
public function waitAndSave(Key $key)
8989
{
90-
@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);
90+
@trigger_error(sprintf('%s() is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.', __METHOD__), E_USER_DEPRECATED);
9191
throw new NotSupportedException();
9292
}
9393

0 commit comments

Comments
 (0)