Skip to content
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

Fix deprecated assertFileNotExists() calls #583

Closed
dmitriim opened this issue Jul 6, 2021 · 9 comments
Closed

Fix deprecated assertFileNotExists() calls #583

dmitriim opened this issue Jul 6, 2021 · 9 comments

Comments

@dmitriim
Copy link
Member

dmitriim commented Jul 6, 2021

In Moodle 3.11:

5) generator_testcase::test_create_idp_entity_no_files
assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.

/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

6) auth_saml2_metadata_writer_testcase::test_write_non_dataroot_path
assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.

/var/www/html/lib/phpunit/classes/basic_testcase.php:64
@kabalin
Copy link
Collaborator

kabalin commented Jul 6, 2021

Yeah, noticed that, it fails in 3.9 and 3.10 CI run if changed to assertFileDoesNotExist now.

@dmitriim
Copy link
Member Author

dmitriim commented Jul 6, 2021

that may be time to branch out for 3.11+... @brendanheywood @danmarsden ?

@danmarsden
Copy link
Member

@dmitriim yeah - I had the same thought so I've just created one - if you get a chance can you please update the readme with the detail on the new branch and drop the patch in for PHPunit too?

@kabalin
Copy link
Collaborator

kabalin commented Jul 7, 2021

So, any new feature will miss < 3.11 (unless someone keep them in sync or send two PRs) and it is all because of deprication notice that does not affect test result yet in any way? 😕

@danmarsden
Copy link
Member

No - we don't follow upstream 'master branch for features only' policy. We backport features to supported branches where possible. But yes it does mean more work.

@kabalin
Copy link
Collaborator

kabalin commented Jul 7, 2021

Yeah, I got that, I mean adding more work when it is not strictly necessary (it is just a deprecation notice in test, not some new feature that does not work in versions lower than 3.11) 😃

@danmarsden
Copy link
Member

for some reason I thought we were getting failures in there on 4.0/master - not just warnings - but the failure in the master branch might be something different.... We could hold off branching until 4.0 I guess

@danmarsden
Copy link
Member

yeah - lets hold off branching this for now - deprecated warnings in test I can live with - @dmitriim - is this causing failures in your pipelines? - or just warnings?

@dmitriim dmitriim removed the bug label Sep 23, 2021
@danmarsden
Copy link
Member

fixed in #659 with backwards compatible code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants