diff --git a/.idea/oliverdavies-uk.iml b/.idea/oliverdavies-uk.iml
index c241f3d14..7e065a8fd 100644
--- a/.idea/oliverdavies-uk.iml
+++ b/.idea/oliverdavies-uk.iml
@@ -140,6 +140,7 @@
+
diff --git a/.idea/php.xml b/.idea/php.xml
index e97eec3a0..63b499427 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -149,9 +149,12 @@
+
-
+
+
+
diff --git a/composer.json b/composer.json
index 9411a4595..e23001c99 100644
--- a/composer.json
+++ b/composer.json
@@ -41,6 +41,7 @@
"drupal/stage_file_proxy": "^1.0",
"drush/drush": "^10",
"nesbot/carbon": "^2.33",
+ "symfony/config": "^3.4",
"tightenco/collect": "^8.17"
},
"require-dev": {
diff --git a/composer.lock b/composer.lock
index d36a47eca..2ebc91db7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "cda1968001f7e8b3c87b26f9eae2d89d",
+ "content-hash": "65f1f71774508070ca5c65a6f52e7fd8",
"packages": [
{
"name": "asm89/stack-cors",
@@ -5673,6 +5673,82 @@
],
"time": "2020-03-15T09:38:08+00:00"
},
+ {
+ "name": "symfony/config",
+ "version": "v3.4.47",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/config.git",
+ "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f",
+ "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/filesystem": "~2.8|~3.0|~4.0",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<3.3",
+ "symfony/finder": "<3.3"
+ },
+ "require-dev": {
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/event-dispatcher": "~3.3|~4.0",
+ "symfony/finder": "~3.3|~4.0",
+ "symfony/yaml": "~3.0|~4.0"
+ },
+ "suggest": {
+ "symfony/yaml": "To use the yaml reference dumper"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Config\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Config Component",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/config/tree/v3.4.47"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-24T10:57:07+00:00"
+ },
{
"name": "symfony/console",
"version": "v3.4.41",
diff --git a/web/modules/custom/blog/opdavies_blog.services.yml b/web/modules/custom/blog/opdavies_blog.services.yml
index 713053d26..f633240a6 100644
--- a/web/modules/custom/blog/opdavies_blog.services.yml
+++ b/web/modules/custom/blog/opdavies_blog.services.yml
@@ -1,24 +1,25 @@
+parameters:
+ container.autowiring.strict_mode: true
+
services:
+ Drupal\Core\Config\ConfigFactoryInterface:
+ alias: config.factory
+
+ Drupal\Core\Entity\EntityTypeManagerInterface:
+ alias: entity_type.manager
+
+ Drupal\Core\Queue\QueueFactory:
+ alias: queue
+
Drupal\opdavies_blog\EventSubscriber\PushPostToSocialMediaOnceItIsPublished:
autowire: true
tags:
- { name: event_subscriber }
Drupal\opdavies_blog\EventSubscriber\SortTagsAlphabeticallyWhenPostIsSaved:
+ autowire: true
tags:
- { name: event_subscriber }
- Drupal\opdavies_blog\Repository\PostRepository:
- autowire: true
-
- Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher:
- autowire: true
-
- Drupal\opdavies_blog\Service\PostPusher\NullPostPusher:
- autowire: true
-
- Drupal\opdavies_blog\Service\PostPusher\PostPusher:
- alias: Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher
-
- Drupal\opdavies_blog\Repository\RelatedPostsRepository:
- autowire: true
+ GuzzleHttp\ClientInterface:
+ alias: http_client
diff --git a/web/modules/custom/blog/src/OpdaviesBlogServiceProvider.php b/web/modules/custom/blog/src/OpdaviesBlogServiceProvider.php
new file mode 100644
index 000000000..ad1898aeb
--- /dev/null
+++ b/web/modules/custom/blog/src/OpdaviesBlogServiceProvider.php
@@ -0,0 +1,36 @@
+in(__DIR__ . '/' . $directory)
+ ->files()
+ ->name('*.php');
+
+ foreach ($files as $file) {
+ $class = 'Drupal\opdavies_blog\\' . $directory . '\\' .
+ str_replace('/', '\\', substr($file->getRelativePathname(), 0, -4));
+
+ if ($container->hasDefinition($class)) {
+ continue;
+ }
+
+ $definition = new Definition($class);
+ $definition->setAutowired(TRUE);
+ $container->setDefinition($class, $definition);
+ }
+ }
+ }
+
+}
diff --git a/web/modules/custom/blog/tests/modules/blog_test/opdavies_blog_test.services.yml b/web/modules/custom/blog/tests/modules/blog_test/opdavies_blog_test.services.yml
index 321315221..a7fd9ca47 100644
--- a/web/modules/custom/blog/tests/modules/blog_test/opdavies_blog_test.services.yml
+++ b/web/modules/custom/blog/tests/modules/blog_test/opdavies_blog_test.services.yml
@@ -1,6 +1,12 @@
+parameters:
+ container.autowiring.strict_mode: true
+
services:
+ Drupal\Core\Entity\EntityTypeManagerInterface:
+ alias: entity_type.manager
+
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
- alias: Drupal\opdavies_blog\Service\PostPusher\NullPostPusher
+ class: Drupal\opdavies_blog\Service\PostPusher\NullPostPusher
Drupal\opdavies_blog_test\Factory\PostFactory:
autowire: true
diff --git a/web/modules/custom/talks/opdavies_talks.services.yml b/web/modules/custom/talks/opdavies_talks.services.yml
index 8533d2e7d..bcf30012f 100644
--- a/web/modules/custom/talks/opdavies_talks.services.yml
+++ b/web/modules/custom/talks/opdavies_talks.services.yml
@@ -1,13 +1,10 @@
services:
+ Drupal\Component\Datetime\TimeInterface:
+ alias: datetime.time
+
+ Drupal\Core\Entity\EntityTypeManagerInterface:
+ alias: entity_type.manager
+
Drupal\opdavies_talks\EventSubscriber\UpdateTalkNodeBeforeSave:
tags:
- { name: event_subscriber }
-
- Drupal\opdavies_talks\Repository\TalkRepository:
- autowire: true
-
- Drupal\opdavies_talks\Service\TalkCounter:
- autowire: true
-
- Drupal\opdavies_talks\Service\TalkDateUpdater:
- autowire: true
diff --git a/web/modules/custom/talks/src/OpdaviesTalksServiceProvider.php b/web/modules/custom/talks/src/OpdaviesTalksServiceProvider.php
new file mode 100644
index 000000000..866125bd5
--- /dev/null
+++ b/web/modules/custom/talks/src/OpdaviesTalksServiceProvider.php
@@ -0,0 +1,36 @@
+in(__DIR__ . '/' . $directory)
+ ->files()
+ ->name('*.php');
+
+ foreach ($files as $file) {
+ $class = 'Drupal\opdavies_talks\\' . $directory . '\\' .
+ str_replace('/', '\\', substr($file->getRelativePathname(), 0, -4));
+
+ if ($container->hasDefinition($class)) {
+ continue;
+ }
+
+ $definition = new Definition($class);
+ $definition->setAutowired(TRUE);
+ $container->setDefinition($class, $definition);
+ }
+ }
+ }
+
+}