Jérôme Tamarelle
Jérôme Tamarelle boosted:
Jérôme Tamarellegromnan@phpc.social
2025-07-11

@symfony check @chris conferences to learn more about the new Symfony AI christopher-hertel.de/

Jérôme Tamarellegromnan@phpc.social
2025-07-11

@symfony check @chris conferences to learn more about the new Symfony AI christopher-hertel.de/

Jérôme Tamarelle boosted:
Symfonysymfony
2025-07-11

🚀 Kicking off the Symfony AI Initiative
➡️ symfony.com/blog/kicking-off-t

Jérôme Tamarelle boosted:
2025-06-12

I think some collection of community-approved attributes might be beneficial for PHP.

I’m thinking in terms of attributes like `#[Internal]` that might not make sense to add directly to the language but would be good to have so that static analysis tools and IDEs could standardize on them (like with phpdoc annotations).

Is this something @phpfig would take on? If not them, who?

#PHP #PHPFIG

Jérôme Tamarelle boosted:
2025-06-04

🚨 #APIPlatformCon Speaker reveal! Meet @gromnan: maintainer of the PHP drivers and libraries for MongoDB and member of the @symfony Core Team. Don’t miss his talk on everything you need to know about using API Platform with MongoDB. Join us: api-platform.com/con/2025

Meet JérômeMeet our API Platform Con speaker: Jérôme Tamarelle

A regular open-source contributor for the past 15 years, Jérôme joined the Symfony Core Team in 2021 and is currently the maintainer of the PHP drivers and libraries for MongoDB.MongoDB : Demandez-en plus à votre base de données

Don’t miss his talk covering everything you need to know about using API Platform with MongoDB — and why MongoDB is a perfect match for modern APIs, especially when used with our framework.
Jérôme Tamarellegromnan@phpc.social
2025-05-28

@ellisgl interesting, why do you prefer XML over Attributes?

Jérôme Tamarellegromnan@phpc.social
2025-05-28

Have you ever used XML for Symfony config or routing? It's set to be deprecated in 7.4. If that's a concern for you, it's the time to speak up.
XML adds extra overhead when creating a Configuration class and an .xsd schema. Good to see it being phased out. github.com/symfony/symfony/iss

Jérôme Tamarellegromnan@phpc.social
2025-05-16

Just when we thought the #Symfony Dependency Injection component was feature complete, we've opened a new chapter with the introduction of resource definitions. Classes can be tagged according to the interfaces or attributes they use, to be injected them into services.
This leverages the classes exploration feature of the container builder and invalidate the cache when code is modified, making project configuration even more automatic, and still controllable.
symfony.com/blog/new-in-symfon

PHP code showing usage of addResourceTag method for ApiResource attribute.
Jérôme Tamarellegromnan@phpc.social
2025-04-28

🚀 New in Symfony 7.3: Twig Extension Attributes

"This new syntax makes your extensions cleaner, faster to write, easier to maintain and lazy-loaded by default; while keeping the full power of the Twig integration." Well summarized! #php

symfony.com/blog/new-in-symfon

mastodon.social/@symfony/11441

Jérôme Tamarelle boosted:
Symfonysymfony
2025-04-28

🚀 New in Symfony 7.3: Twig Extension Attributes
➡️ symfony.com/blog/new-in-symfon

Jérôme Tamarellegromnan@phpc.social
2025-04-16

@stof That's true!
It would be nice to have a PHP built-in attribute to mark new parameters without breaking backward compatibility. They would work in the same way as func_get_arg. Similar to #[ReturnTypeWillChange] but that could be used in PHP code.

Jérôme Tamarellegromnan@phpc.social
2025-04-16

A reminder for maintainers of #PHP libraries: adding a parameter to a method of an interface causes a fatal error in all the classes that implement it. It's a BC break that should be prohibed in a minor version.
In Symfony, we add the parameter virtually using phpdoc, and read it using func_get_arg.

PHP code: /** * @param int $nbToken * * @psalm-param int<1, max> $nbToken */ public function mark(string $place /* , int $nbToken = 1 */): void { $nbToken = 1 < \func_num_args() ? func_get_arg(1) : 1; } Source: https://github.com/symfony/symfony/blob/01c26aa928ecc5dc42ce90268299c190c6b712ed/src/Symfony/Component/Workflow/Marking.php#L39
Jérôme Tamarellegromnan@phpc.social
2025-04-15

While the major release was made only 5 days ago, we have already reached install parity for the mongodb extension in version 1 and 2 ... with pie.
With pecl, the latest version is automatically installed for most people, so download stats are going well. #PHP

Daily installs from packagist: 1 for version 1 and 1 for version 2.
https://packagist.org/packages/mongodb/mongodb-extension/statsTotal downloads of mongodb extension with pecl: 47k for version 2
https://pecl.php.net/package-stats.php?pid=981&rid=&cid=7
Jérôme Tamarelle boosted:
Jérôme Tamarellegromnan@phpc.social
2025-04-10

The new major version of the MongoDB PHP driver have been released. This is a boring release that only removes deprecated things. As any other good library that takes care of its users, the awesome features are in the minor releases. github.com/mongodb/mongo-php-l #PHP

Jérôme Tamarelle boosted:
Jérôme Tamarellegromnan@phpc.social
2025-04-10

Using closures and generators in #PHP classes can create circular references without you even realizing it. Learn to recognize these patterns to avoid memory leaks. dev.to/gromnan/php-closures-an

class A
{
    public iterable $iterator;

    public function __construct()
    {
        $this->iterator = $this->generator();
    }

    private function generator(): Generator
    {
        yield;
    }
}class A {
    public Closure $closure;
    public function __construct()
    {
        $this->closure = function () {};
    }
}
Jérôme Tamarellegromnan@phpc.social
2025-04-10

The new major version of the MongoDB PHP driver have been released. This is a boring release that only removes deprecated things. As any other good library that takes care of its users, the awesome features are in the minor releases. github.com/mongodb/mongo-php-l #PHP

Jérôme Tamarellegromnan@phpc.social
2025-03-19

The Symfony Demo project upgraded to PHPUnit 11, so you can upgrade your project too.

You have to replace all the PHPUnit annotations by the corresponding PHP Attributes. But Rector will ease this process: github.com/rectorphp/rector-ph

The symfony/phpunit-bridge is no longer necessary as PHPUnit now has its own error and deprecation handler. Say goodbye to simple-phpunit.

More details in the PR: github.com/symfony/demo/pull/1 #PHP

@test annotation becomes #[Test] attribute@testWith annotation#[TestWith] attribute
Jérôme Tamarellegromnan@phpc.social
2025-03-06

MongoDB integration for Laravel version 5.2 released. With support of Atlas Search as search engine for Laravel Scout.
laravel-news.com/laravel-mongo

We've done it, but it's not really necessary. If the documents are already stored in MongoDB, it's easy to create a Search Index and the server synchronizes the data into a Lucene index.

That's why MongoDB is a developer experience focused platform: 1 service with the database and the search engine.

Jérôme Tamarellegromnan@phpc.social
2025-03-04

Ça va être très instructif. je vous recommande de venir si vous pouvez. phpc.social/@symfony@mastodon.

Jérôme Tamarellegromnan@phpc.social
2025-03-01

If you're a PHP extension developer, we're interested too.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst