This also means that you won't get any bug fixes or other updates to these files, so be aware of that. htaccess) and you don't want to lose the changes. ![]() "/sites/": false,Įxcluding files is useful if you made some updates to these files (like robots.txt and. Or they exclude some files from scaffolding: "name": "drupal/my-project", Usually, people configure at least the location of their webroot: "name": "drupal/my-project", The scaffolding operations run automatically as needed, for example after composer install, so you don't have to do anything once you configure the plugin in your composer.json file. As you can see they are copied from the assets directory to your project root and webroot directories. You can see the scaffolding files for Drupal 9.4 in the screenshot below. It's a Composer plugin used for placing scaffold files (like index.php, README.md, robots.txt, and so on) from the drupal/core project into their desired location inside the webroot. ![]() Run the following command to install the plugin: composer require drupal/core-vendor-hardeningĪnd the hardening will happen automatically. htaccess and web.config files within the directory. It works by removing unneeded directories from the vendor directory and also placing. But if for some reason that's not possible, you can use the drupal/core-vendor-hardening plugin to harden the vendor directory. In other words, it shouldn't be publicly available over HTTP. The vendor directory should always be placed outside of the server's docroot directory to mitigate security concerns. For example, Drupal depends on various Symfony packages, and they all will be stored in the vendor directory. The vendor directory is the place where Composer stores all third-party dependencies. You can safely remove this package if you don't want to see messages. To find out how to configure it click here. You can remove all of them (use for example composer remove -dev -no-update behat/mink) and replace them with just the drupal/core-dev package. Some older versions of Drupal have dev dependencies required one by one in the require-dev section as you can see in the screenshot below. Then when you run composer install -no-dev on your build/production server you won't install dev dependencies. Make sure to use the -dev option to add the package to the require-dev section. To install the package, run: composer require -dev drupal/core-dev Those are tools like Behat Mink, PHPUnit, Prophecy, PHPStan, and Coder. ![]() As the name suggests, this package will install development dependencies. Unless you are a Drupal developer and you want to run tests, you don't need this package. Switching to the core-recommended package also means that from now on to update Drupal core with Composer you have to use the following command: composer update -with-dependencies drupal/core-recommended drupal/core-dev
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |