Skip to content

Commit

Permalink
Add @internal to what is not covered by our BC promise (see #1045)
Browse files Browse the repository at this point in the history
Description
-----------

Implements #1031 

**TODO**

* [x] What about controllers? Do they need an `@internal` tag, too?
* [x] What about `Contao\CoreBundle\Repository\RememberMeRepository`?
* [x] What about `Contao\ManagerBundle\Api\*`?
* [x] What about `Contao\ManagerBundle\ContaoManager\ApiCommand\*`?

Commits
-------

b3273e3 Add @internal to what is not covered by our BC promise (see #1031)
3c7da70 Fix a wrong service name and make controllers and API classes internal
a8aaee0 Do not make the ContaoUserProvider class internal
  • Loading branch information
leofeyer committed Dec 5, 2019
1 parent f1266ec commit fd61bc4
Show file tree
Hide file tree
Showing 164 changed files with 471 additions and 4 deletions.
3 changes: 3 additions & 0 deletions calendar-bundle/src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;

/**
* @internal
*/
class Plugin implements BundlePluginInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions calendar-bundle/src/EventListener/GeneratePageListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
use Contao\StringUtil;
use Contao\Template;

/**
* @internal
*/
class GeneratePageListener
{
/**
Expand Down
3 changes: 3 additions & 0 deletions calendar-bundle/src/EventListener/InsertTagsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Contao\Events;
use Contao\StringUtil;

/**
* @internal
*/
class InsertTagsListener
{
private const SUPPORTED_TAGS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;

/**
* @internal
*/
class PreviewUrlConvertListener
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;

/**
* @internal
*/
class PreviewUrlCreateListener
{
/**
Expand Down
3 changes: 3 additions & 0 deletions calendar-bundle/src/Picker/EventPickerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class EventPickerProvider extends AbstractInsertTagPickerProvider implements Dca
*/
private $security;

/**
* @internal Do not inherit from this class; decorate the "contao_calendar.picker.event_provider" service instead
*/
public function __construct(FactoryInterface $menuFactory, RouterInterface $router, ?TranslatorInterface $translator, Security $security)
{
parent::__construct($menuFactory, $router, $translator);
Expand Down
3 changes: 3 additions & 0 deletions comments-bundle/src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;

/**
* @internal
*/
class Plugin implements BundlePluginInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Cache/ContaoCacheClearer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class ContaoCacheClearer implements CacheClearerInterface
*/
private $filesystem;

/**
* @internal Do not inherit from this class; decorate the "contao.cache.clear_internal" service instead
*/
public function __construct(Filesystem $filesystem)
{
$this->filesystem = $filesystem;
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Cache/ContaoCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class ContaoCacheWarmer implements CacheWarmerInterface
*/
private $framework;

/**
* @internal Do not inherit from this class; decorate the "contao.cache.warm_internal" service instead
*/
public function __construct(Filesystem $filesystem, ResourceFinderInterface $finder, FileLocator $locator, string $rootDir, Connection $connection, ContaoFramework $framework)
{
$this->filesystem = $filesystem;
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/AutomatorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/**
* Runs Contao automator tasks on the command line.
*
* @internal
*/
class AutomatorCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/DebugDcaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/**
* Dumps debug information about a Contao DCA.
*
* @internal
*/
class DebugDcaCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/FilesyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

/**
* Synchronizes the file system with the database.
*
* @internal
*/
class FilesyncCommand extends Command implements FrameworkAwareInterface
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

/**
* Installs the required Contao directories.
*
* @internal
*/
class InstallCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/ResizeImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

/**
* Resize deferred images that have not been processed yet.
*
* @internal
*/
class ResizeImagesCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/SymlinksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

/**
* Symlinks the public resources into the web directory.
*
* @internal
*/
class SymlinksCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/UserPasswordCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

/**
* Changes the password of a Contao back end user.
*
* @internal
*/
class UserPasswordCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Command/VersionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use Symfony\Component\Console\Output\OutputInterface;

/**
* @internal
*
* @deprecated Deprecated since Contao 4.4, to be removed in Contao 5.0; use
* "composer show | grep contao/core-bundle | awk '{ print $2 }'" instead
*/
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
use Symfony\Component\Routing\RouteCollection;
use Terminal42\ServiceAnnotationBundle\Terminal42ServiceAnnotationBundle;

/**
* @internal
*/
class Plugin implements BundlePluginInterface, RoutingPluginInterface
{
/**
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Controller/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

/**
* @Route(defaults={"_scope" = "backend", "_token_check" = true})
*
* @internal
*/
class BackendController extends AbstractController
{
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Controller/BackendCsvImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class BackendCsvImportController
*/
private $projectDir;

/**
* @internal Do not inherit from this class; decorate the "Contao\CoreBundle\Controller\BackendCsvImportController" service instead
*/
public function __construct(ContaoFramework $framework, Connection $connection, RequestStack $requestStack, TranslatorInterface $translator, string $projectDir)
{
$this->framework = $framework;
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Controller/FaviconController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

/**
* @Route(defaults={"_scope" = "frontend"})
*
* @internal
*/
class FaviconController
{
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Controller/FrontendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

/**
* @Route(defaults={"_scope" = "frontend", "_token_check" = true})
*
* @internal
*/
class FrontendController extends AbstractController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* @internal
*/
class TwoFactorController extends AbstractFrontendModuleController
{
/**
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Controller/ImagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
* @internal
*/
class ImagesController
{
/**
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Controller/InitializeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
/**
* Custom controller to support legacy entry points.
*
* @internal
*
* @deprecated Deprecated in Contao 4.0, to be removed in Contao 5.0
*/
class InitializeController extends AbstractController
Expand Down
2 changes: 2 additions & 0 deletions core-bundle/src/Controller/RobotsTxtController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

/**
* @Route(defaults={"_scope" = "frontend"})
*
* @internal
*/
class RobotsTxtController
{
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Cors/WebsiteRootsConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class WebsiteRootsConfigProvider implements ProviderInterface
*/
private $connection;

/**
* @internal Do not inherit from this class; decorate the "contao.cors.website_roots_config_provider" service instead
*/
public function __construct(Connection $connection)
{
$this->connection = $connection;
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/DataCollector/ContaoDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\DataCollector\DataCollector;

/**
* @internal
*/
class ContaoDataCollector extends DataCollector implements FrameworkAwareInterface
{
use FrameworkAwareTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;

/**
* @internal
*/
class AddAssetsPackagesPass implements CompilerPassInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* Adds the composer packages and version numbers to the container.
*
* @internal
*/
class AddPackagesPass implements CompilerPassInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
*/
class AddResourcesPathsPass implements CompilerPassInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* @internal
*/
class AddSessionBagsPass implements CompilerPassInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
*/
class DataContainerCallbackPass implements CompilerPassInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Makes services public that we need to retrieve directly.
*
* @internal
*/
class MakeServicesPublicPass implements CompilerPassInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

/**
* @internal
*/
class MapFragmentsToGlobalsPass implements CompilerPassInterface
{
use PriorityTaggedServiceTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
*/
class PickerProviderPass implements CompilerPassInterface
{
use PriorityTaggedServiceTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
*/
class RegisterHookListenersPass implements CompilerPassInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
*/
class RemembermeServicesPass implements CompilerPassInterface
{
public const OVERRIDE_PREFIX = 'security.authentication.rememberme.services.simplehash';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* @internal
*/
class SearchIndexerPass implements CompilerPassInterface
{
use PriorityTaggedServiceTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* @internal
*/
class TranslationDataCollectorPass implements CompilerPassInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions core-bundle/src/Doctrine/Schema/DcaSchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class DcaSchemaProvider
*/
private $doctrine;

/**
* @internal Do not inherit from this class; decorate the "contao.doctrine.schema_provider" service instead
*/
public function __construct(ContaoFramework $framework, Registry $doctrine)
{
$this->framework = $framework;
Expand Down

0 comments on commit fd61bc4

Please sign in to comment.