Viewed   70 times

When you install or update a project with composer, you can tell it to skip the development related dependencies (tests, build tools, etc.) with the --no-dev flag

composer.phar update --no-dev

Without this flag, composer will always download the extra dependencies.

Is there any way (programmatically or otherwise) to tell composer to always skip the development dependencies? That is, is there anything real code that matches the pseudo code

//File: composer.json



In short: no - not, yet.

Composer's default installation mode is to install development dependencies.

As far as i know, there is only the CLI option --no-dev and no config option.

It's possible to define a config section in the composer.json of a project, see

But a quick glance at the source code revealed, that there is no configuration directive for this.

    "config": {
        "no-dev": "true"

+1 for this idea. It could be a useful addition to the Config class.

Sunday, November 6, 2022

It's recommended to fake php version, rather than ignore platform requirements. Add


to your ~/.composer/config.json or use composer config -g -e to edit it.

An example of sufficient config to fake php version:

    "config": {

It may have much more options though.

Thursday, August 25, 2022

The way you are supposed to inject your configuration is to define all the constants first before ever touching the first TCPDF class.

Make sure to also set the constant K_TCPDF_EXTERNAL_CONFIG to true. This will prevent the autoconfiguration to search for the file you were talking about. (See line 60 of this file here:

This is well hidden in the documentation, but I found this:

How to override TCPDF config using Composer

  1. Copy the original tcpdf_config.php somewhere to your project, for example src/tcpdf_config.php.
  2. Add define('K_TCPDF_EXTERNAL_CONFIG', true); at the beginning of your config copy and modify the rest of the config to your needs.
  3. Edit your composer.json and add/update autoload section:
"autoload": {
  "files": [
  1. Regenerate the composer autoloader using composer dump-autoload.
Wednesday, September 21, 2022

Follow these steps, you 'll definitely find the solution.

  1. Download the GWT 2.5 RC2, and put it somewhere...I put it in my eclipse/plugins directory. link

  2. In Eclipse, add GWT 2.5 to the Project -> Properties -> Google -> Web Toolkit -> Configure SDKs screen, and select the 2.5 version that you have added to the directory in the step above.

  3. Right click on the project in Eclipse, go to its Run Configurations window, and create a new "Java Application", name it something like "GWT Super Dev Mode".

  4. While in the Run Configurations window, do the following:

    1. Set the project based on your project name, and type in the main class as

    2. On the Classpath tab, click user Entries, then click Add External JARs, navigate to the GWT 2.5 directory, and find the gwt-codeserver.jar, and click "Open" (and other external libraries).

    3. In the Arguments tab, add -src src/ *SOURCE PATH OF YOUR PROJECT* to Program arguments, and add optional -Xmx1024m to VM arguments.

    4. Click Apply, then go ahead and Run the project.

  5. After this you will get a URL like, localhost:9876/

  6. Goto that URL, and bookmark, Dev Mode ON and Dev MOde Off then run your code, remove the suffix gwt.codesvr=127.00.1:9997 in the URL. Now click Dev Mode ON...

Hope you get the solution...

Tuesday, November 8, 2022

GWT.setUncaughtExceptionHandler lets you set an exception handler, which will handle all exceptions. You can then get the stacktrace of that exception using something like this code, and then print exception.toString() and the stack trace to the console. This has worked reasonably well for me.

Monday, September 26, 2022
Only authorized users can answer the search term. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :