KnpLabs / KnpMenuBundle

Object Oriented menus for your Symfony project.
http://knplabs.com
MIT License
1.4k stars 204 forks source link

Fix the CI job using dev deps #446

Closed stof closed 2 years ago

stof commented 2 years ago

Preferring stable versions totally defeats the goal of that CI job, as it can find compatible stable versions.

jordisala1991 commented 2 years ago

That's the error I got when trying Symfony 6:

PHP Fatal error:  '\static' is an invalid class name in /home/runner/work/KnpMenuBundle/KnpMenuBundle/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(49) : eval()'d code on line 34

There is a mixed usage of both phpunit mock and prophecy ones. prophecy being used on 2 files only. I can replace that mocks for normal ones and get rid of that dependency if you want.

stof commented 2 years ago

That's the error I got when trying Symfony 6:

that's because we actually rely on a bunch of transitive dependencies right now, and so our dev job already gets some Symfony 6 packages for them.

I'll try to look whether I can fix support for static in prophecy instead.

jordisala1991 commented 2 years ago

That's the error I got when trying Symfony 6:

that's because we actually rely on a bunch of transitive dependencies right now, and so our dev job already gets some Symfony 6 packages for them.

I'll try to look whether I can fix support for static in prophecy instead.

Nice! Let me know if you need help moving this forward.

garak commented 2 years ago

It looks like the "static" problem was solved in prophecy. Maybe we can try to require ^1.13?

jordisala1991 commented 2 years ago

That link comes from a fork instead of the main repo. Seems like it is a fix not applied to the original repo, here is the main issue: https://github.com/phpspec/prophecy/issues/527

garak commented 2 years ago

That link comes from a fork instead of the main repo. Seems like it is a fix not applied to the original repo, here is the main issue: phpspec/prophecy#527

Sorry, didn't notice that 😞

jordisala1991 commented 2 years ago

@garak Can you trigger the build again here? Now it should pass.

garak commented 2 years ago

@garak Can you trigger the build again here? Now it should pass.

It didn't pass

jordisala1991 commented 2 years ago

Maybe closing and reopening?

jordisala1991 commented 2 years ago

Needs this fix: https://github.com/KnpLabs/KnpMenuBundle/pull/445/files#diff-8434e9b1d6c83ce1df5b5556356b5b6e2bcc808e635b4a1a23e6f880966c5217R216

jordisala1991 commented 2 years ago

~This one is also needed~

Edit: I did a cherry-pick on #445