PHP code example of ahmyi / composer-preload

1. Go to this page and download the library: Download ahmyi/composer-preload library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ahmyi / composer-preload example snippets



[:opcode:]
JSON
{
    "extra": {
        "preload": {
            "paths": [
                "web"
            ],
            "exclude": [
                "web/core/tests",
                "web/core/lib/Drupal/Component/Assertion",
                "web/core/modules/simpletest",
                "web/core/modules/editor/src/Tests"
            ],
            "extensions": ["php", "module", "inc", "install"],
            "exclude-regex": "/[A-Za-z0-9_]test\\.php$/i",
            "no-status-check": false,
            "files": [
                "somefile.php"
            ],
            "exclude-files": [
                "web/some_file_in_paths_to_exclude.php"
            ],
            "export":"webroot/file_to_export.php",
            "template" : "template/mypreloadtemplate.php"
        }
    }
}