0

Is there any hidden reason why Drupal developer decided to use strange file extensions — for example node.install, node.module, simple.profile, case.test? Why not just using stand .php extension?

Thanks

1

Because it's easier for the core to know about special files that way.

As a developer you're free to name your module or theme whatever you like, so that means that Drupal core needs another way to find and identify certain important files. Doing this using the file extension is an easy way.

  • I think .module.php is not harder to find than .module – Andy Truong Jan 26 '15 at 19:50
  • @AndyTruong you're right, but what's the point of adding the .php? I can't see a reason where it would be helpful to have. – user5482 Jan 26 '15 at 19:52
  • with .php, developers do not need configure their IDE. Code highlighting in code browser no more mess github.com/drupal/drupal/blob/8.0.x/core/modules/node/… – Andy Truong Jan 26 '15 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.