Skip to content

Upgrade CA dependencies: PHP 8.3, Laravel 11, PHPUnit 11#2842

Merged
emmachughes merged 15 commits intomasterfrom
ca-php-8.3-laravel-11
Dec 16, 2024
Merged

Upgrade CA dependencies: PHP 8.3, Laravel 11, PHPUnit 11#2842
emmachughes merged 15 commits intomasterfrom
ca-php-8.3-laravel-11

Conversation

@emmachughes
Copy link
Contributor

No description provided.

@chrieinv
Copy link
Contributor

chrieinv commented Dec 10, 2024

Issue with Integrity constraint violation: 19 NOT NULL constraint failed: h5p_contents.license is because the license field is not nullable. It was set as nullable when created, but the migration 2016_02_25_154000_increase_text_license.php, changing the length of the license field, does not specify that the field can be nullable, so it seems that SQLite then defaulted back to not nullable but MariaDB kept it as nullable.

@emmachughes
Copy link
Contributor Author

Sounds like a problem caused by https://laravel.com/docs/11.x/upgrade#modifying-columns, perhaps?

@chrieinv
Copy link
Contributor

Seems so. This is a big change, it will be an issue with all new installations. It's possible to fix the migrations, but there are over 100 migrations, so maybe the Database squash on a pre Laravel 11 setup is a solution?

@emmachughes
Copy link
Contributor Author

I think we should fix the migrations instead. It doesn't seem like it would be too hard.

The columns that have ->change() statements are:

  • cerpus_contents_shares.email
  • content_languages.language_code
  • h5p_contents.filtered
  • h5p_contents.license
  • h5p_contents.parameters
  • h5p_contents.user_id
  • h5p_contents_user_data.data
  • h5p_contents_user_data.user_id
  • h5p_results.user_id
  • ndla_article_import_statuses.message
  • ndla_article_import_statuses.ndla_id
  • ndla_id_mappers.language_code
  • question_set_question_answers.answer_text
  • question_set_questions.question_text
  • question_sets.title

@emmachughes
Copy link
Contributor Author

Have verified that the resulting database schema is identical to that of an existing install.

@emmachughes emmachughes changed the title Upgrade CA dependencies: PHP 8.3, Laravel 11, PHPUnit 10 Upgrade CA dependencies: PHP 8.3, Laravel 11, PHPUnit 11 Dec 11, 2024
@emmachughes emmachughes added dependencies Pull requests that update a dependency file Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor) composer Pull requests that update Composer packages labels Dec 11, 2024
@emmachughes emmachughes requested a review from chrieinv December 11, 2024 14:32
@emmachughes emmachughes merged commit 8aa1b74 into master Dec 16, 2024
@emmachughes emmachughes deleted the ca-php-8.3-laravel-11 branch December 16, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor) composer Pull requests that update Composer packages dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants