Timber - Version 1.16.0

Version Description

Changes for Theme Developers * Allows for translation of time_ago Twig filter #2214 #2215 (thanks @gchtr)

Fixes and improvements * Fixed an issue where an excessive amount of DELETEs could hit the DB #1834 #2243 (thanks @chads2000 @dennisjac) * Fix an issue with blank user names #2232 (thanks @flip111)

Download this release

Release Info

Developer jarednova
Plugin Icon 128x128 Timber
Version 1.16.0
Comparing to
See all releases

Code changes from version 1.15.2 to 1.16.0

lib/Helper.php CHANGED
@@ -200,7 +200,7 @@ class Helper {
200
  if ( is_object($error) || is_array($error) ) {
201
  $error = print_r($error, true);
202
  }
203
- return error_log('[ Timber ]'.$error);
204
  }
205
 
206
  /**
200
  if ( is_object($error) || is_array($error) ) {
201
  $error = print_r($error, true);
202
  }
203
+ return error_log('[ Timber ] '.$error);
204
  }
205
 
206
  /**
lib/Loader.php CHANGED
@@ -54,6 +54,10 @@ class Loader {
54
  }
55
  }
56
 
 
 
 
 
57
  $key = null;
58
  $output = false;
59
  if ( false !== $expires ) {
@@ -178,6 +182,14 @@ class Loader {
178
  $twig = apply_filters('timber/twig/functions', $twig);
179
  $twig = apply_filters('timber/twig/escapers', $twig);
180
  $twig = apply_filters('timber/loader/twig', $twig);
 
 
 
 
 
 
 
 
181
  return $twig;
182
  }
183
 
54
  }
55
  }
56
 
57
+ if ( $expires === 0 ) {
58
+ $expires = false;
59
+ }
60
+
61
  $key = null;
62
  $output = false;
63
  if ( false !== $expires ) {
182
  $twig = apply_filters('timber/twig/functions', $twig);
183
  $twig = apply_filters('timber/twig/escapers', $twig);
184
  $twig = apply_filters('timber/loader/twig', $twig);
185
+
186
+ $twig = apply_filters('timber/twig', $twig);
187
+
188
+ /**
189
+ * get_twig is deprecated, use timber/twig
190
+ */
191
+ $twig = apply_filters('get_twig', $twig);
192
+
193
  return $twig;
194
  }
195
 
lib/PostType.php CHANGED
@@ -22,12 +22,13 @@ class PostType {
22
 
23
  protected function init( $post_type ) {
24
  $obj = get_post_type_object($post_type);
25
- foreach ( get_object_vars($obj) as $key => $value ) {
26
- if ( $key === '' || ord($key[0]) === 0 ) {
27
- continue;
 
 
 
28
  }
29
- $this->$key = $value;
30
  }
31
  }
32
-
33
  }
22
 
23
  protected function init( $post_type ) {
24
  $obj = get_post_type_object($post_type);
25
+ if ( ! empty( $obj ) ) {
26
+ foreach ( get_object_vars($obj) as $key => $value ) {
27
+ if ( $key === '' || ord($key[0]) === 0 ) {
28
+ continue;
29
+ }
30
+ $this->$key = $value;
31
  }
 
32
  }
33
  }
 
34
  }
lib/Timber.php CHANGED
@@ -35,7 +35,7 @@ use Timber\Loader;
35
  */
