diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 28c3bc316dda9981cd4e8c9fcd446e004543c85e..2ebbf8c56e5cf3aebaf2c26504a6339c97f5d8de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,50 +50,5 @@ variables: OPT_IN_TEST_PREVIOUS_MAJOR: 1 OPT_IN_TEST_PREVIOUS_MINOR: 1 OPT_IN_TEST_NEXT_MINOR: 1 - - -################################################################################### -# -# * -# /( -# ((((, -# /((((((( -# ((((((((((* -# ,((((((((((((((( -# ,((((((((((((((((((( -# ((((((((((((((((((((((((* -# *((((((((((((((((((((((((((((( -# ((((((((((((((((((((((((((((((((((* -# *(((((((((((((((((( .(((((((((((((((((( -# ((((((((((((((((((. /(((((((((((((((((* -# /((((((((((((((((( .(((((((((((((((((, -# ,(((((((((((((((((( (((((((((((((((((( -# .(((((((((((((((((((( .((((((((((((((((( -# ((((((((((((((((((((((( ((((((((((((((((/ -# (((((((((((((((((((((((((((/ ,(((((((((((((((* -# .((((((((((((((/ /(((((((((((((. ,((((((((((((((( -# *(((((((((((((( ,(((((((((((((/ *((((((((((((((. -# ((((((((((((((, /(((((((((((((. ((((((((((((((, -# (((((((((((((/ ,(((((((((((((* ,(((((((((((((, -# *((((((((((((( .((((((((((((((( ,((((((((((((( -# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/ -# ((((((((((((( *(((((((((((((((((((((((* *(((((((((((( -# ((((((((((((( ,(((((((((((((..((((((((((((( *(((((((((((( -# ((((((((((((, /((((((((((((* /((((((((((((/ (((((((((((( -# ((((((((((((( /((((((((((((/ (((((((((((((* (((((((((((( -# (((((((((((((/ /(((((((((((( ,((((((((((((, *(((((((((((( -# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/ -# *((((((((((((((((((((((((((, /((((((((((((((((((((((((( -# ((((((((((((((((((((((((( ((((((((((((((((((((((((, -# .(((((((((((((((((((((((/ ,((((((((((((((((((((((( -# ((((((((((((((((((((((/ ,(((((((((((((((((((((/ -# *((((((((((((((((((((( (((((((((((((((((((((, -# ,(((((((((((((((((((((, ((((((((((((((((((((/ -# ,(((((((((((((((((((((* /(((((((((((((((((((( -# ((((((((((((((((((((((, ,/((((((((((((((((((((, -# ,((((((((((((((((((((((((((((((((((((((((((((((((((( -# .((((((((((((((((((((((((((((((((((((((((((((( -# .((((((((((((((((((((((((((((((((((((,. -# .,(((((((((((((((((((((((((. -# -################################################################################### \ No newline at end of file + OPT_IN_TEST_NEXT_MAJOR: 1 + RUN_JOB_UPGRADE_STATUS: 1 diff --git a/component.info.yml b/component.info.yml index dbe71bf315928f7daded1bb1dcc70ae829a37dc7..223a1ebc8bdd8e19a888cef0f5e9d462a20465ad 100644 --- a/component.info.yml +++ b/component.info.yml @@ -2,4 +2,4 @@ name: Component type: module description: 'Easily add JS components to Drupal as blocks, with only a single yml file.' package: Component -core_version_requirement: ^8 || ^9 || ^10 +core_version_requirement: ^9 || ^10 || ^11 diff --git a/composer.json b/composer.json index d814b460420e002525ff099a669aaeb18fa21659..4a2e99087a9afb685e44902d205047cc05c0575d 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,5 @@ "source": "https://git.drupalcode.org/project/component" }, "license": "GPL-2.0-or-later", - "minimum-stability": "dev", - "require": { - } + "minimum-stability": "dev" } diff --git a/modules/component_example/component_example.info.yml b/modules/component_example/component_example.info.yml index a593bbf87425153d16f83ce7833b94fe0a4da6ef..227ee99aa6a598c12ceebeef19796c399e92e1e2 100644 --- a/modules/component_example/component_example.info.yml +++ b/modules/component_example/component_example.info.yml @@ -2,6 +2,6 @@ name: Component example type: module description: 'An example module with some sample components for reference.' package: Component -core_version_requirement: ^8 || ^9 || ^10 +core_version_requirement: ^9 || ^10 || ^11 dependencies: - component:component diff --git a/modules/component_example/components/example_blank/example_blank.component.yml b/modules/component_example/components/example_blank/example_blank.component.yml index c76091c8f56714bdbcaa97ac8928964080ef3e1b..f52d3909c0472bc1e9efaf16426d1f51d5c694b2 100644 --- a/modules/component_example/components/example_blank/example_blank.component.yml +++ b/modules/component_example/components/example_blank/example_blank.component.yml @@ -1,2 +1,5 @@ name: Example blank description: 'This is a blank component for testing.' +props: + type: object + properties: {} diff --git a/modules/component_example/components/example_blank/example_blank.twig b/modules/component_example/components/example_blank/example_blank.twig new file mode 100644 index 0000000000000000000000000000000000000000..8ab052a4a76d70d37a845f515e63c71d831c3f67 --- /dev/null +++ b/modules/component_example/components/example_blank/example_blank.twig @@ -0,0 +1,6 @@ +{# +/** + * @file + * Required Twig template for components as of Drupal 10.3. + */ +#} diff --git a/modules/component_example/components/example_config/example_config.component.yml b/modules/component_example/components/example_config/example_config.component.yml index 1caf4132f9c35a43eee628372e0ad8af14ccfd09..edc7fb65eb9bb3e96e09b34edfe2ec53263a2d34 100644 --- a/modules/component_example/components/example_config/example_config.component.yml +++ b/modules/component_example/components/example_config/example_config.component.yml @@ -40,3 +40,6 @@ form_configuration: type: date title: 'Birthday' default_value: '2227-01-20' +props: + type: object + properties: {} diff --git a/modules/component_example/components/example_config/example_config.twig b/modules/component_example/components/example_config/example_config.twig new file mode 100644 index 0000000000000000000000000000000000000000..8ab052a4a76d70d37a845f515e63c71d831c3f67 --- /dev/null +++ b/modules/component_example/components/example_config/example_config.twig @@ -0,0 +1,6 @@ +{# +/** + * @file + * Required Twig template for components as of Drupal 10.3. + */ +#} diff --git a/modules/component_example/components/example_react_calc/example_react_calc.component.yml b/modules/component_example/components/example_react_calc/example_react_calc.component.yml index 1387ee0d81700b4bad2564ea17c348a8a89ea454..0b15407c5b3c9a170b64186bab78503abf7a32e4 100644 --- a/modules/component_example/components/example_react_calc/example_react_calc.component.yml +++ b/modules/component_example/components/example_react_calc/example_react_calc.component.yml @@ -11,4 +11,7 @@ dependencies: - component/example_react_lib cache: max-age: 0 +props: + type: object + properties: {} # Inspired by: https://codepen.io/jlmortola/pen/VPYaEv diff --git a/modules/component_example/components/example_react_calc/example_react_calc.twig b/modules/component_example/components/example_react_calc/example_react_calc.twig new file mode 100644 index 0000000000000000000000000000000000000000..8ab052a4a76d70d37a845f515e63c71d831c3f67 --- /dev/null +++ b/modules/component_example/components/example_react_calc/example_react_calc.twig @@ -0,0 +1,6 @@ +{# +/** + * @file + * Required Twig template for components as of Drupal 10.3. + */ +#} diff --git a/modules/component_example/components/example_react_lib/example_react_lib.component.yml b/modules/component_example/components/example_react_lib/example_react_lib.component.yml index daab79603fb3deeccd423b9267d37951b4463f1d..4cf3dae4882a640296fdb2ce5445ca24ea0aab70 100644 --- a/modules/component_example/components/example_react_lib/example_react_lib.component.yml +++ b/modules/component_example/components/example_react_lib/example_react_lib.component.yml @@ -14,3 +14,6 @@ js: //unpkg.com/react-dom@16.7.0/umd/react-dom.production.min.js: { type: external, minified: true, crossorigin: anonymous } //unpkg.com/create-react-class@15.6.0/create-react-class.min.js : { type: external, minified: true, crossorigin: anonymous } //unpkg.com/babel-standalone@6/babel.min.js: { type: external, minified: true, crossorigin: anonymous } +props: + type: object + properties: {} diff --git a/modules/component_example/components/example_react_lib/example_react_lib.twig b/modules/component_example/components/example_react_lib/example_react_lib.twig new file mode 100644 index 0000000000000000000000000000000000000000..8ab052a4a76d70d37a845f515e63c71d831c3f67 --- /dev/null +++ b/modules/component_example/components/example_react_lib/example_react_lib.twig @@ -0,0 +1,6 @@ +{# +/** + * @file + * Required Twig template for components as of Drupal 10.3. + */ +#} diff --git a/modules/component_example/components/example_tabs/example_tabs.component.yml b/modules/component_example/components/example_tabs/example_tabs.component.yml index 47837aaa18798723ab5c876518703071893142da..170679c1c7219e18a4e8ab0e085d8374c19f713c 100755 --- a/modules/component_example/components/example_tabs/example_tabs.component.yml +++ b/modules/component_example/components/example_tabs/example_tabs.component.yml @@ -44,3 +44,6 @@ form_configuration: # https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/group/theme_render/8.2.x#sec_caching cache: max-age: 60 +props: + type: object + properties: {} diff --git a/modules/component_example/components/example_tabs/example_tabs.twig b/modules/component_example/components/example_tabs/example_tabs.twig new file mode 100644 index 0000000000000000000000000000000000000000..8ab052a4a76d70d37a845f515e63c71d831c3f67 --- /dev/null +++ b/modules/component_example/components/example_tabs/example_tabs.twig @@ -0,0 +1,6 @@ +{# +/** + * @file + * Required Twig template for components as of Drupal 10.3. + */ +#} diff --git a/src/ComponentDiscovery.php b/src/ComponentDiscovery.php index 89f9d9c289dd2494baadb831808c216ed2aaab17..1c96d6acb41421cc65b31b326f63080ffb672d8f 100755 --- a/src/ComponentDiscovery.php +++ b/src/ComponentDiscovery.php @@ -6,7 +6,7 @@ use Drupal\Component\Discovery\DiscoveryException; use Drupal\Component\Serialization\Exception\InvalidDataTypeException; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Extension\ThemeHandlerInterface; -use Drupal\Core\Serialization\Yaml; +use Drupal\Component\Serialization\Yaml; use Drupal\Core\Site\Settings; use Psr\Log\LoggerInterface; diff --git a/src/ComponentServiceProvider.php b/src/ComponentServiceProvider.php index 1d8bf7aa98de4c444668a068a9dbbcbb35bea537..da45664ba42dea62f86da1bbd40141f61031ee82 100644 --- a/src/ComponentServiceProvider.php +++ b/src/ComponentServiceProvider.php @@ -7,7 +7,7 @@ use Drupal\Core\DependencyInjection\ServiceProviderBase; use Symfony\Component\DependencyInjection\Reference; /** - * Component service provider + * Component service provider. */ class ComponentServiceProvider extends ServiceProviderBase { diff --git a/src/Plugin/Derivative/ComponentBlockDeriver.php b/src/Plugin/Derivative/ComponentBlockDeriver.php index 4d8de86c958ae6181e096b8c0099bb718be739a6..947877438186c9fdb5b472ea7e4499da007fe92c 100644 --- a/src/Plugin/Derivative/ComponentBlockDeriver.php +++ b/src/Plugin/Derivative/ComponentBlockDeriver.php @@ -3,6 +3,7 @@ namespace Drupal\component\Plugin\Derivative; use Drupal\component\ComponentDiscoveryInterface; +use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Core\Plugin\Context\ContextDefinition; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Symfony\Component\DependencyInjection\ContainerInterface;