Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299330

Symfony update exposes fatal error during installation due to 'access_manager' service depending on 'request'

$
0
0

Spin-off from #1894002: Pin dependencies to specific versions in composer.json.

That issue is trying to update to Symfony 2.2-BETA2. That Symfony update includes a fix to ContainerBuilder to throw an error upon trying to create an uninstantiated synthetic service. Throwing an error in that case is the correct action, and the pre-beta2 version of ContainerBuilder in Drupal HEAD is wrong to not be throwing that error.

That fix, however, exposes a Drupal bug, as demonstrated by the test failures caused by this patch.

The bug is that the 'access_manager' service depends on 'request'. However, during installation, drupal_flush_all_caches() is called which calls drupal_container()->get('router.builder')->rebuild(); which dispatches events listened to by the 'access_subscriber', which depends on 'access_manager'. However, since this is during installation, there is no 'request'.

Possible solutions:
1. Fix 'access_manager' to not have a hard dependency on 'request'. Its methods that get called during the router rebuild events don't need the request for anything. Only its other methods do.
2. Make the installer set a mock 'request' service instance in the DIC.

I think the first one would be cleaner. Feedback?

AttachmentSizeStatusTest resultOperations
access_manager_request_dependency.patch910 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.View details | Re-test

Viewing all articles
Browse latest Browse all 299330

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>