diff --git a/src/Blog/Embedder.php b/src/Blog/Embedder.php
new file mode 100644
index 0000000..8cb8eec
--- /dev/null
+++ b/src/Blog/Embedder.php
@@ -0,0 +1,60 @@
+loader->load();
+ $vectors = $this->createEmbeddings($posts);
+ $this->pushToChromaDB($posts, $vectors);
+ }
+
+ /**
+ * @param Post[] $posts
+ *
+ * @return Vector[]
+ */
+ private function createEmbeddings(array $posts): array
+ {
+ $texts = array_map(fn (Post $post) => $post->toString(), $posts);
+ $response = $this->platform->request(new Embeddings(), $texts);
+
+ assert($response instanceof AsyncResponse);
+ $response = $response->unwrap();
+ assert($response instanceof VectorResponse);
+
+ return $response->getContent();
+ }
+
+ /**
+ * @param Post[] $posts
+ * @param Vector[] $vectors
+ */
+ private function pushToChromaDB(array $posts, array $vectors): void
+ {
+ $collection = $this->chromaClient->getOrCreateCollection('symfony_blog');
+
+ $ids = array_map(fn (Post $post) => $post->id, $posts);
+ $vectors = array_map(fn (Vector $vector) => $vector->getData(), $vectors);
+
+ $collection->upsert($ids, $vectors, $posts);
+ }
+}
diff --git a/src/Blog/Loader.php b/src/Blog/Loader.php
new file mode 100644
index 0000000..866e7cc
--- /dev/null
+++ b/src/Blog/Loader.php
@@ -0,0 +1,42 @@
+httpClient->request('GET', 'https://feeds.feedburner.com/symfony/blog');
+
+ $posts = [];
+ $crawler = new Crawler($response->getContent());
+ $crawler->filter('item')->each(function (Crawler $node) use (&$posts) {
+ $title = $node->filter('title')->text();
+ $posts[] = new Post(
+ Uuid::v5(Uuid::fromString('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), $title),
+ $title,
+ $node->filter('link')->text(),
+ $node->filter('description')->text(),
+ (new Crawler($node->filter('content\:encoded')->text()))->text(),
+ $node->filter('dc\:creator')->text(),
+ new \DateTimeImmutable($node->filter('pubDate')->text()),
+ );
+ });
+
+ return $posts;
+ }
+}
diff --git a/src/Blog/Post.php b/src/Blog/Post.php
new file mode 100644
index 0000000..6aff1ac
--- /dev/null
+++ b/src/Blog/Post.php
@@ -0,0 +1,55 @@
+title}
+ From: {$this->author} on {$this->date->format('Y-m-d')}
+ Description: {$this->description}
+ {$this->content}
+ TEXT;
+ }
+
+ /**
+ * @return array{
+ * id: string,
+ * title: string,
+ * link: string,
+ * description: string,
+ * content: string,
+ * author: string,
+ * date: string,
+ * }
+ */
+ public function toArray(): array
+ {
+ return [
+ 'id' => $this->id->toRfc4122(),
+ 'title' => $this->title,
+ 'link' => $this->link,
+ 'description' => $this->description,
+ 'content' => $this->content,
+ 'author' => $this->author,
+ 'date' => $this->date->format('Y-m-d'),
+ ];
+ }
+}
diff --git a/src/Command/BlogEmbedCommand.php b/src/Command/BlogEmbedCommand.php
index ea5436e..27affd9 100644
--- a/src/Command/BlogEmbedCommand.php
+++ b/src/Command/BlogEmbedCommand.php
@@ -4,39 +4,18 @@
namespace App\Command;
-use Codewithkyrian\ChromaDB\Client;
-use PhpLlm\LlmChain\Bridge\OpenAI\Embeddings;
-use PhpLlm\LlmChain\Document\Vector;
-use PhpLlm\LlmChain\Model\Response\AsyncResponse;
-use PhpLlm\LlmChain\Model\Response\VectorResponse;
-use PhpLlm\LlmChain\PlatformInterface;
+use App\Blog\Embedder;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\DomCrawler\Crawler;
-use Symfony\Component\Uid\Uuid;
-use Symfony\Contracts\HttpClient\HttpClientInterface;
-/**
- * @phpstan-type Post array{
- * id: Uuid,
- * title: string,
- * link: string,
- * description: string,
- * content: string,
- * author: string,
- * date: \DateTimeImmutable,
- * }
- */
#[AsCommand('app:blog:embed', description: 'Create embeddings for Symfony blog and push to ChromaDB.')]
final class BlogEmbedCommand extends Command
{
public function __construct(
- private readonly HttpClientInterface $httpClient,
- private readonly PlatformInterface $platform,
- private readonly Client $chromaClient,
+ private readonly Embedder $embedder,
) {
parent::__construct();
}
@@ -46,85 +25,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io = new SymfonyStyle($input, $output);
$io->title('Loading RSS of Symfony blog as embeddings into ChromaDB');
- $posts = $this->loadBlogPosts();
- $vectors = $this->createEmbeddings($posts);
- $this->pushToChromaDB($posts, $vectors);
+ $this->embedder->embedBlog();
$io->success('Symfony Blog Successfully Embedded!');
return Command::SUCCESS;
}
-
- /**
- * @return list
- */
- private function loadBlogPosts(): array
- {
- $response = $this->httpClient->request('GET', 'https://feeds.feedburner.com/symfony/blog');
-
- $posts = [];
- $crawler = new Crawler($response->getContent());
- $crawler->filter('item')->each(function (Crawler $node) use (&$posts) {
- $title = $node->filter('title')->text();
- $posts[] = [
- 'id' => Uuid::v5(Uuid::fromString('6ba7b810-9dad-11d1-80b4-00c04fd430c8'), $title),
- 'title' => $title,
- 'link' => $node->filter('link')->text(),
- 'description' => $node->filter('description')->text(),
- 'content' => (new Crawler($node->filter('content\:encoded')->text()))->text(),
- 'author' => $node->filter('dc\:creator')->text(),
- 'date' => new \DateTimeImmutable($node->filter('pubDate')->text()),
- ];
- });
-
- return $posts;
- }
-
- /**
- * @param Post[] $posts
- *
- * @return Vector[]
- */
- private function createEmbeddings(array $posts): array
- {
- $texts = [];
- foreach ($posts as $post) {
- $texts[] = <<format('Y-m-d')}
- Description: {$post['description']}
- {$post['content']}
- TEXT;
- }
-
- $response = $this->platform->request(new Embeddings(), $texts);
-
- assert($response instanceof AsyncResponse);
- $response = $response->unwrap();
- assert($response instanceof VectorResponse);
-
- return $response->getContent();
- }
-
- /**
- * @param Post[] $posts
- * @param Vector[] $vectors
- */
- private function pushToChromaDB(array $posts, array $vectors): void
- {
- $collection = $this->chromaClient->getOrCreateCollection('symfony_blog');
-
- $ids = array_column($posts, 'id');
- $vectors = array_map(fn (Vector $vector) => $vector->getData(), $vectors);
-
- $collection->upsert($ids, $vectors, $posts);
- }
}
diff --git a/tests/Blog/EmbedderTest.php b/tests/Blog/EmbedderTest.php
new file mode 100644
index 0000000..51652be
--- /dev/null
+++ b/tests/Blog/EmbedderTest.php
@@ -0,0 +1,101 @@
+createMock(PlatformInterface::class);
+ $chromaClient = $this->createMock(Client::class);
+ $posts = $loader->load();
+ $vectors = [
+ new Vector([0.1, 0.2, 0.3]),
+ new Vector([0.4, 0.5, 0.6]),
+ new Vector([0.7, 0.8, 0.9]),
+ new Vector([1.0, 1.1, 1.2]),
+ new Vector([1.3, 1.4, 1.5]),
+ new Vector([1.6, 1.7, 1.8]),
+ new Vector([1.9, 2.0, 2.1]),
+ new Vector([2.2, 2.3, 2.4]),
+ new Vector([2.5, 2.6, 2.7]),
+ new Vector([2.8, 2.9, 3.0]),
+ ];
+ $platform
+ ->method('request')
+ ->willReturn($this->createAsyncResponse($vectors));
+
+ $collection = $this->createMock(CollectionResource::class);
+ $chromaClient
+ ->expects($this->once())
+ ->method('getOrCreateCollection')
+ ->with('symfony_blog')
+ ->willReturn($collection);
+
+ $collection
+ ->expects($this->once())
+ ->method('upsert')
+ ->with(
+ array_map(fn (Post $post) => $post->id, $posts),
+ array_map(fn (Vector $vector) => $vector->getData(), $vectors),
+ $posts,
+ );
+
+ $embedder = new Embedder($loader, $platform, $chromaClient);
+ $embedder->embedBlog();
+ }
+
+ /**
+ * @param Vector[] $vectors
+ */
+ private function createAsyncResponse(array $vectors): AsyncResponse
+ {
+ $converter = new class($vectors) implements ResponseConverter {
+ /**
+ * @param Vector[] $vectors
+ */
+ public function __construct(private readonly array $vectors)
+ {
+ }
+
+ public function supports(Model $model, object|array|string $input): bool
+ {
+ return true;
+ }
+
+ public function convert(HttpResponse $response, array $options = []): LlmResponse
+ {
+ return new VectorResponse(...$this->vectors);
+ }
+ };
+
+ return new AsyncResponse($converter, new MockResponse());
+ }
+}
diff --git a/tests/Blog/LoaderTest.php b/tests/Blog/LoaderTest.php
new file mode 100644
index 0000000..31f42f0
--- /dev/null
+++ b/tests/Blog/LoaderTest.php
@@ -0,0 +1,46 @@
+load();
+
+ self::assertCount(10, $posts);
+
+ self::assertSame('A Week of Symfony #936 (2-8 December 2024)', $posts[0]->title);
+ self::assertSame('https://symfony.com/blog/a-week-of-symfony-936-2-8-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed', $posts[0]->link);
+ self::assertStringContainsString('This week, Symfony celebrated the SymfonyCon 2024 Vienna conference with great success.', $posts[0]->description);
+ self::assertStringContainsString('Select a track for a guided path through 100+ video tutorial courses about Symfony', $posts[0]->content);
+ self::assertSame('Javier Eguiluz', $posts[0]->author);
+ self::assertEquals(new \DateTimeImmutable('8.12.2024 09:39:00 +0100'), $posts[0]->date);
+
+ self::assertSame('A Week of Symfony #935 (25 November - 1 December 2024)', $posts[1]->title);
+ self::assertSame('Symfony 7.2 curated new features', $posts[2]->title);
+ self::assertSame('Symfony 7.2.0 released', $posts[3]->title);
+ self::assertSame('Symfony 5.4.49 released', $posts[4]->title);
+ self::assertSame('SymfonyCon Vienna 2024: See you next week!', $posts[5]->title);
+ self::assertSame('New in Symfony 7.2: Misc. Improvements (Part 2)', $posts[6]->title);
+ self::assertSame('Symfony 7.1.9 released', $posts[7]->title);
+ self::assertSame('Symfony 6.4.16 released', $posts[8]->title);
+ self::assertSame('Symfony 5.4.48 released', $posts[9]->title);
+ }
+}
diff --git a/tests/Blog/PostTest.php b/tests/Blog/PostTest.php
new file mode 100644
index 0000000..866f3f2
--- /dev/null
+++ b/tests/Blog/PostTest.php
@@ -0,0 +1,62 @@
+toString());
+ }
+
+ public function testPostToArray(): void
+ {
+ $id = Uuid::v4();
+ $post = new Post(
+ $id,
+ 'Hello, World!',
+ 'https://example.com/hello-world',
+ 'This is a test description.',
+ 'This is a test post.',
+ 'John Doe',
+ new \DateTimeImmutable('2024-12-08 09:39:00'),
+ );
+
+ $expected = [
+ 'id' => $id->toRfc4122(),
+ 'title' => 'Hello, World!',
+ 'link' => 'https://example.com/hello-world',
+ 'description' => 'This is a test description.',
+ 'content' => 'This is a test post.',
+ 'author' => 'John Doe',
+ 'date' => '2024-12-08',
+ ];
+
+ self::assertSame($expected, $post->toArray());
+ }
+}
diff --git a/tests/Blog/fixtures/blog.rss b/tests/Blog/fixtures/blog.rss
new file mode 100644
index 0000000..9fc7c51
--- /dev/null
+++ b/tests/Blog/fixtures/blog.rss
@@ -0,0 +1,996 @@
+
+
+
+ Symfony Blog
+
+ https://symfony.com/blog/
+ Most recent posts published on the Symfony project blog
+ Tue, 10 Dec 2024 23:56:55 +0100
+ Sun, 08 Dec 2024 09:39:00 +0100
+ en
+
+
+ https://symfony.com/blog/a-week-of-symfony-936-2-8-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ This week, Symfony celebrated the SymfonyCon 2024 Vienna conference with great success. This annual event brought together the global Symfony community to exchange ideas, learn new things, and collaborate on contributions to the Symfony project. In addition,…
+ This week, Symfony celebrated the SymfonyCon 2024 Vienna conference with great success. This annual event brought together the global Symfony community to exchange ideas, learn new things, and collaborate on contributions to the Symfony project. In addition, the upcoming Symfony 7.3 version introduced support for pre-compressing web assets and a new userIsGranted() security method to test user authorization without relying on the session.
+
+
Symfony development highlights
+
+
This week, 57 pull requests were merged (28 in code and 29 in docs) and 28 issues were closed (22 in code and 6 in docs). Excluding merges, 35 authors made 2,784 additions and 954 deletions. See details for code and docs.
SymfonyCasts is the official way to learn Symfony.
+Select a track for a guided path through 100+ video tutorial courses about
+Symfony, PHP and JavaScript.
+
+
This week, SymfonyCasts published the following updates:
+ ]]>
+ https://symfony.com/blog/a-week-of-symfony-936-2-8-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Sun, 08 Dec 2024 09:39:00 +0100
+ https://symfony.com/blog/a-week-of-symfony-936-2-8-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/a-week-of-symfony-935-25-november-1-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ This week, the stable Symfony 7.2.0 version was released, featuring tens of new additions. Additionally, we announced the Black Friday Symfony promotions. Furthermore, the maintenance releases for Symfony 5.4.48, 6.4.16, and 7.1.9 are now available. Finally,…
+ This week, the stable Symfony 7.2.0 version was released, featuring tens of new additions. Additionally, we announced the Black Friday Symfony promotions. Furthermore, the maintenance releases for Symfony 5.4.48, 6.4.16, and 7.1.9 are now available. Finally, next week, the global Symfony community will gather in Vienna for the SymfonyCon 2024 conference.
+
+
Symfony development highlights
+
+
This week, 39 pull requests were merged (28 in code and 11 in docs) and 21 issues were closed (19 in code and 2 in docs). Excluding merges, 21 authors made 1,033 additions and 332 deletions. See details for code and docs.
Symfony CLI is a must-have tool when developing
+Symfony applications on your local machine. It includes the
+Symfony Local Server,
+the best way to run local Symfony applications. This week Symfony CLI released
+its new 5.10.5,
+version with the following changes:
+
+
+
Update fixtures (@fabpot)
+
Update check-requirements.php script to v2.0.3 (@fabpot)
+
Fix path on local envs (@fabpot)
+
Add a warning about the listening IP change in 5.10.3 (@tucksaun)
+
+
+
Symfony Jobs
+
+
These are some of the most recent Symfony job offers:
SymfonyCasts is the official way to learn Symfony.
+Select a track for a guided path through 100+ video tutorial courses about
+Symfony, PHP and JavaScript.
+
+
This week, SymfonyCasts published the following updates:
+ ]]>
+ https://symfony.com/blog/a-week-of-symfony-935-25-november-1-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Sun, 01 Dec 2024 09:54:00 +0100
+ https://symfony.com/blog/a-week-of-symfony-935-25-november-1-december-2024?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-7-2-curated-new-features?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 7.2.0 has been released. As for any other Symfony release, our backward compatibility promise applies and this means that you should be able to upgrade easily to 7.2 without changing anything in your code.
+
+During the last couple of months, we've…
+ Symfony 7.2.0 has been released. As for any other Symfony release, our backward compatibility promise applies and this means that you should be able to upgrade easily to 7.2 without changing anything in your code.
+
+
During the last couple of months, we've blogged about the great 7.2 new features. I highly recommend you to read these articles about Symfony 7.2 as they contain the major changes for this new version:
+
+
+
Week, WordCount and Yaml Constraints: Symfony 7.2 introduces three new constraints: one to validate week numbers, another to check word count, and a third to validate YAML syntax.
+
Silent Verbosity: Symfony 7.2 introduces a new silent verbosity to supress all output, including errors.
+
Expression Language Improvements: Symfony 7.2 improves the ExpressionLanguage component with new bitwise and logical operators, easier registration of custom providers and support for comments.
+
AsMessage Attribute: Symfony 7.2 introduces a new AsMessage attribute, allowing you to configure the transport(s) directly within the message class
+
Named Serializers: Symfony 7.2 allows you to configure multiple serializer instances with different default contexts, name converters, and sets of normalizers and encoders.
+
Translations Linter: Symfony 7.2 includes a new lint:translations command to check the validity of your translation contents.
+
WhenNot Attribute: Symfony 7.2 introduces the WhenNot attribute to exclude a service from certain environments.
+
Lazy Choice Loader: Symfony 7.2 introduces a new lazy choice loader to improve performance of choice fields with lots of options.
+
String Component Improvements: Symfony 7.2 improves the String component with a new kebab-case method, new truncation modes and a Spanish inflector.
+
Compound Constraint Improvements: In Symfony 7.2, Compound constraints are easier to test and can define the validation groups and payload via the constructor.
+
Mailer and Notifier Integrations: Symfony 7.2 adds some new integrations to the Mailer and Notifier components, adding to the tens of integrations already available.
+
Improved Translation Extractor: Symfony 7.2 improves the translation extractor command, allowing customization of prefixes, modification of update behavior, and sorting of content.
+
Desktop Notifications: Symfony 7.2 allows to send notifications directly to your local desktop using the new desktop channel in the Notifier component.
+
Template DX Improvements: In Symfony 7.2, you can set HTTP headers in static pages and render specific Twig blocks using attributes.
+
Non-Empty Container Parameters: Symfony 7.2 introduces a new utility to require that some parameters exist and have non-empty values.
+
Keepalive Messenger Transports: Symfony 7.2 introduces the keepalive feature for Messenger transports, preventing timeouts when processing messages.
+
Mime Improvements: In Symfony 7.2, the Mime component adds support for custom encoders and Unicode email addresses.
+
Console Finished Indicator: Symfony 7.2 allows customizing the indicator displayed when a Console command completes.
+
Constraint Improvements: Symfony 7.2 adds a validation mode for BIC constraint, an errorPath for Unique constraint, format options for Ulid constraint, and context support for When constraint.
+
Simpler Trusted Proxies Configuration: Symfony 7.2 simplifies trusted proxy configuration with a private subnet shortcut and new environment variables.
New Command Options: Symfony 7.2 introduces new command options to lint container env vars, format messenger stats output, and filter assets during debugging.
Serializer Improvements: Symfony 7.2 enhances the Serializer with support for DateTime subclasses, a new SnakeCaseToCamelCase name converter, updated UUID constants, and optional Webhook integration.
+
Stateless CSRF: Symfony 7.2 introduces stateless CSRF protection, enabling secure token validation without relying on server-side sessions.
+
Deprecations: Symfony 7.2 deprecates several features, including session config options, empty user identifiers, and the !tagged tag.
+
Optional Secret: Symfony 7.2 simplifies application setup by making the secret optional, enhancing security and developer experience.
+
Misc. Improvements (Part 1): Symfony 7.2 introduces features like custom retry delays for Messenger, improved null-coalesce support in expressions, custom attributes for user login passports, and enhanced VarDumper support for PHP 8.4 property hooks.
+ ]]>
+ https://symfony.com/blog/symfony-7-2-curated-new-features?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Fri, 29 Nov 2024 09:52:00 +0100
+ https://symfony.com/blog/symfony-7-2-curated-new-features?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-7-2-0-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 7.2.0 has just been released.
+Check the Living on the Edge
+category on this blog to learn about the main features of this new stable release;
+or check the release announcement of BETA1
+to get the list of all new features.
+Here is the list of the most…
+ Symfony 7.2.0 has just been released.
+
Check the Living on the Edge
+category on this blog to learn about the main features of this new stable release;
+or check the release announcement of BETA1
+to get the list of all new features.
+
Here is the list of the most important changes since 7.2.0-RC1:
+
+
bug #59023 [HttpClient] Fix streaming and redirecting with NoPrivateNetworkHttpClient (@nicolas-grekas)
+
bug #59014 [Form] Allow integer for the calendar option of DateType (@alexandre-daubois)
+
bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+
bug #58562 [HttpClient] Close gracefull when the server closes the connection abruptly (@discordier)
+
bug #59007 [Dotenv] read runtime config from composer.json in debug dotenv command (@xabbuh)
+
bug #58963 [PropertyInfo] Fix write visibility for Asymmetric Visibility and Virtual Properties (@xabbuh, @pan93412)
+
bug #58983 [Translation] [Bridge][Lokalise] Fix empty keys array in PUT, DELETE requests causing Lokalise API error (@DominicLuidold)
+
bug #58956 [DoctrineBridge] Fix Connection::createSchemaManager() for Doctrine DBAL v2 (@neodevcode)
+
bug #58959 [PropertyInfo] consider write property visibility to decide whether a property is writable (@xabbuh)
+
bug #58964 [TwigBridge] do not add child nodes to EmptyNode instances (@xabbuh)
Want to upgrade to this new release? Because Symfony protects
+backwards-compatibility very closely, this should be quite easy. Use
+SymfonyInsight upgrade reports
+to detect the code you will need to change in your project and
+read our upgrade
+documentation to learn more.
+
Want to be notified whenever a new Symfony release is published? Or when a
+version is not maintained anymore? Or only when a security issue is fixed?
+Consider subscribing to the Symfony Roadmap Notifications.
+ ]]>
+ https://symfony.com/blog/symfony-7-2-0-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Fri, 29 Nov 2024 09:46:04 +0100
+ https://symfony.com/blog/symfony-7-2-0-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-5-4-49-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 5.4.49 has just been released.
+Here is the list of the most important changes since 5.4.48:
+
+ bug #59023 [HttpClient] Fix streaming and redirecting with NoPrivateNetworkHttpClient (@nicolas-grekas)
+
+WARNING: 5.4.49 is the last version for the Symfony…
+ Symfony 5.4.49 has just been released.
+Here is the list of the most important changes since 5.4.48:
+
+
bug #59023 [HttpClient] Fix streaming and redirecting with NoPrivateNetworkHttpClient (@nicolas-grekas)
+
+
WARNING: 5.4.49 is the last version for the Symfony 5.4 branch. If some
+of your projects are still using this version, consider upgrading as soon as
+possible. However, if you can't upgrade soon, note that we still provide
+security issue releases according to our release policy.
+
Want to upgrade to this new release? Because Symfony protects
+backwards-compatibility very closely, this should be quite easy. Use
+SymfonyInsight upgrade reports
+to detect the code you will need to change in your project and
+read our upgrade
+documentation to learn more.
+
Want to be notified whenever a new Symfony release is published? Or when a
+version is not maintained anymore? Or only when a security issue is fixed?
+Consider subscribing to the Symfony Roadmap Notifications.
+ ]]>
+ https://symfony.com/blog/symfony-5-4-49-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Fri, 29 Nov 2024 09:39:54 +0100
+ https://symfony.com/blog/symfony-5-4-49-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfonycon-vienna-2024-see-you-next-week?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+
+
+SymfonyCon Vienna is just around the corner! 🎉 Next week, we’ll come together for an exciting event featuring brand-new talks, inspiring speakers, and everything you need to make the most of this gathering with the Symfony and PHP community.
+
+💡Pro…
+
+
+
+SymfonyCon Vienna is just around the corner! 🎉 Next week, we’ll come together for an exciting event featuring brand-new talks, inspiring speakers, and everything you need to make the most of this gathering with the Symfony and PHP community.
+
+
💡Pro tip: Use the business meeting feature in your SymfonyLive profile to schedule meetings with sponsors ahead of time!
+
+
Not registered yet? Don’t miss out—there’s still time to grab your tickets for:
+
+
+
December 3-4: Workshop Days – Choose from a variety of 1-day training sessions. Spots are filling fast!
+
December 5-6: Conference Days – Dive into 3 parallel tracks plus an unconference track, all in English.
🧑💻Unlock new skills and level up your expertise with our workshops!
+
+
Held on December 3-4, 2024, these workshops are crafted for developers eager to dive deep into Symfony, PHP, and modern coding practices. Here’s what you can look forward to:
Symfony 7: The Fast Track by Nicolas Grekas (2-day intensive): Jumpstart your journey with Symfony 7 and grasp its latest innovations.
+
+
+
Whether you're new to Symfony or looking to master advanced techniques, there’s something here for everyone. Don't miss the chance to learn directly from Symfony experts and apply your skills to real-world projects. Secure your spot now and get ready to accelerate your Symfony journey!
+
+
🎟️ Select the ticket of your choice
+
+
Register by clicking on Buy ticket and choose your ticket:
+
+
+
"Workshops only", December 3-4
+
"Conference only", December 5-6
+
Combo ticket "Conference + Workshops" to live a full Symfony week experience!
+
+
+
🫵 Participate in the Unconference track
+
+
The Unconference track is a participant-driven format where attendees shape the content and discussions in real-time. Have a topic you're passionate about? Claim your slot by emailing us at events@symfony.com and set the stage for an unforgettable experience.
+
+
Each unconference talk lasts 20 minutes with a screen and projector available on both days.
Read our attendee guide for venue, accommodation, and transportation details.
+
Use the business meeting feature in your Symfony Live profile to schedule meetings with sponsors ahead of time!
+
+
+
🎉 Plan to attend the community evening on Thursday, December 5
+
+
Join us for a "Night at the Museum" at one of Vienna's most iconic place: Naturhistorisches Museum Wien (20 minutes by public transport from the conference). From 7:30-10:30 pm. Drinks, music & access to parts of permanent exhibition included!
+
+
💻 Save the date for the Symfony hackathon on Saturday, December 7
+
+
Everyone is welcome to join the hackday! Whether you're an experienced contributor or new to the community, your participation is highly valued as it brings a fresh perspective! More details are available here. Address: Stockwerk, Pater-Schwartz-Gasse 11A, 1150 Wien - Map
+
+
💡 Follow the "conferences" blog posts to stay updated!
+
+
We can't wait to meet you in person to learn and share the latest about Symfony. Join us and be part of the @symfony community! 🫶
The PasswordStrength constraint validates that the given password has reached
+a minimum strength configured in the constraint. In Symfony 7.2, we've changed
+the visibility of the estimateStrength() validator method from private to public.
+
This allows you to access the estimated password strength and display it, for
+example, in the interface, so users can better understand the quality of their
+passwords.
In Symfony 7.2, we've added a new defaultAction() method in the HtmlSanitizer component.
+This method sets the default action for elements that are not explicitly allowed
+or blocked:
HtmlSanitizerAction is a PHP enum with three cases: Drop (removes the element
+and its children); Block (removes the element but keeps its children); and Allow
+(keeps the element).
The current defaultNull() of BooleanNode, used when
+defining and processing configuration values, casts null values to true.
+In Symfony 7.2, we've updated this method so you can define nullable boolean
+values properly:
The IpUtils class includes an anonymize() method to obscure part of the IP
+address for user privacy. In Symfony 7.2, we've added two new arguments to this
+method so you can specify how many bytes to anonymize:
+
+
+
+
useSymfony\Component\HttpFoundation\IpUtils;
+
+$ipv4 = '123.234.235.236';
+// for IPv4 addresses, you can hide 0 to 4 bytes
+$anonymousIpv4 = IpUtils::anonymize($ipv4, 3);
+// $anonymousIpv4 = '123.0.0.0'
+
+$ipv6 = '2a01:198:603:10:396e:4789:8e99:890f';
+// for IPv6 addresses, you can hide 0 to 16 bytes
+// (you must define the second argument (bytes to anonymize in IPv4 addresses)
+// even when you are only anonymizing IPv6 addresses)
+$anonymousIpv6 = IpUtils::anonymize($ipv6, 3, 10);
+// $anonymousIpv6 = '2a01:198:603::'
When defining a configuration tree, you can use many node types for
+configuration values (boolean, integers, floats, enums, arrays, etc.). However,
+you couldn't define string values directly; they were specified as scalar nodes.
+
In Symfony 7.2, we've added a string node type and a stringNode() method,
+allowing you to define configuration values as strings explicitly:
In Symfony 7.2, the security panel of the Symfony Profiler has been improved
+with several new features. First, the authenticators tab has been updated.
+Previously, authenticators that didn't support the request were not shown:
+
+
+
+
Now, to make debugging easier, you can see all the application's authenticators.
+If an authenticator doesn't support the request, it will be labeled as "not supported":
+
+
+
+
When using a stateful firewall, the token tab of de-authenticated users now
+includes a link to the request that contained the previously authenticated user:
+
+
+
+
The authenticators tab has also been redesigned to display information more
+clearly. It now also shows whether an authenticator is lazy and includes any exception
+passed to the onAuthenticationFailure() method:
+
+
+
+
+
This is the final blog post in the New in Symfony 7.2 series. We hope you
+enjoyed it and discovered some of the great new features introduced in Symfony 7.2.
+Check out the Symfony minor version upgrade guide to learn how to upgrade to 7.2
+from other 7.x versions. Meanwhile, we've already started working on Symfony 7.3,
+which will be released at the end of May 2025.
+ ]]>
+ https://symfony.com/blog/new-in-symfony-7-2-misc-improvements-part-2?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Thu, 28 Nov 2024 08:40:00 +0100
+ https://symfony.com/blog/new-in-symfony-7-2-misc-improvements-part-2?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-7-1-9-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 7.1.9 has just been released.
+Here is the list of the most important changes since 7.1.8:
+
+ bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+bug #58562 [HttpClient] Close gracefull when the server closes…
+ Symfony 7.1.9 has just been released.
+Here is the list of the most important changes since 7.1.8:
+
+
bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+
bug #58562 [HttpClient] Close gracefull when the server closes the connection abruptly (@discordier)
+
bug #59007 [Dotenv] read runtime config from composer.json in debug dotenv command (@xabbuh)
+
bug #58963 [PropertyInfo] Fix write visibility for Asymmetric Visibility and Virtual Properties (@xabbuh, @pan93412)
+
bug #58983 [Translation] [Bridge][Lokalise] Fix empty keys array in PUT, DELETE requests causing Lokalise API error (@DominicLuidold)
+
bug #58956 [DoctrineBridge] Fix Connection::createSchemaManager() for Doctrine DBAL v2 (@neodevcode)
+
bug #58959 [PropertyInfo] consider write property visibility to decide whether a property is writable (@xabbuh)
+
bug #58964 [TwigBridge] do not add child nodes to EmptyNode instances (@xabbuh)
+
bug #58952 [Cache] silence warnings issued by Redis Sentinel on connection issues (@xabbuh)
+
bug #58859 [AssetMapper] ignore missing directory in isVendor() (@alexislefebvre)
+
bug #58917 [OptionsResolver] Allow Union/Intersection Types in Resolved Closures (@zanbaldwin)
+
bug #58822 [DependencyInjection] Fix checking for interfaces in ContainerBuilder::getReflectionClass() (@donquixote)
+
bug #58865 Dynamically fix compatibility with doctrine/data-fixtures v2 (@greg0ire)
+
bug #58921 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception (@lyrixx)
+
bug #58908 [DoctrineBridge] don't call EntityManager::initializeObject() with scalar values (@xabbuh)
+
bug #58938 [Cache] make RelayProxyTrait compatible with relay extension 0.9.0 (@xabbuh)
+
bug #58924 [HttpClient] Fix empty hosts in option "resolve" (@nicolas-grekas)
+
bug #58915 [HttpClient] Fix option "resolve" with IPv6 addresses (@nicolas-grekas)
Want to upgrade to this new release? Because Symfony protects
+backwards-compatibility very closely, this should be quite easy. Use
+SymfonyInsight upgrade reports
+to detect the code you will need to change in your project and
+read our upgrade
+documentation to learn more.
+
Want to be notified whenever a new Symfony release is published? Or when a
+version is not maintained anymore? Or only when a security issue is fixed?
+Consider subscribing to the Symfony Roadmap Notifications.
+ ]]>
+ https://symfony.com/blog/symfony-7-1-9-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Wed, 27 Nov 2024 14:02:38 +0100
+ https://symfony.com/blog/symfony-7-1-9-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-6-4-16-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 6.4.16 has just been released.
+Here is the list of the most important changes since 6.4.15:
+
+ bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+bug #58562 [HttpClient] Close gracefull when the server closes…
+ Symfony 6.4.16 has just been released.
+Here is the list of the most important changes since 6.4.15:
+
+
bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+
bug #58562 [HttpClient] Close gracefull when the server closes the connection abruptly (@discordier)
+
bug #59007 [Dotenv] read runtime config from composer.json in debug dotenv command (@xabbuh)
+
bug #58963 [PropertyInfo] Fix write visibility for Asymmetric Visibility and Virtual Properties (@xabbuh, @pan93412)
+
bug #58983 [Translation] [Bridge][Lokalise] Fix empty keys array in PUT, DELETE requests causing Lokalise API error (@DominicLuidold)
+
bug #58956 [DoctrineBridge] Fix Connection::createSchemaManager() for Doctrine DBAL v2 (@neodevcode)
+
bug #58959 [PropertyInfo] consider write property visibility to decide whether a property is writable (@xabbuh)
+
bug #58964 [TwigBridge] do not add child nodes to EmptyNode instances (@xabbuh)
+
bug #58952 [Cache] silence warnings issued by Redis Sentinel on connection issues (@xabbuh)
+
bug #58859 [AssetMapper] ignore missing directory in isVendor() (@alexislefebvre)
+
bug #58917 [OptionsResolver] Allow Union/Intersection Types in Resolved Closures (@zanbaldwin)
+
bug #58822 [DependencyInjection] Fix checking for interfaces in ContainerBuilder::getReflectionClass() (@donquixote)
+
bug #58865 Dynamically fix compatibility with doctrine/data-fixtures v2 (@greg0ire)
+
bug #58921 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception (@lyrixx)
+
bug #58908 [DoctrineBridge] don't call EntityManager::initializeObject() with scalar values (@xabbuh)
+
bug #58938 [Cache] make RelayProxyTrait compatible with relay extension 0.9.0 (@xabbuh)
+
bug #58924 [HttpClient] Fix empty hosts in option "resolve" (@nicolas-grekas)
+
bug #58915 [HttpClient] Fix option "resolve" with IPv6 addresses (@nicolas-grekas)
Want to upgrade to this new release? Because Symfony protects
+backwards-compatibility very closely, this should be quite easy. Use
+SymfonyInsight upgrade reports
+to detect the code you will need to change in your project and
+read our upgrade
+documentation to learn more.
+
Want to be notified whenever a new Symfony release is published? Or when a
+version is not maintained anymore? Or only when a security issue is fixed?
+Consider subscribing to the Symfony Roadmap Notifications.
+ ]]>
+ https://symfony.com/blog/symfony-6-4-16-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+
+ Wed, 27 Nov 2024 13:54:27 +0100
+ https://symfony.com/blog/symfony-6-4-16-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed#comments-list
+
+
+
+ https://symfony.com/blog/symfony-5-4-48-released?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
+ Symfony 5.4.48 has just been released.
+Here is the list of the most important changes since 5.4.47:
+
+ bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+bug #58562 [HttpClient] Close gracefull when the server closes…
+ Symfony 5.4.48 has just been released.
+Here is the list of the most important changes since 5.4.47:
+
+
bug #59013 [HttpClient] Fix checking for private IPs before connecting (@nicolas-grekas)
+
bug #58562 [HttpClient] Close gracefull when the server closes the connection abruptly (@discordier)
+
bug #59007 [Dotenv] read runtime config from composer.json in debug dotenv command (@xabbuh)
+
bug #58963 [PropertyInfo] Fix write visibility for Asymmetric Visibility and Virtual Properties (@xabbuh, @pan93412)
+
bug #58983 [Translation] [Bridge][Lokalise] Fix empty keys array in PUT, DELETE requests causing Lokalise API error (@DominicLuidold)
+
bug #58959 [PropertyInfo] consider write property visibility to decide whether a property is writable (@xabbuh)
+
bug #58964 [TwigBridge] do not add child nodes to EmptyNode instances (@xabbuh)
+
bug #58822 [DependencyInjection] Fix checking for interfaces in ContainerBuilder::getReflectionClass() (@donquixote)
+
bug #58865 Dynamically fix compatibility with doctrine/data-fixtures v2 (@greg0ire)
+
bug #58921 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception (@lyrixx)
+
bug #58908 [DoctrineBridge] don't call EntityManager::initializeObject() with scalar values (@xabbuh)
+
bug #58924 [HttpClient] Fix empty hosts in option "resolve" (@nicolas-grekas)
+
bug #58915 [HttpClient] Fix option "resolve" with IPv6 addresses (@nicolas-grekas)
Want to upgrade to this new release? Because Symfony protects
+backwards-compatibility very closely, this should be quite easy. Use
+SymfonyInsight upgrade reports
+to detect the code you will need to change in your project and
+read our upgrade
+documentation to learn more.
+
Want to be notified whenever a new Symfony release is published? Or when a
+version is not maintained anymore? Or only when a security issue is fixed?
+Consider subscribing to the Symfony Roadmap Notifications.