Skip to content
Snippets Groups Projects
Select Git revision
  • 1502ed6377514bf22e2999be2caa829db3d22f22
  • master default protected
  • fix/woo-stubs-dir
  • default-packages
  • use-internal-packages
  • update-setup
  • feature/wpdesk-cs
  • 2.5.3
  • 2.5.2
  • 2.5.1
  • 2.5.0
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3
  • 2.2.1
  • 2.2
  • 2.1
  • 2.0
  • 1.10.15
  • 1.10.12
  • 1.10.8
  • 1.10.7
  • 1.10.6
  • 1.10.5
  • 1.10.3
  • 1.10.2
27 results

scoper.inc.php

Blame
  • scoper.inc.php 3.02 KiB
    <?php
    
    declare( strict_types=1 );
    
    use Isolated\Symfony\Component\Finder\Finder;
    
    return [
    	// The prefix configuration. If a non null value will be used, a random prefix will be generated.
    	'prefix'                     => 'PluginTemplateVendor',
    
    	// By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working
    	// directory. You can however define which files should be scoped by defining a collection of Finders in the
    	// following configuration key.
    	//
    	// For more see: https://github.com/humbug/php-scoper#finders-and-paths
    	'finders'                    => [
    		Finder::create()
    		      ->files()
    		      ->ignoreVCS( true )
    		      ->name( [ '*.php', 'composer.json', '*.css', '*.js', '*.jpg', '*.png', '*.wsdl' ] )
    		      ->exclude( [
    			      'doc',
    			      'test',
    			      'test_old',
    			      'tests',
    			      'Tests',
    			      'vendor-bin',
    			      'wp-wpdesk-composer',
    			      'wp-wpdesk-helper-override',
    			      'wp-code-sniffer',
    			      'wp-codeception',
    		      ] )
    		      ->in( [ 'vendor/psr', 'vendor/wpdesk', ] ),
    	],
    
    	// Whitelists a list of files. Unlike the other whitelist related features, this one is about completely leaving
    	// a file untouched.
    	// Paths are relative to the configuration file unless if they are already absolute
    	'files-whitelist'            => [
    	],
    
    	// When scoping PHP files, there will be scenarios where some of the code being scoped indirectly references the
    	// original namespace. These will include, for example, strings or string manipulations. PHP-Scoper has limited
    	// support for prefixing such strings. To circumvent that, you can define patchers to manipulate the file to your
    	// heart contents.
    	//
    	// For more see: https://github.com/humbug/php-scoper#patchers
    	'patchers'                   => [
    	],
    
    	// PHP-Scoper's goal is to make sure that all code for a project lies in a distinct PHP namespace. However, you
    	// may want to share a common API between the bundled code of your PHAR and the consumer code. For example if
    	// you have a PHPUnit PHAR with isolated code, you still want the PHAR to be able to understand the
    	// PHPUnit\Framework\TestCase class.
    	//
    	// A way to achieve this is by specifying a list of classes to not prefix with the following configuration key. Note
    	// that this does not work with functions or constants neither with classes belonging to the global namespace.
    	//
    	// Fore more see https://github.com/humbug/php-scoper#whitelist
    	'whitelist'                  => [],
    
    	// If `true` then the user defined constants belonging to the global namespace will not be prefixed.
    	//
    	// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
    	'whitelist-global-constants' => false,
    
    	// If `true` then the user defined functions belonging to the global namespace will not be prefixed.
    	//
    	// For more see https://github.com/humbug/php-scoper#constants--constants--functions-from-the-global-namespace
    	'whitelist-global-functions' => false,