This tag is for questions related with how Drupal utilizes Symfony components.

learn more… | top users | synonyms

0
votes
2answers
31 views

How does the events dispatcher map to map_save to a callback function?

MigrateEvents.php contains an event definition like this: /** * Name of the event fired when saving to a migration's map. * * This event allows modules to perform an action whenever the ...
1
vote
1answer
51 views

Error running a PHPUnit test only under run-tests.sh

I'm working on an 8.x module that uses PHPUnit tests. I've been running these from the command line using the embedded phpunit script that's installed with Drupal 8: ../vendor/bin/phpunit ...
0
votes
1answer
376 views

How can I tell Guzzle to safely ignore ssl.certificate_authority in Behat testing? (Development server)

On a sandbox install of Drupal running behat under the Behat Drupal Extension, I'm trying to fun the following feature: @api Scenario: Logged in User Given I am logged in as a user with the ...
0
votes
1answer
66 views

Passing HTML to the response object

I had this piece of code in a module developed for some previous version of Drupal 8. protected function getOutput() { $content = $this->buildContent(); //print_r($content); $page = ...
3
votes
1answer
500 views

Replace Standard Node Path in Drupal 8

I am still new to all the Symfony semantics. What would be the easiest way to change node canonical urls to be /article/[node-title] instead of /node/[node-id]? Following this documentation I tried ...
2
votes
1answer
114 views

Is it possible to pass Drupal config values as arguments to services?

I'm writing a module that makes calls to a Web service to read and store data. Here's my services.yml file: services: example.connection: class: Drupal\Core\Http\Client I've already a ...
11
votes
2answers
6k views

Should I learn Symfony 2?

I saw this, How much of Drupal 8 will rely on or be compatible with Symfony? but I don't understand if it applies to my question. Should I learn Symfony 2 to develop with Drupal?
1
vote
1answer
214 views

Is updating the composer.json file & consequently composer.lock in Drupal 8 considered a good practice or hacking the core?

I have been working with another developers on a scaffolding tool for Drupal8 based on Symfony Console component. The current setup process includes updating composer.json using composer CLI: ...
17
votes
1answer
2k views

Why are routing files filled with underscores?

What is the deal with all the parameters with, and without, a prefixed underscore character? Where does Drupal decide how to process these parameters? Was this concept introduced from Symfony, or is ...
4
votes
1answer
266 views

What arguments can I use when defining a service?

Looking at system.services.yaml, I noticed that some of the services arguments are strings starting with @. They seem to contain a reference to another defined service. system.manager: class: ...
2
votes
1answer
71 views

Is there any case where a module needs to implement a class using ServiceProviderInterface?

Drupal defines the CoreServiceProvider class which is used to add the twig, twig.loader.filesystem, and module_handler services. Since the Drupal 8 way to register a service from a module is using ...
7
votes
3answers
846 views

Is it acceptable to modify Drupal's composer.json file?

Drupal adheres to the best-practice of never modifying core. Drupal 8 has a composer.json file built into core, if you need to add a third-party library, should you modify composer.json, or is there ...
5
votes
3answers
335 views

Lime for Drupal 8?

Now that Drupal 8 is going to be based mostly on Symfony, is the TDD/unit-testing going to change too? For Symfony, Lime is the preferred testing-suite. Is that true for Drupal8?
3
votes
1answer
589 views

How much of Drupal 8 will rely on or be compatible with Symfony? [closed]

Now that Drupal 8 is being redeveloped with Symfony, and we are just about to go into the code freeze so that early adopters can start playing with it, what will it affect? Will we be able to write ...
0
votes
1answer
322 views

Symfony2 authentication and Drupal 7

I am currently developing a website using the framework Symfony2. I am nearly at the end of its development, and just the "security" part is missing (authentication and authorization). What I would ...
4
votes
2answers
625 views

Creating Drupal 8 route for AJAX requests

How should I implement a callback to a single Drupal class (in my case it's Transliteration). I don't need a full Drupal load/bootstrap, but one independent class. The purpose of the AJAX code would ...
9
votes
1answer
677 views

How can I install composer packages with drush make?

How does one include composer package in a drush make file? The more general answer, the better. There's already a composer drush module allowing drush dl to handle composer packages, but that ...