From 4c427adf5c4212da727acdec3faa02f8b9a85e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:03:02 +0100 Subject: [PATCH] doc: Update the specs example in the contribution guide (#873) --- CONTRIBUTING.md | 91 +++++++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 41 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1dee2adbb..0be92f9d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ make make help ``` -This project has a certain number of unit tests. However because it is tightly +This project has a certain number of unit tests. However, because it is tightly coupled to [PHP-Parser][php-parser] and since [node visitors][node-visitors] behaviour and effects depends a lot on how they are combined, you can find an extensive integration test suite for the scoping of PHP files in @@ -25,24 +25,34 @@ return [ 'meta' => [ 'title' => 'Title of the specification: this is used to quickly identify what is tested/covered by this file', - // Default configuration value for this file + // Default configuration values for this file 'prefix' => 'Humbug', - 'whitelist' => [], 'expose-global-constants' => false, - 'expose-global-functions' => true, + 'expose-global-classes' => false, + 'expose-global-functions' => false, + 'expose-namespaces' => [], + 'expose-constants' => [], + 'expose-classes' => [], + 'expose-functions' => [], + 'exclude-namespaces' => [], + 'exclude-constants' => [], + 'exclude-classes' => [], + 'exclude-functions' => [], + 'expected-recorded-classes' => [], + 'expected-recorded-functions' => [], ], // List of specifications [ 'spec' => <<<'SPEC' -This is a multiline spec description. -It can also be a simple string when more readable. -SPEC + This is a multiline spec description. + It can also be a simple string when more readable. + SPEC , // Each configuration setting defined in "meta" can be overridden // here for this specification - 'whitelist' => ['Bar'], + 'expose-global-constants' => true, // Content of the specification: this should be the content of a plain // PHP file as you can notice by the presence of the opening ` <<<'PHP' - <<<'PHP' -