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

Drupal 10 Upgrade #13

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Drupal 10 Upgrade #13

wants to merge 11 commits into from

Conversation

humble-ahitofel
Copy link
Member

@humble-ahitofel humble-ahitofel commented May 21, 2024

Ready for review.

@humble-ahitofel humble-ahitofel force-pushed the drupal-10-upgrade branch 7 times, most recently from 47a1d7d to 7da2f79 Compare June 7, 2024 09:16
@humble-ahitofel humble-ahitofel changed the title Draft: Drupal 10 Upgrade Drupal 10 Upgrade Jun 7, 2024
- Updated *.info.yml to be compatible with Drupal 10.
- Replaced deprecated drupal_get_path() with extension.list.module
service for module path retrieval.
- Replaced deprecated jQuery $.once to pure javascript .once library.
- Replaced deprecated entityManager with entityTypeManager.
- Applied code style improvements using Rector for enhanced readability
and consistency.
- Added is_countable() checks before count(); lack of it results in a
warning starting from PHP 7.2.
- Standardized constant declarations to follow modern PHP visibility and
style conventions.
- Rewrote forms using ContentEntityForm to match the updated constructor
in the latest Drupal core.
- Replaced deprecated drupal_set_message() with \Drupal::messenger()
->addMessage() and \Drupal::messenger()->addWarning().
- Replaced deprecated urlInfo() with toUrl() for generating URLs.
- Replaced deprecated entity url() with toUrl()->toString() for
generating URL string.
- Updated entity queries to explicitly manage access checks.
- Replaced deprecated format_date() function with date.formatter
service.
- Added explicit array initialization to prevent warnings and ensure
proper variable usage.
- Replaced fully qualified class names with imported class names for
improved readability.
- Replaced deprecated pager_default_initialize() with pager.manager
service for pager initialization.
- Moved Rss::$base_field property initialization to the constructor to
avoid potential conflicts and adhere to best practices.
- Replaced deprecated entity_view() with entityTypeManager()
->getViewBuilder()->view() for rendering entities.
- Replaced deprecated getVocabularyId() with bundle() for retrieving
vocabulary IDs.
- Replaced deprecated prepareQuery with prepareStatement.
- Replaced deprecated getUsername() with getDisplayName() for retrieving
user display names.
- Replaced hook_user_login with form submit handler for redirecting
users, as the former caused login failures.
- Removed leftover console.log from kifiform-tags-custom.js file.
- Hide asker's municipality and name in Question render.
- Remove 'created' field from asklib_answer display.
- Hide "title" label in Question view.

Note: The hiding is currently implemented through code. Managing the
Question display through the admin panel would be preferable.
Kirjastot.fi search and Ask Libraries search need to be kept separate. For example, Asklib has its own sorting logic.
The indexing was broken for Questions. Additional setup for the QuestionSearch was added, ensuring proper indexing.
…le metadata

This will resolve the issue with running the 'drush updatedb' when Drupal has been updated to 10.4 from 10.1.
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 this pull request may close these issues.

1 participant