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

Deprecation error in CI #163

Open
rupertj opened this issue Jan 5, 2024 · 5 comments · May be fixed by #164
Open

Deprecation error in CI #163

rupertj opened this issue Jan 5, 2024 · 5 comments · May be fixed by #164

Comments

@rupertj
Copy link
Member

rupertj commented Jan 5, 2024

See here: https://github.com/localgovdrupal/localgov_paragraphs/actions/runs/7426621431/job/20210755941

Error: Call to deprecated function format_size():
in drupal:10.2.0 and is removed from drupal:11.0.0. Use
  \Drupal\Core\StringTranslation\ByteSizeMarkup::create($size, $langcode)
  instead.
 ------ -------------------------------------------------------------------------- 
  Line   modules/localgov_subsites_paragraphs/localgov_subsites_paragraphs.module  
 ------ -------------------------------------------------------------------------- 
  211    Call to deprecated function format_size():                                
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use                   
           \Drupal\Core\StringTranslation\ByteSizeMarkup::create($size,            
         $langcode)                                                                
           instead.                                                                
 ------ -------------------------------------------------------------------------- 
@rupertj rupertj linked a pull request Jan 5, 2024 that will close this issue
@rupertj
Copy link
Member Author

rupertj commented Jan 5, 2024

Actually, I think I got a little ahead of myself here. It looks like ByteSizeMarkup::create() only got introduced in 10.2, so we don't want to merge this until we're happy to drop support for 10.1.

@andybroomfield
Copy link
Contributor

Suggest we add // @phpstan-ignore-next-line. for now until we can bump support to 10.2+

@rupertj
Copy link
Member Author

rupertj commented Jan 8, 2024

Good plan. I'm also wondering if we can make a failure on the deprecated code check into a warning instead of an error. I know how to do this on GitLab CI, but not GitHub actions.

@millnut
Copy link
Member

millnut commented Jan 8, 2024

I agree with @andybroomfield we should use // @phpstan-ignore-next-line to ignore for now. I would be in favour of this for the full comment which will highlight in various IDE tools that we need to fix it in future;

// FIXME: Replace with ByteSizeMarkup, when Drupal 10.1 is end of life.
// @phpstan-ignore-next-line.

@stephen-cox
Copy link
Member

I've created a PR to ignore this using @millnut suggestion above #166

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

Successfully merging a pull request may close this issue.

4 participants