From d782bd9081a8eaf69400f89fc5e4d3d6d73f9628 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Wed, 27 Nov 2024 22:42:37 -0500 Subject: [PATCH] Try and figure out what's going on with the flash messages. --- app/composer.lock | 44 +++++++++---------- .../Database/DatabaseHandler.php | 13 ++++-- .../Middleware/AuthenticatedMiddleware.php | 3 +- app/src/Middlewares.php | 2 +- app/templates/feed/skeleton.xml.twig | 2 + dev/php/config/xdebug.ini | 2 +- 6 files changed, 38 insertions(+), 28 deletions(-) diff --git a/app/composer.lock b/app/composer.lock index 9caa87b..7c1e6bf 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -3151,16 +3151,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -3198,7 +3198,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -3214,7 +3214,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", @@ -3758,16 +3758,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { @@ -3821,7 +3821,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -3837,7 +3837,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", @@ -5116,16 +5116,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.4.3", + "version": "11.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76" + "reference": "f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8e8ed1854de5d36c088ec1833beae40d2dedd76", - "reference": "e8e8ed1854de5d36c088ec1833beae40d2dedd76", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4", + "reference": "f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4", "shasum": "" }, "require": { @@ -5135,7 +5135,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", @@ -5146,7 +5146,7 @@ "phpunit/php-timer": "^7.0.1", "sebastian/cli-parser": "^3.0.2", "sebastian/code-unit": "^3.0.1", - "sebastian/comparator": "^6.1.1", + "sebastian/comparator": "^6.2.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", "sebastian/exporter": "^6.1.3", @@ -5196,7 +5196,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.4" }, "funding": [ { @@ -5212,7 +5212,7 @@ "type": "tidelift" } ], - "time": "2024-10-28T13:07:50+00:00" + "time": "2024-11-27T10:44:52+00:00" }, { "name": "sebastian/cli-parser", @@ -6248,12 +6248,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "ext-pdo": "*" }, - "platform-dev": {}, + "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/app/src/Infrastructure/Database/DatabaseHandler.php b/app/src/Infrastructure/Database/DatabaseHandler.php index 02673fb..84519e8 100644 --- a/app/src/Infrastructure/Database/DatabaseHandler.php +++ b/app/src/Infrastructure/Database/DatabaseHandler.php @@ -9,6 +9,13 @@ class DatabaseHandler implements DatabaseHandlerInterface { private PDO $handle; + /** + * @param string $host + * @param string $username + * @param string $password + * @param string $database + * @param int $port + */ public function __construct( private string $host, private string $username, @@ -18,13 +25,13 @@ class DatabaseHandler implements DatabaseHandlerInterface ) { $this->handle = new PDO( $this->getConnectionString(), - $username, - $password + $this->username, + $this->password ); } /** - * @return PDO For this particular Handler we will return the PDO objectg + * @return PDO For this particular Handler we will return the PDO object */ public function getConnection() { diff --git a/app/src/Middleware/AuthenticatedMiddleware.php b/app/src/Middleware/AuthenticatedMiddleware.php index 816dbe3..14512b6 100644 --- a/app/src/Middleware/AuthenticatedMiddleware.php +++ b/app/src/Middleware/AuthenticatedMiddleware.php @@ -19,7 +19,8 @@ class AuthenticatedMiddleware implements MiddlewareInterface public function process(Request $request, RequestHandler $handler): Response { if ($this->session->has('user')) { - if ($this->session->get('user')['authenticated']) { + $userSession = $this->session->get('user'); + if ($userSession['authenticated']) { return $handler->handle($request); } } diff --git a/app/src/Middlewares.php b/app/src/Middlewares.php index 2cefbbb..282923c 100644 --- a/app/src/Middlewares.php +++ b/app/src/Middlewares.php @@ -56,6 +56,6 @@ class Middlewares $app->add(TwigMiddleware::create($app, $twig)); // Add the error handling middleware - $app->addErrorMiddleware(true, true, true); + $app->addErrorMiddleware(true, true, true); } } diff --git a/app/templates/feed/skeleton.xml.twig b/app/templates/feed/skeleton.xml.twig index 562c793..85662df 100644 --- a/app/templates/feed/skeleton.xml.twig +++ b/app/templates/feed/skeleton.xml.twig @@ -11,6 +11,7 @@ {% block channel %} + {{ channel.title }} {{ channel.url }} @@ -39,6 +40,7 @@ {% endblock %} + {% block image %}{% endblock %} {# Render each episoe in here #} diff --git a/dev/php/config/xdebug.ini b/dev/php/config/xdebug.ini index db5db76..f717568 100644 --- a/dev/php/config/xdebug.ini +++ b/dev/php/config/xdebug.ini @@ -3,4 +3,4 @@ zend_extension=xdebug xdebug.mode=develop,debug xdebug.client_host=host.docker.internal xdebug.start_with_request=yes - +xdebug.idekey="slovocast"