php

What is composer.lock

The purpose of the lock file is to record the exact versions of packages that are installed for your application on your environment. The content of the file is managed by composer and is not manually edited.

When the composer.lock file exists the composer install command will install the exact versions on the lock file and basically ignore the composer.json file.

How to make drupal install notice the composer.json again

Well simply you can

Add a NOT IN condition and a nested query to your views WHERE condition

PROBLEM: 

I needed to add a NOT IN condition with a nested query for the WHERE condition. The usual method wont work

 

$view->query->where[1]['conditions'][] = array(
            ['field'] => 'groups_group_membership.type'
            ['value'] => array
                (
                    [0] => 'SELECT_QUERY_HERE'
                  
                )

            ['operator'] => IN
        );

SOLUTION :

The way that works

 

Symfony - assigning a value to a computed field on form submit event

Problem: I have a field in my schema that needs to have a value but I cannot make the user input the value in the form. I have to insert it when I am saving the object instance in the database. I can assign a value for this field using the user entered data in the form. How can I do this

Example: For examples sake say I have a filed called FullName, which I have to assign using the user inputs FirstName and LastName.

So basically  FullName = FirstName + " " + LastName.

Solution: Use a event listner  provided by the formBuilder object.