-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency upgrade to propel 2.0.0-beta4 and symfony 7 #41
Conversation
@SkyFoxvn would you be able to approve the GH workflow run? I'm curious to see if this works. |
@smhg sorry for the delay im seeing this pull request just now. |
Github notifications are tricky, that's why I tagged you. No rush. |
@smhg as i can see tests didnt go right :) look like problem with actions/checkout i dont really have much experiance with this think for a public repos so im not sure how exactly to configure it for forked pull requests im open for suggestions about that |
@SkyFoxvn I'll try it out in a local copy. But I'm just starting to look at propel-bundle. Not sure if I can be of any help. |
@SkyFoxvn All checks have passed |
@ldaspt check the tests there are some deprecations and other stuffs on the different versions |
@SkyFoxvn The deprecations are not triggered by the bundle but by PHPunit and propel
The bundle should migrate to phpunit 10 but phpunit 10 require php: >=8.1 and the bundle is compatible with php 8.0
The deprecations are not triggered by Propel, it is not possible to fix in the bundle, I think it is necessary to modify the file |
I got rid of the warnings like this: |
@ldaspt ok i will get rid of the deprecations later i made new branch "7.0" can you change the version to which you want to merge this commits from 6.0 to 7.0 if you can just make new pull request to 7.0 tnx |
3bec690
to
9e1a16a
Compare
@ldaspt can't typehints break things if they differ from what people are doing with those methods today? This looked like the safest option which still gives some benefits (phpstan). But please ignore if not relevant. |
@ldaspt type hints and phpdoc dosant exclude each other i actually use both quite often type hints are very nice improvement last few years but they lack the ability for additional context for which you use phpdoc. @smhg im not sure i understand you last comment for now everything here looks ok to me with the deprecations i can deal later but i will delay the merge few days because i want to check few thinks on me pc and this week its just crazy :) |
@SkyFoxvn Add a type hint to
The bundle does not have tests for command, there are no usage of FixturesLoadCommand in the directory The warnings are triggered indirectly by the
It is possible that this will break the command if the developer uses SF6 and extends the command but all the others commands has already the typehint @see https://github.com/SkyFoxvn/PropelBundle/tree/6.0/Command |
I didn't notice that. Good catch! Please ignore everything I said :) |
@smhg Done Fix phpstan error with SF7
Note: It misses the
There are others PHPStan errors
|
sorry i did forget to fix github actions for this branch so can you apply the changes from last 2 commits on your branch so we can run the tests here too https://github.com/SkyFoxvn/PropelBundle/commits/7.0/ |
…ndle\Tests\Fixtures\Model\User::eraseCredentials() must be compatible with Symfony\Component\Security\Core\User\UserInterface::eraseCredentials(): void
Fix error phpstan Line Command/FixturesLoadCommand.php ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 112 Return type mixed of method Propel\Bundle\PropelBundle\Command\FixturesLoadCommand::execute() is not covariant with return type int of method Symfony\Component\Console\Command\Command::execute().
486693b
to
cd0e02a
Compare
btw about "The bundle does not have tests for command, there are no usage of FixturesLoadCommand in the directory Tests and I do not find of propel:fixtures:load in the directory" feel free to go wild with writing more tests :D im kind of lazy(and busy) more tests its always good |
@SkyFoxvn Rebase done @smhg Can you give me the depreciation warning, because it seems not necessary. There are no phpstan errors on the file Twig/Extension/SyntaxExtension.php and the signature of ExtensionInterface is
https://github.com/twigphp/Twig/blob/3.x/src/Extension/ExtensionInterface.php |
Sorry, it was not a criticism, it was just an explanation of why the error was not present in the tests. Thank you very much for maintaining the bundle. |
@ldaspt strange. I get this in a Symfony 6.4/PHP 8.1 project running PHPUnit:
I guess they've already added the return phpdoc in Symfony 7.x. But an explicit return typehint is a good thing to have, no? Since it only returns an array, it's possible to add it. Afterwards it is warning-free in both versions. |
@ldaspt dont worry i dont take it as criticism and its not like i cant do more i just i guess i dont want to invest more time then necessary i made the fork mostly with the idea to keep it alive i dont even use propel anymore(not me choice do as you know sometimes we work with what we must :) ) also i appreciate the help @ldaspt @smhg tnx feel free to make more changes, tests etc |
1x: Method "Twig\Extension\ExtensionInterface::getFilters()" might add "array" as a native return type declaration in the future. Do the same in implementation "Propel\Bundle\PropelBundle\Twig\Extension\SyntaxExtension" now to avoid errors or add an explicit @return annotation to suppress this message.
See by `SYMFONY_PATCH_TYPE_DECLARATIONS=force=2 vendor/bin/patch-type-declarations` Commit contains only classes implementing Symfony interfaces or extends Synfony classes https://symfony.com/blog/symfony-7-0-type-declarations#preparing-your-applications
@smhg Running |
@SkyFoxvn I think this looks great. If you can run CI and everything is green, a release would be awesome! Thank you both! |
For information, I created a PR in the Propel repository to fix the PHP depreciations |
@ldaspt it look ok but can you just edit the readme file to point the right branch and i will merge it after that but the release will wait for few days i want to remove all the warning and deprecation messages before i make a release |
@SkyFoxvn Readme updated |
No description provided.