Skip to content

Commit

Permalink
[Live][Stimulus] Removing experimental & auditing internal classes
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jan 28, 2024
1 parent b07f864 commit 9ebae32
Show file tree
Hide file tree
Showing 61 changed files with 26 additions and 118 deletions.
5 changes: 1 addition & 4 deletions src/LiveComponent/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Live Components

**EXPERIMENTAL** This component is currently experimental and is
likely to change, or even change drastically.

Live components work with the [TwigComponent](https://symfony.com/bundles/ux-twig-component/current/index.html)
library to give you the power to automatically update your
Twig components on the frontend as the user interacts with them.
Inspired by [Livewire](https://laravel-livewire.com/) and
[Phoenix LiveView](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html).

Want a demo? Check out https://github.com/weaverryan/live-demo.
Want a demo? Check out https://ux.symfony.com/live-component.

**This repository is a READ-ONLY sub-tree split**. See
https://github.com/symfony/ux to create issues or submit pull requests.
Expand Down
12 changes: 4 additions & 8 deletions src/LiveComponent/doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
Live Components
===============

.. caution::

This component is currently experimental and is likely to change, or even
change drastically.

Live components builds on top of the `TwigComponent`_ library
to give you the power to automatically update your Twig components on
the frontend as the user interacts with them. Inspired by
Expand Down Expand Up @@ -3459,8 +3454,10 @@ This bundle aims at following the same Backward Compatibility promise as
the Symfony framework:
https://symfony.com/doc/current/contributing/code/bc.html

However it is currently considered `experimental`_, meaning it is not
bound to Symfony's BC policy for the moment.
For JavaScript files, the public API (i.e. documented features and exports
from the main JavaScript file) is protected by the backward compatibility
promise. However, any internal implementation in the JavaScript files
(i.e. exports from internal files) is not protected.

.. _`TwigComponent`: https://symfony.com/bundles/ux-twig-component/current/index.html
.. _TwigComponent documentation: https://symfony.com/bundles/ux-twig-component/current/index.html
Expand All @@ -3469,7 +3466,6 @@ bound to Symfony's BC policy for the moment.
.. _`Twig Component`: https://symfony.com/bundles/ux-twig-component/current/index.html
.. _`Twig Component mount documentation`: https://symfony.com/bundles/ux-twig-component/current/index.html#the-mount-method
.. _`Symfony form`: https://symfony.com/doc/current/forms.html
.. _`experimental`: https://symfony.com/doc/current/contributing/code/experimental.html
.. _`dependent form fields`: https://ux.symfony.com/live-component/demos/dependent-form-fields
.. _StimulusBundle configured in your app: https://symfony.com/bundles/StimulusBundle/current/index.html
.. _`localizes its URLs`: https://symfony.com/doc/current/translation/locale.html#translation-locale-url
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/AsLiveComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
* @see https://symfony.com/bundles/ux-live-component
*
* @author Kevin Bond <[email protected]>
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
final class AsLiveComponent extends AsTwigComponent
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/LiveAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* An attribute to register a LiveAction method.
*
* @see https://symfony.com/bundles/ux-live-component/current/index.html#actions
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
class LiveAction
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/LiveArg.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* @see https://symfony.com/bundles/ux-live-component/current/index.html#actions-arguments
*
* @author Tomas Norkūnas <[email protected]>
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
final class LiveArg
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/LiveListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* method and re-render the component.
*
* @see https://symfony.com/bundles/ux-live-component/current/index.html#listeners
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class LiveListener extends LiveAction
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/LiveProp.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* An attribute to mark a property as a "LiveProp".
*
* @see https://symfony.com/bundles/ux-live-component/current/index.html#liveprops-stateful-component-properties
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_PROPERTY)]
final class LiveProp
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/PostHydrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

