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

Upgrade UDOIT classic to PHP 8.1 and upgrade Heroku Stack #8

Open
10 tasks done
jonespm opened this issue Sep 20, 2024 · 0 comments
Open
10 tasks done

Upgrade UDOIT classic to PHP 8.1 and upgrade Heroku Stack #8

jonespm opened this issue Sep 20, 2024 · 0 comments

Comments

@jonespm
Copy link
Member

jonespm commented Sep 20, 2024

To use Heroku Stack 22 this needs to be updated to PHP 8.1. This also is good for keeping up with security updates. This will document some things we need to do.

  • Get instance running
  • Upgrade Docker to php 8.1
  • Run composer upgrade process
  • Run tests (Tests pass)
  • Upgrade Heroku Stack heroku stack:set heroku-22 -a udoit-um-test-env and redeploy
  • Check for any errors/warnings and upgrade

Current warnings to resolve

  • E_WARNING: Undefined variable $footer_scripts {"code":2,"message":"Undefined variable $footer_scripts","file":"/app/templates/template.php","line":50}

Fixed this and used isset to check

  • 2024-09-20T20:19:23.781041+00:00 app[web.1]: [20-Sep-2024 20:19:23 UTC] PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /app/public/index.php on line 43

Suggested to use this pattern
$main_action = filter_input(INPUT_POST, 'main_action'); $main_action = htmlspecialchars($main_action, ENT_QUOTES, 'UTF-8');

or
$main_action = filter_input(INPUT_POST, 'main_action', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

  • 2024-10-03T20:40:11.081119+00:00 app[web.1]: [03-Oct-2024 20:40:11 UTC] PHP Warning: Undefined array key "mwej" in /app/lib/ims-blti/blti.php on line 74

There's a new warning in PHP 8.1 for undefined keys.. These need to be checked.

  • Title is being double escaped. I'm not sure if this was a bug before but this is a bug now. It looks like it was previouly a bug but an easy fix.
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

No branches or pull requests

1 participant