Closed (works as designed)
Project:
Components!
Version:
3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2022 at 13:10 UTC
Updated:
22 Nov 2025 at 15:02 UTC
Jump to comment: Most recent
Comments
Comment #2
m4oliveiAre there breaking changes in the update to 3.x?
There wasn't anything specifically called out in the release notes or the successive alpha and beta releases:
https://www.drupal.org/project/components/releases/3.0.0-alpha1
https://www.drupal.org/project/components/releases/3.0.0-alpha2
https://www.drupal.org/project/components/releases/3.0.0-alpha3
https://www.drupal.org/project/components/releases/3.0.0-beta1
https://www.drupal.org/project/components/releases/3.0.0-beta2
https://www.drupal.org/project/components/releases/3.0.0-beta3
Here is a link to the diff:
https://git.drupalcode.org/project/components/-/compare/8.x-2.4...3.0.0-...
From that I spot the following breaking changes, which depending on your use of the module, may or may not be an issue:
componets.infoservice name changed tocomponents.registryComponentsLoader::__constructarguments changed. Only a problem if you're extending the class, otherwise if your using service (components.twig.loader) from the container, should be fine.ComponentsLoaderprotected members changed. Only a problem if you're extending the class.ComponentsLoader::checkActiveThemepublic method removed.ComponentsLoader::addPathpublic method removed.ComponentsLoader::prependPathpublic method removed.I work on a very large codebase with heavy componets module use. None of these breaks apply. Also note that there are 3.x version specific notes throughout the guide. https://www.drupal.org/docs/contributed-modules/components
Comment #3
marcoscanoI came across #3368589: Trim the right-hand slash on namespace paths today when upgrading to 3.x. It doesn't seem to be an intentional breaking change, but something to be aware of, since it seems other sites are reporting similar errors.
Comment #4
nmangold commentedI ran into an issue after upgrading from 2.x to 3.x on a project. The site was throwing an error similar to "Template xxx is not defined..." I finally figured out the project was still using the older 1.x API which was deprecated in 2.x, and removed in 3.x. Hopefully, this helps someone else.
More details can be found at https://www.drupal.org/docs/contributed-modules/components/registering-t..., and https://www.drupal.org/docs/contributed-modules/components/registering-t....
Comment #5
johnalbinYep. The docs were already written when Components 2.0 was released. Whoever updated your website from Components 1.0 to 2.0 screwed up. I'm sorry you are now having issues when upgrading to 3.0. But you could have read them then and you wouldn't have broken the site when 3.0 was released.