This merge request was automatically created by the Project Update Bot. It contains the changes from run 11-121090.
Closes #3426155
Szczepan Musiał (0a0c08ed) at 04 Mar 10:02
Drop drupal 8 and 9 support
Szczepan Musiał (b70640ff) at 04 Mar 09:53
Issue #3408740 by Vj: Node and taxonomy tokens not working
... and 1 more commit
3318181: PHPCS codding standard
Colan Schwartz (70304404) at 26 Oct 13:57
Issue #3358046 by colan: Fixed PHPCS errors.
Closes #3358046
Colan Schwartz (70304404) at 26 Oct 13:48
Issue #3358046 by colan: Fixed PHPCS errors.
... and 7 more commits
Closes #3358046
Looks like someone already changed it to 1.1.0 .
Hi @lamp5 much appreciated if you could please release a new D10 compatible version :)
I think I was wrong to suggested 1.0.2
as the next version, there looks to be new features in dev branch so I think it would be 1.1.0
- easy to revert my commit from this MR if I'm wrong but would be good for maintainer to weigh in.
Agreed on the suggestion @ericgsmith! It feels like it'll reduce upgrade friction to include the NULL
check. Though it's not directly tied to D10, the driving factor that forces the need to use the file url generator service is D10. Some people inevitably won't be upgrading custom breadcrumbs until it's time to upgrade to D10, and so it may feel synonymous to them. If @lamp5 is on board, we can:
NULL
check in this PRNULL
check and trigger_error
@trigger_error('Calling BreadcrumbBuilder::__construct() without the $fileUrlGenerator argument is deprecated in custom_breadcrumbs:1.0.2 and will be required in a future release of custom_breadcrumbs. See <insert d.o. issue from step 2 here>.', E_USER_DEPRECATED);
@trigger_error('Calling BreadcrumbBuilder::__construct() without the $fileUrlGenerator argument is deprecated in custom_breadcrumbs:A and will be required before custom_breadcrumbs:B. See C.', E_USER_DEPRECATED);
1.0.2
)That said - its still and option to just add a note to the release notes that if people are extending the BreadcrumbBuilder
class in their custom code they will need to update their service definitions.
I am curious - what version of Drupal are you using? And what was the original error? Apologies - found your original comment on the Drupal.org issue.
The change to introduce the file_url_generator
as an argument was introduced in https://www.drupal.org/project/custom_breadcrumbs/issues/3341309
If you are extending this modules BreadcrumbBuilder
as your own service in custom code, then this is a backwards compatible issue that the arguments changed. If you want to cater for this then the deprecation message should not mention anything to do with core, it would depend on if this module wants a v2 specifically for the change already committed to dev. This is not anything to do with 9 v 10.
The file_url_generator
service was introduced in Drupal 9.3 - https://www.drupal.org/node/2940031 so if anything, the module just needs its core version requirements bumped - but again that is nothing to do with D10 compatibility - I think this null / deprecation change can be reverted.
@lamp5 if the plan is to publish a release that will be compatible with both core 9.5.x and 10.x, which I recommend, it appears that this is the standard approach for injecting the file URL generator service in versions > 9.3 and < 10. Here is a sample in TwigExtension.php.
I recommend moving forward with this as is, and eventually, when a release is made for versions that are only compatible with D10, the = NULL)
and trigger_error
should be removed. See https://www.drupal.org/project/drupal/issues/3285503 for a sample in core where maintainers move away from the NULL checking in D10 only. Also, here's the same TwigExtension.php
file in D10 without the null check.
I had an error on my project related to the $fileUrlGenerator and founded solution in the core