- Issue created by @alexpott
- π·π΄Romania amateescu
Maybe we could improve
\Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass
instead, and remove the backend-specific service from the container if the main service doesn't exist. - π¬π§United Kingdom alexpott πͺπΊπ
@amateescu but without views installed we have no idea that mysql.views.cast_sql exists to override views.cast_sql
- Merge request !10548Revert "Issue #3478621 by catch, longwave, nicxvan: Add filecache to OOP hook attribute parsing" β (Open) created by alexpott
- π·π΄Romania amateescu
@alexpott, but we do know that
mysql.views.cast_sql
is a backend override service because it's tagged withbackend_overridable
, and then we just need to split the backend name from its ID to find out the main service ID.I'm not sure that MR was meant for this issue though :)
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 3493595-the-mysql.views.castsql-service to hidden.
- π¬π§United Kingdom alexpott πͺπΊπ
@amateescu we only know that it is an override once the views service exists. This is about sites without views installed. The MySQL service is not tagged.
Fixed the MR.
- π·π΄Romania amateescu
Ohh.. that's right, somehow I didn't realize that only the main service is tagged :)
The kernel test failure seems to be caused by this change.
- π¬π§United Kingdom alexpott πͺπΊπ
The kernel failure occurred because before we had two services in services.yml files implementing \Drupal\views\Plugin\views\query\CastSqlInterface and now we have 1 - ie. the one in views.services.yml so now it errors. The best fix is to add the missing alias. The fact this is in a plugin directory is odd because it is a backend overridable service and it only ever accessed in real runtime code by doing
\Drupal::service('views.cast_sql')
so it's not a plugin at all. Anyhow that's not something this issue needs to resolve.