33

Examples in the Zend tutorial:

  • phpunit.xml.dist
  • local.php.dist
  • TestConfig.php.dist
Owen
  • 448
  • 3
  • 11
AsTeR
  • 7,247
  • 14
  • 60
  • 99

1 Answers1

61

.dist files are often configuration files which do not contain the real-world deploy-specific parameters (e.g. Database Passwords, etc.), and are there to help you get started with the application/framework faster. So, to get started with such frameworks, you should remove the .dist extension, and customize your configuration file with your personal parameters.

One purpose I have seen in using .dist extension, is to avoid publishing personal data on VCSs (say git). So, you, as the developer of a reusable app, would use your own configuration file, but put the de-facto get-started config data in a separate .dist-suffixed file. (See Symfony2's documentation, 4th part)

semekh
  • 3,867
  • 2
  • 24
  • 34
  • 4
    In Zend 2 ".dist" files can contain default configuration but are not meant to be removed. Do you for what words does "dist" stand ? "Distribution" ? – AsTeR May 30 '13 at 21:12
  • 1
    It stands for "Distributable" – Khadija May 27 '21 at 13:18
  • Not your fault, just FYI: It looks like that Symfony has reverted their approach on `.dist` files after the referenced 2.2 version. We can only do the educated guess that is because they got it turned wrong: .dist in a repository distributed contains the default or the example and the user can override that file with a file of the same basename (e.g.: repo: `.env.dist`, user: `.env`; or e.g.: repo `phpunit.xml.dist`, user: `phpunit.xml`). Compare @AsTeR May 2013 comment which has the Zend Framework example that has the correct forward path of distributing (not backwards as Symfony 2.2). – hakre Jan 20 '23 at 11:01