|
38 | 38 | 'FQCN string argument' => <<<'PHP' |
39 | 39 | <?php |
40 | 40 | |
| 41 | + spl_autoload_register('sodiumCompatAutoloader'); |
| 42 | + spl_autoload_register('Sodium\compatAutoloader'); |
41 | 43 | spl_autoload_register(['Swift', 'autoload']); |
42 | 44 | spl_autoload_register(['\Swift', 'autoload']); |
43 | 45 | spl_autoload_register(['Humbug\\Swift', 'autoload']); |
|
51 | 53 | |
52 | 54 | namespace Humbug; |
53 | 55 | |
| 56 | + \spl_autoload_register('Humbug\\sodiumCompatAutoloader'); |
| 57 | + \spl_autoload_register('Humbug\\Sodium\\compatAutoloader'); |
54 | 58 | \spl_autoload_register(['Humbug\\Swift', 'autoload']); |
55 | 59 | \spl_autoload_register(['Humbug\\Swift', 'autoload']); |
56 | 60 | \spl_autoload_register(['Humbug\\Swift', 'autoload']); |
|
84 | 88 | PHP, |
85 | 89 | ], |
86 | 90 |
|
| 91 | + 'FQCN string argument on exposed function' => [ |
| 92 | + 'expose-functions' => ['sodiumCompatAutoloader'], |
| 93 | + 'payload' => <<<'PHP' |
| 94 | + <?php |
| 95 | + |
| 96 | + spl_autoload_register('sodiumCompatAutoloader'); |
| 97 | + |
| 98 | + ---- |
| 99 | + <?php |
| 100 | + |
| 101 | + namespace Humbug; |
| 102 | + |
| 103 | + \spl_autoload_register('Humbug\\sodiumCompatAutoloader'); |
| 104 | + |
| 105 | + PHP, |
| 106 | + ], |
| 107 | + |
87 | 108 | 'FQCN string argument on class from an excluded namespace' => [ |
88 | 109 | 'exclude-namespaces' => [ |
89 | 110 | 'Symfony\Component\Yaml', |
|
110 | 131 | PHP, |
111 | 132 | ], |
112 | 133 |
|
| 134 | + 'FQCN string argument on function from an excluded namespace' => [ |
| 135 | + 'exclude-namespaces' => [ |
| 136 | + 'Sodium', |
| 137 | + '/^$/', |
| 138 | + ], |
| 139 | + 'payload' => <<<'PHP' |
| 140 | + <?php |
| 141 | + |
| 142 | + spl_autoload_register('Sodium\CompatAutoloader'); |
| 143 | + |
| 144 | + ---- |
| 145 | + <?php |
| 146 | + |
| 147 | + namespace { |
| 148 | + \spl_autoload_register('Sodium\\CompatAutoloader'); |
| 149 | + } |
| 150 | + |
| 151 | + PHP, |
| 152 | + ], |
| 153 | + |
113 | 154 | 'FQCN string argument with global functions not exposed' => [ |
114 | 155 | 'expose-global-functions' => false, |
115 | 156 | 'payload' => <<<'PHP' |
|
0 commit comments