php-translation / extractor

Extracts translation strings from source code
MIT License
126 stars 33 forks source link

Allow Symfony 7 support #172

Closed bocharsky-bw closed 4 months ago

bocharsky-bw commented 9 months ago

This is stuck, seems we need to move from Annotations to Attributes in case to support Symfony 7

Any volunteers to help?

rvanlaak commented 9 months ago

@bocharsky-bw can you point in a direction, to be clear on the approach that the implementer could potentially follow? Does your comment also imply dropping doctrine/annotations and releasing a new minor or major of this library? https://github.com/php-translation/extractor/blob/master/composer.json#L16

bocharsky-bw commented 9 months ago

Fairly speaking I didn't think about it yet, so I'm open to any good ideas :) But you're right, with more specific task it could be easier to pick this up, so here are my thoughts: I think it's time to drop PHP 7.2-8.0 support, that is ancient already so I think we can switch to PHP attributes completely and no need to support legacy annotations, and so we could drop that dependency completely. Though, I wonder if we should bump a major version for this, probably it's reasonable.

Thoughts?

rvanlaak commented 9 months ago

The last major release was in 2019, so I think it's fine to do a major cleanup: https://github.com/php-translation/extractor/releases/tag/2.0.0

Guite commented 9 months ago

Can you also add php-parser v5 maybe ?

rvanlaak commented 9 months ago

@Guite as PHP-Parser is not a hard requirement for Symfony 7, feel free to help by creating a separate PR to add support for PHP-Parser v5: https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md

byhaskell commented 8 months ago

@bocharsky-bw Hello. Tell me, please, where exactly are annotations used? I can’t find it, I’m trying to figure it out because without this bundle, entering text by hand is a lot of work)

bocharsky-bw commented 8 months ago

This bundle provides some annotations https://github.com/php-translation/extractor/tree/master/src/Annotation , so those should be rewritten with Attributes because annotations support was dropped in Symfony which blocks upgrading this bundle as it requires annotations.

byhaskell commented 8 months ago

Got it, thanks. I will try

bocharsky-bw commented 4 months ago

Closed in favor of #175