README.txt
Same filename in this branch
- 9 sites/README.txt
- 9 composer/Template/README.txt
- 9 composer/Metapackage/README.txt
- 9 profiles/README.txt
- 9 themes/README.txt
- 9 modules/README.txt
- 9 core/profiles/demo_umami/themes/umami/README.txt
- 9 core/profiles/demo_umami/themes/umami/images/classy/README.txt
- 9 core/profiles/demo_umami/themes/umami/css/classy/README.txt
- 9 core/profiles/demo_umami/themes/umami/js/classy/README.txt
- 9 core/profiles/demo_umami/themes/umami/templates/classy/README.txt
- 9 core/themes/stable9/README.txt
- 9 core/themes/stable9/images/README.txt
- 9 core/themes/seven/README.txt
- 9 core/themes/seven/images/classy/README.txt
- 9 core/themes/seven/css/classy/README.txt
- 9 core/themes/seven/js/classy/README.txt
- 9 core/themes/seven/templates/classy/README.txt
- 9 core/themes/claro/images/classy/README.txt
- 9 core/themes/claro/css/classy/README.txt
- 9 core/themes/claro/js/classy/README.txt
- 9 core/themes/claro/templates/classy/README.txt
- 9 core/themes/stark/README.txt
- 9 core/themes/bartik/README.txt
- 9 core/themes/bartik/images/classy/README.txt
- 9 core/themes/bartik/css/classy/README.txt
- 9 core/themes/bartik/js/classy/README.txt
- 9 core/themes/bartik/templates/classy/README.txt
- 9 core/themes/stable/README.txt
- 9 core/themes/classy/README.txt
- 9 core/modules/system/tests/src/Functional/UpdateSystem/README.txt
- 9 core/modules/system/tests/src/Functional/Update/README.txt
- 9 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
- 9 core/tests/fixtures/files/README.txt
- 9 core/assets/scaffold/README.txt
- 9 core/assets/vendor/tabbable/README.txt
- 9 core/lib/Drupal/Core/README.txt
- 9 core/lib/Drupal/Component/Render/README.txt
- 9 core/lib/Drupal/Component/Assertion/README.txt
- 9 core/lib/Drupal/Component/Discovery/README.txt
- 9 core/lib/Drupal/Component/FileSecurity/README.txt
- 9 core/lib/Drupal/Component/FileCache/README.txt
- 9 core/lib/Drupal/Component/Utility/README.txt
- 9 core/lib/Drupal/Component/README.txt
- 9 core/lib/Drupal/Component/Graph/README.txt
- 9 core/lib/Drupal/Component/DependencyInjection/README.txt
- 9 core/lib/Drupal/Component/FrontMatter/README.txt
- 9 core/lib/Drupal/Component/Version/README.txt
- 9 core/lib/Drupal/Component/Serialization/README.txt
- 9 core/lib/Drupal/Component/ClassFinder/README.txt
- 9 core/lib/Drupal/Component/ProxyBuilder/README.txt
- 9 core/lib/Drupal/Component/EventDispatcher/README.txt
- 9 core/lib/Drupal/Component/Diff/README.txt
- 9 core/lib/Drupal/Component/FileSystem/README.txt
- 9 core/lib/Drupal/Component/Gettext/README.txt
- 9 core/lib/Drupal/Component/Bridge/README.txt
- 9 core/lib/Drupal/Component/PhpStorage/README.txt
- 9 core/lib/Drupal/Component/Datetime/README.txt
- 9 core/lib/Drupal/Component/Transliteration/README.txt
- 9 core/lib/Drupal/Component/Annotation/README.txt
- 9 core/lib/Drupal/Component/HttpFoundation/README.txt
- 9 core/lib/Drupal/Component/Uuid/README.txt
- 9 core/lib/Drupal/Component/Plugin/README.txt
- 9 core/lib/README.txt
Same filename in other branches
- 7.x sites/README.txt
- 7.x sites/all/themes/README.txt
- 7.x sites/all/modules/README.txt
- 7.x sites/all/libraries/README.txt
- 7.x profiles/README.txt
- 7.x profiles/standard/translations/README.txt
- 7.x profiles/minimal/translations/README.txt
- 7.x README.txt
- 7.x themes/README.txt
- 7.x themes/stark/README.txt
- 7.x modules/README.txt
- 7.x modules/simpletest/files/README.txt
- 8.9.x sites/README.txt
- 8.9.x composer/Template/README.txt
- 8.9.x composer/Metapackage/README.txt
- 8.9.x composer/Plugin/VendorHardening/README.txt
- 8.9.x profiles/README.txt
- 8.9.x README.txt
- 8.9.x themes/README.txt
- 8.9.x modules/README.txt
- 8.9.x core/profiles/demo_umami/themes/umami/README.txt
- 8.9.x core/profiles/demo_umami/themes/umami/images/classy/README.txt
- 8.9.x core/profiles/demo_umami/themes/umami/css/classy/README.txt
- 8.9.x core/profiles/demo_umami/themes/umami/js/classy/README.txt
- 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/README.txt
- 8.9.x core/themes/seven/README.txt
- 8.9.x core/themes/seven/images/classy/README.txt
- 8.9.x core/themes/seven/css/classy/README.txt
- 8.9.x core/themes/seven/js/classy/README.txt
- 8.9.x core/themes/seven/templates/classy/README.txt
- 8.9.x core/themes/claro/images/classy/README.txt
- 8.9.x core/themes/claro/css/classy/README.txt
- 8.9.x core/themes/claro/js/classy/README.txt
- 8.9.x core/themes/claro/templates/classy/README.txt
- 8.9.x core/themes/stark/README.txt
- 8.9.x core/themes/bartik/README.txt
- 8.9.x core/themes/bartik/images/classy/README.txt
- 8.9.x core/themes/bartik/css/classy/README.txt
- 8.9.x core/themes/bartik/js/classy/README.txt
- 8.9.x core/themes/bartik/templates/classy/README.txt
- 8.9.x core/themes/stable/README.txt
- 8.9.x core/themes/classy/README.txt
- 8.9.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
- 8.9.x core/tests/fixtures/files/README.txt
- 8.9.x core/assets/scaffold/README.txt
- 8.9.x core/lib/Drupal/Core/README.txt
- 8.9.x core/lib/Drupal/Component/Render/README.txt
- 8.9.x core/lib/Drupal/Component/Assertion/README.txt
- 8.9.x core/lib/Drupal/Component/Discovery/README.txt
- 8.9.x core/lib/Drupal/Component/FileSecurity/README.txt
- 8.9.x core/lib/Drupal/Component/FileCache/README.txt
- 8.9.x core/lib/Drupal/Component/Utility/README.txt
- 8.9.x core/lib/Drupal/Component/README.txt
- 8.9.x core/lib/Drupal/Component/Graph/README.txt
- 8.9.x core/lib/Drupal/Component/DependencyInjection/README.txt
- 8.9.x core/lib/Drupal/Component/Version/README.txt
- 8.9.x core/lib/Drupal/Component/Serialization/README.txt
- 8.9.x core/lib/Drupal/Component/ClassFinder/README.txt
- 8.9.x core/lib/Drupal/Component/ProxyBuilder/README.txt
- 8.9.x core/lib/Drupal/Component/EventDispatcher/README.txt
- 8.9.x core/lib/Drupal/Component/Diff/README.txt
- 8.9.x core/lib/Drupal/Component/FileSystem/README.txt
- 8.9.x core/lib/Drupal/Component/Gettext/README.txt
- 8.9.x core/lib/Drupal/Component/Bridge/README.txt
- 8.9.x core/lib/Drupal/Component/PhpStorage/README.txt
- 8.9.x core/lib/Drupal/Component/Datetime/README.txt
- 8.9.x core/lib/Drupal/Component/Transliteration/README.txt
- 8.9.x core/lib/Drupal/Component/Annotation/README.txt
- 8.9.x core/lib/Drupal/Component/HttpFoundation/README.txt
- 8.9.x core/lib/Drupal/Component/Uuid/README.txt
- 8.9.x core/lib/Drupal/Component/Plugin/README.txt
- 8.9.x core/lib/README.txt
- 10 sites/README.txt
- 10 composer/Template/README.txt
- 10 composer/Metapackage/README.txt
- 10 composer/Plugin/VendorHardening/README.txt
- 10 profiles/README.txt
- 10 themes/README.txt
- 10 modules/README.txt
- 10 core/profiles/demo_umami/themes/umami/README.txt
- 10 core/profiles/demo_umami/themes/umami/images/classy/README.txt
- 10 core/profiles/demo_umami/themes/umami/css/classy/README.txt
- 10 core/profiles/demo_umami/themes/umami/js/classy/README.txt
- 10 core/profiles/demo_umami/themes/umami/templates/classy/README.txt
- 10 core/themes/stable9/README.txt
- 10 core/themes/claro/images/classy/README.txt
- 10 core/themes/claro/css/classy/README.txt
- 10 core/themes/claro/js/classy/README.txt
- 10 core/themes/claro/templates/classy/README.txt
- 10 core/themes/stark/README.txt
- 10 core/modules/sdc/README.txt
- 10 core/modules/system/tests/src/Functional/UpdateSystem/README.txt
- 10 core/modules/system/tests/src/Functional/Update/README.txt
- 10 core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
- 10 core/tests/fixtures/files/README.txt
- 10 core/assets/scaffold/README.txt
- 10 core/assets/vendor/tabbable/README.txt
- 10 core/lib/Drupal/Core/README.txt
- 10 core/lib/Drupal/Component/Render/README.txt
- 10 core/lib/Drupal/Component/Assertion/README.txt
- 10 core/lib/Drupal/Component/Discovery/README.txt
- 10 core/lib/Drupal/Component/FileSecurity/README.txt
- 10 core/lib/Drupal/Component/FileCache/README.txt
- 10 core/lib/Drupal/Component/Utility/README.txt
- 10 core/lib/Drupal/Component/README.txt
- 10 core/lib/Drupal/Component/Graph/README.txt
- 10 core/lib/Drupal/Component/DependencyInjection/README.txt
- 10 core/lib/Drupal/Component/FrontMatter/README.txt
- 10 core/lib/Drupal/Component/Version/README.txt
- 10 core/lib/Drupal/Component/Serialization/README.txt
- 10 core/lib/Drupal/Component/ClassFinder/README.txt
- 10 core/lib/Drupal/Component/ProxyBuilder/README.txt
- 10 core/lib/Drupal/Component/EventDispatcher/README.txt
- 10 core/lib/Drupal/Component/Diff/README.txt
- 10 core/lib/Drupal/Component/FileSystem/README.txt
- 10 core/lib/Drupal/Component/Gettext/README.txt
- 10 core/lib/Drupal/Component/PhpStorage/README.txt
- 10 core/lib/Drupal/Component/Datetime/README.txt
- 10 core/lib/Drupal/Component/Transliteration/README.txt
- 10 core/lib/Drupal/Component/Annotation/README.txt
- 10 core/lib/Drupal/Component/HttpFoundation/README.txt
- 10 core/lib/Drupal/Component/Uuid/README.txt
- 10 core/lib/Drupal/Component/Plugin/README.txt
- 10 core/lib/README.txt
- 11.x sites/README.txt
- 11.x composer/Template/README.txt
- 11.x composer/Metapackage/README.txt
- 11.x composer/Plugin/VendorHardening/README.txt
- 11.x profiles/README.txt
- 11.x themes/README.txt
- 11.x modules/README.txt
- 11.x core/profiles/demo_umami/themes/umami/README.txt
- 11.x core/profiles/demo_umami/themes/umami/images/classy/README.txt
- 11.x core/profiles/demo_umami/themes/umami/css/classy/README.txt
- 11.x core/profiles/demo_umami/themes/umami/js/classy/README.txt
- 11.x core/profiles/demo_umami/themes/umami/templates/classy/README.txt
- 11.x core/themes/stable9/README.txt
- 11.x core/themes/claro/images/classy/README.txt
- 11.x core/themes/claro/css/classy/README.txt
- 11.x core/themes/claro/js/classy/README.txt
- 11.x core/themes/claro/templates/classy/README.txt
- 11.x core/themes/stark/README.txt
- 11.x core/modules/sdc/README.txt
- 11.x core/modules/system/tests/src/Functional/UpdateSystem/README.txt
- 11.x core/modules/system/tests/src/Functional/Update/README.txt
- 11.x core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/README.txt
- 11.x core/tests/fixtures/files/README.txt
- 11.x core/assets/scaffold/README.txt
- 11.x core/assets/vendor/tabbable/README.txt
- 11.x core/lib/Drupal/Core/README.txt
- 11.x core/lib/Drupal/Component/Render/README.txt
- 11.x core/lib/Drupal/Component/Assertion/README.txt
- 11.x core/lib/Drupal/Component/Discovery/README.txt
- 11.x core/lib/Drupal/Component/FileSecurity/README.txt
- 11.x core/lib/Drupal/Component/FileCache/README.txt
- 11.x core/lib/Drupal/Component/Utility/README.txt
- 11.x core/lib/Drupal/Component/README.txt
- 11.x core/lib/Drupal/Component/Graph/README.txt
- 11.x core/lib/Drupal/Component/DependencyInjection/README.txt
- 11.x core/lib/Drupal/Component/FrontMatter/README.txt
- 11.x core/lib/Drupal/Component/Version/README.txt
- 11.x core/lib/Drupal/Component/Serialization/README.txt
- 11.x core/lib/Drupal/Component/ClassFinder/README.txt
- 11.x core/lib/Drupal/Component/ProxyBuilder/README.txt
- 11.x core/lib/Drupal/Component/EventDispatcher/README.txt
- 11.x core/lib/Drupal/Component/Diff/README.txt
- 11.x core/lib/Drupal/Component/FileSystem/README.txt
- 11.x core/lib/Drupal/Component/Gettext/README.txt
- 11.x core/lib/Drupal/Component/PhpStorage/README.txt
- 11.x core/lib/Drupal/Component/Datetime/README.txt
- 11.x core/lib/Drupal/Component/Transliteration/README.txt
- 11.x core/lib/Drupal/Component/Annotation/README.txt
- 11.x core/lib/Drupal/Component/HttpFoundation/README.txt
- 11.x core/lib/Drupal/Component/Uuid/README.txt
- 11.x core/lib/Drupal/Component/Plugin/README.txt
- 11.x core/lib/README.txt
The Drupal Vendor Hardening Composer Plugin =========================================== Thanks for using this Drupal component. You can participate in its development on Drupal.org, through our issue system: https://www.drupal.org/project/issues/drupal You can get the full Drupal repo here: https://www.drupal.org/project/drupal/git-instructions You can browse the full Drupal repo here: https://git.drupalcode.org/project/drupal What does it do? ---------------- This Composer plugin does two things: 1) It removes extraneous directories from the project's vendor directory. They're typically directories which might contain executable files, such as test directories. This sort of processing is required for projects that have a vendor directory inside the HTTP server docroot. This is a common layout for Drupal. By default, the plugin knows how to clean up packages for Drupal core, so you can require drupal/core-vendor-hardening in your project and the rest will happen automatically. The plugin can also be configured to clean up additional packages using the project's composer.json extra field. This plugin can also clean up packages that were installed outside of the vendor directory, using composer/installers. This allows users to configure the plugin to clean up, for instance, Drupal extensions and Drupal core. 2) The plugin also adds .htaccess and web.config files to the root of the project's vendor directory. These files will perform due diligence to keep the web server from serving files from within the vendor directory. How do I set it up? ------------------- Require this Composer plugin into your project: composer require drupal/core-vendor-hardening When you install or update, this plugin will look through each package and remove directories it knows about. You can see the list of default package cleanups for this plugin in Config.php. If you discover that this list needs updating, please file an issue about it: https://www.drupal.org/project/issues/drupal In addition to the default list of packages, you can configure the plugin using the root package's composer.json extra field, like this: "extra": { "drupal-core-vendor-hardening": { "vendor/package": ["test", "documentation"] } } The above code will tell the plugin to remove the test/ and documentation/ directories from the 'vendor/package' package when it is installed or updated. For packages installed outside of the vendor directory, such as those installed by composer/installers, the paths to remove should be relative to the package base. As an example, a Drupal module package named drupal/module_name might be installed by composer/installers to web/modules/contrib/module_name/. Cleanup paths specified for this package might look like this: "extra": { "drupal-core-vendor-hardening": { "drupal/module_name": ["tests", "src/Tests"] } } This would then cause the plugin to try and remove web/modules/contrib/module_name/tests and web/modules/contrib/module_name/src/Tests.
File
-
composer/
Plugin/ VendorHardening/ README.txt
View source
- The Drupal Vendor Hardening Composer Plugin
- ===========================================
-
- Thanks for using this Drupal component.
-
- You can participate in its development on Drupal.org, through our issue system:
- https://www.drupal.org/project/issues/drupal
-
- You can get the full Drupal repo here:
- https://www.drupal.org/project/drupal/git-instructions
-
- You can browse the full Drupal repo here:
- https://git.drupalcode.org/project/drupal
-
- What does it do?
- ----------------
-
- This Composer plugin does two things:
-
- 1) It removes extraneous directories from the project's vendor directory.
- They're typically directories which might contain executable files, such as test
- directories.
-
- This sort of processing is required for projects that have a vendor directory
- inside the HTTP server docroot. This is a common layout for Drupal.
-
- By default, the plugin knows how to clean up packages for Drupal core, so you
- can require drupal/core-vendor-hardening in your project and the rest will
- happen automatically.
-
- The plugin can also be configured to clean up additional packages using the
- project's composer.json extra field.
-
- This plugin can also clean up packages that were installed outside of the
- vendor directory, using composer/installers. This allows users to configure the
- plugin to clean up, for instance, Drupal extensions and Drupal core.
-
- 2) The plugin also adds .htaccess and web.config files to the root of the
- project's vendor directory. These files will perform due diligence to keep the
- web server from serving files from within the vendor directory.
-
- How do I set it up?
- -------------------
-
- Require this Composer plugin into your project:
-
- composer require drupal/core-vendor-hardening
-
- When you install or update, this plugin will look through each package and
- remove directories it knows about.
-
- You can see the list of default package cleanups for this plugin in Config.php.
- If you discover that this list needs updating, please file an issue about it:
- https://www.drupal.org/project/issues/drupal
-
- In addition to the default list of packages, you can configure the plugin using
- the root package's composer.json extra field, like this:
-
- "extra": {
- "drupal-core-vendor-hardening": {
- "vendor/package": ["test", "documentation"]
- }
- }
-
- The above code will tell the plugin to remove the test/ and documentation/
- directories from the 'vendor/package' package when it is installed or updated.
-
- For packages installed outside of the vendor directory, such as those installed
- by composer/installers, the paths to remove should be relative to the package
- base. As an example, a Drupal module package named drupal/module_name might be
- installed by composer/installers to web/modules/contrib/module_name/. Cleanup
- paths specified for this package might look like this:
-
- "extra": {
- "drupal-core-vendor-hardening": {
- "drupal/module_name": ["tests", "src/Tests"]
- }
- }
-
- This would then cause the plugin to try and remove
- web/modules/contrib/module_name/tests and
- web/modules/contrib/module_name/src/Tests.
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.