36
  class Timber {
37
 
38
- public static $version = '1.15.2';
39
  public static $locations;
40
  public static $dirname = 'views';
41
  public static $twig_cache = false;
@@ -278,6 +278,7 @@ class Timber {
278
  * Compile a Twig file.
279
  *
280
  * Passes data to a Twig file and returns the output.
 
281
  *
282
  * @api
283
  * @example
@@ -331,6 +332,11 @@ class Timber {
331
  }
332
 
333
  $output = $loader->render($file, $data, $expires, $cache_mode);
 
 
 
 
 
334
  }
335
 
336
  do_action('timber_compile_done');
35
  */
36
  class Timber {
37
 
38
+ public static $version = '1.16.0';
39
  public static $locations;
40
  public static $dirname = 'views';
41
  public static $twig_cache = false;
278
  * Compile a Twig file.
279
  *
280
  * Passes data to a Twig file and returns the output.
281
+ * If the template file doesn't exist it will throw a warning when WP_DEBUG is enabled.
282
  *
283
  * @api
284
  * @example
332
  }
333
 
334
  $output = $loader->render($file, $data, $expires, $cache_mode);
335
+ } else {
336
+ if ( is_array($filenames) ) {
337
+ $filenames = implode(", ", $filenames);
338
+ }
339
+ Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
340
  }
341
 
342
  do_action('timber_compile_done');
lib/Twig.php CHANGED
@@ -10,25 +10,18 @@ use Timber\Term;
10
  use Timber\Image;
11
  use Timber\User;
12
 
13
-
14
  class Twig {
15
-
16
  public static $dir_name;
17
 
18
  /**
19
  * @codeCoverageIgnore
20
  */
21
  public static function init() {
22
- new self();
23
- }
24
 
25
- /**
26
- * @codeCoverageIgnore
27
- */
28
- public function __construct() {
29
- add_action('timber/twig/filters', array($this, 'add_timber_filters'));
30
- add_action('timber/twig/functions', array($this, 'add_timber_functions'));
31
- add_action('timber/twig/escapers', array($this, 'add_timber_escapers'));
32
  }
33
 
34
  /**
@@ -208,7 +201,7 @@ class Twig {
208
 
209
  $twig->addFilter(new Twig_Filter('pluck', array('Timber\Helper', 'pluck')));
210
 
211
- /**
212
  * @deprecated since 1.13 (to be removed in 2.0). Use Twig's native filter filter instead
213
  * @todo remove this in 2.x so that filter merely passes to Twig's filter without any modification
214
  * @ticket #1594 #2120
@@ -234,12 +227,6 @@ class Twig {
234
  return apply_filters_ref_array($tag, $args);
235
  } ));
236
 
237
-
238
- $twig = apply_filters('timber/twig', $twig);
239
- /**
240
- * get_twig is deprecated, use timber/twig
241
- */
242
- $twig = apply_filters('get_twig', $twig);
243
  return $twig;
244
  }
245
 
@@ -353,13 +340,33 @@ class Twig {
353
  }
354
 
355
  /**
356
- * @param int|string $from
357
- * @param int|string $to
358
- * @param string $format_past
359
- * @param string $format_future
 
 
 
 
 
 
 
 
 
 
360
  * @return string
361
  */