/**
* An attribute to register a PostHydrate hook.
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
final class PostHydrate
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/PreDehydrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

/**
* An attribute to register a PreDehydrate hook.
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
final class PreDehydrate
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Attribute/PreReRender.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*
* This hook ONLY happens when rendering via HTTP: it does
* not happen during the initial render of a component.
*
* @experimental
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
final class PreReRender
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/ComponentToolsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* Trait with shortcut methods useful for live components.
*
* @author Ryan Weaver <[email protected]>
*
* @experimental
*/
trait ComponentToolsTrait
{
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/ComponentValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class ComponentValidator implements ComponentValidatorInterface, ServiceSubscriberInterface
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/ComponentValidatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*/
interface ComponentValidatorInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/ComponentWithFormTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*/
trait ComponentWithFormTrait
{
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/DefaultActionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*/
trait DefaultActionTrait
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class ComponentDefaultActionPass implements CompilerPassInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class OptionalDependencyPass implements CompilerPassInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class LiveComponentExtension extends Extension implements PrependExtensionInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
*
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class AddLiveAttributesSubscriber implements EventSubscriberInterface, ServiceSubscriberInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
use Symfony\UX\TwigComponent\Event\PostMountEvent;
use Symfony\UX\TwigComponent\Event\PreRenderEvent;

/**
* Handles the "defer" key, which causes the component to be rendered asynchronously.
*
* @internal
*/
final class DeferLiveComponentSubscriber implements EventSubscriberInterface
{
private const DEFAULT_LOADING_TAG = 'div';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
*
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class InterceptChildComponentRenderSubscriber implements EventSubscriberInterface, ServiceSubscriberInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
* @author Kevin Bond <[email protected]>
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class LiveComponentSubscriber implements EventSubscriberInterface, ServiceSubscriberInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
/**
* @author Nicolas Rigaud <[email protected]>
*
* @experimental
*
* @internal
*/
class QueryStringInitializeSubscriber implements EventSubscriberInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
*
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
final class ResetDeterministicIdSubscriber implements EventSubscriberInterface
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Exception/HydrationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class HydrationException extends BadRequestHttpException
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Form/Type/LiveCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

/**
* @author Gábor Egyed <[email protected]>
*
* @experimental
*/
final class LiveCollectionType extends AbstractType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\Persistence\ObjectManager;

/**
* Handles hydration of Doctrine entities.
*
* @internal
*/
class DoctrineEntityHydrationExtension implements HydrationExtensionInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace Symfony\UX\LiveComponent\Hydration;

/**
* Interface for custom hydration of objects.
*/
interface HydrationExtensionInterface
{
/**
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/LiveCollectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

/**
* @author Gábor Egyed <[email protected]>
*
* @experimental
*/
trait LiveCollectionTrait
{
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/LiveComponentBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*/
final class LiveComponentBundle extends Bundle
{
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/LiveComponentHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class LiveComponentHydrator
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/LiveResponder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
namespace Symfony\UX\LiveComponent;

/**
* @experimental
*
* @author Ryan Weaver <[email protected]>
*/
final class LiveResponder
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Metadata/LiveComponentMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class LiveComponentMetadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class LiveComponentMetadataFactory implements ResetInterface
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Metadata/LivePropMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class LivePropMetadata
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Twig/DeterministicTwigIdCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class DeterministicTwigIdCalculator
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Twig/LiveComponentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class LiveComponentExtension extends AbstractExtension
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Twig/LiveComponentRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
/**
* @author Kevin Bond <[email protected]>
*
* @experimental
*
* @internal
*/
final class LiveComponentRuntime
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Util/ChildComponentPartialRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
/**
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class ChildComponentPartialRenderer implements ServiceSubscriberInterface
Expand Down
2 changes: 0 additions & 2 deletions src/LiveComponent/src/Util/DehydratedProps.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*
* @author Ryan Weaver <[email protected]>
*
* @experimental
*
* @internal
*/
class DehydratedProps
Expand Down
Loading

0 comments on commit 9ebae32

Please sign in to comment.