Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feature #20777 [ClassLoader] Deprecate Apc/WinCache/Xcache class load…
…ers (nicolas-grekas)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[ClassLoader] Deprecate Apc/WinCache/Xcache class loaders

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

See composer/composer#5559

Commits
-------

fa36e1d [ClassLoader] Deprecate Apc/WinCache/Xcache class loaders
  • Loading branch information
fabpot committed Dec 6, 2016
2 parents 4644ee9 + fa36e1d commit 9f475f8
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 1 deletion.
8 changes: 8 additions & 0 deletions UPGRADE-3.3.md
@@ -0,0 +1,8 @@
UPGRADE FROM 3.2 to 3.3
=======================

ClassLoader
-----------

* The ApcClassLoader, WinCacheClassLoader and XcacheClassLoader classes have been deprecated
in favor of the `--apcu-autoloader` option introduced in composer 1.3
6 changes: 6 additions & 0 deletions UPGRADE-4.0.md
@@ -1,6 +1,12 @@
UPGRADE FROM 3.x to 4.0
=======================

ClassLoader
-----------

* The ApcClassLoader, WinCacheClassLoader and XcacheClassLoader classes have been removed
in favor of the `--apcu-autoloader` option introduced in composer 1.3

Console
-------

Expand Down
Expand Up @@ -32,7 +32,6 @@
<argument>Symfony\Component\HttpFoundation\Request</argument>
<argument>Symfony\Component\HttpKernel\Kernel</argument>
<argument>Symfony\Component\ClassLoader\ClassCollectionLoader</argument>
<argument>Symfony\Component\ClassLoader\ApcClassLoader</argument>
</argument>
</service>

Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/ClassLoader/ApcClassLoader.php
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\ClassLoader;

@trigger_error('The '.__NAMESPACE__.'\ApcClassLoader class is deprecated since version 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.', E_USER_DEPRECATED);

/**
* ApcClassLoader implements a wrapping autoloader cached in APC for PHP 5.3.
*
Expand Down Expand Up @@ -44,6 +46,8 @@
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
*
* @deprecated since version 3.3, to be removed in 4.0. Use `composer install --apcu-autoloader` instead.
*/
class ApcClassLoader
{
Expand Down
6 changes: 6 additions & 0 deletions src/Symfony/Component/ClassLoader/CHANGELOG.md
@@ -1,6 +1,12 @@
CHANGELOG
=========

3.3.0
-----

* The ApcClassLoader, WinCacheClassLoader and XcacheClassLoader classes have been deprecated
in favor of the `--apcu-autoloader` option introduced in composer 1.3

3.0.0
-----

Expand Down
Expand Up @@ -14,6 +14,9 @@
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\ClassLoader\ClassLoader;

/**
* @group legacy
*/
class ApcClassLoaderTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/ClassLoader/WinCacheClassLoader.php
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\ClassLoader;

@trigger_error('The '.__NAMESPACE__.'\WinCacheClassLoader class is deprecated since version 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.', E_USER_DEPRECATED);

/**
* WinCacheClassLoader implements a wrapping autoloader cached in WinCache.
*
Expand Down Expand Up @@ -43,6 +45,8 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
* @author Artem Ryzhkov <artem@smart-core.org>
*
* @deprecated since version 3.3, to be removed in 4.0. Use `composer install --apcu-autoloader` instead.
*/
class WinCacheClassLoader
{
Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Component/ClassLoader/XcacheClassLoader.php
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\ClassLoader;

@trigger_error('The '.__NAMESPACE__.'\XcacheClassLoader class is deprecated since version 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.', E_USER_DEPRECATED);

/**
* XcacheClassLoader implements a wrapping autoloader cached in XCache for PHP 5.3.
*
Expand Down Expand Up @@ -43,6 +45,8 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Kris Wallsmith <kris@symfony.com>
* @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
*
* @deprecated since version 3.3, to be removed in 4.0. Use `composer install --apcu-autoloader` instead.
*/
class XcacheClassLoader
{
Expand Down

2 comments on commit 9f475f8

@Seldaek
Copy link
Member

@Seldaek Seldaek commented on 9f475f8 Dec 6, 2016

Choose a reason for hiding this comment

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

No biggie but IMO once composer/composer#5947 is tackled we should point users to the docs page and not just tell them to migrate to --apcu-autoloader, because maybe some of them actually shouldn't?

@xabbuh
Copy link
Member

@xabbuh xabbuh commented on 9f475f8 Dec 7, 2016

Choose a reason for hiding this comment

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

good idea, I created #20804 so we don't forget about this

Please sign in to comment.