362
- public static function time_ago( $from, $to = null, $format_past = '%s ago', $format_future = '%s from now' ) {
 
 
 
 
 
 
 
 
 
 
363
  $to = $to === null ? time() : $to;
364
  $to = is_int($to) ? $to : strtotime($to);
365
  $from = is_int($from) ? $from : strtotime($from);
10
  use Timber\Image;
11
  use Timber\User;
12
 
 
13
  class Twig {
 
14
  public static $dir_name;
15
 
16
  /**
17
  * @codeCoverageIgnore
18
  */
19
  public static function init() {
20
+ $self = new self();
 
21
 
22
+ add_action( 'timber/twig/filters', array( $self, 'add_timber_filters' ) );
23
+ add_action( 'timber/twig/functions', array( $self, 'add_timber_functions' ) );
24
+ add_action( 'timber/twig/escapers', array( $self, 'add_timber_escapers' ) );
 
 
 
 
25
  }
26
 
27
  /**
201
 
202
  $twig->addFilter(new Twig_Filter('pluck', array('Timber\Helper', 'pluck')));
203
 
204
+ /**
205
  * @deprecated since 1.13 (to be removed in 2.0). Use Twig's native filter filter instead
206
  * @todo remove this in 2.x so that filter merely passes to Twig's filter without any modification
207
  * @ticket #1594 #2120
227
  return apply_filters_ref_array($tag, $args);
228
  } ));
229
 
 
 
 
 
 
 
230
  return $twig;
231
  }
232
 
340
  }
341
 
342
  /**
343
+ * Returns the difference between two times in a human readable format.
344
+ *
345
+ * Differentiates between past and future dates.
346
+ *
347
+ * @see \human_time_diff()
348
+ *
349
+ * @param int|string $from Base date as a timestamp or a date string.
350
+ * @param int|string $to Optional. Date to calculate difference to as a timestamp or
351
+ * a date string. Default to current time.
352
+ * @param string $format_past Optional. String to use for past dates. To be used with
353
+ * `sprintf()`. Default `%s ago`.
354
+ * @param string $format_future Optional. String to use for future dates. To be used with
355
+ * `sprintf()`. Default `%s from now`.
356
+ *
357
  * @return string
358
  */
359
+ public static function time_ago( $from, $to = null, $format_past = null, $format_future = null ) {
360
+ if ( null === $format_past ) {
361
+ /* translators: %s: Human-readable time difference. */
362
+ $format_past = __( '%s ago' );
363
+ }
364
+
365
+ if ( null === $format_future ) {
366
+ /* translators: %s: Human-readable time difference. */
367
+ $format_future = __( '%s from now' );
368
+ }
369
+
370
  $to = $to === null ? time() : $to;
371
  $to = is_int($to) ? $to : strtotime($to);
372
  $from = is_int($from) ? $from : strtotime($from);
lib/URLHelper.php CHANGED
@@ -207,7 +207,7 @@ class URLHelper {
207
  */
208
  public static function remove_double_slashes( $url ) {
209
  $url = str_replace('//', '/', $url);
210
- $schemes_whitelist = array( 'http', 'https', 's3' );
211
  foreach ( $schemes_whitelist as $scheme ) {
212
  if ( strstr($url, $scheme . ':') && !strstr($url, $scheme . '://') ) {
213
  $url = str_replace( $scheme . ':/', $scheme . '://', $url );
207
  */
208
  public static function remove_double_slashes( $url ) {
209
  $url = str_replace('//', '/', $url);
210
+ $schemes_whitelist = apply_filters( 'timber/url/schemes-whitelist', array( 'http', 'https', 's3', 'gs' ) );
211
  foreach ( $schemes_whitelist as $scheme ) {
212
  if ( strstr($url, $scheme . ':') && !strstr($url, $scheme . '://') ) {
213
  $url = str_replace( $scheme . ':/', $scheme . '://', $url );
lib/User.php CHANGED
@@ -44,7 +44,7 @@ class User extends Core implements CoreInterface {
44
  * @var string The description from WordPress
45
  */
46
  public $description;
47
- public $display_name;
48
 
49
  /**
50
  * @api
44
  * @var string The description from WordPress
45
  */
46
  public $description;
47
+ public $display_name = '';
48
 
49
  /**
50
  * @api
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 4.9.8
5
- Tested up to: 5.3.2
6
- Stable tag: 1.15.2
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -32,8 +32,15 @@ _Twig is the template language powering Timber; if you need a little background
32
 
33
  **Fixes and improvements**
34
 
 
35
 
 
36
  **Changes for Theme Developers**
 
 
 
 
 
37
 
38
  = 1.15.2 =
39
  **Fixes and improvements**
2
  Contributors: jarednova
3
  Tags: template engine, templates, twig
4
  Requires at least: 4.9.8
5
+ Tested up to: 5.4.1
6
+ Stable tag: 1.16.0
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
32
 
33
  **Fixes and improvements**
34
 
35
+ **Changes for Theme Developers**
36
 
37
+ = 1.16.0 =
38
  **Changes for Theme Developers**
39
+ * Allows for translation of time_ago Twig filter #2214 #2215 (thanks @gchtr)
40
+
41
+ **Fixes and improvements**
42
+ * Fixed an issue where an excessive amount of DELETEs could hit the DB #1834 #2243 (thanks @chads2000 @dennisjac)
43
+ * Fix an issue with blank user names #2232 (thanks @flip111)
44
 
45
  = 1.15.2 =
46
  **Fixes and improvements**
timber.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Timber
4
  Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
5
  Plugin URI: https://upstatement.com/timber
6
  Author: Jared Novack + Upstatement
7
- Version: 1.15.2
8
  Author URI: http://upstatement.com/
9
  */
10
  // we look for Composer files first in the plugins dir.
4
  Description: The WordPress Timber Library allows you to write themes using the power of Twig templates.
5
  Plugin URI: https://upstatement.com/timber
6
  Author: Jared Novack + Upstatement
7
+ Version: 1.16.0
8
  Author URI: http://upstatement.com/
9
  */
10
  // we look for Composer files first in the plugins dir.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitf110f5a1c019086cf9b17e8d5e12df63::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef', '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\ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit840372b7c0b94b42cc1fe167280106ef
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire840372b7c0b94b42cc1fe167280106ef($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire840372b7c0b94b42cc1fe167280106ef($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf110f5a1c019086cf9b17e8d5e12df63
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitf110f5a1c019086cf9b17e8d5e12df63', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitf110f5a1c019086cf9b17e8d5e12df63', '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\ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::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\ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequiref110f5a1c019086cf9b17e8d5e12df63($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequiref110f5a1c019086cf9b17e8d5e12df63($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 ComposerStaticInit840372b7c0b94b42cc1fe167280106ef
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -618,11 +618,11 @@ class ComposerStaticInit840372b7c0b94b42cc1fe167280106ef
618
  public static function getInitializer(ClassLoader $loader)
619
  {
620
  return \Closure::bind(function () use ($loader) {
621
- $loader->prefixLengthsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixLengthsPsr4;
622
- $loader->prefixDirsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixDirsPsr4;
623
- $loader->fallbackDirsPsr4 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$fallbackDirsPsr4;
624
- $loader->prefixesPsr0 = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$prefixesPsr0;
625
- $loader->classMap = ComposerStaticInit840372b7c0b94b42cc1fe167280106ef::$classMap;
626
 
627
  }, null, ClassLoader::class);
628
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63
8
  {
9
  public static $files = array (
10
  '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
618
  public static function getInitializer(ClassLoader $loader)
619
  {
620
  return \Closure::bind(function () use ($loader) {
621
+ $loader->prefixLengthsPsr4 = ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$prefixLengthsPsr4;
622
+ $loader->prefixDirsPsr4 = ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$prefixDirsPsr4;
623
+ $loader->fallbackDirsPsr4 = ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$fallbackDirsPsr4;
624
+ $loader->prefixesPsr0 = ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$prefixesPsr0;
625
+ $loader->classMap = ComposerStaticInitf110f5a1c019086cf9b17e8d5e12df63::$classMap;
626
 
627
  }, null, ClassLoader::class);
628
  }
vendor/composer/installed.json CHANGED
@@ -115,31 +115,34 @@
115
  },
116
  {
117
  "name": "composer/installers",
118
- "version": "v1.8.0",
119
- "version_normalized": "1.8.0.0",
120
  "source": {
121
  "type": "git",
122
  "url": "https://github.com/composer/installers.git",
123
- "reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3"
124
  },
125
  "dist": {
126
  "type": "zip",
127
- "url": "https://api.github.com/repos/composer/installers/zipball/7d610d50aae61ae7ed6675e58efeabdf279bb5e3",
128
- "reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3",
129
  "shasum": ""
130
  },
131
  "require": {
132
- "composer-plugin-api": "^1.0"
133
  },
134
  "replace": {
135
  "roundcube/plugin-installer": "*",
136
  "shama/baton": "*"
137
  },
138
  "require-dev": {
139
- "composer/composer": "1.0.*@dev",
140
- "phpunit/phpunit": "^4.8.36"
 
 
 
141
  },
142
- "time": "2020-02-07T10:39:20+00:00",
143
  "type": "composer-plugin",
144
  "extra": {
145
  "class": "Composer\\Installers\\Plugin",
@@ -237,21 +240,31 @@
237
  "yawik",
238
  "zend",
239
  "zikula"
 
 
 
 
 
 
 
 
 
 
240
  ]
241
  },
242
  {
243
  "name": "symfony/polyfill-ctype",
244
- "version": "v1.14.0",
245
- "version_normalized": "1.14.0.0",
246
  "source": {
247
  "type": "git",
248
  "url": "https://github.com/symfony/polyfill-ctype.git",
249
- "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38"
250
  },
251
  "dist": {
252
  "type": "zip",
253
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
254
- "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
255
  "shasum": ""
256
  },
257
  "require": {
@@ -260,11 +273,11 @@
260
  "suggest": {
261
  "ext-ctype": "For best performance"
262
  },
263
- "time": "2020-01-13T11:15:53+00:00",
264
  "type": "library",
265
  "extra": {
266
  "branch-alias": {
267
- "dev-master": "1.14-dev"
268
  }
269
  },
270
  "installation-source": "dist",
@@ -297,6 +310,20 @@
297
  "ctype",
298
  "polyfill",
299
  "portable"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  ]
301
  },
302
  {
115
  },
116
  {
117
  "name": "composer/installers",
118
+ "version": "v1.9.0",
119
+ "version_normalized": "1.9.0.0",
120
  "source": {
121
  "type": "git",
122
  "url": "https://github.com/composer/installers.git",
123
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
124
  },
125
  "dist": {
126
  "type": "zip",
127
+ "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
128
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
129
  "shasum": ""
130
  },
131
  "require": {
132
+ "composer-plugin-api": "^1.0 || ^2.0"
133
  },
134
  "replace": {
135
  "roundcube/plugin-installer": "*",
136
  "shama/baton": "*"
137
  },
138
  "require-dev": {
139
+ "composer/composer": "1.6.* || 2.0.*@dev",
140
+ "composer/semver": "1.0.* || 2.0.*@dev",
141
+ "phpunit/phpunit": "^4.8.36",
142
+ "sebastian/comparator": "^1.2.4",
143
+ "symfony/process": "^2.3"
144
  },
145
+ "time": "2020-04-07T06:57:05+00:00",
146
  "type": "composer-plugin",
147
  "extra": {
148
  "class": "Composer\\Installers\\Plugin",
240
  "yawik",
241
  "zend",
242
  "zikula"
243
+ ],
244
+ "funding": [
245
+ {
246
+ "url": "https://packagist.com",
247
+ "type": "custom"
248
+ },
249
+ {
250
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
251
+ "type": "tidelift"
252
+ }
253
  ]
254
  },
255
  {
256
  "name": "symfony/polyfill-ctype",
257
+ "version": "v1.17.0",
258
+ "version_normalized": "1.17.0.0",
259
  "source": {
260
  "type": "git",
261
  "url": "https://github.com/symfony/polyfill-ctype.git",
262
+ "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
263
  },
264
  "dist": {
265
  "type": "zip",
266
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
267
+ "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
268
  "shasum": ""
269
  },
270
  "require": {
273
  "suggest": {
274
  "ext-ctype": "For best performance"
275
  },
276
+ "time": "2020-05-12T16:14:59+00:00",
277
  "type": "library",
278
  "extra": {
279
  "branch-alias": {
280
+ "dev-master": "1.17-dev"
281
  }
282
  },
283
  "installation-source": "dist",
310
  "ctype",
311
  "polyfill",
312
  "portable"
313
+ ],
314
+ "funding": [
315
+ {
316
+ "url": "https://symfony.com/sponsor",
317
+ "type": "custom"
318
+ },
319
+ {
320
+ "url": "https://github.com/fabpot",
321
+ "type": "github"
322
+ },
323
+ {
324
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
325
+ "type": "tidelift"
326
+ }
327
  ]
328
  },
329
  {
vendor/composer/installers/composer.json CHANGED
@@ -31,7 +31,7 @@
31
  "iTop",
32
  "Joomla",
33
  "Kanboard",
34
- "Known",
35
  "Kohana",
36
  "Lan Management System",
37
  "Laravel",
@@ -97,11 +97,14 @@
97
  "roundcube/plugin-installer": "*"
98
  },
99
  "require": {
100
- "composer-plugin-api": "^1.0"
101
  },
102
  "require-dev": {
103
- "composer/composer": "1.0.*@dev",
104
- "phpunit/phpunit": "^4.8.36"
 
 
 
105
  },
106
  "scripts": {
107
  "test": "phpunit"
31
  "iTop",
32
  "Joomla",
33
  "Kanboard",
34
+ "Known",
35
  "Kohana",
36
  "Lan Management System",
37
  "Laravel",
97
  "roundcube/plugin-installer": "*"
98
  },
99
  "require": {
100
+ "composer-plugin-api": "^1.0 || ^2.0"
101
  },
102
  "require-dev": {
103
+ "composer/composer": "1.6.* || 2.0.*@dev",
104
+ "composer/semver": "1.0.* || 2.0.*@dev",
105
+ "phpunit/phpunit": "^4.8.36",
106
+ "sebastian/comparator": "^1.2.4",
107
+ "symfony/process": "^2.3"
108
  },
109
  "scripts": {
110
  "test": "phpunit"
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php CHANGED
@@ -126,6 +126,7 @@ abstract class BaseInstaller
126
  protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
  {
128
  foreach ($paths as $path => $names) {
 
129
  if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
130
  return $path;
131
  }
126
  protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
  {
128
  foreach ($paths as $path => $names) {
129
+ $names = (array) $names;
130
  if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
131
  return $path;
132
  }
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php CHANGED
@@ -58,25 +58,15 @@ class CakePHPInstaller extends BaseInstaller
58
  }
59
 
60
  $repositoryManager = $this->composer->getRepositoryManager();
61
- if ($repositoryManager) {
62
- $repos = $repositoryManager->getLocalRepository();
63
- if (!$repos) {
64
- return false;
65
- }
66
- $cake3 = new $multiClass(array(
67
- new $constraintClass($matcher, $version),
68
- new $constraintClass('!=', '9999999-dev'),
69
- ));
70
- $pool = new Pool('dev');
71
- $pool->addRepository($repos);
72
- $packages = $pool->whatProvides('cakephp/cakephp');
73
- foreach ($packages as $package) {
74
- $installed = new $constraintClass('=', $package->getVersion());
75
- if ($cake3->matches($installed)) {
76
- return true;
77
- }
78
- }
79
  }
80
- return false;
 
 
 
 
 
 
81
  }
82
  }
58
  }
59
 
60
  $repositoryManager = $this->composer->getRepositoryManager();
61
+ if (! $repositoryManager) {
62
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
+
65
+ $repos = $repositoryManager->getLocalRepository();
66
+ if (!$repos) {
67
+ return false;
68
+ }
69
+
70
+ return $repos->findPackage('cakephp/cakephp', new $constraintClass($matcher, $version)) !== null;
71
  }
72
  }
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php CHANGED
@@ -9,6 +9,7 @@ class DrupalInstaller extends BaseInstaller
9
  'theme' => 'themes/{$name}/',
10
  'library' => 'libraries/{$name}/',
11
  'profile' => 'profiles/{$name}/',
 
12
  'drush' => 'drush/{$name}/',
13
  'custom-theme' => 'themes/custom/{$name}/',
14
  'custom-module' => 'modules/custom/{$name}/',
9
  'theme' => 'themes/{$name}/',
10
  'library' => 'libraries/{$name}/',
11
  'profile' => 'profiles/{$name}/',
12
+ 'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
13
  'drush' => 'drush/{$name}/',
14
  'custom-theme' => 'themes/custom/{$name}/',
15
  'custom-module' => 'modules/custom/{$name}/',
vendor/composer/installers/src/Composer/Installers/Plugin.php CHANGED
@@ -8,10 +8,20 @@ use Composer\Plugin\PluginInterface;
8
 
9
  class Plugin implements PluginInterface
10
  {
 
11
 
12
  public function activate(Composer $composer, IOInterface $io)
13
  {
14
- $installer = new Installer($io, $composer);
15
- $composer->getInstallationManager()->addInstaller($installer);
 
 
 
 
 
 
 
 
 
16
  }
17
  }
8
 
9
  class Plugin implements PluginInterface
10
  {
11
+ private $installer;
12
 
13
  public function activate(Composer $composer, IOInterface $io)
14
  {
15
+ $this->installer = new Installer($io, $composer);
16
+ $composer->getInstallationManager()->addInstaller($this->installer);
17
+ }
18
+
19
+ public function deactivate(Composer $composer, IOInterface $io)
20
+ {
21
+ $composer->getInstallationManager()->removeInstaller($this->installer);
22
+ }
23
+
24
+ public function uninstall(Composer $composer, IOInterface $io)
25
+ {
26
  }
27
  }
vendor/symfony/polyfill-ctype/bootstrap.php CHANGED
@@ -13,14 +13,34 @@ use Symfony\Polyfill\Ctype as p;
13
 
14
  if (!function_exists('ctype_alnum')) {
15
  function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
 
 
16
  function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
 
 
17
  function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
 
 
18
  function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
 
 
19
  function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
 
 
20
  function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
 
 
21
  function ctype_print($text) { return p\Ctype::ctype_print($text); }
 
 
22
  function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
 
 
23
  function ctype_space($text) { return p\Ctype::ctype_space($text); }
 
 
24
  function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
 
 
25
  function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
26
  }
13
 
14
  if (!function_exists('ctype_alnum')) {
15
  function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
16
+ }
17
+ if (!function_exists('ctype_alpha')) {
18
  function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
19
+ }
20
+ if (!function_exists('ctype_cntrl')) {
21
  function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
22
+ }
23
+ if (!function_exists('ctype_digit')) {
24
  function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
25
+ }
26
+ if (!function_exists('ctype_graph')) {
27
  function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
28
+ }
29
+ if (!function_exists('ctype_lower')) {
30
  function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
31
+ }
32
+ if (!function_exists('ctype_print')) {
33
  function ctype_print($text) { return p\Ctype::ctype_print($text); }
34
+ }
35
+ if (!function_exists('ctype_punct')) {
36
  function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
37
+ }
38
+ if (!function_exists('ctype_space')) {
39
  function ctype_space($text) { return p\Ctype::ctype_space($text); }
40
+ }
41
+ if (!function_exists('ctype_upper')) {
42
  function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
43
+ }
44
+ if (!function_exists('ctype_xdigit')) {
45
  function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
46
  }
vendor/symfony/polyfill-ctype/composer.json CHANGED
@@ -28,7 +28,7 @@
28
  "minimum-stability": "dev",
29
  "extra": {
30
  "branch-alias": {
31
- "dev-master": "1.14-dev"
32
  }
33
  }
34
  }
28
  "minimum-stability": "dev",
29
  "extra": {
30
  "branch-alias": {
31
+ "dev-master": "1.17-dev"
32
  }
33
  }
34
  }