Version Description
2022-03-22 =
When a zone has "Always Use HTTPS" enabled, only send HTTPS based URLs. HTTP URLs will never be hit and never present in the cache.
Download this release
Release Info
Developer | manatarms |
Plugin | Cloudflare |
Version | 4.8.3 |
Comparing to | |
See all releases |
Code changes from version 4.8.2 to 4.8.3
- cloudflare.php +1 -1
- composer.json +38 -38
- composer.lock +1 -1
- config.json +26 -26
- output.log +8 -8
- readme.txt +5 -1
- src/WordPress/Hooks.php +38 -6
- src/WordPress/WordPressClientAPI.php +15 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
cloudflare.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cloudflare
|
4 |
Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
|
5 |
Description: Cloudflare speeds up and protects your WordPress site.
|
6 |
-
Version: 4.8.
|
7 |
Requires PHP: 7.2
|
8 |
Author: Cloudflare, Inc.
|
9 |
License: BSD-3-Clause
|
3 |
Plugin Name: Cloudflare
|
4 |
Plugin URI: https://blog.cloudflare.com/new-wordpress-plugin/
|
5 |
Description: Cloudflare speeds up and protects your WordPress site.
|
6 |
+
Version: 4.8.3
|
7 |
Requires PHP: 7.2
|
8 |
Author: Cloudflare, Inc.
|
9 |
License: BSD-3-Clause
|
composer.json
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
}
|
6 |
-
},
|
7 |
-
"description": "A Cloudflare plugin for WordPress",
|
8 |
-
"license": "BSD-3-Clause",
|
9 |
-
"name": "cloudflare/wordpress-plugin",
|
10 |
-
"type": "wordpress-plugin",
|
11 |
-
"require": {
|
12 |
-
"cloudflare/cf-ip-rewrite": "^1.0.0",
|
13 |
-
"symfony/polyfill-intl-idn": "*",
|
14 |
-
"psr/log": "^1.0"
|
15 |
-
},
|
16 |
-
"require-dev": {
|
17 |
-
"symfony/yaml": "~2.6",
|
18 |
-
"johnkary/phpunit-speedtrap": "*",
|
19 |
-
"php-mock/php-mock-phpunit": "*",
|
20 |
-
"phpunit/phpunit": "*",
|
21 |
-
"squizlabs/php_codesniffer": "*",
|
22 |
-
"phpcompatibility/php-compatibility": "*",
|
23 |
-
"dealerdirect/phpcodesniffer-composer-installer": "*",
|
24 |
-
"phpdocumentor/reflection-docblock": "*"
|
25 |
-
},
|
26 |
-
"scripts": {
|
27 |
-
"format": "php vendor/bin/phpcs -d date.timezone=UTC --standard=phpcs.xml",
|
28 |
-
"test": "php vendor/bin/phpunit",
|
29 |
-
"clean-crash-test": "rm -f vendor/phpunit/php-code-coverage/tests/_files/Crash.php",
|
30 |
-
"remove-php-8-symfony-polyfill-bootstraps": "rm -f vendor/symfony/polyfill-ctype/bootstrap80.php vendor/symfony/polyfill-intl-idn/bootstrap80.php vendor/symfony/polyfill-intl-normalizer/bootstrap80.php"
|
31 |
-
},
|
32 |
-
"_comment": [
|
33 |
-
"php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
|
34 |
-
],
|
35 |
-
"version": "4.8.2",
|
36 |
-
"config": {
|
37 |
-
"platform": {
|
38 |
-
"php": "7.2"
|
39 |
-
}
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
1 |
{
|
2 |
+
"autoload": {
|
3 |
+
"psr-4": {
|
4 |
+
"CF\\": "src/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
}
|
6 |
+
},
|
7 |
+
"description": "A Cloudflare plugin for WordPress",
|
8 |
+
"license": "BSD-3-Clause",
|
9 |
+
"name": "cloudflare/wordpress-plugin",
|
10 |
+
"type": "wordpress-plugin",
|
11 |
+
"require": {
|
12 |
+
"cloudflare/cf-ip-rewrite": "^1.0.0",
|
13 |
+
"symfony/polyfill-intl-idn": "*",
|
14 |
+
"psr/log": "^1.0"
|
15 |
+
},
|
16 |
+
"require-dev": {
|
17 |
+
"symfony/yaml": "~2.6",
|
18 |
+
"johnkary/phpunit-speedtrap": "*",
|
19 |
+
"php-mock/php-mock-phpunit": "*",
|
20 |
+
"phpunit/phpunit": "*",
|
21 |
+
"squizlabs/php_codesniffer": "*",
|
22 |
+
"phpcompatibility/php-compatibility": "*",
|
23 |
+
"dealerdirect/phpcodesniffer-composer-installer": "*",
|
24 |
+
"phpdocumentor/reflection-docblock": "*"
|
25 |
+
},
|
26 |
+
"scripts": {
|
27 |
+
"format": "php vendor/bin/phpcs -d date.timezone=UTC --standard=phpcs.xml",
|
28 |
+
"test": "php vendor/bin/phpunit",
|
29 |
+
"clean-crash-test": "rm -f vendor/phpunit/php-code-coverage/tests/_files/Crash.php",
|
30 |
+
"remove-php-8-symfony-polyfill-bootstraps": "rm -f vendor/symfony/polyfill-ctype/bootstrap80.php vendor/symfony/polyfill-intl-idn/bootstrap80.php vendor/symfony/polyfill-intl-normalizer/bootstrap80.php"
|
31 |
+
},
|
32 |
+
"_comment": [
|
33 |
+
"php-compatibility-install comes from https://github.com/wimg/PHPCompatibility/issues/102#issuecomment-255778195"
|
34 |
+
],
|
35 |
+
"version": "4.8.3",
|
36 |
+
"config": {
|
37 |
+
"platform": {
|
38 |
+
"php": "7.2"
|
39 |
+
}
|
40 |
+
}
|
41 |
}
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "cloudflare/cf-ip-rewrite",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "ecc1e471de68cf38adee93b24bc9db24",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "cloudflare/cf-ip-rewrite",
|
config.json
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
],
|
12 |
-
"
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
"AdvanceDDoSCard",
|
23 |
-
"AutomaticHTTPSRewritesCard"
|
24 |
-
]
|
25 |
-
},
|
26 |
-
"locale": "en",
|
27 |
-
"integrationName": "wordpress",
|
28 |
-
"version": "4.8.2"
|
29 |
}
|
1 |
{
|
2 |
+
"debug": false,
|
3 |
+
"featureManagerIsFullZoneProvisioningEnabled": false,
|
4 |
+
"isDNSPageEnabled": false,
|
5 |
+
"isSubdomainCheckEnabled": true,
|
6 |
+
"useHostAPILogin": false,
|
7 |
+
"homePageCards": [
|
8 |
+
"ApplyDefaultSettingsCard",
|
9 |
+
"AutomaticPlatformOptimizationCard",
|
10 |
+
"PurgeCacheCard"
|
11 |
+
],
|
12 |
+
"moreSettingsCards": {
|
13 |
+
"container.moresettings.speed": [
|
14 |
+
"AlwaysOnlineCard",
|
15 |
+
"ImageOptimizationCard",
|
16 |
+
"PluginSpecificCacheCard",
|
17 |
+
"DevelopmentModeCard"
|
18 |
],
|
19 |
+
"container.moresettings.security": [
|
20 |
+
"SecurityLevelCard",
|
21 |
+
"WAFCard",
|
22 |
+
"AdvanceDDoSCard",
|
23 |
+
"AutomaticHTTPSRewritesCard"
|
24 |
+
]
|
25 |
+
},
|
26 |
+
"locale": "en",
|
27 |
+
"integrationName": "wordpress",
|
28 |
+
"version": "4.8.3"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
output.log
CHANGED
@@ -27,27 +27,27 @@ php-7.4-build2: Pulling from cloudflare/cloudflare-wordpress/php-actions_compose
|
|
27 |
320f26ee9b1c: Download complete
|
28 |
30e209609427: Verifying Checksum
|
29 |
30e209609427: Download complete
|
30 |
-
801bfaa63ef2: Verifying Checksum
|
31 |
801bfaa63ef2: Download complete
|
32 |
801bfaa63ef2: Pull complete
|
33 |
4612e05a72cf: Verifying Checksum
|
34 |
4612e05a72cf: Download complete
|
|
|
35 |
79c03e12047a: Verifying Checksum
|
36 |
79c03e12047a: Download complete
|
37 |
9b2beae78beb: Verifying Checksum
|
38 |
9b2beae78beb: Download complete
|
39 |
-
|
|
|
40 |
5571c1cd7f43: Verifying Checksum
|
41 |
5571c1cd7f43: Download complete
|
42 |
-
|
43 |
-
51393fef6543: Verifying Checksum
|
44 |
-
51393fef6543: Download complete
|
45 |
65564f077fec: Verifying Checksum
|
46 |
65564f077fec: Download complete
|
47 |
-
|
48 |
-
|
49 |
-
9b2beae78beb: Pull complete
|
50 |
79c03e12047a: Pull complete
|
|
|
|
|
51 |
51393fef6543: Pull complete
|
52 |
5571c1cd7f43: Pull complete
|
53 |
65564f077fec: Pull complete
|
27 |
320f26ee9b1c: Download complete
|
28 |
30e209609427: Verifying Checksum
|
29 |
30e209609427: Download complete
|
|
|
30 |
801bfaa63ef2: Download complete
|
31 |
801bfaa63ef2: Pull complete
|
32 |
4612e05a72cf: Verifying Checksum
|
33 |
4612e05a72cf: Download complete
|
34 |
+
30e209609427: Pull complete
|
35 |
79c03e12047a: Verifying Checksum
|
36 |
79c03e12047a: Download complete
|
37 |
9b2beae78beb: Verifying Checksum
|
38 |
9b2beae78beb: Download complete
|
39 |
+
320f26ee9b1c: Pull complete
|
40 |
+
4612e05a72cf: Pull complete
|
41 |
5571c1cd7f43: Verifying Checksum
|
42 |
5571c1cd7f43: Download complete
|
43 |
+
9b2beae78beb: Pull complete
|
|
|
|
|
44 |
65564f077fec: Verifying Checksum
|
45 |
65564f077fec: Download complete
|
46 |
+
51393fef6543: Verifying Checksum
|
47 |
+
51393fef6543: Download complete
|
|
|
48 |
79c03e12047a: Pull complete
|
49 |
+
4d1e94121e00: Verifying Checksum
|
50 |
+
4d1e94121e00: Download complete
|
51 |
51393fef6543: Pull complete
|
52 |
5571c1cd7f43: Pull complete
|
53 |
65564f077fec: Pull complete
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: icyapril, manatarms, thillcf, deuill, epatryk, jacobbednarz
|
|
3 |
Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.9
|
6 |
-
Stable tag: 4.8.
|
7 |
Requires PHP: 7.2
|
8 |
License: BSD-3-Clause
|
9 |
|
@@ -99,6 +99,10 @@ Yes, Cloudflare works with, and helps speed up your site even more, if you have
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
102 |
= 4.8.2 - 2022-03-18 =
|
103 |
|
104 |
* Retag 4.8.1 with correct version in user agent
|
3 |
Tags: cloudflare, seo, ssl, ddos, speed, security, cdn, performance, free
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.9
|
6 |
+
Stable tag: 4.8.3
|
7 |
Requires PHP: 7.2
|
8 |
License: BSD-3-Clause
|
9 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 4.8.3 - 2022-03-22 =
|
103 |
+
|
104 |
+
* When a zone has "Always Use HTTPS" enabled, only send HTTPS based URLs. HTTP URLs will never be hit and never present in the cache.
|
105 |
+
|
106 |
= 4.8.2 - 2022-03-18 =
|
107 |
|
108 |
* Retag 4.8.1 with correct version in user agent
|
src/WordPress/Hooks.php
CHANGED
@@ -165,10 +165,11 @@ class Hooks
|
|
165 |
$urls = apply_filters('cloudflare_purge_by_url', $urls, $postId);
|
166 |
|
167 |
$zoneTag = $this->api->getZoneTag($wpDomain);
|
|
|
168 |
|
169 |
// Fetch the page rules and should we not have any hints of cache
|
170 |
// all behaviour or APO, filter out the non-cacheable URLs.
|
171 |
-
$hasCacheOverride = $this->
|
172 |
if (!$hasCacheOverride && !$this->isAutomaticPlatformOptimizationEnabled()) {
|
173 |
$this->logger->debug("cache everything behaviour and APO not found, filtering URLs to only be those that are cacheable by default");
|
174 |
$urls = array_filter($urls, array($this, "pathHasCachableFileExtension"));
|
@@ -181,6 +182,12 @@ class Hooks
|
|
181 |
}
|
182 |
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
if (isset($zoneTag) && !empty($urls)) {
|
185 |
$chunks = array_chunk($urls, 30);
|
186 |
|
@@ -444,14 +451,15 @@ class Hooks
|
|
444 |
}
|
445 |
|
446 |
/**
|
447 |
-
*
|
448 |
-
*
|
449 |
-
* would trigger the "cache everything" behaviour.
|
450 |
*
|
451 |
* @param mixed $pagerules
|
|
|
|
|
452 |
* @return bool
|
453 |
*/
|
454 |
-
|
455 |
{
|
456 |
if (!is_array($pagerules)) {
|
457 |
return false;
|
@@ -459,7 +467,7 @@ class Hooks
|
|
459 |
|
460 |
foreach ($pagerules as $pagerule) {
|
461 |
foreach ($pagerule["actions"] as $action) {
|
462 |
-
if ($action["id"] ==
|
463 |
return true;
|
464 |
}
|
465 |
}
|
@@ -469,6 +477,13 @@ class Hooks
|
|
469 |
return false;
|
470 |
}
|
471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
/**
|
473 |
* pathHasCachableFileExtension takes a string of a URL and evaluates if it
|
474 |
* has a file extension that Cloudflare caches by default.
|
@@ -488,4 +503,21 @@ class Hooks
|
|
488 |
|
489 |
return false;
|
490 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
}
|
165 |
$urls = apply_filters('cloudflare_purge_by_url', $urls, $postId);
|
166 |
|
167 |
$zoneTag = $this->api->getZoneTag($wpDomain);
|
168 |
+
$activePageRules = $this->api->getPageRules($zoneTag, "active");
|
169 |
|
170 |
// Fetch the page rules and should we not have any hints of cache
|
171 |
// all behaviour or APO, filter out the non-cacheable URLs.
|
172 |
+
$hasCacheOverride = $this->pageRuleContains($activePageRules, "cache_level", "cache_everything");
|
173 |
if (!$hasCacheOverride && !$this->isAutomaticPlatformOptimizationEnabled()) {
|
174 |
$this->logger->debug("cache everything behaviour and APO not found, filtering URLs to only be those that are cacheable by default");
|
175 |
$urls = array_filter($urls, array($this, "pathHasCachableFileExtension"));
|
182 |
}
|
183 |
}
|
184 |
|
185 |
+
$hasAlwaysUseHTTPSOverrideDisabled = $this->pageRuleContains($activePageRules, "always_use_https", "off");
|
186 |
+
if ($this->zoneSettingAlwaysUseHTTPSEnabled($zoneTag) && !$hasAlwaysUseHTTPSOverrideDisabled) {
|
187 |
+
$this->logger->debug("always_use_https is enabled without page rule overrides present, removing HTTP based URLs");
|
188 |
+
$urls = array_filter($urls, array($this, "urlIsHTTPS"));
|
189 |
+
}
|
190 |
+
|
191 |
if (isset($zoneTag) && !empty($urls)) {
|
192 |
$chunks = array_chunk($urls, 30);
|
193 |
|
451 |
}
|
452 |
|
453 |
/**
|
454 |
+
* Accepts a page rule key and value to check if it exists in the page rules
|
455 |
+
* provided.
|
|
|
456 |
*
|
457 |
* @param mixed $pagerules
|
458 |
+
* @param mixed $key
|
459 |
+
* @param mixed $value
|
460 |
* @return bool
|
461 |
*/
|
462 |
+
private function pageRuleContains($pagerules, $key, $value)
|
463 |
{
|
464 |
if (!is_array($pagerules)) {
|
465 |
return false;
|
467 |
|
468 |
foreach ($pagerules as $pagerule) {
|
469 |
foreach ($pagerule["actions"] as $action) {
|
470 |
+
if ($action["id"] == $key && $action["value"] == $value) {
|
471 |
return true;
|
472 |
}
|
473 |
}
|
477 |
return false;
|
478 |
}
|
479 |
|
480 |
+
private function zoneSettingAlwaysUseHTTPSEnabled($zoneTag)
|
481 |
+
{
|
482 |
+
$settings = $this->api->getZoneSetting($zoneTag, "always_use_https");
|
483 |
+
return $settings["value"] == "on";
|
484 |
+
}
|
485 |
+
|
486 |
+
|
487 |
/**
|
488 |
* pathHasCachableFileExtension takes a string of a URL and evaluates if it
|
489 |
* has a file extension that Cloudflare caches by default.
|
503 |
|
504 |
return false;
|
505 |
}
|
506 |
+
|
507 |
+
/**
|
508 |
+
* urlIsHTTPS determines if a scheme used for a URL is HTTPS.
|
509 |
+
*
|
510 |
+
* @param mixed $value
|
511 |
+
* @return bool
|
512 |
+
*/
|
513 |
+
private function urlIsHTTPS($value)
|
514 |
+
{
|
515 |
+
$parsed_scheme = parse_url($value, PHP_URL_SCHEME);
|
516 |
+
|
517 |
+
if ($parsed_scheme == "https") {
|
518 |
+
return true;
|
519 |
+
}
|
520 |
+
|
521 |
+
return false;
|
522 |
+
}
|
523 |
}
|
src/WordPress/WordPressClientAPI.php
CHANGED
@@ -82,6 +82,21 @@ class WordPressClientAPI extends Client
|
|
82 |
return $this->responseOk($response);
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
/**
|
86 |
* @param $urlPattern
|
87 |
*
|
82 |
return $this->responseOk($response);
|
83 |
}
|
84 |
|
85 |
+
/**
|
86 |
+
* @param $zoneId
|
87 |
+
* @param $settingName
|
88 |
+
* @param $params
|
89 |
+
*
|
90 |
+
* @return bool
|
91 |
+
*/
|
92 |
+
public function getZoneSetting($zoneId, $settingName)
|
93 |
+
{
|
94 |
+
$request = new Request('GET', 'zones/' . $zoneId . '/settings/' . $settingName, array(), null);
|
95 |
+
$response = $this->callAPI($request);
|
96 |
+
|
97 |
+
return $response["result"];
|
98 |
+
}
|
99 |
+
|
100 |
/**
|
101 |
* @param $urlPattern
|
102 |
*
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit959bcbb6a94a41bb92a90d5d095538b7::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitcc9f49ab626c58cbc54f07acd330a4a3
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitcc9f49ab626c58cbc54f07acd330a4a3
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit959bcbb6a94a41bb92a90d5d095538b7
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit959bcbb6a94a41bb92a90d5d095538b7', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit959bcbb6a94a41bb92a90d5d095538b7', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire959bcbb6a94a41bb92a90d5d095538b7($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire959bcbb6a94a41bb92a90d5d095538b7($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
@@ -69,10 +69,10 @@ class ComposerStaticInitcc9f49ab626c58cbc54f07acd330a4a3
|
|
69 |
public static function getInitializer(ClassLoader $loader)
|
70 |
{
|
71 |
return \Closure::bind(function () use ($loader) {
|
72 |
-
$loader->prefixLengthsPsr4 =
|
73 |
-
$loader->prefixDirsPsr4 =
|
74 |
-
$loader->prefixesPsr0 =
|
75 |
-
$loader->classMap =
|
76 |
|
77 |
}, null, ClassLoader::class);
|
78 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
69 |
public static function getInitializer(ClassLoader $loader)
|
70 |
{
|
71 |
return \Closure::bind(function () use ($loader) {
|
72 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::$prefixLengthsPsr4;
|
73 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::$prefixDirsPsr4;
|
74 |
+
$loader->prefixesPsr0 = ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::$prefixesPsr0;
|
75 |
+
$loader->classMap = ComposerStaticInit959bcbb6a94a41bb92a90d5d095538b7::$classMap;
|
76 |
|
77 |
}, null, ClassLoader::class);
|
78 |
}
|