Kdyby / Translation

Integration of Symfony/Translation into Nette Framework
https://packagist.org/packages/kdyby/translation
Other
89 stars 84 forks source link

Latte 2.9 #178

Open Pepiik opened 3 years ago

Pepiik commented 3 years ago

Hello, after update latte/latte to 2.9 from 2.8.3 getting this error:

Compile Error

Declaration of Kdyby\StrictObjects\Scream::__set(string $name, $value) must be compatible with Latte\Macros\MacroSet::__set(string $name, $value): void
jkavalik commented 3 years ago

Could Kdyby\StrictObjects be instead replaced with Nette\SmartObject from nette/utils which is already required?

dg commented 3 years ago

The only correct fix is to removed use Kdyby\StrictObject\Scream here https://github.com/Kdyby/Translation/blob/master/src/Latte/TranslateMacros.php#L21

🤦‍♂️

jaroslavlibal commented 3 years ago

Unfortunately, there will probably be more compatibility issues than this one :(

Eg. it is not possible to use a paired translation macro (Undefined variable: ʟ_fi; however the same problem exists since latte 2.8.4).

dg commented 3 years ago

So why don't you fork it and fix it?

jaroslavlibal commented 3 years ago

Because I discovered it accidentally a few minutes before my post. I wasn't able to find out what needs to be changed before returning from work. I also did't know if I am able to solve it at all.

I thought it would be better to make a note to an already open issue called "Latte 2.9" than to create a new issue or doing nothing.

Your "strict answer" makes me feel that I am doing something bad and I don't think I deserved it.

PR: https://github.com/Kdyby/Translation/pull/182/commits/4cf0f7bec0eae51c14babd6558bc6755ab4180a2

dg commented 3 years ago

It is nothing against you, but that the problem is solved in two years. It's time to leave the dead horse.