WP User Avatar - Version 3.2.9

Version Description

  • Fixed bug where reset password enforcement not working.
  • Made sure select2 is only loaded where needed in admin screens.
Download this release

Release Info

Developer Collizo4sky
Plugin Icon 128x128 WP User Avatar
Version 3.2.9
Comparing to
See all releases

Code changes from version 3.2.8 to 3.2.9

Files changed (59) hide show
  1. assets/css/admin-style.css +1 -1
  2. changelog.txt +4 -0
  3. languages/wp-user-avatar.pot +29 -29
  4. readme.txt +5 -19
  5. src/RegisterScripts.php +3 -2
  6. src/ShortcodeParser/Builder/EditProfileBuilder.php +4 -0
  7. src/ShortcodeParser/Builder/PasswordResetBuilder.php +4 -0
  8. src/ShortcodeParser/Builder/RegistrationFormBuilder.php +4 -0
  9. vendor/autoload.php +1 -1
  10. vendor/barryvdh/composer-cleanup-plugin/.gitignore +5 -0
  11. vendor/barryvdh/composer-cleanup-plugin/src/CleanupPlugin.php +158 -0
  12. vendor/barryvdh/composer-cleanup-plugin/src/CleanupRules.php +120 -0
  13. vendor/collizo4sky/persist-admin-notices-dismissal/CHANGES.md +0 -21
  14. vendor/collizo4sky/persist-admin-notices-dismissal/README.md +0 -128
  15. vendor/collizo4sky/persist-admin-notices-dismissal/composer.json +0 -27
  16. vendor/composer/autoload_classmap.php +2 -0
  17. vendor/composer/autoload_psr4.php +1 -0
  18. vendor/composer/autoload_real.php +7 -7
  19. vendor/composer/autoload_static.php +14 -4
  20. vendor/composer/installed.json +48 -0
  21. vendor/composer/installed.php +13 -2
  22. vendor/pelago/emogrifier/CHANGELOG.md +0 -507
  23. vendor/pelago/emogrifier/README.md +0 -478
  24. vendor/pelago/emogrifier/composer.json +0 -97
  25. vendor/symfony/css-selector/CHANGELOG.md +0 -13
  26. vendor/symfony/css-selector/README.md +0 -20
  27. vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php +0 -74
  28. vendor/symfony/css-selector/Tests/Node/AbstractNodeTest.php +0 -34
  29. vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php +0 -37
  30. vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php +0 -33
  31. vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php +0 -35
  32. vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php +0 -35
  33. vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php +0 -47
  34. vendor/symfony/css-selector/Tests/Node/HashNodeTest.php +0 -33
  35. vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php +0 -33
  36. vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php +0 -32
  37. vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php +0 -34
  38. vendor/symfony/css-selector/Tests/Node/SpecificityTest.php +0 -63
  39. vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php +0 -70
  40. vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php +0 -55
  41. vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php +0 -49
  42. vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php +0 -49
  43. vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php +0 -50
  44. vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php +0 -50
  45. vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php +0 -44
  46. vendor/symfony/css-selector/Tests/Parser/ParserTest.php +0 -253
  47. vendor/symfony/css-selector/Tests/Parser/ReaderTest.php +0 -102
  48. vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php +0 -45
  49. vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php +0 -44
  50. vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php +0 -36
  51. vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php +0 -45
  52. vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php +0 -96
  53. vendor/symfony/css-selector/Tests/XPath/Fixtures/ids.html +0 -48
  54. vendor/symfony/css-selector/Tests/XPath/Fixtures/lang.xml +0 -11
  55. vendor/symfony/css-selector/Tests/XPath/Fixtures/shakespear.html +0 -308
  56. vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php +0 -413
  57. vendor/symfony/css-selector/composer.json +0 -32
  58. vendor/symfony/css-selector/phpunit.xml.dist +0 -31
  59. wp-user-avatar.php +2 -2
assets/css/admin-style.css CHANGED
@@ -1955,7 +1955,7 @@ textarea.wp-editor-area {
1955
  .ppress-admin .ppress-admin-wrap .subsubsub {
1956
  background: #fff;
1957
  font-size: 14px;
1958
- padding: 0 16px;
1959
  margin-top: 0;
1960
  float: none;
1961
  text-align: left;
1955
  .ppress-admin .ppress-admin-wrap .subsubsub {
1956
  background: #fff;
1957
  font-size: 14px;
1958
+ padding: 0 32px;
1959
  margin-top: 0;
1960
  float: none;
1961
  text-align: left;
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 3.2.8 =
4
  * Fixed bug with content restriction shortcode not working correctly.
5
  * Fixed bug with item dragging in the form builder.
1
  == Changelog ==
2
 
3
+ = 3.2.9 =
4
+ * Fixed bug where reset password enforcement not working.
5
+ * Made sure select2 is only loaded where needed in admin screens.
6
+
7
  = 3.2.8 =
8
  * Fixed bug with content restriction shortcode not working correctly.
9
  * Fixed bug with item dragging in the form builder.
languages/wp-user-avatar.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: ProfilePress 3.2.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
- "POT-Creation-Date: 2022-02-14 09:49:33+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -142,17 +142,17 @@ msgid "Upload"
142
  msgstr ""
143
 
144
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:145
145
- #: src/RegisterScripts.php:72 src/RegisterScripts.php:127
146
  msgid "Are you sure?"
147
  msgstr ""
148
 
149
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:146
150
- #: src/RegisterScripts.php:73
151
  msgid "Deleting..."
152
  msgstr ""
153
 
154
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:147
155
- #: src/RegisterScripts.php:74
156
  msgid "An error occurred. Please try again."
157
  msgstr ""
158
 
@@ -4440,43 +4440,43 @@ msgstr ""
4440
  msgid "Member Directory"
4441
  msgstr ""
4442
 
4443
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:82
4444
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:95
4445
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:216
4446
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:228
4447
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:137
4448
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:150
4449
  msgid "Strength indicator"
4450
  msgstr ""
4451
 
4452
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:83
4453
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:217
4454
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:138
4455
  msgid "Very weak"
4456
  msgstr ""
4457
 
4458
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:84
4459
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:218
4460
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:139
4461
  msgid "Weak"
4462
  msgstr ""
4463
 
4464
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:85
4465
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:219
4466
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:140
4467
  msgctxt "password strength"
4468
  msgid "Medium"
4469
  msgstr ""
4470
 
4471
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:86
4472
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:220
4473
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:141
4474
  msgid "Strong"
4475
  msgstr ""
4476
 
4477
- #: src/ShortcodeParser/Builder/EditProfileBuilder.php:87
4478
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:221
4479
- #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:142
4480
  msgid "Mismatch"
4481
  msgstr ""
4482
 
@@ -4577,7 +4577,7 @@ msgid "No post written yet."
4577
  msgstr ""
4578
 
4579
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:106
4580
- #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:340
4581
  #: src/Widgets/TabbedWidget.php:90
4582
  msgid "Get New Password"
4583
  msgstr ""
@@ -5538,9 +5538,9 @@ msgstr ""
5538
  msgid "ProfilePress"
5539
  msgstr ""
5540
 
5541
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.8) #-#-#-#-#
5542
  #. Plugin URI of the plugin/theme
5543
- #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.8) #-#-#-#-#
5544
  #. Author URI of the plugin/theme
5545
  msgid "https://profilepress.net"
5546
  msgstr ""
2
  # This file is distributed under the same license as the ProfilePress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: ProfilePress 3.2.9\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-avatar\n"
7
+ "POT-Creation-Date: 2022-03-09 06:22:46+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
142
  msgstr ""
143
 
144
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:145
145
+ #: src/RegisterScripts.php:73 src/RegisterScripts.php:128
146
  msgid "Are you sure?"
147
  msgstr ""
148
 
149
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:146
150
+ #: src/RegisterScripts.php:74
151
  msgid "Deleting..."
152
  msgstr ""
153
 
154
  #: deprecated/wp-user-avatar/includes/class-wp-user-avatar.php:147
155
+ #: src/RegisterScripts.php:75
156
  msgid "An error occurred. Please try again."
157
  msgstr ""
158
 
4440
  msgid "Member Directory"
4441
  msgstr ""
4442
 
4443
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:86
4444
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:99
4445
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:220
4446
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:232
4447
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:141
4448
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:154
4449
  msgid "Strength indicator"
4450
  msgstr ""
4451
 
4452
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:87
4453
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:221
4454
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:142
4455
  msgid "Very weak"
4456
  msgstr ""
4457
 
4458
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:88
4459
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:222
4460
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:143
4461
  msgid "Weak"
4462
  msgstr ""
4463
 
4464
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:89
4465
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:223
4466
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:144
4467
  msgctxt "password strength"
4468
  msgid "Medium"
4469
  msgstr ""
4470
 
4471
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:90
4472
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:224
4473
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:145
4474
  msgid "Strong"
4475
  msgstr ""
4476
 
4477
+ #: src/ShortcodeParser/Builder/EditProfileBuilder.php:91
4478
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:225
4479
+ #: src/ShortcodeParser/Builder/RegistrationFormBuilder.php:146
4480
  msgid "Mismatch"
4481
  msgstr ""
4482
 
4577
  msgstr ""
4578
 
4579
  #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:106
4580
+ #: src/ShortcodeParser/Builder/PasswordResetBuilder.php:344
4581
  #: src/Widgets/TabbedWidget.php:90
4582
  msgid "Get New Password"
4583
  msgstr ""
5538
  msgid "ProfilePress"
5539
  msgstr ""
5540
 
5541
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.9) #-#-#-#-#
5542
  #. Plugin URI of the plugin/theme
5543
+ #. #-#-#-#-# wp-user-avatar.pot (ProfilePress 3.2.9) #-#-#-#-#
5544
  #. Author URI of the plugin/theme
5545
  msgid "https://profilepress.net"
5546
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: user registration, user profile, registration form, membership, login form
5
  Requires at least: 4.7
6
  Requires PHP: 7.1.0
7
  Tested up to: 5.9
8
- Stable tag: 3.2.8
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
@@ -118,6 +118,10 @@ No. You can create and manage your forms, user profiles and member directories w
118
 
119
  == Changelog ==
120
 
 
 
 
 
121
  = 3.2.8 =
122
  * Fixed bug with content restriction shortcode not working correctly.
123
  * Fixed bug with item dragging in the form builder.
@@ -126,22 +130,4 @@ No. You can create and manage your forms, user profiles and member directories w
126
  * [Pro](https://profilepress.net/addons/passwordless-login/) Added enabling/disabling of passwordless login per form.
127
  * [Pro](https://profilepress.net/addons/woocommerce/) support for replacing the registration form in WooCommerce my account page
128
 
129
- = 3.2.7 =
130
- * Fixed bug where redirect after login settings not getting cleared.
131
- * Fixed bug with wp_title user profile output.
132
- * Fixed bug where content restriction didn't work in some cases.
133
-
134
- = 3.2.6 =
135
- * [New content restriction shortcode](https://profilepress.net/article/wordpress-content-restriction-shortcodes/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
136
- * Added content restriction to specific users.
137
-
138
- = 3.2.5 =
139
- * [Pro] [Two-Factor Authentication addon](https://profilepress.net/addons/2fa/?utm_source=wporg_listing&utm_medium=readme&utm_campaign=changelog).
140
- * Fixed bug where member directory custom sort wasn't working.
141
- * Fixed conflict with LearnDash Propanel.
142
- * Fixed bug where value attribute of password-reset-submit wasn't working.
143
- * Datepicker now respect WP start of week day.
144
- * Fixed Flatpickr date bug.
145
- * Added prefix to hint.css.
146
-
147
  See the [changelog file](https://plugins.svn.wordpress.org/wp-user-avatar/trunk/changelog.txt) for full change log information.
5
  Requires at least: 4.7
6
  Requires PHP: 7.1.0
7
  Tested up to: 5.9
8
+ Stable tag: 3.2.9
9
  License: GPLv2 or later
10
 
11
  Modern membership plugin for user registration, login form, user profile, member directories & content restriction.
118
 
119
  == Changelog ==
120
 
121
+ = 3.2.9 =
122
+ * Fixed bug where reset password enforcement not working.
123
+ * Made sure select2 is only loaded where needed in admin screens.
124
+
125
  = 3.2.8 =
126
  * Fixed bug with content restriction shortcode not working correctly.
127
  * Fixed bug with item dragging in the form builder.
130
  * [Pro](https://profilepress.net/addons/passwordless-login/) Added enabling/disabling of passwordless login per form.
131
  * [Pro](https://profilepress.net/addons/woocommerce/) support for replacing the registration form in WooCommerce my account page
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  See the [changelog file](https://plugins.svn.wordpress.org/wp-user-avatar/trunk/changelog.txt) for full change log information.
src/RegisterScripts.php CHANGED
@@ -9,7 +9,7 @@ class RegisterScripts
9
  add_action('wp_enqueue_scripts', [$this, 'public_css']);
10
  add_action('admin_enqueue_scripts', [$this, 'admin_css']);
11
  add_action('wp_enqueue_scripts', [$this, 'public_js']);
12
- add_action('admin_enqueue_scripts', [$this, 'admin_js']);
13
  }
14
 
15
  public function asset_suffix()
@@ -64,6 +64,7 @@ class RegisterScripts
64
  }
65
 
66
  wp_enqueue_script('ppress-flatpickr', PPRESS_ASSETS_URL . '/flatpickr/flatpickr.min.js', array('jquery'));
 
67
  wp_enqueue_script('ppress-select2', PPRESS_ASSETS_URL . '/select2/select2.min.js', array('jquery'));
68
 
69
  wp_enqueue_script('ppress-frontend-script', PPRESS_ASSETS_URL . "/js/frontend{$suffix}.js", ['jquery', 'ppress-flatpickr', 'ppress-select2'], PPRESS_VERSION_NUMBER, true);
@@ -96,7 +97,7 @@ class RegisterScripts
96
 
97
  wp_enqueue_script('ppress-flatpickr', PPRESS_ASSETS_URL . '/flatpickr/flatpickr.min.js', array('jquery'));
98
 
99
- if ($pagenow != 'index.php') {
100
  wp_enqueue_script('ppress-select2', PPRESS_ASSETS_URL . '/select2/select2.min.js', array('jquery'));
101
  }
102
 
9
  add_action('wp_enqueue_scripts', [$this, 'public_css']);
10
  add_action('admin_enqueue_scripts', [$this, 'admin_css']);
11
  add_action('wp_enqueue_scripts', [$this, 'public_js']);
12
+ add_action('admin_enqueue_scripts', [$this, 'admin_js'], 999999);
13
  }
14
 
15
  public function asset_suffix()
64
  }
65
 
66
  wp_enqueue_script('ppress-flatpickr', PPRESS_ASSETS_URL . '/flatpickr/flatpickr.min.js', array('jquery'));
67
+
68
  wp_enqueue_script('ppress-select2', PPRESS_ASSETS_URL . '/select2/select2.min.js', array('jquery'));
69
 
70
  wp_enqueue_script('ppress-frontend-script', PPRESS_ASSETS_URL . "/js/frontend{$suffix}.js", ['jquery', 'ppress-flatpickr', 'ppress-select2'], PPRESS_VERSION_NUMBER, true);
97
 
98
  wp_enqueue_script('ppress-flatpickr', PPRESS_ASSETS_URL . '/flatpickr/flatpickr.min.js', array('jquery'));
99
 
100
+ if (in_array($pagenow, ['user-edit.php', 'profile.php']) || ppress_is_admin_page()) {
101
  wp_enqueue_script('ppress-select2', PPRESS_ASSETS_URL . '/select2/select2.min.js', array('jquery'));
102
  }
103
 
src/ShortcodeParser/Builder/EditProfileBuilder.php CHANGED
@@ -78,6 +78,10 @@ class EditProfileBuilder
78
 
79
  $atts = apply_filters('ppress_edit_profile_password_meter_field_atts', $atts);
80
 
 
 
 
 
81
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
82
  'empty' => esc_html__('Strength indicator'),
83
  'short' => esc_html__('Very weak'),
78
 
79
  $atts = apply_filters('ppress_edit_profile_password_meter_field_atts', $atts);
80
 
81
+ if (isset($atts['enforce']) && in_array($atts['enforce'], ['1', 'true', true], true)) {
82
+ $atts['enforce'] = 'true';
83
+ }
84
+
85
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
86
  'empty' => esc_html__('Strength indicator'),
87
  'short' => esc_html__('Very weak'),
src/ShortcodeParser/Builder/PasswordResetBuilder.php CHANGED
@@ -212,6 +212,10 @@ class PasswordResetBuilder
212
 
213
  $atts = apply_filters('ppress_password_reset_handler_meter_field_atts', $atts);
214
 
 
 
 
 
215
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
216
  'empty' => esc_html__('Strength indicator'),
217
  'short' => esc_html__('Very weak'),
212
 
213
  $atts = apply_filters('ppress_password_reset_handler_meter_field_atts', $atts);
214
 
215
+ if (isset($atts['enforce']) && in_array($atts['enforce'], ['1', 'true', true], true)) {
216
+ $atts['enforce'] = 'true';
217
+ }
218
+
219
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
220
  'empty' => esc_html__('Strength indicator'),
221
  'short' => esc_html__('Very weak'),
src/ShortcodeParser/Builder/RegistrationFormBuilder.php CHANGED
@@ -131,6 +131,10 @@ class RegistrationFormBuilder
131
  {
132
  $atts['enforce'] = isset($atts['enforce']) ? $atts['enforce'] : 'true';
133
 
 
 
 
 
134
  $attributes = self::field_attributes('ignore_value', self::valid_field_atts(ppress_normalize_attributes($atts)));
135
 
136
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
131
  {
132
  $atts['enforce'] = isset($atts['enforce']) ? $atts['enforce'] : 'true';
133
 
134
+ if (in_array($atts['enforce'], ['1', 'true', true], true)) {
135
+ $atts['enforce'] = 'true';
136
+ }
137
+
138
  $attributes = self::field_attributes('ignore_value', self::valid_field_atts(ppress_normalize_attributes($atts)));
139
 
140
  wp_localize_script('password-strength-meter', 'pwsL10n', array(
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitfb483d02c1b21601df3caf62d9e38e62::getLoader();
vendor/barryvdh/composer-cleanup-plugin/.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /vendor
2
+ /.idea
3
+ composer.phar
4
+ composer.lock
5
+ .DS_Store
vendor/barryvdh/composer-cleanup-plugin/src/CleanupPlugin.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Barryvdh\Composer;
4
+
5
+ use Composer\Composer;
6
+ use Composer\EventDispatcher\EventSubscriberInterface;
7
+ use Composer\IO\IOInterface;
8
+ use Composer\Plugin\PluginInterface;
9
+ use Composer\Script\ScriptEvents;
10
+ use Composer\Installer\PackageEvent;
11
+ use Composer\Script\CommandEvent;
12
+ use Composer\Util\Filesystem;
13
+ use Composer\Package\BasePackage;
14
+
15
+ class CleanupPlugin implements PluginInterface, EventSubscriberInterface
16
+ {
17
+ /** @var \Composer\Composer $composer */
18
+ protected $composer;
19
+ /** @var \Composer\IO\IOInterface $io */
20
+ protected $io;
21
+ /** @var \Composer\Config $config */
22
+ protected $config;
23
+ /** @var \Composer\Util\Filesystem $filesystem */
24
+ protected $filesystem;
25
+ /** @var array $rules */
26
+ protected $rules;
27
+
28
+ /**
29
+ * {@inheritDoc}
30
+ */
31
+ public function activate(Composer $composer, IOInterface $io)
32
+ {
33
+ $this->composer = $composer;
34
+ $this->io = $io;
35
+ $this->config = $composer->getConfig();
36
+ $this->filesystem = new Filesystem();
37
+ $this->rules = CleanupRules::getRules();
38
+ }
39
+
40
+ /**
41
+ * {@inheritDoc}
42
+ */
43
+ public function deactivate(Composer $composer, IOInterface $io)
44
+ {
45
+ //
46
+ }
47
+
48
+ /**
49
+ * {@inheritDoc}
50
+ */
51
+ public function uninstall(Composer $composer, IOInterface $io)
52
+ {
53
+ //
54
+ }
55
+
56
+ /**
57
+ * {@inheritDoc}
58
+ */
59
+ public static function getSubscribedEvents()
60
+ {
61
+ return array(
62
+ 'post-package-install' => 'onPostPackageInstall',
63
+ 'post-package-update' => 'onPostPackageUpdate',
64
+ /*ScriptEvents::POST_INSTALL_CMD => array(
65
+ array('onPostInstallUpdateCmd', 0)
66
+ ),
67
+ ScriptEvents::POST_UPDATE_CMD => array(
68
+ array('onPostInstallUpdateCmd', 0)
69
+ ),*/
70
+ );
71
+ }
72
+
73
+ /**
74
+ * Function to run after a package has been installed
75
+ */
76
+ public function onPostPackageInstall(PackageEvent $event)
77
+ {
78
+ /** @var \Composer\Package\CompletePackage $package */
79
+ $package = $event->getOperation()->getPackage();
80
+
81
+ $this->cleanPackage($package);
82
+ }
83
+
84
+ /**
85
+ * Function to run after a package has been updated
86
+ */
87
+ public function onPostPackageUpdate(PackageEvent $event)
88
+ {
89
+ /** @var \Composer\Package\CompletePackage $package */
90
+ $package = $event->getOperation()->getTargetPackage();
91
+
92
+ $this->cleanPackage($package);
93
+ }
94
+
95
+ /**
96
+ * Function to run after a package has been updated
97
+ *
98
+ * @param CommandEvent $event
99
+ */
100
+ public function onPostInstallUpdateCmd(CommandEvent $event)
101
+ {
102
+ /** @var \Composer\Repository\WritableRepositoryInterface $repository */
103
+ $repository = $this->composer->getRepositoryManager()->getLocalRepository();
104
+
105
+ /** @var \Composer\Package\CompletePackage $package */
106
+ foreach($repository->getPackages() as $package){
107
+ if ($package instanceof BasePackage) {
108
+ $this->cleanPackage($package);
109
+ }
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Clean a package, based on its rules.
115
+ *
116
+ * @param BasePackage $package The package to clean
117
+ * @return bool True if cleaned
118
+ */
119
+ protected function cleanPackage(BasePackage $package)
120
+ {
121
+ // Only clean 'dist' packages
122
+ if ($package->getInstallationSource() !== 'dist') {
123
+ return false;
124
+ }
125
+
126
+ $vendorDir = $this->config->get('vendor-dir');
127
+ $targetDir = $package->getTargetDir();
128
+ $packageName = $package->getPrettyName();
129
+ $packageDir = $targetDir ? $packageName . '/' . $targetDir : $packageName ;
130
+
131
+ $rules = isset($this->rules[$packageName]) ? $this->rules[$packageName] : null;
132
+ if(!$rules){
133
+ return;
134
+ }
135
+
136
+ $dir = $this->filesystem->normalizePath(realpath($vendorDir . '/' . $packageDir));
137
+ if (!is_dir($dir)) {
138
+ return false;
139
+ }
140
+
141
+ foreach((array) $rules as $part) {
142
+ // Split patterns for single globs (should be max 260 chars)
143
+ $patterns = explode(' ', trim($part));
144
+
145
+ foreach ($patterns as $pattern) {
146
+ try {
147
+ foreach (glob($dir.'/'.$pattern) as $file) {
148
+ $this->filesystem->remove($file);
149
+ }
150
+ } catch (\Exception $e) {
151
+ $this->io->write("Could not parse $packageDir ($pattern): ".$e->getMessage());
152
+ }
153
+ }
154
+ }
155
+
156
+ return true;
157
+ }
158
+ }
vendor/barryvdh/composer-cleanup-plugin/src/CleanupRules.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Barryvdh\Composer;
4
+
5
+ class CleanupRules
6
+ {
7
+ public static function getRules()
8
+ {
9
+ // Default patterns for common files
10
+ $docs = 'README* CHANGELOG* CHANGES* FAQ* CONTRIBUTING* CODE_OF_CONDUCT* HISTORY* UPGRADING* UPGRADE* package* demo example examples doc docs readme* changelog* composer*';
11
+ $tests = '.travis.yml .php_cs gulpfile.js package.json styleci.yml puli.json .scrutinizer.yml phpunit.xml* phpcs.php phpunit.php test tests Tests travis patchwork.json';
12
+
13
+ return array(
14
+ 'anahkiasen/former' => array($docs, $tests),
15
+ 'anahkiasen/html-object' => array($docs, 'phpunit.xml* tests/*'),
16
+ 'anahkiasen/rocketeer' => array($docs, $tests),
17
+ 'anahkiasen/underscore-php' => array($docs, $tests),
18
+ 'barryvdh/composer-cleanup-plugin' => array($docs, $tests),
19
+ 'barryvdh/laravel-debugbar' => array($docs, $tests),
20
+ 'barryvdh/laravel-ide-helper' => array($docs, $tests),
21
+ 'bllim/datatables' => array($docs, $tests),
22
+ 'cartalyst/sentry' => array($docs, $tests),
23
+ 'classpreloader/classpreloader' => array($docs, $tests),
24
+ 'd11wtq/boris' => array($docs, $tests),
25
+ 'danielstjules/stringy' => array($docs, $tests),
26
+ 'dflydev/markdown' => array($docs, $tests),
27
+ 'dnoegel/php-xdg-base-dir' => array($docs, $tests),
28
+ 'doctrine/annotations' => array($docs, $tests, 'bin'),
29
+ 'doctrine/cache' => array($docs, $tests, 'bin'),
30
+ 'doctrine/collections' => array($docs, $tests),
31
+ 'doctrine/common' => array($docs, $tests, 'bin lib/vendor'),
32
+ 'doctrine/dbal' => array($docs, $tests, 'bin build* docs2 lib/vendor'),
33
+ 'doctrine/inflector' => array($docs, $tests),
34
+ 'dompdf/dompdf' => array($docs, $tests, 'www'),
35
+ 'filp/whoops' => array($docs, $tests),
36
+ 'guzzle/guzzle' => array($docs, $tests),
37
+ 'guzzlehttp/guzzle' => array($docs, $tests),
38
+ 'guzzlehttp/oauth-subscriber' => array($docs, $tests),
39
+ 'guzzlehttp/streams' => array($docs, $tests),
40
+ 'guzzlehttp/promises' => array($docs, $tests),
41
+ 'guzzlehttp/psr7' => array($docs, $tests),
42
+ 'imagine/imagine' => array($docs, $tests, 'lib/Imagine/Test'),
43
+ 'intervention/image' => array($docs, $tests, 'public'),
44
+ 'ircmaxell/password-compat' => array($docs, $tests),
45
+ 'jakub-onderka/php-console-color' => array($docs, $tests, 'build.xml example.php'),
46
+ 'jakub-onderka/php-console-highlighter' => array($docs, $tests, 'build.xml'),
47
+ 'jasonlewis/basset' => array($docs, $tests),
48
+ 'jeremeamia/SuperClosure' => array($docs, $tests, 'demo'),
49
+ 'kriswallsmith/assetic' => array($docs, $tests),
50
+ 'laravel/framework' => array($docs, $tests, 'build'),
51
+ 'leafo/lessphp' => array($docs, $tests, 'Makefile package.sh'),
52
+ 'league/flysystem' => array($docs, $tests),
53
+ 'league/stack-robots' => array($docs, $tests),
54
+ 'maximebf/debugbar' => array($docs, $tests, 'demo'),
55
+ 'mccool/laravel-auto-presenter' => array($docs, $tests),
56
+ 'mockery/mockery' => array($docs, $tests),
57
+ 'monolog/monolog' => array($docs, $tests),
58
+ 'mrclay/minify' => array($docs, $tests, 'MIN.txt min_extras min_unit_tests min/builder min/config* min/quick-test* min/utils.php min/groupsConfig.php min/index.php'),
59
+ 'mtdowling/cron-expression' => array($docs, $tests),
60
+ 'mustache/mustache' => array($docs, $tests, 'bin'),
61
+ 'nesbot/carbon' => array($docs, $tests),
62
+ 'nikic/php-parser' => array($docs, $tests, 'test_old'),
63
+ 'oyejorge/less.php' => array($docs, $tests),
64
+ 'patchwork/utf8' => array($docs, $tests),
65
+ 'phenx/php-font-lib' => array($docs, $tests . 'www'),
66
+ 'phpdocumentor/reflection-docblock' => array($docs, $tests),
67
+ 'phpoffice/phpexcel' => array($docs, $tests, 'Examples unitTests changelog.txt'),
68
+ 'phpseclib/phpseclib' => array($docs, $tests, 'build'),
69
+ 'predis/predis' => array($docs, $tests, 'bin'),
70
+ 'psr/log' => array($docs, $tests),
71
+ 'psr/http-message' => array($docs, $tests),
72
+ 'psy/psysh' => array($docs, $tests),
73
+ 'rcrowe/twigbridge' => array($docs, $tests),
74
+ 'simplepie/simplepie' => array($docs, $tests, 'build compatibility_test ROADMAP.md'),
75
+ 'stack/builder' => array($docs, $tests),
76
+ 'swiftmailer/swiftmailer' => array($docs, $tests, 'build* notes test-suite create_pear_package.php'),
77
+ 'symfony/browser-kit' => array($docs, $tests),
78
+ 'symfony/class-loader' => array($docs, $tests),
79
+ 'symfony/console' => array($docs, $tests),
80
+ 'symfony/css-selector' => array($docs, $tests),
81
+ 'symfony/debug' => array($docs, $tests),
82
+ 'symfony/dom-crawler' => array($docs, $tests),
83
+ 'symfony/event-dispatcher' => array($docs, $tests),
84
+ 'symfony/filesystem' => array($docs, $tests),
85
+ 'symfony/finder' => array($docs, $tests),
86
+ 'symfony/http-foundation' => array($docs, $tests),
87
+ 'symfony/http-kernel' => array($docs, $tests),
88
+ 'symfony/process' => array($docs, $tests),
89
+ 'symfony/routing' => array($docs, $tests),
90
+ 'symfony/security' => array($docs, $tests),
91
+ 'symfony/security-core' => array($docs, $tests),
92
+ 'symfony/translation' => array($docs, $tests),
93
+ 'symfony/var-dumper' => array($docs, $tests),
94
+ 'tijsverkoyen/css-to-inline-styles' => array($docs, $tests),
95
+ 'twig/twig' => array($docs, $tests),
96
+ 'venturecraft/revisionable' => array($docs, $tests),
97
+ 'vlucas/phpdotenv' => array($docs, $tests),
98
+ 'willdurand/geocoder' => array($docs, $tests),
99
+ 'soundasleep/html2text' => array($docs, $tests),
100
+ 'clue/stream-filter' => array($docs, $tests),
101
+ 'a5hleyrich/wp-background-processing' => array($docs, $tests),
102
+ 'activecampaign/api-php' => array($docs, $tests),
103
+ 'collizo4sky/persist-admin-notices-dismissal' => array($docs, $tests),
104
+ 'drewm/drip' => array($docs, $tests),
105
+ 'jacobbennett/sendyphp' => array($docs, $tests),
106
+ 'league/csv' => array($docs, $tests),
107
+ 'mailerlite/mailerlite-api-v2-php-sdk' => array($docs, $tests),
108
+ 'mailoptin/advanceanalytics' => array($docs, $tests),
109
+ 'mailoptin/core' => array($docs, $tests),
110
+ 'pelago/emogrifier' => array($docs, $tests),
111
+ 'php-http/curl-client' => array($docs, $tests),
112
+ 'php-http/discovery' => array($docs, $tests),
113
+ 'php-http/httplug' => array($docs, $tests),
114
+ 'php-http/message' => array($docs, $tests),
115
+ 'php-http/message-factory' => array($docs, $tests),
116
+ 'php-http/promise' => array($docs, $tests),
117
+ 'thinkshout/mailchimp-api-php' => array($docs, $tests),
118
+ );
119
+ }
120
+ }
vendor/collizo4sky/persist-admin-notices-dismissal/CHANGES.md DELETED
@@ -1,21 +0,0 @@
1
- #### 1.4.4
2
- * Added support for extra dismissible links via `.dismiss-this` CSS class.
3
-
4
- #### 1.4.3
5
- * Added filter hook `pand_dismiss_notice_js_url` in case you're using this in a theme or a local environment that doesn't quite find the correct URL.
6
- * Added filter hook `pand_theme_loader` that returns a boolean for simpler usage of the `pand_dismiss_notice_js_url` hook
7
-
8
- #### 1.4.2
9
- * No changes to `class PAnD`
10
- * Updated `.gitignore` and `.gitattributes`
11
- * Now use classmap in composer's autoloader, should be more efficient
12
-
13
- #### 1.4.1
14
- * Fixed the `forever` setting with options
15
-
16
- #### 1.4.0
17
- * WPCS 1.1.0 linting done
18
- * Switched from storing timeout in transients to storing in the options table, this should play much better with object caching
19
-
20
- #### 1.3.x
21
- * Uses transients to store timeout
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/collizo4sky/persist-admin-notices-dismissal/README.md DELETED
@@ -1,128 +0,0 @@
1
- # Persist Admin notice Dismissals
2
- [![Latest Stable Version](https://poser.pugx.org/collizo4sky/persist-admin-notices-dismissal/v/stable)](https://packagist.org/packages/collizo4sky/persist-admin-notices-dismissal)
3
- [![Total Downloads](https://poser.pugx.org/collizo4sky/persist-admin-notices-dismissal/downloads)](https://packagist.org/packages/collizo4sky/persist-admin-notices-dismissal)
4
-
5
- Simple framework library that persists the dismissal of admin notices across pages in WordPress dashboard.
6
-
7
- ## Installation
8
-
9
- Run `composer require collizo4sky/persist-admin-notices-dismissal`
10
-
11
- Alternatively, clone or download this repo into the `vendor/` folder in your plugin, and include/require the `persist-admin-notices-dismissal.php` file like so
12
-
13
- ```php
14
- require __DIR__ . '/vendor/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php';
15
- add_action( 'admin_init', array( 'PAnD', 'init' ) );
16
- ```
17
-
18
- or let Composer's autoloader do the work.
19
-
20
- ## How to Use
21
- Firstly, install and activate this library within a plugin.
22
-
23
- Say you have the following markup as your admin notice,
24
-
25
-
26
- ```php
27
- function sample_admin_notice__success() {
28
- ?>
29
- <div class="updated notice notice-success is-dismissible">
30
- <p><?php _e( 'Done!', 'sample-text-domain' ); ?></p>
31
- </div>
32
- <?php
33
- }
34
- add_action( 'admin_notices', 'sample_admin_notice__success' );
35
- ```
36
-
37
- To make it hidden forever when dismissed, add the following data attribute `data-dismissible="disable-done-notice-forever"` to the div markup like so:
38
-
39
-
40
- ```php
41
- function sample_admin_notice__success() {
42
- if ( ! PAnD::is_admin_notice_active( 'disable-done-notice-forever' ) ) {
43
- return;
44
- }
45
-
46
- ?>
47
- <div data-dismissible="disable-done-notice-forever" class="updated notice notice-success is-dismissible">
48
- <p><?php _e( 'Done!', 'sample-text-domain' ); ?></p>
49
- </div>
50
- <?php
51
- }
52
- add_action( 'admin_init', array( 'PAnD', 'init' ) );
53
- add_action( 'admin_notices', 'sample_admin_notice__success' );
54
- ```
55
-
56
- ## Autoloaders
57
- When using the framework with an autoloader you **must** also load the class outside of the `admin_notices` or `network_admin_notices` hooks. The reason is that these hooks come after the `admin_enqueue_script` hook that loads the javascript.
58
-
59
- Just add the following in your main plugin file.
60
-
61
- ```php
62
- add_action( 'admin_init', array( 'PAnD', 'init' ) );
63
- ```
64
-
65
- #### Usage Instructions and Examples
66
- If you have two notices displayed when certain actions are triggered; firstly, choose a string to uniquely identify them, e.g. `notice-one` and `notice-two`
67
-
68
- To make the first notice never appear once dismissed, its `data-dismissible` attribute will be `data-dismissible="notice-one-forever"` where `notice-one` is its unique identifier and `forever` is the dismissal time period.
69
-
70
- To make the second notice only hidden for 2 days, its `data-dismissible` attribute will be `data-dismissible="notice-two-2"` where `notice-two` is its unique identifier and the `2`, the number of days it will be hidden is the dismissal time period.
71
-
72
- You **must** append the dismissal time period to the end of your unique identifier with a hyphen (`-`) and this value must be an integer. The only exception is the string `forever`.
73
-
74
- To actually make the dismissed admin notice not to appear, use the `is_admin_notice_active()` function like so:
75
-
76
-
77
- ```php
78
- function sample_admin_notice__success1() {
79
- if ( ! PAnD::is_admin_notice_active( 'notice-one-forever' ) ) {
80
- return;
81
- }
82
-
83
- ?>
84
- <div data-dismissible="notice-one-forever" class="updated notice notice-success is-dismissible">
85
- <p><?php _e( 'Done 1!', 'sample-text-domain' ); ?></p>
86
- </div>
87
- <?php
88
- }
89
-
90
- function sample_admin_notice__success2() {
91
- if ( ! PAnD::is_admin_notice_active( 'notice-two-2' ) ) {
92
- return;
93
- }
94
-
95
- ?>
96
- <div data-dismissible="notice-two-2" class="updated notice notice-success is-dismissible">
97
- <p><?php _e( 'Done 2!', 'sample-text-domain' ); ?></p>
98
- </div>
99
- <?php
100
- }
101
-
102
- add_action( 'admin_init', array( 'PAnD', 'init' ) );
103
- add_action( 'admin_notices', 'sample_admin_notice__success1' );
104
- add_action( 'admin_notices', 'sample_admin_notice__success2' );
105
- ```
106
-
107
- Please note that if you cleanup after your plugin deletion please try to make the removal of stored options as specific as possible. Otherwise you may end up deleting the stored options from other projects.
108
-
109
- A filter hook is available to return the proper URL to the Javascript file. An example usage is as follows, especially if this is being used in a theme.
110
-
111
- ```php
112
- add_filter( 'pand_theme_loader', '__return_true' );
113
- ```
114
-
115
- The `pand_theme_loader` runs the following hook if `true`. You can directly change the URL to the Javascript file by using another hook in the following manner by changing the return value.
116
-
117
- ```php
118
- add_filter(
119
- 'pand_dismiss_notice_js_url',
120
- function( $js_url, $composer_path ) {
121
- return get_stylesheet_directory_uri() . $composer_path;
122
- },
123
- 10,
124
- 2
125
- );
126
- ```
127
-
128
- Cool beans. Isn't it?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/collizo4sky/persist-admin-notices-dismissal/composer.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "name": "collizo4sky/persist-admin-notices-dismissal",
3
- "description": "Simple library to persist dismissal of admin notices across pages in WordPress dashboard.",
4
- "version": "1.4.4",
5
- "type": "library",
6
- "license": "GPL-3.0-or-later",
7
- "authors": [
8
- {
9
- "name": "Collins Agbonghama",
10
- "email": "me@w3guy.com",
11
- "role": "developer"
12
- }
13
- ],
14
- "prefer-stable": true,
15
- "require": {
16
- "php": ">=5.4"
17
- },
18
- "support": {
19
- "issues": "https://github.com/w3guy/persist-admin-notices-dismissal/issues",
20
- "source": "https://github.com/w3guy/persist-admin-notices-dismissal"
21
- },
22
- "autoload": {
23
- "classmap": [
24
- "persist-admin-notices-dismissal.php"
25
- ]
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php CHANGED
@@ -6,6 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
9
  'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  'PAnD' => $vendorDir . '/collizo4sky/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php',
11
  'Pelago\\Emogrifier' => $vendorDir . '/pelago/emogrifier/src/Emogrifier.php',
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Barryvdh\\Composer\\CleanupPlugin' => $vendorDir . '/barryvdh/composer-cleanup-plugin/src/CleanupPlugin.php',
10
+ 'Barryvdh\\Composer\\CleanupRules' => $vendorDir . '/barryvdh/composer-cleanup-plugin/src/CleanupRules.php',
11
  'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
12
  'PAnD' => $vendorDir . '/collizo4sky/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php',
13
  'Pelago\\Emogrifier' => $vendorDir . '/pelago/emogrifier/src/Emogrifier.php',
vendor/composer/autoload_psr4.php CHANGED
@@ -9,4 +9,5 @@ return array(
9
  'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
10
  'ProfilePress\\Core\\' => array($baseDir . '/src'),
11
  'Pelago\\' => array($vendorDir . '/pelago/emogrifier/src'),
 
12
  );
9
  'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
10
  'ProfilePress\\Core\\' => array($baseDir . '/src'),
11
  'Pelago\\' => array($vendorDir . '/pelago/emogrifier/src'),
12
+ 'Barryvdh\\Composer\\' => array($vendorDir . '/barryvdh/composer-cleanup-plugin/src'),
13
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,19 +53,19 @@ class ComposerAutoloaderInit086b35c3fc9ae167454ce62fc7fcb235
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequire086b35c3fc9ae167454ce62fc7fcb235($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
- function composerRequire086b35c3fc9ae167454ce62fc7fcb235($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitfb483d02c1b21601df3caf62d9e38e62
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInitfb483d02c1b21601df3caf62d9e38e62', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInitfb483d02c1b21601df3caf62d9e38e62', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequirefb483d02c1b21601df3caf62d9e38e62($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequirefb483d02c1b21601df3caf62d9e38e62($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
@@ -22,6 +22,10 @@ class ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235
22
  'ProfilePress\\Core\\' => 18,
23
  'Pelago\\' => 7,
24
  ),
 
 
 
 
25
  );
26
 
27
  public static $prefixDirsPsr4 = array (
@@ -37,9 +41,15 @@ class ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235
37
  array (
38
  0 => __DIR__ . '/..' . '/pelago/emogrifier/src',
39
  ),
 
 
 
 
40
  );
41
 
42
  public static $classMap = array (
 
 
43
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
44
  'PAnD' => __DIR__ . '/..' . '/collizo4sky/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php',
45
  'Pelago\\Emogrifier' => __DIR__ . '/..' . '/pelago/emogrifier/src/Emogrifier.php',
@@ -288,9 +298,9 @@ class ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235
288
  public static function getInitializer(ClassLoader $loader)
289
  {
290
  return \Closure::bind(function () use ($loader) {
291
- $loader->prefixLengthsPsr4 = ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235::$prefixLengthsPsr4;
292
- $loader->prefixDirsPsr4 = ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235::$prefixDirsPsr4;
293
- $loader->classMap = ComposerStaticInit086b35c3fc9ae167454ce62fc7fcb235::$classMap;
294
 
295
  }, null, ClassLoader::class);
296
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62
8
  {
9
  public static $files = array (
10
  'fda73876e8be17735f680f484cec1679' => __DIR__ . '/../..' . '/src/Functions/custom-settings-api.php',
22
  'ProfilePress\\Core\\' => 18,
23
  'Pelago\\' => 7,
24
  ),
25
+ 'B' =>
26
+ array (
27
+ 'Barryvdh\\Composer\\' => 18,
28
+ ),
29
  );
30
 
31
  public static $prefixDirsPsr4 = array (
41
  array (
42
  0 => __DIR__ . '/..' . '/pelago/emogrifier/src',
43
  ),
44
+ 'Barryvdh\\Composer\\' =>
45
+ array (
46
+ 0 => __DIR__ . '/..' . '/barryvdh/composer-cleanup-plugin/src',
47
+ ),
48
  );
49
 
50
  public static $classMap = array (
51
+ 'Barryvdh\\Composer\\CleanupPlugin' => __DIR__ . '/..' . '/barryvdh/composer-cleanup-plugin/src/CleanupPlugin.php',
52
+ 'Barryvdh\\Composer\\CleanupRules' => __DIR__ . '/..' . '/barryvdh/composer-cleanup-plugin/src/CleanupRules.php',
53
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
54
  'PAnD' => __DIR__ . '/..' . '/collizo4sky/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php',
55
  'Pelago\\Emogrifier' => __DIR__ . '/..' . '/pelago/emogrifier/src/Emogrifier.php',
298
  public static function getInitializer(ClassLoader $loader)
299
  {
300
  return \Closure::bind(function () use ($loader) {
301
+ $loader->prefixLengthsPsr4 = ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62::$prefixLengthsPsr4;
302
+ $loader->prefixDirsPsr4 = ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62::$prefixDirsPsr4;
303
+ $loader->classMap = ComposerStaticInitfb483d02c1b21601df3caf62d9e38e62::$classMap;
304
 
305
  }, null, ClassLoader::class);
306
  }
vendor/composer/installed.json CHANGED
@@ -1,5 +1,53 @@
1
  {
2
  "packages": [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  {
4
  "name": "collizo4sky/persist-admin-notices-dismissal",
5
  "version": "1.4.4",
1
  {
2
  "packages": [
3
+ {
4
+ "name": "barryvdh/composer-cleanup-plugin",
5
+ "version": "dev-master",
6
+ "version_normalized": "dev-master",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/mailoptin/composer-cleanup-plugin.git",
10
+ "reference": "540fddf14a4fd96626278963b10e14169a989f2e"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/mailoptin/composer-cleanup-plugin/zipball/540fddf14a4fd96626278963b10e14169a989f2e",
15
+ "reference": "540fddf14a4fd96626278963b10e14169a989f2e",
16
+ "shasum": ""
17
+ },
18
+ "require": {
19
+ "composer-plugin-api": "^2.0"
20
+ },
21
+ "time": "2022-03-09T06:20:49+00:00",
22
+ "default-branch": true,
23
+ "type": "composer-plugin",
24
+ "extra": {
25
+ "branch-alias": {
26
+ "dev-master": "0.1-dev"
27
+ },
28
+ "class": "Barryvdh\\Composer\\CleanupPlugin"
29
+ },
30
+ "installation-source": "dist",
31
+ "autoload": {
32
+ "psr-4": {
33
+ "Barryvdh\\Composer\\": "src/"
34
+ }
35
+ },
36
+ "license": [
37
+ "MIT"
38
+ ],
39
+ "authors": [
40
+ {
41
+ "name": "Barry vd. Heuvel",
42
+ "email": "barryvdh@gmail.com"
43
+ }
44
+ ],
45
+ "description": "A composer cleanup plugin, to remove tests and documentation to save space",
46
+ "support": {
47
+ "source": "https://github.com/mailoptin/composer-cleanup-plugin/tree/master"
48
+ },
49
+ "install-path": "../barryvdh/composer-cleanup-plugin"
50
+ },
51
  {
52
  "name": "collizo4sky/persist-admin-notices-dismissal",
53
  "version": "1.4.4",
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'd060c0c1bf3242258599cdc607bce5eae3d3b5ac',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
@@ -16,7 +16,18 @@
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => 'd060c0c1bf3242258599cdc607bce5eae3d3b5ac',
 
 
 
 
 
 
 
 
 
 
 
20
  'dev_requirement' => false,
21
  ),
22
  'collizo4sky/persist-admin-notices-dismissal' => array(
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '6283077c705e2efa9a21ad4af3869108aeb5ae42',
9
  'name' => '__root__',
10
  'dev' => false,
11
  ),
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => '6283077c705e2efa9a21ad4af3869108aeb5ae42',
20
+ 'dev_requirement' => false,
21
+ ),
22
+ 'barryvdh/composer-cleanup-plugin' => array(
23
+ 'pretty_version' => 'dev-master',
24
+ 'version' => 'dev-master',
25
+ 'type' => 'composer-plugin',
26
+ 'install_path' => __DIR__ . '/../barryvdh/composer-cleanup-plugin',
27
+ 'aliases' => array(
28
+ 0 => '0.1.x-dev',
29
+ ),
30
+ 'reference' => '540fddf14a4fd96626278963b10e14169a989f2e',
31
  'dev_requirement' => false,
32
  ),
33
  'collizo4sky/persist-admin-notices-dismissal' => array(
vendor/pelago/emogrifier/CHANGELOG.md DELETED
@@ -1,507 +0,0 @@
1
- # Emogrifier Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- This project adheres to [Semantic Versioning](https://semver.org/).
5
-
6
- ## x.y.z
7
-
8
- ### Added
9
-
10
- ### Changed
11
-
12
- ### Deprecated
13
-
14
- ### Removed
15
-
16
- ### Fixed
17
-
18
- ## 3.1.0
19
-
20
- ### Added
21
- - Add support for PHP 7.4
22
- ([#821](https://github.com/MyIntervals/emogrifier/pull/821),
23
- [#829](https://github.com/MyIntervals/emogrifier/pull/829))
24
-
25
- ### Changed
26
- - Upgrade to Symfony 5.0
27
- ([#822](https://github.com/MyIntervals/emogrifier/pull/820)
28
-
29
- ## 3.0.0
30
-
31
- ### Added
32
- - Test and document excluding entire subtree with `addExcludedSelector()`
33
- ([#347](https://github.com/MyIntervals/emogrifier/issues/347),
34
- [#768](https://github.com/MyIntervals/emogrifier/pull/768))
35
- - Test that rules with `:optional` or `:required` are copied to the `<style>`
36
- element ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
37
- [#765](https://github.com/MyIntervals/emogrifier/pull/765))
38
- - Test that rules with `:only-of-type` are copied to the `<style>` element
39
- ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
40
- [#760](https://github.com/MyIntervals/emogrifier/pull/760))
41
- - Support `:last-of-type`
42
- ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
43
- [#758](https://github.com/MyIntervals/emogrifier/pull/758))
44
- - Support `:first-of-type`
45
- ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
46
- [#757](https://github.com/MyIntervals/emogrifier/pull/757))
47
- - Support `:empty`
48
- ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
49
- [#756](https://github.com/MyIntervals/emogrifier/pull/756))
50
- - Test that rules with `:any-link` are copied to the `<style>` element
51
- ([#748](https://github.com/MyIntervals/emogrifier/issues/748),
52
- [#755](https://github.com/MyIntervals/emogrifier/pull/755))
53
- - Support and test `:only-child`
54
- ([#747](https://github.com/MyIntervals/emogrifier/issues/747),
55
- [#754](https://github.com/MyIntervals/emogrifier/pull/754))
56
- - Support and test `:nth-last-of-type`
57
- ([#747](https://github.com/MyIntervals/emogrifier/issues/747),
58
- [#751](https://github.com/MyIntervals/emogrifier/pull/751))
59
- - Support and test `:nth-last-child`
60
- ([#747](https://github.com/MyIntervals/emogrifier/issues/747),
61
- [#750](https://github.com/MyIntervals/emogrifier/pull/750))
62
- - Support and test general sibling combinator
63
- ([#723](https://github.com/MyIntervals/emogrifier/issues/723),
64
- [#745](https://github.com/MyIntervals/emogrifier/pull/745))
65
- - Test universal selector with combinators
66
- ([#723](https://github.com/MyIntervals/emogrifier/issues/723),
67
- [#743](https://github.com/MyIntervals/emogrifier/pull/743))
68
- - Preserve `display: none` elements with `-emogrifier-keep` class
69
- ([#252](https://github.com/MyIntervals/emogrifier/issues/252),
70
- [#737](https://github.com/MyIntervals/emogrifier/pull/737))
71
- - Preserve valid `@import` rules
72
- ([#338](https://github.com/MyIntervals/emogrifier/issues/338),
73
- [#334](https://github.com/MyIntervals/emogrifier/pull/334),
74
- [#732](https://github.com/MyIntervals/emogrifier/pull/732),
75
- [#735](https://github.com/MyIntervals/emogrifier/pull/735))
76
- - Add `HtmlPruner::removeRedundantClassesAfterCssInlined`
77
- ([#380](https://github.com/MyIntervals/emogrifier/issues/380),
78
- [#724](https://github.com/MyIntervals/emogrifier/pull/724))
79
- - Check on Travis that PHP-CS-Fixer will not change anything
80
- [#727](https://github.com/MyIntervals/emogrifier/pull/727))
81
- - Support `:not(…)` as an entire selector
82
- ([#469](https://github.com/MyIntervals/emogrifier/issues/469),
83
- [#725](https://github.com/MyIntervals/emogrifier/pull/725))
84
- - Add `HtmlPruner::removeRedundantClasses`
85
- ([#380](https://github.com/MyIntervals/emogrifier/issues/380),
86
- [#708](https://github.com/MyIntervals/emogrifier/pull/708))
87
- - Support multiple attributes selectors
88
- ([#385](https://github.com/MyIntervals/emogrifier/issues/385),
89
- [#721](https://github.com/MyIntervals/emogrifier/pull/721))
90
- - Support `> :first-child` and `> :last-child` in selectors
91
- ([#384](https://github.com/MyIntervals/emogrifier/issues/384),
92
- [#720](https://github.com/MyIntervals/emogrifier/pull/720))
93
- - Add an `ArrayIntersector` class
94
- ([#708](https://github.com/MyIntervals/emogrifier/pull/708),
95
- [#710](https://github.com/MyIntervals/emogrifier/pull/710))
96
- - Add `CssInliner::getMatchingUninlinableSelectors`
97
- ([#380](https://github.com/MyIntervals/emogrifier/issues/380),
98
- [#707](https://github.com/MyIntervals/emogrifier/pull/707))
99
- - Add tests for `:nth-child` and `:nth-of-type`
100
- ([#71](https://github.com/MyIntervals/emogrifier/issues/71),
101
- [#698](https://github.com/MyIntervals/emogrifier/pull/698))
102
-
103
- ### Changed
104
- - Relax the dependency on `symfony/css-selector`
105
- ([#762](https://github.com/MyIntervals/emogrifier/pull/762))
106
- - Rename `HtmlPruner::removeInvisibleNodes` to
107
- `HtmlPruner::removeElementsWithDisplayNone`
108
- ([#717](https://github.com/MyIntervals/emogrifier/issues/717),
109
- [#718](https://github.com/MyIntervals/emogrifier/pull/718))
110
- - Mark the utility classes as internal
111
- ([#715](https://github.com/MyIntervals/emogrifier/pull/715))
112
- - Move utility classes to the `Pelago\Emogrifier\Utilities` namespace
113
- ([#712](https://github.com/MyIntervals/emogrifier/pull/712))
114
- - Make the `$css` parameter of the `inlineCss` method optional
115
- ([#700](https://github.com/MyIntervals/emogrifier/pull/700))
116
- - Update the development dependencies
117
- ([#691](https://github.com/MyIntervals/emogrifier/pull/691))
118
-
119
- ### Deprecated
120
- - Support for PHP 5.6 will be removed in Emogrifier 4.0.
121
- - Deprecate the `Emogrifier` class
122
- ([#701](https://github.com/MyIntervals/emogrifier/pull/701))
123
-
124
- ### Removed
125
- - Drop `enableCssToHtmlMapping` and `disableInvisibleNodeRemoval`
126
- ([#692](https://github.com/MyIntervals/emogrifier/pull/692))
127
- - Drop support for PHP 5.5
128
- ([#690](https://github.com/MyIntervals/emogrifier/pull/690))
129
-
130
- ### Fixed
131
- - Fix PhpStorm code inspection warnings
132
- ([#729](https://github.com/MyIntervals/emogrifier/issues/729),
133
- [#770](https://github.com/MyIntervals/emogrifier/pull/770))
134
- - Uppercase type combined with class or ID in selector
135
- ([#590](https://github.com/MyIntervals/emogrifier/issues/590),
136
- [#769](https://github.com/MyIntervals/emogrifier/pull/769))
137
- - Dynamic pseudo-class combined with static one (rules copied to `<style>`
138
- element, [#746](https://github.com/MyIntervals/emogrifier/pull/746))
139
- - Descendant attribute selectors (such as `html input[disabled]`)
140
- ([#375](https://github.com/MyIntervals/emogrifier/pull/375),
141
- [#709](https://github.com/MyIntervals/emogrifier/pull/709))
142
- - Attribute selectors with hyphen in attribute name
143
- ([#284](https://github.com/MyIntervals/emogrifier/issues/284),
144
- [#540](https://github.com/MyIntervals/emogrifier/pull/540),
145
- [#704](https://github.com/MyIntervals/emogrifier/pull/702))
146
- - Attribute selectors with space, hyphen, colon, semicolon or (most) other
147
- non-alphanumeric characters in attribute value
148
- ([#284](https://github.com/MyIntervals/emogrifier/issues/284),
149
- [#333](https://github.com/MyIntervals/emogrifier/issues/333),
150
- [#550](https://github.com/MyIntervals/emogrifier/issues/550),
151
- [#540](https://github.com/MyIntervals/emogrifier/pull/540),
152
- [#704](https://github.com/MyIntervals/emogrifier/pull/702))
153
- - Don’t create empty `style` attributes for unparsable declarations
154
- ([#259](https://github.com/MyIntervals/emogrifier/issues/259),
155
- [#702](https://github.com/MyIntervals/emogrifier/pull/702))
156
- - Allow `:not(:behavioural-pseudo-class)` in selectors
157
- ([#697](https://github.com/MyIntervals/emogrifier/pull/697),
158
- [#703](https://github.com/MyIntervals/emogrifier/pull/703))
159
-
160
- ## 2.2.0
161
-
162
- ### Added
163
- - Add a `HtmlPruner` class
164
- ([#679](https://github.com/MyIntervals/emogrifier/pull/679))
165
- - Add `AbstractHtmlProcessor::fromDomDocument`
166
- ([#676](https://github.com/MyIntervals/emogrifier/pull/676))
167
- - Add `AbstractHtmlProcessor::fromHtml`
168
- ([#675](https://github.com/MyIntervals/emogrifier/pull/675))
169
-
170
- ### Changed
171
- - Make the closures static
172
- ([#674](https://github.com/MyIntervals/emogrifier/pull/674))
173
- - Keep `<wbr>` elements by default with `CssInliner`
174
- ([#665](https://github.com/MyIntervals/emogrifier/pull/665))
175
- - Make the `CssInliner` inherit `AbstractHtmlProcessor`
176
- ([#660](https://github.com/MyIntervals/emogrifier/pull/660))
177
- - Separate `CssInliner::inlineCss` and the rendering
178
- ([#654](https://github.com/MyIntervals/emogrifier/pull/654))
179
-
180
- ### Removed
181
- - Drop the removal of unprocessable tags from `CssInliner`
182
- ([#685](https://github.com/MyIntervals/emogrifier/pull/685))
183
- - Drop the removal of invisible nodes from `CssInliner`
184
- ([#684](https://github.com/MyIntervals/emogrifier/pull/684))
185
-
186
- ### Fixed
187
- - Remove opening `<body>` tag from `body` content when element has attribute(s)
188
- ([#677](https://github.com/MyIntervals/emogrifier/issues/677),
189
- [#683](https://github.com/MyIntervals/emogrifier/pull/683))
190
- - Keep development files out of the Composer packages
191
- ([#678](https://github.com/MyIntervals/emogrifier/pull/678))
192
- - Call all static methods statically in `CssConcatenator`
193
- ([#670](https://github.com/MyIntervals/emogrifier/pull/670))
194
- - Support all HTML5 self-closing tags, including `<embed>`, `<source>`,
195
- `<track>` and `<wbr>`
196
- ([#653](https://github.com/MyIntervals/emogrifier/pull/653))
197
- - Remove all "unprocessable" (e.g. `<wbr>`) tags
198
- ([#650](https://github.com/MyIntervals/emogrifier/pull/650))
199
- - Correct translated xpath of `:nth-child` selector
200
- ([#648](https://github.com/MyIntervals/emogrifier/pull/648))
201
-
202
- ## 2.1.1
203
-
204
- ### Changed
205
- - Add a test that a missing document type gets added
206
- ([#641](https://github.com/MyIntervals/emogrifier/pull/641))
207
-
208
- ### Fixed
209
- - Keep the `style` element the `head`
210
- ([#642](https://github.com/MyIntervals/emogrifier/pull/642))
211
-
212
- ## 2.1.0
213
-
214
- ### Added
215
- - PHP 7.3 support
216
- ([#638](https://github.com/MyIntervals/emogrifier/pull/638))
217
- - Allow PHP 7.3 in `composer.json`
218
- - Test in Travis for PHP 7.3
219
- - Add a `renderBodyContent()` method
220
- ([#633](https://github.com/MyIntervals/emogrifier/pull/633))
221
- - Add a `getDomDocument()` method
222
- ([#630](https://github.com/MyIntervals/emogrifier/pull/630))
223
- - Add a Composer script for PHP CS Fixer
224
- ([#607](https://github.com/MyIntervals/emogrifier/pull/607))
225
- - Copy matching rules with dynamic pseudo-classes or pseudo-elements in
226
- selectors to the style element
227
- ([#280](https://github.com/MyIntervals/emogrifier/issues/280),
228
- [#562](https://github.com/MyIntervals/emogrifier/pull/562),
229
- [#567](https://github.com/MyIntervals/emogrifier/pull/567))
230
- - Add a CssToAttributeConverter
231
- ([#546](https://github.com/MyIntervals/emogrifier/pull/546))
232
- - Expose the DOMDocument in AbstractHtmlProcessor
233
- ([#520](https://github.com/MyIntervals/emogrifier/pull/520))
234
- - Add an HtmlNormalizer class
235
- ([#513](https://github.com/MyIntervals/emogrifier/pull/513),
236
- [#516](https://github.com/MyIntervals/emogrifier/pull/516))
237
- - Add a CssInliner class
238
- ([#514](https://github.com/MyIntervals/emogrifier/pull/514),
239
- [#522](https://github.com/MyIntervals/emogrifier/pull/522))
240
- - Composer scripts for the various CI build steps
241
- - Validate the composer.json on Travis
242
- ([#476](https://github.com/MyIntervals/emogrifier/pull/476))
243
-
244
- ### Changed
245
- - Mark the work-in-progress classes as `@internal`
246
- ([#640](https://github.com/MyIntervals/emogrifier/pull/640))
247
- - Remove the unprocessable tags from the DOM, not from the raw HTML
248
- ([#627](https://github.com/MyIntervals/emogrifier/pull/627))
249
- - Reject empty HTML in `setHtml()`
250
- ([#622](https://github.com/MyIntervals/emogrifier/pull/622))
251
- - Stop passing the DOM document around
252
- ([#618](https://github.com/MyIntervals/emogrifier/pull/618))
253
- - Improve performance by using explicit namespaces for PHP functions
254
- ([#573](https://github.com/MyIntervals/emogrifier/pull/573),
255
- [#576](https://github.com/MyIntervals/emogrifier/pull/576))
256
- - Add type hint checking to the code sniffs
257
- ([#566](https://github.com/MyIntervals/emogrifier/pull/566))
258
- - Check the code with PHPMD
259
- ([#561](https://github.com/MyIntervals/emogrifier/pull/561))
260
- - Add the cyclomatic complexity to the checked code sniffs
261
- ([#558](https://github.com/MyIntervals/emogrifier/pull/558))
262
- - Use the Symfony CSS selector component
263
- ([#540](https://github.com/MyIntervals/emogrifier/pull/540))
264
-
265
- ### Deprecated
266
- - Support for PHP 5.5 will be removed in Emogrifier 3.0.
267
- - Support for PHP 5.6 will be removed in Emogrifier 4.0.
268
- - The removal of invisible nodes will be removed in Emogrifier 3.0.
269
- ([#473](https://github.com/MyIntervals/emogrifier/pull/473))
270
- - Converting CSS styles to (non-CSS) HTML attributes will be removed
271
- in Emogrifier 3.0. Please use the new CssToAttributeConverter instead.
272
- ([#474](https://github.com/MyIntervals/emogrifier/pull/474))
273
- - Emogrifier 3.x.y will be the last release that supports usage without
274
- Composer (i.e., you can still require the class file).
275
- Starting with version 4.0, Emogrifier will only work with Composer.
276
- - The Emogrifier class will be superseded by CssInliner class in
277
- Emogrifier 3.0. For this, the Emogrifier class will be deprecated for
278
- version 3.0 and removed for version 4.0.
279
-
280
- ### Removed
281
- - Drop the `@version` PHPDoc annotations
282
- ([#637](https://github.com/MyIntervals/emogrifier/pull/637))
283
- - Drop the destructors
284
- ([#619](https://github.com/MyIntervals/emogrifier/pull/619))
285
-
286
- ### Fixed
287
- - Add required XML PHP extension to `composer.json`
288
- ([#614](https://github.com/MyIntervals/emogrifier/pull/614))
289
- - Add required DOM PHP extension to `composer.json`
290
- ([#595](https://github.com/MyIntervals/emogrifier/pull/595))
291
- - Escape hyphens in regular expressions
292
- ([#588](https://github.com/MyIntervals/emogrifier/pull/588))
293
- - Fix Travis for PHP 5.x
294
- ([#589](https://github.com/MyIntervals/emogrifier/pull/589))
295
- - Allow CSS between empty `@media` rule and another `@media` rule
296
- ([#534](https://github.com/MyIntervals/emogrifier/pull/534))
297
- - Allow additional whitespace in media-query-list of disallowed `@media` rules
298
- ([#532](https://github.com/MyIntervals/emogrifier/pull/532))
299
- - Allow multiple minified `@import` rules in the CSS without error (note:
300
- `@import`s are currently ignored,
301
- [#527](https://github.com/MyIntervals/emogrifier/pull/527))
302
- - Style property ordering when multiple mixed individual and shorthand
303
- properties apply ([#511](https://github.com/MyIntervals/emogrifier/pull/511),
304
- [#508](https://github.com/MyIntervals/emogrifier/issues/508))
305
- - Calculation of selector precedence for selectors involving pseudo-classes
306
- and/or attributes ([#502](https://github.com/MyIntervals/emogrifier/pull/502))
307
- - Allow `@charset` in the CSS without error (note: its value is currently
308
- ignored, [#507](https://github.com/MyIntervals/emogrifier/pull/507))
309
- - Allow attribute selectors in descendants
310
- ([#506](https://github.com/MyIntervals/emogrifier/pull/506),
311
- [#381](https://github.com/MyIntervals/emogrifier/issues/381),
312
- [#443](https://github.com/MyIntervals/emogrifier/issues/443))
313
- - Allow adjacent sibling CSS selector combinator in minified CSS
314
- ([#505](https://github.com/MyIntervals/emogrifier/pull/505))
315
- - Allow CSS property values containing newlines
316
- ([#504](https://github.com/MyIntervals/emogrifier/pull/504))
317
-
318
- ## 2.0.0
319
-
320
- ### Added
321
- - Support for CSS :not() selector
322
- ([#431](https://github.com/MyIntervals/emogrifier/pull/431))
323
- - Automatically remove !important annotations from final inline style declarations
324
- ([#420](https://github.com/MyIntervals/emogrifier/pull/420))
325
- - Automatically move `<style>` block from `<head>` to `<body>`
326
- ([#396](https://github.com/MyIntervals/emogrifier/pull/396))
327
- - PHP 7.2 support ([#398](https://github.com/MyIntervals/emogrifier/pull/398))
328
- - Allow PHP 7.2 in `composer.json`, cleaner PHP version constraint
329
- - Test in Travis for PHP 7.2
330
- - Debug mode. Throw debug exceptions only if debug is active.
331
- ([#392](https://github.com/MyIntervals/emogrifier/pull/392))
332
-
333
- ### Changed
334
- - Test with latest and oldest dependencies on Travis
335
- ([#463](https://github.com/MyIntervals/emogrifier/pull/463))
336
- - Always enable the debug mode in the tests
337
- ([#448](https://github.com/MyIntervals/emogrifier/pull/448))
338
- - Optimize the string operations
339
- ([#430](https://github.com/MyIntervals/emogrifier/pull/430))
340
-
341
- ### Deprecated
342
- - Support for PHP 5.5 will be removed in Emogrifier 3.0.
343
- - Support for PHP 5.6 will be removed in Emogrifier 4.0.
344
-
345
- ### Removed
346
- - Drop support for PHP 5.4
347
- ([#422](https://github.com/MyIntervals/emogrifier/pull/422))
348
- - Drop support for HHVM
349
- ([#386](https://github.com/MyIntervals/emogrifier/pull/386))
350
-
351
- ### Fixed
352
- - Handle invalid/unrecognized selectors in media query blocks
353
- ([#442](https://github.com/MyIntervals/emogrifier/pull/442))
354
- - Throw (the correct) exception for invalid excluded selectors
355
- ([#437](https://github.com/MyIntervals/emogrifier/pull/437))
356
- - emogrifyBody must not encode umlaut entities
357
- ([#414](https://github.com/MyIntervals/emogrifier/pull/414))
358
- - Fix mapped HTML attribute values
359
- ([#405](https://github.com/MyIntervals/emogrifier/pull/405))
360
- - Make sure the HTML always has a BODY element
361
- ([#410](https://github.com/MyIntervals/emogrifier/pull/410))
362
- - Make inline style priority higher than css block priority
363
- ([#404](https://github.com/MyIntervals/emogrifier/pull/404))
364
- - Fix media regex parsing
365
- ([#402](https://github.com/MyIntervals/emogrifier/pull/402))
366
- - Silence purposefully ignored PHP Warnings
367
- ([#400](https://github.com/MyIntervals/emogrifier/pull/400))
368
-
369
- ## 1.2.0 (2017-03-02)
370
-
371
- ### Added
372
- - Handling invalid xPath expression warnings
373
- ([#361](https://github.com/MyIntervals/emogrifier/pull/361))
374
-
375
- ### Deprecated
376
- - Support for PHP 5.5 will be removed in Emogrifier 3.0.
377
- - Support for PHP 5.4 will be removed in Emogrifier 2.0.
378
-
379
- ### Fixed
380
- - Allow colon (`:`) and semi-colon (`;`) when using the `*=` selector
381
- ([#371](https://github.com/MyIntervals/emogrifier/pull/371))
382
- - Ignore "auto" width and height
383
- ([#365](https://github.com/MyIntervals/emogrifier/pull/365))
384
-
385
- ## 1.1.0 (2016-09-18)
386
-
387
- ### Added
388
- - Add support for PHP 7.1
389
- ([#342](https://github.com/MyIntervals/emogrifier/pull/342))
390
- - Support the attr|=value selector
391
- ([#337](https://github.com/MyIntervals/emogrifier/pull/337))
392
- - Support the attr*=value selector
393
- ([#330](https://github.com/MyIntervals/emogrifier/pull/330))
394
- - Support the attr$=value selector
395
- ([#329](https://github.com/MyIntervals/emogrifier/pull/329))
396
- - Support the attr^=value selector
397
- ([#324](https://github.com/MyIntervals/emogrifier/pull/324))
398
- - Support the attr~=value selector
399
- ([#323](https://github.com/MyIntervals/emogrifier/pull/323))
400
- - Add CSS to HTML attribute mapper
401
- ([#288](https://github.com/MyIntervals/emogrifier/pull/288))
402
-
403
- ### Changed
404
- - Remove composer dependency from PHP mbstring extension
405
- (Actual code dependency were removed a lot of time ago)
406
- ([#295](https://github.com/MyIntervals/emogrifier/pull/295))
407
-
408
- ### Deprecated
409
- - Support for PHP 5.5 will be removed in Emogrifier 3.0.
410
- - Support for PHP 5.4 will be removed in Emogrifier 2.0.
411
-
412
- ### Fixed
413
- - Method emogrifyBodyContent() doesn't keeps utf8 umlauts
414
- ([#349](https://github.com/MyIntervals/emogrifier/pull/349))
415
- - Ignore value with words more than one in the attribute selector
416
- ([#327](https://github.com/MyIntervals/emogrifier/pull/327))
417
- - Ignore spaces around the > in the direct child selector
418
- ([#322](https://github.com/MyIntervals/emogrifier/pull/322))
419
- - Ignore empty media queries
420
- ([#307](https://github.com/MyIntervals/emogrifier/pull/307))
421
- ([#237](https://github.com/MyIntervals/emogrifier/issues/237))
422
- - Ignore pseudo-class when combined with pseudo-element
423
- ([#308](https://github.com/MyIntervals/emogrifier/pull/308))
424
- - First-child and last-child selectors are broken
425
- ([#293](https://github.com/MyIntervals/emogrifier/pull/293))
426
- - Second !important rule needs to overwrite the first one
427
- ([#292](https://github.com/MyIntervals/emogrifier/pull/292))
428
-
429
- ## 1.0.0 (2015-10-15)
430
-
431
- ### Added
432
- - Add branch alias ([#231](https://github.com/MyIntervals/emogrifier/pull/231))
433
- - Remove media queries which do not impact the document
434
- ([#217](https://github.com/MyIntervals/emogrifier/pull/217))
435
- - Allow elements to be excluded from emogrification
436
- ([#215](https://github.com/MyIntervals/emogrifier/pull/215))
437
- - Handle !important ([#214](https://github.com/MyIntervals/emogrifier/pull/214))
438
- - emogrifyBodyContent() method
439
- ([#206](https://github.com/MyIntervals/emogrifier/pull/206))
440
- - Cache combinedStyles ([#211](https://github.com/MyIntervals/emogrifier/pull/211))
441
- - Allow user to define media types to keep
442
- ([#200](https://github.com/MyIntervals/emogrifier/pull/200))
443
- - Ignore invalid CSS selectors
444
- ([#194](https://github.com/MyIntervals/emogrifier/pull/194))
445
- - isRemoveDisplayNoneEnabled option
446
- ([#162](https://github.com/MyIntervals/emogrifier/pull/162))
447
- - Allow disabling of "inline style" and "style block" parsing
448
- ([#156](https://github.com/MyIntervals/emogrifier/pull/156))
449
- - Preserve @media if necessary
450
- ([#62](https://github.com/MyIntervals/emogrifier/pull/62))
451
- - Add extraction of style blocks within the HTML
452
- - Add several new pseudo-selectors (first-child, last-child, nth-child,
453
- and nth-of-type)
454
-
455
- ### Changed
456
- - Make HTML5 the default document type
457
- ([#245](https://github.com/MyIntervals/emogrifier/pull/245))
458
- - Make copyCssWithMediaToStyleNode private
459
- ([#218](https://github.com/MyIntervals/emogrifier/pull/218))
460
- - Stop encoding umlauts and dollar signs
461
- ([#170](https://github.com/MyIntervals/emogrifier/pull/170))
462
- - Convert the classes to namespaces
463
- ([#41](https://github.com/MyIntervals/emogrifier/pull/41))
464
-
465
- ### Deprecated
466
- - Support for PHP 5.4 will be removed in Emogrifier 2.0.
467
-
468
- ### Removed
469
- - Drop support for PHP 5.3
470
- ([#114](https://github.com/MyIntervals/emogrifier/pull/114))
471
- - Support for character sets other than UTF-8 was removed.
472
-
473
- ### Fixed
474
- - Fix failing tests on Windows due to line endings
475
- ([#263](https://github.com/MyIntervals/emogrifier/pull/263))
476
- - Parsing CSS declaration blocks
477
- ([#261](https://github.com/MyIntervals/emogrifier/pull/261))
478
- - Fix first-child and last-child selectors
479
- ([#257](https://github.com/MyIntervals/emogrifier/pull/257))
480
- - Fix parsing of CSS for data URIs
481
- ([#243](https://github.com/MyIntervals/emogrifier/pull/243))
482
- - Fix multi-line media queries
483
- ([#241](https://github.com/MyIntervals/emogrifier/pull/241))
484
- - Keep CSS media queries even if followed by CSS comments
485
- ([#201](https://github.com/MyIntervals/emogrifier/pull/201))
486
- - Fix CSS selectors with exact attribute only
487
- ([#197](https://github.com/MyIntervals/emogrifier/pull/197))
488
- - Properly handle UTF-8 characters and entities
489
- ([#189](https://github.com/MyIntervals/emogrifier/pull/189))
490
- - Add mbstring extension to composer.json
491
- ([#93](https://github.com/MyIntervals/emogrifier/pull/93))
492
- - Prevent incorrectly capitalized CSS selectors from being stripped
493
- ([#85](https://github.com/MyIntervals/emogrifier/pull/85))
494
- - Fix CSS selectors with exact attribute only
495
- ([#197](https://github.com/MyIntervals/emogrifier/pull/197))
496
- - Wrong selector extraction from minified CSS
497
- ([#69](https://github.com/MyIntervals/emogrifier/pull/69))
498
- - Restore libxml error handler state after clearing
499
- ([#65](https://github.com/MyIntervals/emogrifier/pull/65))
500
- - Ignore all warnings produced by DOMDocument::loadHTML()
501
- ([#63](https://github.com/MyIntervals/emogrifier/pull/63))
502
- - Style tags in HTML cause an Xpath invalid query error
503
- ([#60](https://github.com/MyIntervals/emogrifier/pull/60))
504
- - Fix PHP warnings with PHP 5.5
505
- ([#26](https://github.com/MyIntervals/emogrifier/pull/26))
506
- - Make removal of invisible nodes operate in a case-insensitive manner
507
- - Fix a bug that was overwriting existing inline styles from the original HTML
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/pelago/emogrifier/README.md DELETED
@@ -1,478 +0,0 @@
1
- # Emogrifier
2
-
3
- [![Build Status](https://travis-ci.org/MyIntervals/emogrifier.svg?branch=master)](https://travis-ci.org/MyIntervals/emogrifier)
4
- [![Latest Stable Version](https://poser.pugx.org/pelago/emogrifier/v/stable.svg)](https://packagist.org/packages/pelago/emogrifier)
5
- [![Total Downloads](https://poser.pugx.org/pelago/emogrifier/downloads.svg)](https://packagist.org/packages/pelago/emogrifier)
6
- [![Latest Unstable Version](https://poser.pugx.org/pelago/emogrifier/v/unstable.svg)](https://packagist.org/packages/pelago/emogrifier)
7
- [![License](https://poser.pugx.org/pelago/emogrifier/license.svg)](https://packagist.org/packages/pelago/emogrifier)
8
-
9
- _n. e•mog•ri•fi•er [\ē-'mä-grƏ-,fī-Ər\] - a utility for changing completely the
10
- nature or appearance of HTML email, esp. in a particularly fantastic or bizarre
11
- manner_
12
-
13
- Emogrifier converts CSS styles into inline style attributes in your HTML code.
14
- This ensures proper display on email and mobile device readers that lack
15
- stylesheet support.
16
-
17
- This utility was developed as part of [Intervals](http://www.myintervals.com/)
18
- to deal with the problems posed by certain email clients (namely Outlook 2007
19
- and GoogleMail) when it comes to the way they handle styling contained in HTML
20
- emails. As many web developers and designers already know, certain email
21
- clients are notorious for their lack of CSS support. While attempts are being
22
- made to develop common [email standards](http://www.email-standards.org/),
23
- implementation is still a ways off.
24
-
25
- The primary problem with uncooperative email clients is that most tend to only
26
- regard inline CSS, discarding all `<style>` elements and links to stylesheets
27
- in `<link>` elements. Emogrifier solves this problem by converting CSS styles
28
- into inline style attributes in your HTML code.
29
-
30
- - [How it works](#how-it-works)
31
- - [Installation](#installation)
32
- - [Usage](#usage)
33
- - [Supported CSS selectors](#supported-css-selectors)
34
- - [Caveats](#caveats)
35
- - [Steps to release a new version](#steps-to-release-a-new-version)
36
- - [Maintainers](#maintainers)
37
-
38
- ## How it Works
39
-
40
- Emogrifier automagically transmogrifies your HTML by parsing your CSS and
41
- inserting your CSS definitions into tags within your HTML based on your CSS
42
- selectors.
43
-
44
- ## Installation
45
-
46
- For installing emogrifier, either add `pelago/emogrifier` to the `require`
47
- section in your project's `composer.json`, or you can use composer as below:
48
-
49
- ```bash
50
- composer require pelago/emogrifier
51
- ```
52
-
53
- See https://getcomposer.org/ for more information and documentation.
54
-
55
- ## Usage
56
-
57
- ### Inlining Css
58
-
59
- The most basic way to use the `CssInliner` class is to create an instance with
60
- the original HTML, inline the external CSS, and then get back the resulting
61
- HTML:
62
-
63
- ```php
64
- use Pelago\Emogrifier\CssInliner;
65
-
66
-
67
-
68
- $visualHtml = CssInliner::fromHtml($html)->inlineCss($css)->render();
69
- ```
70
-
71
- If there is no external CSS file and all CSS is located within `<style>`
72
- elements in the HTML, you can omit the `$css` parameter:
73
-
74
- ```php
75
- $visualHtml = CssInliner::fromHtml($html)->inlineCss()->render();
76
- ```
77
-
78
- If you would like to get back only the content of the `<body>` element instead of
79
- the complete HTML document, you can use the `renderBodyContent` method instead:
80
-
81
- ```php
82
- $bodyContent = $visualHtml = CssInliner::fromHtml($html)->inlineCss()
83
- ->renderBodyContent();
84
- ```
85
-
86
- If you would like to modify the inlining process with any of the available
87
- [options](#options), you will need to call the corresponding methods
88
- before inlining the CSS. The code then would look like this:
89
-
90
- ```php
91
- $visualHtml = CssInliner::fromHtml($html)->disableStyleBlocksParsing()
92
- ->inlineCss($css)->render();
93
- ```
94
-
95
- There are also some other HTML-processing classes available
96
- (all of which are subclasses of `AbstractHtmlProcessor`) which you can use
97
- to further change the HTML after inlining the CSS.
98
- (For more details on the classes, please have a look at the sections below.)
99
- `CssInliner` and all HTML-processing classes can share the same `DOMDocument`
100
- instance to work on:
101
-
102
- ```php
103
- use Pelago\Emogrifier\CssInliner;
104
- use Pelago\Emogrifier\HtmlProcessor\CssToAttributeConverter;
105
- use Pelago\Emogrifier\HtmlProcessor\HtmlPruner;
106
-
107
-
108
-
109
- $cssInliner = CssInliner::fromHtml($html)->inlineCss($css);
110
- $domDocument = $cssInliner->getDomDocument();
111
- HtmlPruner::fromDomDocument($domDocument)->removeElementsWithDisplayNone()
112
- ->removeRedundantClassesAfterCssInlined($cssInliner);
113
- $finalHtml = CssToAttributeConverter::fromDomDocument($domDocument)
114
- ->convertCssToVisualAttributes()->render();
115
- ```
116
-
117
- ### Normalizing and cleaning up HTML
118
-
119
- The `HtmlNormalizer` class normalizes the given HTML in the following ways:
120
-
121
- - add a document type (HTML5) if missing
122
- - disentangle incorrectly nested tags
123
- - add HEAD and BODY elements (if they are missing)
124
- - reformat the HTML
125
-
126
- The class can be used like this:
127
-
128
- ```php
129
- use Pelago\Emogrifier\HtmlProcessor\HtmlNormalizer;
130
-
131
-
132
-
133
- $cleanHtml = HtmlNormalizer::fromHtml($rawHtml)->render();
134
- ```
135
-
136
- ### Converting CSS styles to visual HTML attributes
137
-
138
- The `CssToAttributeConverter` converts a few style attributes values to visual
139
- HTML attributes. This allows to get at least a bit of visual styling for email
140
- clients that do not support CSS well. For example, `style="width: 100px"`
141
- will be converted to `width="100"`.
142
-
143
- The class can be used like this:
144
-
145
- ```php
146
- use Pelago\Emogrifier\HtmlProcessor\CssToAttributeConverter;
147
-
148
-
149
-
150
- $visualHtml = CssToAttributeConverter::fromHtml($rawHtml)
151
- ->convertCssToVisualAttributes()->render();
152
- ```
153
-
154
- You can also have the `CssToAttributeConverter` work on a `DOMDocument`:
155
-
156
- ```php
157
- $visualHtml = CssToAttributeConverter::fromDomDocument($domDocument)
158
- ->convertCssToVisualAttributes()->render();
159
- ```
160
-
161
- ### Removing redundant content and attributes from the HTML
162
-
163
- The `HtmlPruner` class can reduce the size of the HTML by removing elements with
164
- a `display: none` style declaration, and/or removing classes from `class`
165
- attributes that are not required.
166
-
167
- It can be used like this:
168
-
169
- ```php
170
- use Pelago\Emogrifier\HtmlProcessor\HtmlPruner;
171
-
172
-
173
-
174
- $prunedHtml = HtmlPruner::fromHtml($html)->removeElementsWithDisplayNone()
175
- ->removeRedundantClasses($classesToKeep)->render();
176
- ```
177
-
178
- The `removeRedundantClasses` method accepts a whitelist of names of classes that
179
- should be retained. If this is a post-processing step after inlining CSS, you
180
- can alternatively use `removeRedundantClassesAfterCssInlined`, passing it the
181
- `CssInliner` instance that has inlined the CSS (and having the `HtmlPruner` work
182
- on the `DOMDocument`). This will use information from the `CssInliner` to
183
- determine which classes are still required (namely, those used in uninlinable
184
- rules that have been copied to a `<style>` element):
185
-
186
- ```php
187
- $prunedHtml = HtmlPruner::fromDomDocument($cssInliner->getDomDocument())
188
- ->removeElementsWithDisplayNone()
189
- ->removeRedundantClassesAfterCssInlined($cssInliner)->render();
190
- ```
191
-
192
- The `removeElementsWithDisplayNone` method will not remove any elements which
193
- have the class `-emogrifier-keep`. So if, for example, there are elements which
194
- by default have `display: none` but are revealed by an `@media` rule, or which
195
- are intended as a preheader, you can add that class to those elements. The
196
- paragraph in this HTML snippet will not be removed even though it has
197
- `display: none` (which has presumably been applied by `CssInliner::inlineCss()`
198
- from a CSS rule `.preheader { display: none; }`):
199
-
200
- ```html
201
- <p class="preheader -emogrifier-keep" style="display: none;">
202
- Hello World!
203
- </p>
204
- ```
205
-
206
- The `removeRedundantClassesAfterCssInlined` (or `removeRedundantClasses`)
207
- method, if invoked after `removeElementsWithDisplayNone`, will remove the
208
- `-emogrifier-keep` class.
209
-
210
- ### Options
211
-
212
- There are several options that you can set on the `CssInliner` instance before
213
- calling the `inlineCss` method (or on the `Emogrifier` instance before calling
214
- the `emogrify` method):
215
-
216
- * `->disableStyleBlocksParsing()` - By default, `CssInliner` will grab
217
- all `<style>` blocks in the HTML and will apply the CSS styles as inline
218
- "style" attributes to the HTML. The `<style>` blocks will then be removed
219
- from the HTML. If you want to disable this functionality so that `CssInliner`
220
- leaves these `<style>` blocks in the HTML and does not parse them, you should
221
- use this option. If you use this option, the contents of the `<style>` blocks
222
- will _not_ be applied as inline styles and any CSS you want `CssInliner` to
223
- use must be passed in as described in the [Usage section](#usage) above.
224
- * `->disableInlineStylesParsing()` - By default, `CssInliner`
225
- preserves all of the "style" attributes on tags in the HTML you pass to it.
226
- However if you want to discard all existing inline styles in the HTML before
227
- the CSS is applied, you should use this option.
228
- * `->addAllowedMediaType(string $mediaName)` - By default, `CssInliner`
229
- will keep only media types `all`, `screen` and `print`. If you want to keep
230
- some others, you can use this method to define them.
231
- * `->removeAllowedMediaType(string $mediaName)` - You can use this
232
- method to remove media types that Emogrifier keeps.
233
- * `->addExcludedSelector(string $selector)` - Keeps elements from
234
- being affected by CSS inlining. Note that only elements matching the supplied
235
- selector(s) will be excluded from CSS inlining, not necessarily their
236
- descendants. If you wish to exclude an entire subtree, you should provide
237
- selector(s) which will match all elements in the subtree, for example by using
238
- the universal selector:
239
- ```php
240
- $cssInliner->addExcludedSelector('.message-preview');
241
- $cssInliner->addExcludedSelector('.message-preview *');
242
- ```
243
-
244
- ### Using the legacy Emogrifier class
245
-
246
- In version 3.0.0, the `Emogrifier` class has been deprecated, and it will be
247
- removed for version 4.0.0. Please update your code to use the new
248
- `CssInliner` class instead.
249
-
250
- If you are still using the deprecated class, here is how to use it:
251
-
252
- First, you provide Emogrifier with the HTML and CSS you would like to merge.
253
- This can happen directly during instantiation:
254
-
255
- ```php
256
- $html = '<html><h1>Hello world!</h1></html>';
257
- $css = 'h1 {font-size: 32px;}';
258
- $emogrifier = new \Pelago\Emogrifier($html, $css);
259
- ```
260
-
261
- You could also use the setters for providing this data after instantiation:
262
-
263
- ```php
264
- $emogrifier = new \Pelago\Emogrifier();
265
-
266
- $html = '<html><h1>Hello world!</h1></html>';
267
- $css = 'h1 {font-size: 32px;}';
268
-
269
- $emogrifier->setHtml($html);
270
- $emogrifier->setCss($css);
271
- ```
272
-
273
- After you have set the HTML and CSS, you can call the `emogrify` method to
274
- merge both:
275
-
276
- ```php
277
- $mergedHtml = $emogrifier->emogrify();
278
- ```
279
-
280
- Emogrifier automatically adds a Content-Type meta tag to set the charset for
281
- the document (if it is not provided).
282
-
283
- If you would like to get back only the content of the BODY element instead of
284
- the complete HTML document, you can use the `emogrifyBodyContent` instead:
285
-
286
- ```php
287
- $bodyContent = $emogrifier->emogrifyBodyContent();
288
- ```
289
-
290
- ### Migrating from `Emogrifier` to `CssInliner`
291
-
292
- #### Minimal example
293
-
294
- Old code using `Emogrifier`:
295
-
296
- ```php
297
- $emogrifier = new Emogrifier($html);
298
- $html = $emogrifier->emogrify();
299
- ```
300
-
301
- New code using `CssInliner`:
302
-
303
- ```php
304
- $html = CssInliner::fromHtml($html)->inlineCss()->render();
305
- ```
306
-
307
- NB: In this example, the old code removes elements with `display: none;`
308
- while the new code does not, as the default behaviors of the old and
309
- the new class differ in this regard.
310
-
311
- #### More complex example
312
-
313
- Old code using `Emogrifier`:
314
-
315
- ```php
316
- $emogrifier = new Emogrifier($html, $css);
317
- $emogrifier->enableCssToHtmlMapping();
318
-
319
- $html = $emogrifier->emogrify();
320
- ```
321
-
322
- New code using `CssInliner` and family:
323
-
324
- ```php
325
- $domDocument = CssInliner::fromHtml($html)->inlineCss($css)->getDomDocument();
326
-
327
- HtmlPruner::fromDomDocument($domDocument)->removeElementsWithDisplayNone(),
328
- $html = CssToAttributeConverter::fromDomDocument($domDocument)
329
- ->convertCssToVisualAttributes()->render();
330
- ```
331
-
332
- ## Supported CSS selectors
333
-
334
- Emogrifier currently supports the following
335
- [CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors):
336
-
337
- * [type](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors)
338
- * [class](https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors)
339
- * [ID](https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors)
340
- * [universal](https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors)
341
- (partial support)
342
- * [attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors):
343
- * presence
344
- * exact value match
345
- * value with `~` (one word within a whitespace-separated list of words)
346
- * value with `|` (either exact value match or prefix followed by a hyphen)
347
- * value with `^` (prefix match)
348
- * value with `$` (suffix match)
349
- * value with `*` (substring match)
350
- * [adjacent](https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_selectors)
351
- * [general sibling](https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator)
352
- * [child](https://developer.mozilla.org/en-US/docs/Web/CSS/Child_selectors)
353
- * [descendant](https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_selectors)
354
- * [pseudo-classes](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes):
355
- * [empty](https://developer.mozilla.org/en-US/docs/Web/CSS/:empty)
356
- * [first-child](https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child)
357
- * [first-of-type](https://developer.mozilla.org/en-US/docs/Web/CSS/:first-of-type)
358
- (with a type, e.g. `p:first-of-type` but not `*:first-of-type` which will
359
- behave as `*:first-child`)
360
- * [last-child](https://developer.mozilla.org/en-US/docs/Web/CSS/:last-child)
361
- * [last-of-type](https://developer.mozilla.org/en-US/docs/Web/CSS/:last-of-type)
362
- (with a type)
363
- * [not()](https://developer.mozilla.org/en-US/docs/Web/CSS/:not)
364
- * [nth-child()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child)
365
- * [nth-last-child()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-child)
366
- * [nth-last-of-type()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-of-type)
367
- (with a type)
368
- * [nth-of-type()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type)
369
- (with a type)
370
- * [only-child](https://developer.mozilla.org/en-US/docs/Web/CSS/:only-child)
371
-
372
- The following selectors are not implemented yet:
373
-
374
- * [universal](https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors):
375
- * with
376
- [child combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Child_combinator)
377
- * as ancestor with
378
- [descendant combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator)
379
- (e.g. `p *` is supported but `* p` is not)
380
- * [case-insensitive attribute value](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#case-insensitive)
381
- * static [pseudo-classes](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes):
382
- * [first-of-type](https://developer.mozilla.org/en-US/docs/Web/CSS/:first-of-type)
383
- without a type (will behave as `:first-child`)
384
- * [last-of-type](https://developer.mozilla.org/en-US/docs/Web/CSS/:last-of-type)
385
- without a type (will behave as `:last-child`)
386
- * [nth-last-of-type()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-last-of-type)
387
- without a type (will behave as `:nth-last-child()`)
388
- * [nth-of-type()](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type)
389
- without a type (will behave as `:nth-child()`)
390
- * any pseudo-classes not listed above as supported – rules involving them
391
- will nonetheless be preserved and copied to a `<style>` element in the
392
- HTML – including (but not necessarily limited to) the following:
393
- * [any-link](https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link)
394
- * [only-of-type](https://developer.mozilla.org/en-US/docs/Web/CSS/:only-of-type)
395
- * [optional](https://developer.mozilla.org/en-US/docs/Web/CSS/:optional)
396
- * [required](https://developer.mozilla.org/en-US/docs/Web/CSS/:required)
397
-
398
- Rules involving the following selectors cannot be applied as inline styles.
399
- They will, however, be preserved and copied to a `<style>` element in the HTML:
400
-
401
- * dynamic [pseudo-classes](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes)
402
- (such as `:hover`)
403
- * [pseudo-elements](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)
404
- (such as `::after`)
405
-
406
- ## Caveats
407
-
408
- * Emogrifier requires the HTML and the CSS to be UTF-8. Encodings like
409
- ISO8859-1 or ISO8859-15 are not supported.
410
- * Emogrifier preserves all valuable `@media` rules. Media queries can be very
411
- useful in responsive email design. See
412
- [media query support](https://litmus.com/help/email-clients/media-query-support/).
413
- However, in order for them to be effective, you may need to add `!important`
414
- to some of the declarations within them so that they will override CSS styles
415
- that have been inlined. For example, with the following CSS, the `font-size`
416
- declaration in the `@media` rule would not override the font size for `p`
417
- elements from the preceding rule after that has been inlined as
418
- `<p style="font-size: 16px;">` in the HTML, without the `!important` directive
419
- (even though `!important` would not be necessary if the CSS were not inlined):
420
- ```css
421
- p {
422
- font-size: 16px;
423
- }
424
- @media (max-width: 640px) {
425
- p {
426
- font-size: 14px !important;
427
- }
428
- }
429
- ```
430
- * Emogrifier cannot inline CSS rules involving selectors with pseudo-elements
431
- (such as `::after`) or dynamic pseudo-classes (such as `:hover`) – it is
432
- impossible. However, such rules will be preserved and copied to a `<style>`
433
- element, as for `@media` rules. The same caveat about the possible need for
434
- the `!important` directive also applies with pseudo-classes.
435
- * Emogrifier will grab existing inline style attributes _and_ will
436
- grab `<style>` blocks from your HTML, but it will not grab CSS files
437
- referenced in `<link>` elements or `@import` rules (though it will leave them
438
- intact for email clients that support them).
439
- * Even with styles inline, certain CSS properties are ignored by certain email
440
- clients. For more information, refer to these resources:
441
- * [http://www.email-standards.org/](http://www.email-standards.org/)
442
- * [https://www.campaignmonitor.com/css/](https://www.campaignmonitor.com/css/)
443
- * [http://templates.mailchimp.com/resources/email-client-css-support/](http://templates.mailchimp.com/resources/email-client-css-support/)
444
- * All CSS attributes that apply to an element will be applied, even if they are
445
- redundant. For example, if you define a font attribute _and_ a font-size
446
- attribute, both attributes will be applied to that element (in other words,
447
- the more specific attribute will not be combined into the more general
448
- attribute).
449
- * There's a good chance you might encounter problems if your HTML is not
450
- well-formed and valid (DOMDocument might complain). If you get problems like
451
- this, consider running your HTML through
452
- [Tidy](http://php.net/manual/en/book.tidy.php) before you pass it to
453
- Emogrifier.
454
- * Emogrifier automatically converts the provided (X)HTML into HTML5, i.e.,
455
- self-closing tags will lose their slash. To keep your HTML valid, it is
456
- recommended to use HTML5 instead of one of the XHTML variants.
457
-
458
- ## Steps to release a new version
459
-
460
- 1. Create a pull request "Prepare release of version x.y.z" with the following
461
- changes.
462
- 1. In the [composer.json](composer.json), update the `branch-alias` entry to
463
- point to the release _after_ the upcoming release.
464
- 1. In the [CHANGELOG.md](CHANGELOG.md), create a new section with subheadings
465
- for changes _after_ the upcoming release, set the version number for the
466
- upcoming release, and remove any empty sections.
467
- 1. Have the pull request reviewed and merged.
468
- 1. Tag the new release.
469
- 1. In the [Releases tab](https://github.com/MyIntervals/emogrifier/releases),
470
- create a new release and copy the change log entries to the new release.
471
- 1. Post about the new release on social media.
472
-
473
- ## Maintainers
474
-
475
- * [Oliver Klee](https://github.com/oliverklee)
476
- * [Zoli Szabó](https://github.com/zoliszabo)
477
- * [Jake Hotson](https://github.com/JakeQZ)
478
- * [John Reeve](https://github.com/jjriv)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/pelago/emogrifier/composer.json DELETED
@@ -1,97 +0,0 @@
1
- {
2
- "name": "pelago/emogrifier",
3
- "description": "Converts CSS styles into inline style attributes in your HTML code",
4
- "keywords": [
5
- "email",
6
- "css",
7
- "pre-processing"
8
- ],
9
- "homepage": "https://www.myintervals.com/emogrifier.php",
10
- "license": "MIT",
11
- "authors": [
12
- {
13
- "name": "Oliver Klee",
14
- "email": "github@oliverklee.de"
15
- },
16
- {
17
- "name": "Zoli Szabó",
18
- "email": "zoli.szabo+github@gmail.com"
19
- },
20
- {
21
- "name": "John Reeve",
22
- "email": "jreeve@pelagodesign.com"
23
- },
24
- {
25
- "name": "Jake Hotson",
26
- "email": "jake@qzdesign.co.uk"
27
- },
28
- {
29
- "name": "Cameron Brooks"
30
- },
31
- {
32
- "name": "Jaime Prado"
33
- }
34
- ],
35
- "support": {
36
- "issues": "https://github.com/MyIntervals/emogrifier/issues",
37
- "source": "https://github.com/MyIntervals/emogrifier"
38
- },
39
- "require": {
40
- "php": "^5.6 || ~7.0 || ~7.1 || ~7.2 || ~7.3 || ~7.4",
41
- "ext-dom": "*",
42
- "ext-libxml": "*",
43
- "symfony/css-selector": "^2.8 || ^3.0 || ^4.0 || ^5.0"
44
- },
45
- "require-dev": {
46
- "friendsofphp/php-cs-fixer": "^2.15.3",
47
- "squizlabs/php_codesniffer": "^3.5.0",
48
- "phpmd/phpmd": "^2.7.0",
49
- "phpunit/phpunit": "^5.7.27"
50
- },
51
- "autoload": {
52
- "psr-4": {
53
- "Pelago\\": "src/"
54
- }
55
- },
56
- "autoload-dev": {
57
- "psr-4": {
58
- "Pelago\\Tests\\": "tests/"
59
- }
60
- },
61
- "prefer-stable": true,
62
- "config": {
63
- "preferred-install": {
64
- "*": "dist"
65
- }
66
- },
67
- "scripts": {
68
- "php:version": "php -v | grep -Po 'PHP\\s++\\K(?:\\d++\\.)*+\\d++(?:-\\w++)?+'",
69
- "php:fix": "php-cs-fixer --config=config/php-cs-fixer.php fix config/ src/ tests/",
70
- "ci:php:lint": "find config src tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
71
- "ci:php:sniff": "phpcs config src tests",
72
- "ci:php:fixer": "php-cs-fixer --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots --diff-format=udiff config/ src/ tests/",
73
- "ci:php:md": "phpmd src text config/phpmd.xml",
74
- "ci:tests:unit": "phpunit tests/",
75
- "ci:tests": [
76
- "@ci:tests:unit"
77
- ],
78
- "ci:dynamic": [
79
- "@ci:tests"
80
- ],
81
- "ci:static": [
82
- "@ci:php:lint",
83
- "@ci:php:sniff",
84
- "@ci:php:fixer",
85
- "@ci:php:md"
86
- ],
87
- "ci": [
88
- "@ci:static",
89
- "@ci:dynamic"
90
- ]
91
- },
92
- "extra": {
93
- "branch-alias": {
94
- "dev-master": "4.0.x-dev"
95
- }
96
- }
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- CHANGELOG
2
- =========
3
-
4
- 2.8.0
5
- -----
6
-
7
- * Added the `CssSelectorConverter` class as a non-static API for the component.
8
- * Deprecated the `CssSelector` static API of the component.
9
-
10
- 2.1.0
11
- -----
12
-
13
- * none
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/README.md DELETED
@@ -1,20 +0,0 @@
1
- CssSelector Component
2
- =====================
3
-
4
- The CssSelector component converts CSS selectors to XPath expressions.
5
-
6
- Resources
7
- ---------
8
-
9
- * [Documentation](https://symfony.com/doc/current/components/css_selector.html)
10
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
11
- * [Report issues](https://github.com/symfony/symfony/issues) and
12
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
13
- in the [main Symfony repository](https://github.com/symfony/symfony)
14
-
15
- Credits
16
- -------
17
-
18
- This component is a port of the Python cssselect library
19
- [v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1),
20
- which is distributed under the BSD license.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\CssSelectorConverter;
16
-
17
- class CssSelectorConverterTest extends TestCase
18
- {
19
- public function testCssToXPath()
20
- {
21
- $converter = new CssSelectorConverter();
22
-
23
- $this->assertEquals('descendant-or-self::*', $converter->toXPath(''));
24
- $this->assertEquals('descendant-or-self::h1', $converter->toXPath('h1'));
25
- $this->assertEquals("descendant-or-self::h1[@id = 'foo']", $converter->toXPath('h1#foo'));
26
- $this->assertEquals("descendant-or-self::h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]", $converter->toXPath('h1.foo'));
27
- $this->assertEquals('descendant-or-self::foo:h1', $converter->toXPath('foo|h1'));
28
- $this->assertEquals('descendant-or-self::h1', $converter->toXPath('H1'));
29
- }
30
-
31
- public function testCssToXPathXml()
32
- {
33
- $converter = new CssSelectorConverter(false);
34
-
35
- $this->assertEquals('descendant-or-self::H1', $converter->toXPath('H1'));
36
- }
37
-
38
- public function testParseExceptions()
39
- {
40
- $this->expectException('Symfony\Component\CssSelector\Exception\ParseException');
41
- $this->expectExceptionMessage('Expected identifier, but <eof at 3> found.');
42
- $converter = new CssSelectorConverter();
43
- $converter->toXPath('h1:');
44
- }
45
-
46
- /** @dataProvider getCssToXPathWithoutPrefixTestData */
47
- public function testCssToXPathWithoutPrefix($css, $xpath)
48
- {
49
- $converter = new CssSelectorConverter();
50
-
51
- $this->assertEquals($xpath, $converter->toXPath($css, ''), '->parse() parses an input string and returns a node');
52
- }
53
-
54
- public function getCssToXPathWithoutPrefixTestData()
55
- {
56
- return [
57
- ['h1', 'h1'],
58
- ['foo|h1', 'foo:h1'],
59
- ['h1, h2, h3', 'h1 | h2 | h3'],
60
- ['h1:nth-child(3n+1)', "*/*[(name() = 'h1') and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"],
61
- ['h1 > p', 'h1/p'],
62
- ['h1#foo', "h1[@id = 'foo']"],
63
- ['h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"],
64
- ['h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"],
65
- ['h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"],
66
- ['h1[class]', 'h1[@class]'],
67
- ['h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"],
68
- ['h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"],
69
- ['h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"],
70
- ['div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"],
71
- ['div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"],
72
- ];
73
- }
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/AbstractNodeTest.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\NodeInterface;
16
-
17
- abstract class AbstractNodeTest extends TestCase
18
- {
19
- /** @dataProvider getToStringConversionTestData */
20
- public function testToStringConversion(NodeInterface $node, $representation)
21
- {
22
- $this->assertEquals($representation, (string) $node);
23
- }
24
-
25
- /** @dataProvider getSpecificityValueTestData */
26
- public function testSpecificityValue(NodeInterface $node, $value)
27
- {
28
- $this->assertEquals($value, $node->getSpecificity()->getValue());
29
- }
30
-
31
- abstract public function getToStringConversionTestData();
32
-
33
- abstract public function getSpecificityValueTestData();
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\AttributeNode;
15
- use Symfony\Component\CssSelector\Node\ElementNode;
16
-
17
- class AttributeNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'],
23
- [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"],
24
- [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"],
25
- ];
26
- }
27
-
28
- public function getSpecificityValueTestData()
29
- {
30
- return [
31
- [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10],
32
- [new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11],
33
- [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10],
34
- [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10],
35
- ];
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ClassNode;
15
- use Symfony\Component\CssSelector\Node\ElementNode;
16
-
17
- class ClassNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'],
23
- ];
24
- }
25
-
26
- public function getSpecificityValueTestData()
27
- {
28
- return [
29
- [new ClassNode(new ElementNode(), 'class'), 10],
30
- [new ClassNode(new ElementNode(null, 'element'), 'class'), 11],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\CombinedSelectorNode;
15
- use Symfony\Component\CssSelector\Node\ElementNode;
16
-
17
- class CombinedSelectorNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'],
23
- [new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] <followed> Element[*]]'],
24
- ];
25
- }
26
-
27
- public function getSpecificityValueTestData()
28
- {
29
- return [
30
- [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0],
31
- [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1],
32
- [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2],
33
- ];
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ElementNode;
15
-
16
- class ElementNodeTest extends AbstractNodeTest
17
- {
18
- public function getToStringConversionTestData()
19
- {
20
- return [
21
- [new ElementNode(), 'Element[*]'],
22
- [new ElementNode(null, 'element'), 'Element[element]'],
23
- [new ElementNode('namespace', 'element'), 'Element[namespace|element]'],
24
- ];
25
- }
26
-
27
- public function getSpecificityValueTestData()
28
- {
29
- return [
30
- [new ElementNode(), 0],
31
- [new ElementNode(null, 'element'), 1],
32
- [new ElementNode('namespace', 'element'), 1],
33
- ];
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ElementNode;
15
- use Symfony\Component\CssSelector\Node\FunctionNode;
16
- use Symfony\Component\CssSelector\Parser\Token;
17
-
18
- class FunctionNodeTest extends AbstractNodeTest
19
- {
20
- public function getToStringConversionTestData()
21
- {
22
- return [
23
- [new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'],
24
- [new FunctionNode(new ElementNode(), 'function', [
25
- new Token(Token::TYPE_IDENTIFIER, 'value', 0),
26
- ]), "Function[Element[*]:function(['value'])]"],
27
- [new FunctionNode(new ElementNode(), 'function', [
28
- new Token(Token::TYPE_STRING, 'value1', 0),
29
- new Token(Token::TYPE_NUMBER, 'value2', 0),
30
- ]), "Function[Element[*]:function(['value1', 'value2'])]"],
31
- ];
32
- }
33
-
34
- public function getSpecificityValueTestData()
35
- {
36
- return [
37
- [new FunctionNode(new ElementNode(), 'function'), 10],
38
- [new FunctionNode(new ElementNode(), 'function', [
39
- new Token(Token::TYPE_IDENTIFIER, 'value', 0),
40
- ]), 10],
41
- [new FunctionNode(new ElementNode(), 'function', [
42
- new Token(Token::TYPE_STRING, 'value1', 0),
43
- new Token(Token::TYPE_NUMBER, 'value2', 0),
44
- ]), 10],
45
- ];
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/HashNodeTest.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ElementNode;
15
- use Symfony\Component\CssSelector\Node\HashNode;
16
-
17
- class HashNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'],
23
- ];
24
- }
25
-
26
- public function getSpecificityValueTestData()
27
- {
28
- return [
29
- [new HashNode(new ElementNode(), 'id'), 100],
30
- [new HashNode(new ElementNode(null, 'id'), 'class'), 101],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ClassNode;
15
- use Symfony\Component\CssSelector\Node\ElementNode;
16
- use Symfony\Component\CssSelector\Node\NegationNode;
17
-
18
- class NegationNodeTest extends AbstractNodeTest
19
- {
20
- public function getToStringConversionTestData()
21
- {
22
- return [
23
- [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'],
24
- ];
25
- }
26
-
27
- public function getSpecificityValueTestData()
28
- {
29
- return [
30
- [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10],
31
- ];
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ElementNode;
15
- use Symfony\Component\CssSelector\Node\PseudoNode;
16
-
17
- class PseudoNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'],
23
- ];
24
- }
25
-
26
- public function getSpecificityValueTestData()
27
- {
28
- return [
29
- [new PseudoNode(new ElementNode(), 'pseudo'), 10],
30
- ];
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php DELETED
@@ -1,34 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use Symfony\Component\CssSelector\Node\ElementNode;
15
- use Symfony\Component\CssSelector\Node\SelectorNode;
16
-
17
- class SelectorNodeTest extends AbstractNodeTest
18
- {
19
- public function getToStringConversionTestData()
20
- {
21
- return [
22
- [new SelectorNode(new ElementNode()), 'Selector[Element[*]]'],
23
- [new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'],
24
- ];
25
- }
26
-
27
- public function getSpecificityValueTestData()
28
- {
29
- return [
30
- [new SelectorNode(new ElementNode()), 0],
31
- [new SelectorNode(new ElementNode(), 'pseudo'), 1],
32
- ];
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Node/SpecificityTest.php DELETED
@@ -1,63 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Node;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\Specificity;
16
-
17
- class SpecificityTest extends TestCase
18
- {
19
- /** @dataProvider getValueTestData */
20
- public function testValue(Specificity $specificity, $value)
21
- {
22
- $this->assertEquals($value, $specificity->getValue());
23
- }
24
-
25
- /** @dataProvider getValueTestData */
26
- public function testPlusValue(Specificity $specificity, $value)
27
- {
28
- $this->assertEquals($value + 123, $specificity->plus(new Specificity(1, 2, 3))->getValue());
29
- }
30
-
31
- public function getValueTestData()
32
- {
33
- return [
34
- [new Specificity(0, 0, 0), 0],
35
- [new Specificity(0, 0, 2), 2],
36
- [new Specificity(0, 3, 0), 30],
37
- [new Specificity(4, 0, 0), 400],
38
- [new Specificity(4, 3, 2), 432],
39
- ];
40
- }
41
-
42
- /** @dataProvider getCompareTestData */
43
- public function testCompareTo(Specificity $a, Specificity $b, $result)
44
- {
45
- $this->assertEquals($result, $a->compareTo($b));
46
- }
47
-
48
- public function getCompareTestData()
49
- {
50
- return [
51
- [new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0],
52
- [new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0],
53
- [new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1],
54
- [new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1],
55
- [new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0],
56
- [new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1],
57
- [new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1],
58
- [new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0],
59
- [new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1],
60
- [new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1],
61
- ];
62
- }
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Parser\Reader;
16
- use Symfony\Component\CssSelector\Parser\Token;
17
- use Symfony\Component\CssSelector\Parser\TokenStream;
18
-
19
- /**
20
- * @author Jean-François Simon <contact@jfsimon.fr>
21
- */
22
- abstract class AbstractHandlerTest extends TestCase
23
- {
24
- /** @dataProvider getHandleValueTestData */
25
- public function testHandleValue($value, Token $expectedToken, $remainingContent)
26
- {
27
- $reader = new Reader($value);
28
- $stream = new TokenStream();
29
-
30
- $this->assertTrue($this->generateHandler()->handle($reader, $stream));
31
- $this->assertEquals($expectedToken, $stream->getNext());
32
- $this->assertRemainingContent($reader, $remainingContent);
33
- }
34
-
35
- /** @dataProvider getDontHandleValueTestData */
36
- public function testDontHandleValue($value)
37
- {
38
- $reader = new Reader($value);
39
- $stream = new TokenStream();
40
-
41
- $this->assertFalse($this->generateHandler()->handle($reader, $stream));
42
- $this->assertStreamEmpty($stream);
43
- $this->assertRemainingContent($reader, $value);
44
- }
45
-
46
- abstract public function getHandleValueTestData();
47
-
48
- abstract public function getDontHandleValueTestData();
49
-
50
- abstract protected function generateHandler();
51
-
52
- protected function assertStreamEmpty(TokenStream $stream)
53
- {
54
- $property = new \ReflectionProperty($stream, 'tokens');
55
- $property->setAccessible(true);
56
-
57
- $this->assertEquals([], $property->getValue($stream));
58
- }
59
-
60
- protected function assertRemainingContent(Reader $reader, $remainingContent)
61
- {
62
- if ('' === $remainingContent) {
63
- $this->assertEquals(0, $reader->getRemainingLength());
64
- $this->assertTrue($reader->isEOF());
65
- } else {
66
- $this->assertEquals(\strlen($remainingContent), $reader->getRemainingLength());
67
- $this->assertEquals(0, $reader->getOffset($remainingContent));
68
- }
69
- }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\CommentHandler;
15
- use Symfony\Component\CssSelector\Parser\Reader;
16
- use Symfony\Component\CssSelector\Parser\Token;
17
- use Symfony\Component\CssSelector\Parser\TokenStream;
18
-
19
- class CommentHandlerTest extends AbstractHandlerTest
20
- {
21
- /** @dataProvider getHandleValueTestData */
22
- public function testHandleValue($value, Token $unusedArgument, $remainingContent)
23
- {
24
- $reader = new Reader($value);
25
- $stream = new TokenStream();
26
-
27
- $this->assertTrue($this->generateHandler()->handle($reader, $stream));
28
- // comments are ignored (not pushed as token in stream)
29
- $this->assertStreamEmpty($stream);
30
- $this->assertRemainingContent($reader, $remainingContent);
31
- }
32
-
33
- public function getHandleValueTestData()
34
- {
35
- return [
36
- // 2nd argument only exists for inherited method compatibility
37
- ['/* comment */', new Token(null, null, null), ''],
38
- ['/* comment */foo', new Token(null, null, null), 'foo'],
39
- ];
40
- }
41
-
42
- public function getDontHandleValueTestData()
43
- {
44
- return [
45
- ['>'],
46
- ['+'],
47
- [' '],
48
- ];
49
- }
50
-
51
- protected function generateHandler()
52
- {
53
- return new CommentHandler();
54
- }
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\HashHandler;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
17
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
18
-
19
- class HashHandlerTest extends AbstractHandlerTest
20
- {
21
- public function getHandleValueTestData()
22
- {
23
- return [
24
- ['#id', new Token(Token::TYPE_HASH, 'id', 0), ''],
25
- ['#123', new Token(Token::TYPE_HASH, '123', 0), ''],
26
-
27
- ['#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'],
28
- ['#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'],
29
- ];
30
- }
31
-
32
- public function getDontHandleValueTestData()
33
- {
34
- return [
35
- ['id'],
36
- ['123'],
37
- ['<'],
38
- ['<'],
39
- ['#'],
40
- ];
41
- }
42
-
43
- protected function generateHandler()
44
- {
45
- $patterns = new TokenizerPatterns();
46
-
47
- return new HashHandler($patterns, new TokenizerEscaping($patterns));
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\IdentifierHandler;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
17
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
18
-
19
- class IdentifierHandlerTest extends AbstractHandlerTest
20
- {
21
- public function getHandleValueTestData()
22
- {
23
- return [
24
- ['foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''],
25
- ['foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'],
26
- ['foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'],
27
- ['foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'],
28
- ['foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'],
29
- ];
30
- }
31
-
32
- public function getDontHandleValueTestData()
33
- {
34
- return [
35
- ['>'],
36
- ['+'],
37
- [' '],
38
- ['*|foo'],
39
- ['/* comment */'],
40
- ];
41
- }
42
-
43
- protected function generateHandler()
44
- {
45
- $patterns = new TokenizerPatterns();
46
-
47
- return new IdentifierHandler($patterns, new TokenizerEscaping($patterns));
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\NumberHandler;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
17
-
18
- class NumberHandlerTest extends AbstractHandlerTest
19
- {
20
- public function getHandleValueTestData()
21
- {
22
- return [
23
- ['12', new Token(Token::TYPE_NUMBER, '12', 0), ''],
24
- ['12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''],
25
- ['+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''],
26
- ['-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''],
27
-
28
- ['12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'],
29
- ['12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'],
30
- ];
31
- }
32
-
33
- public function getDontHandleValueTestData()
34
- {
35
- return [
36
- ['hello'],
37
- ['>'],
38
- ['+'],
39
- [' '],
40
- ['/* comment */'],
41
- ];
42
- }
43
-
44
- protected function generateHandler()
45
- {
46
- $patterns = new TokenizerPatterns();
47
-
48
- return new NumberHandler($patterns);
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\StringHandler;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping;
17
- use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
18
-
19
- class StringHandlerTest extends AbstractHandlerTest
20
- {
21
- public function getHandleValueTestData()
22
- {
23
- return [
24
- ['"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''],
25
- ['"1"', new Token(Token::TYPE_STRING, '1', 1), ''],
26
- ['" "', new Token(Token::TYPE_STRING, ' ', 1), ''],
27
- ['""', new Token(Token::TYPE_STRING, '', 1), ''],
28
- ["'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''],
29
-
30
- ["'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'],
31
- ];
32
- }
33
-
34
- public function getDontHandleValueTestData()
35
- {
36
- return [
37
- ['hello'],
38
- ['>'],
39
- ['1'],
40
- [' '],
41
- ];
42
- }
43
-
44
- protected function generateHandler()
45
- {
46
- $patterns = new TokenizerPatterns();
47
-
48
- return new StringHandler($patterns, new TokenizerEscaping($patterns));
49
- }
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
13
-
14
- use Symfony\Component\CssSelector\Parser\Handler\WhitespaceHandler;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
-
17
- class WhitespaceHandlerTest extends AbstractHandlerTest
18
- {
19
- public function getHandleValueTestData()
20
- {
21
- return [
22
- [' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''],
23
- ["\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''],
24
- ["\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''],
25
-
26
- [' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'],
27
- [' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'],
28
- ];
29
- }
30
-
31
- public function getDontHandleValueTestData()
32
- {
33
- return [
34
- ['>'],
35
- ['1'],
36
- ['a'],
37
- ];
38
- }
39
-
40
- protected function generateHandler()
41
- {
42
- return new WhitespaceHandler();
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/ParserTest.php DELETED
@@ -1,253 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
16
- use Symfony\Component\CssSelector\Node\FunctionNode;
17
- use Symfony\Component\CssSelector\Node\SelectorNode;
18
- use Symfony\Component\CssSelector\Parser\Parser;
19
- use Symfony\Component\CssSelector\Parser\Token;
20
-
21
- class ParserTest extends TestCase
22
- {
23
- /** @dataProvider getParserTestData */
24
- public function testParser($source, $representation)
25
- {
26
- $parser = new Parser();
27
-
28
- $this->assertEquals($representation, array_map(function (SelectorNode $node) {
29
- return (string) $node->getTree();
30
- }, $parser->parse($source)));
31
- }
32
-
33
- /** @dataProvider getParserExceptionTestData */
34
- public function testParserException($source, $message)
35
- {
36
- $parser = new Parser();
37
-
38
- try {
39
- $parser->parse($source);
40
- $this->fail('Parser should throw a SyntaxErrorException.');
41
- } catch (SyntaxErrorException $e) {
42
- $this->assertEquals($message, $e->getMessage());
43
- }
44
- }
45
-
46
- /** @dataProvider getPseudoElementsTestData */
47
- public function testPseudoElements($source, $element, $pseudo)
48
- {
49
- $parser = new Parser();
50
- $selectors = $parser->parse($source);
51
- $this->assertCount(1, $selectors);
52
-
53
- /** @var SelectorNode $selector */
54
- $selector = $selectors[0];
55
- $this->assertEquals($element, (string) $selector->getTree());
56
- $this->assertEquals($pseudo, (string) $selector->getPseudoElement());
57
- }
58
-
59
- /** @dataProvider getSpecificityTestData */
60
- public function testSpecificity($source, $value)
61
- {
62
- $parser = new Parser();
63
- $selectors = $parser->parse($source);
64
- $this->assertCount(1, $selectors);
65
-
66
- /** @var SelectorNode $selector */
67
- $selector = $selectors[0];
68
- $this->assertEquals($value, $selector->getSpecificity()->getValue());
69
- }
70
-
71
- /** @dataProvider getParseSeriesTestData */
72
- public function testParseSeries($series, $a, $b)
73
- {
74
- $parser = new Parser();
75
- $selectors = $parser->parse(sprintf(':nth-child(%s)', $series));
76
- $this->assertCount(1, $selectors);
77
-
78
- /** @var FunctionNode $function */
79
- $function = $selectors[0]->getTree();
80
- $this->assertEquals([$a, $b], Parser::parseSeries($function->getArguments()));
81
- }
82
-
83
- /** @dataProvider getParseSeriesExceptionTestData */
84
- public function testParseSeriesException($series)
85
- {
86
- $parser = new Parser();
87
- $selectors = $parser->parse(sprintf(':nth-child(%s)', $series));
88
- $this->assertCount(1, $selectors);
89
-
90
- /** @var FunctionNode $function */
91
- $function = $selectors[0]->getTree();
92
- $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException');
93
- Parser::parseSeries($function->getArguments());
94
- }
95
-
96
- public function getParserTestData()
97
- {
98
- return [
99
- ['*', ['Element[*]']],
100
- ['*|*', ['Element[*]']],
101
- ['*|foo', ['Element[foo]']],
102
- ['foo|*', ['Element[foo|*]']],
103
- ['foo|bar', ['Element[foo|bar]']],
104
- ['#foo#bar', ['Hash[Hash[Element[*]#foo]#bar]']],
105
- ['div>.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']],
106
- ['div> .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']],
107
- ['div >.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']],
108
- ['div > .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']],
109
- ["div \n> \t \t .foo", ['CombinedSelector[Element[div] > Class[Element[*].foo]]']],
110
- ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
111
- ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
112
- ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
113
- ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
114
- ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
115
- ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']],
116
- ['div, td.foo, div.bar span', ['Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] <followed> Element[span]]']],
117
- ['div > p', ['CombinedSelector[Element[div] > Element[p]]']],
118
- ['td:first', ['Pseudo[Element[td]:first]']],
119
- ['td :first', ['CombinedSelector[Element[td] <followed> Pseudo[Element[*]:first]]']],
120
- ['a[name]', ['Attribute[Element[a][name]]']],
121
- ["a[ name\t]", ['Attribute[Element[a][name]]']],
122
- ['a [name]', ['CombinedSelector[Element[a] <followed> Attribute[Element[*][name]]]']],
123
- ['[name="foo"]', ["Attribute[Element[*][name = 'foo']]"]],
124
- ["[name='foo[1]']", ["Attribute[Element[*][name = 'foo[1]']]"]],
125
- ["[name='foo[0][bar]']", ["Attribute[Element[*][name = 'foo[0][bar]']]"]],
126
- ['a[rel="include"]', ["Attribute[Element[a][rel = 'include']]"]],
127
- ['a[rel = include]', ["Attribute[Element[a][rel = 'include']]"]],
128
- ["a[hreflang |= 'en']", ["Attribute[Element[a][hreflang |= 'en']]"]],
129
- ['a[hreflang|=en]', ["Attribute[Element[a][hreflang |= 'en']]"]],
130
- ['div:nth-child(10)', ["Function[Element[div]:nth-child(['10'])]"]],
131
- [':nth-child(2n+2)', ["Function[Element[*]:nth-child(['2', 'n', '+2'])]"]],
132
- ['div:nth-of-type(10)', ["Function[Element[div]:nth-of-type(['10'])]"]],
133
- ['div div:nth-of-type(10) .aclass', ["CombinedSelector[CombinedSelector[Element[div] <followed> Function[Element[div]:nth-of-type(['10'])]] <followed> Class[Element[*].aclass]]"]],
134
- ['label:only', ['Pseudo[Element[label]:only]']],
135
- ['a:lang(fr)', ["Function[Element[a]:lang(['fr'])]"]],
136
- ['div:contains("foo")', ["Function[Element[div]:contains(['foo'])]"]],
137
- ['div#foobar', ['Hash[Element[div]#foobar]']],
138
- ['div:not(div.foo)', ['Negation[Element[div]:not(Class[Element[div].foo])]']],
139
- ['td ~ th', ['CombinedSelector[Element[td] ~ Element[th]]']],
140
- ['.foo[data-bar][data-baz=0]', ["Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]"]],
141
- ];
142
- }
143
-
144
- public function getParserExceptionTestData()
145
- {
146
- return [
147
- ['attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()],
148
- ['attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()],
149
- ['html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()],
150
- [' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()],
151
- ['div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()],
152
- [' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()],
153
- ['p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()],
154
- ['div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()],
155
- [' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()],
156
- ['foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()],
157
- ['#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()],
158
- ['.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()],
159
- [':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()],
160
- ['[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()],
161
- ['[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()],
162
- ['[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()],
163
- ['[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()],
164
- [':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()],
165
- ['[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()],
166
- ['[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()],
167
- ['[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()],
168
- [':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()],
169
- [':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()],
170
- ['foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()],
171
- ];
172
- }
173
-
174
- public function getPseudoElementsTestData()
175
- {
176
- return [
177
- ['foo', 'Element[foo]', ''],
178
- ['*', 'Element[*]', ''],
179
- [':empty', 'Pseudo[Element[*]:empty]', ''],
180
- [':BEfore', 'Element[*]', 'before'],
181
- [':aftER', 'Element[*]', 'after'],
182
- [':First-Line', 'Element[*]', 'first-line'],
183
- [':First-Letter', 'Element[*]', 'first-letter'],
184
- ['::befoRE', 'Element[*]', 'before'],
185
- ['::AFter', 'Element[*]', 'after'],
186
- ['::firsT-linE', 'Element[*]', 'first-line'],
187
- ['::firsT-letteR', 'Element[*]', 'first-letter'],
188
- ['::Selection', 'Element[*]', 'selection'],
189
- ['foo:after', 'Element[foo]', 'after'],
190
- ['foo::selection', 'Element[foo]', 'selection'],
191
- ['lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'],
192
- ['video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'],
193
- ];
194
- }
195
-
196
- public function getSpecificityTestData()
197
- {
198
- return [
199
- ['*', 0],
200
- [' foo', 1],
201
- [':empty ', 10],
202
- [':before', 1],
203
- ['*:before', 1],
204
- [':nth-child(2)', 10],
205
- ['.bar', 10],
206
- ['[baz]', 10],
207
- ['[baz="4"]', 10],
208
- ['[baz^="4"]', 10],
209
- ['#lipsum', 100],
210
- [':not(*)', 0],
211
- [':not(foo)', 1],
212
- [':not(.foo)', 10],
213
- [':not([foo])', 10],
214
- [':not(:empty)', 10],
215
- [':not(#foo)', 100],
216
- ['foo:empty', 11],
217
- ['foo:before', 2],
218
- ['foo::before', 2],
219
- ['foo:empty::before', 12],
220
- ['#lorem + foo#ipsum:first-child > bar:first-line', 213],
221
- ];
222
- }
223
-
224
- public function getParseSeriesTestData()
225
- {
226
- return [
227
- ['1n+3', 1, 3],
228
- ['1n +3', 1, 3],
229
- ['1n + 3', 1, 3],
230
- ['1n+ 3', 1, 3],
231
- ['1n-3', 1, -3],
232
- ['1n -3', 1, -3],
233
- ['1n - 3', 1, -3],
234
- ['1n- 3', 1, -3],
235
- ['n-5', 1, -5],
236
- ['odd', 2, 1],
237
- ['even', 2, 0],
238
- ['3n', 3, 0],
239
- ['n', 1, 0],
240
- ['+n', 1, 0],
241
- ['-n', -1, 0],
242
- ['5', 0, 5],
243
- ];
244
- }
245
-
246
- public function getParseSeriesExceptionTestData()
247
- {
248
- return [
249
- ['foo'],
250
- ['n+'],
251
- ];
252
- }
253
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/ReaderTest.php DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Parser\Reader;
16
-
17
- class ReaderTest extends TestCase
18
- {
19
- public function testIsEOF()
20
- {
21
- $reader = new Reader('');
22
- $this->assertTrue($reader->isEOF());
23
-
24
- $reader = new Reader('hello');
25
- $this->assertFalse($reader->isEOF());
26
-
27
- $this->assignPosition($reader, 2);
28
- $this->assertFalse($reader->isEOF());
29
-
30
- $this->assignPosition($reader, 5);
31
- $this->assertTrue($reader->isEOF());
32
- }
33
-
34
- public function testGetRemainingLength()
35
- {
36
- $reader = new Reader('hello');
37
- $this->assertEquals(5, $reader->getRemainingLength());
38
-
39
- $this->assignPosition($reader, 2);
40
- $this->assertEquals(3, $reader->getRemainingLength());
41
-
42
- $this->assignPosition($reader, 5);
43
- $this->assertEquals(0, $reader->getRemainingLength());
44
- }
45
-
46
- public function testGetSubstring()
47
- {
48
- $reader = new Reader('hello');
49
- $this->assertEquals('he', $reader->getSubstring(2));
50
- $this->assertEquals('el', $reader->getSubstring(2, 1));
51
-
52
- $this->assignPosition($reader, 2);
53
- $this->assertEquals('ll', $reader->getSubstring(2));
54
- $this->assertEquals('lo', $reader->getSubstring(2, 1));
55
- }
56
-
57
- public function testGetOffset()
58
- {
59
- $reader = new Reader('hello');
60
- $this->assertEquals(2, $reader->getOffset('ll'));
61
- $this->assertFalse($reader->getOffset('w'));
62
-
63
- $this->assignPosition($reader, 2);
64
- $this->assertEquals(0, $reader->getOffset('ll'));
65
- $this->assertFalse($reader->getOffset('he'));
66
- }
67
-
68
- public function testFindPattern()
69
- {
70
- $reader = new Reader('hello');
71
-
72
- $this->assertFalse($reader->findPattern('/world/'));
73
- $this->assertEquals(['hello', 'h'], $reader->findPattern('/^([a-z]).*/'));
74
-
75
- $this->assignPosition($reader, 2);
76
- $this->assertFalse($reader->findPattern('/^h.*/'));
77
- $this->assertEquals(['llo'], $reader->findPattern('/^llo$/'));
78
- }
79
-
80
- public function testMoveForward()
81
- {
82
- $reader = new Reader('hello');
83
- $this->assertEquals(0, $reader->getPosition());
84
-
85
- $reader->moveForward(2);
86
- $this->assertEquals(2, $reader->getPosition());
87
- }
88
-
89
- public function testToEnd()
90
- {
91
- $reader = new Reader('hello');
92
- $reader->moveToEnd();
93
- $this->assertTrue($reader->isEOF());
94
- }
95
-
96
- private function assignPosition(Reader $reader, $value)
97
- {
98
- $position = new \ReflectionProperty($reader, 'position');
99
- $position->setAccessible(true);
100
- $position->setValue($reader, $value);
101
- }
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\SelectorNode;
16
- use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser;
17
-
18
- /**
19
- * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
20
- */
21
- class ClassParserTest extends TestCase
22
- {
23
- /** @dataProvider getParseTestData */
24
- public function testParse($source, $representation)
25
- {
26
- $parser = new ClassParser();
27
- $selectors = $parser->parse($source);
28
- $this->assertCount(1, $selectors);
29
-
30
- /** @var SelectorNode $selector */
31
- $selector = $selectors[0];
32
- $this->assertEquals($representation, (string) $selector->getTree());
33
- }
34
-
35
- public function getParseTestData()
36
- {
37
- return [
38
- ['.testclass', 'Class[Element[*].testclass]'],
39
- ['testel.testclass', 'Class[Element[testel].testclass]'],
40
- ['testns|.testclass', 'Class[Element[testns|*].testclass]'],
41
- ['testns|*.testclass', 'Class[Element[testns|*].testclass]'],
42
- ['testns|testel.testclass', 'Class[Element[testns|testel].testclass]'],
43
- ];
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\SelectorNode;
16
- use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
17
-
18
- /**
19
- * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
20
- */
21
- class ElementParserTest extends TestCase
22
- {
23
- /** @dataProvider getParseTestData */
24
- public function testParse($source, $representation)
25
- {
26
- $parser = new ElementParser();
27
- $selectors = $parser->parse($source);
28
- $this->assertCount(1, $selectors);
29
-
30
- /** @var SelectorNode $selector */
31
- $selector = $selectors[0];
32
- $this->assertEquals($representation, (string) $selector->getTree());
33
- }
34
-
35
- public function getParseTestData()
36
- {
37
- return [
38
- ['*', 'Element[*]'],
39
- ['testel', 'Element[testel]'],
40
- ['testns|*', 'Element[testns|*]'],
41
- ['testns|testel', 'Element[testns|testel]'],
42
- ];
43
- }
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\SelectorNode;
16
- use Symfony\Component\CssSelector\Parser\Shortcut\EmptyStringParser;
17
-
18
- /**
19
- * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
20
- */
21
- class EmptyStringParserTest extends TestCase
22
- {
23
- public function testParse()
24
- {
25
- $parser = new EmptyStringParser();
26
- $selectors = $parser->parse('');
27
- $this->assertCount(1, $selectors);
28
-
29
- /** @var SelectorNode $selector */
30
- $selector = $selectors[0];
31
- $this->assertEquals('Element[*]', (string) $selector->getTree());
32
-
33
- $selectors = $parser->parse('this will produce an empty array');
34
- $this->assertCount(0, $selectors);
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\SelectorNode;
16
- use Symfony\Component\CssSelector\Parser\Shortcut\HashParser;
17
-
18
- /**
19
- * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
20
- */
21
- class HashParserTest extends TestCase
22
- {
23
- /** @dataProvider getParseTestData */
24
- public function testParse($source, $representation)
25
- {
26
- $parser = new HashParser();
27
- $selectors = $parser->parse($source);
28
- $this->assertCount(1, $selectors);
29
-
30
- /** @var SelectorNode $selector */
31
- $selector = $selectors[0];
32
- $this->assertEquals($representation, (string) $selector->getTree());
33
- }
34
-
35
- public function getParseTestData()
36
- {
37
- return [
38
- ['#testid', 'Hash[Element[*]#testid]'],
39
- ['testel#testid', 'Hash[Element[testel]#testid]'],
40
- ['testns|#testid', 'Hash[Element[testns|*]#testid]'],
41
- ['testns|*#testid', 'Hash[Element[testns|*]#testid]'],
42
- ['testns|testel#testid', 'Hash[Element[testns|testel]#testid]'],
43
- ];
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\Parser;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Parser\Token;
16
- use Symfony\Component\CssSelector\Parser\TokenStream;
17
-
18
- class TokenStreamTest extends TestCase
19
- {
20
- public function testGetNext()
21
- {
22
- $stream = new TokenStream();
23
- $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
24
- $stream->push($t2 = new Token(Token::TYPE_DELIMITER, '.', 2));
25
- $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'title', 3));
26
-
27
- $this->assertSame($t1, $stream->getNext());
28
- $this->assertSame($t2, $stream->getNext());
29
- $this->assertSame($t3, $stream->getNext());
30
- }
31
-
32
- public function testGetPeek()
33
- {
34
- $stream = new TokenStream();
35
- $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
36
- $stream->push($t2 = new Token(Token::TYPE_DELIMITER, '.', 2));
37
- $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'title', 3));
38
-
39
- $this->assertSame($t1, $stream->getPeek());
40
- $this->assertSame($t1, $stream->getNext());
41
- $this->assertSame($t2, $stream->getPeek());
42
- $this->assertSame($t2, $stream->getPeek());
43
- $this->assertSame($t2, $stream->getNext());
44
- }
45
-
46
- public function testGetNextIdentifier()
47
- {
48
- $stream = new TokenStream();
49
- $stream->push(new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
50
-
51
- $this->assertEquals('h1', $stream->getNextIdentifier());
52
- }
53
-
54
- public function testFailToGetNextIdentifier()
55
- {
56
- $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException');
57
-
58
- $stream = new TokenStream();
59
- $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2));
60
- $stream->getNextIdentifier();
61
- }
62
-
63
- public function testGetNextIdentifierOrStar()
64
- {
65
- $stream = new TokenStream();
66
-
67
- $stream->push(new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
68
- $this->assertEquals('h1', $stream->getNextIdentifierOrStar());
69
-
70
- $stream->push(new Token(Token::TYPE_DELIMITER, '*', 0));
71
- $this->assertNull($stream->getNextIdentifierOrStar());
72
- }
73
-
74
- public function testFailToGetNextIdentifierOrStar()
75
- {
76
- $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException');
77
-
78
- $stream = new TokenStream();
79
- $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2));
80
- $stream->getNextIdentifierOrStar();
81
- }
82
-
83
- public function testSkipWhitespace()
84
- {
85
- $stream = new TokenStream();
86
- $stream->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
87
- $stream->push($t2 = new Token(Token::TYPE_WHITESPACE, ' ', 2));
88
- $stream->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'h1', 3));
89
-
90
- $stream->skipWhitespace();
91
- $this->assertSame($t1, $stream->getNext());
92
-
93
- $stream->skipWhitespace();
94
- $this->assertSame($t3, $stream->getNext());
95
- }
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/XPath/Fixtures/ids.html DELETED
@@ -1,48 +0,0 @@
1
- <html id="html"><head>
2
- <link id="link-href" href="foo" />
3
- <link id="link-nohref" />
4
- </head><body>
5
- <div id="outer-div">
6
- <a id="name-anchor" name="foo"></a>
7
- <a id="tag-anchor" rel="tag" href="http://localhost/foo">link</a>
8
- <a id="nofollow-anchor" rel="nofollow" href="https://example.org">
9
- link</a>
10
- <ol id="first-ol" class="a b c">
11
- <li id="first-li">content</li>
12
- <li id="second-li" lang="En-us">
13
- <div id="li-div">
14
- </div>
15
- </li>
16
- <li id="third-li" class="ab c"></li>
17
- <li id="fourth-li" class="ab
18
- c"></li>
19
- <li id="fifth-li"></li>
20
- <li id="sixth-li"></li>
21
- <li id="seventh-li"> </li>
22
- </ol>
23
- <p id="paragraph">
24
- <b id="p-b">hi</b> <em id="p-em">there</em>
25
- <b id="p-b2">guy</b>
26
- <input type="checkbox" id="checkbox-unchecked" />
27
- <input type="checkbox" id="checkbox-disabled" disabled="" />
28
- <input type="text" id="text-checked" checked="checked" />
29
- <input type="hidden" />
30
- <input type="hidden" disabled="disabled" />
31
- <input type="checkbox" id="checkbox-checked" checked="checked" />
32
- <input type="checkbox" id="checkbox-disabled-checked"
33
- disabled="disabled" checked="checked" />
34
- <fieldset id="fieldset" disabled="disabled">
35
- <input type="checkbox" id="checkbox-fieldset-disabled" />
36
- <input type="hidden" />
37
- </fieldset>
38
- </p>
39
- <ol id="second-ol">
40
- </ol>
41
- <map name="dummymap">
42
- <area shape="circle" coords="200,250,25" href="foo.html" id="area-href" />
43
- <area shape="default" id="area-nohref" />
44
- </map>
45
- </div>
46
- <div id="foobar-div" foobar="ab bc
47
- cde"><span id="foobar-span"></span></div>
48
- </body></html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/XPath/Fixtures/lang.xml DELETED
@@ -1,11 +0,0 @@
1
- <test>
2
- <a id="first" xml:lang="en">a</a>
3
- <b id="second" xml:lang="en-US">b</b>
4
- <c id="third" xml:lang="en-Nz">c</c>
5
- <d id="fourth" xml:lang="En-us">d</d>
6
- <e id="fifth" xml:lang="fr">e</e>
7
- <f id="sixth" xml:lang="ru">f</f>
8
- <g id="seventh" xml:lang="de">
9
- <h id="eighth" xml:lang="zh"/>
10
- </g>
11
- </test>
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/XPath/Fixtures/shakespear.html DELETED
@@ -1,308 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" debug="true">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
- </head>
7
- <body>
8
- <div id="test">
9
- <div class="dialog">
10
- <h2>As You Like It</h2>
11
- <div id="playwright">
12
- by William Shakespeare
13
- </div>
14
- <div class="dialog scene thirdClass" id="scene1">
15
- <h3>ACT I, SCENE III. A room in the palace.</h3>
16
- <div class="dialog">
17
- <div class="direction">Enter CELIA and ROSALIND</div>
18
- </div>
19
- <div id="speech1" class="character">CELIA</div>
20
- <div class="dialog">
21
- <div id="scene1.3.1">Why, cousin! why, Rosalind! Cupid have mercy! not a word?</div>
22
- </div>
23
- <div id="speech2" class="character">ROSALIND</div>
24
- <div class="dialog">
25
- <div id="scene1.3.2">Not one to throw at a dog.</div>
26
- </div>
27
- <div id="speech3" class="character">CELIA</div>
28
- <div class="dialog">
29
- <div id="scene1.3.3">No, thy words are too precious to be cast away upon</div>
30
- <div id="scene1.3.4">curs; throw some of them at me; come, lame me with reasons.</div>
31
- </div>
32
- <div id="speech4" class="character">ROSALIND</div>
33
- <div id="speech5" class="character">CELIA</div>
34
- <div class="dialog">
35
- <div id="scene1.3.8">But is all this for your father?</div>
36
- </div>
37
- <div class="dialog">
38
- <div id="scene1.3.5">Then there were two cousins laid up; when the one</div>
39
- <div id="scene1.3.6">should be lamed with reasons and the other mad</div>
40
- <div id="scene1.3.7">without any.</div>
41
- </div>
42
- <div id="speech6" class="character">ROSALIND</div>
43
- <div class="dialog">
44
- <div id="scene1.3.9">No, some of it is for my child's father. O, how</div>
45
- <div id="scene1.3.10">full of briers is this working-day world!</div>
46
- </div>
47
- <div id="speech7" class="character">CELIA</div>
48
- <div class="dialog">
49
- <div id="scene1.3.11">They are but burs, cousin, thrown upon thee in</div>
50
- <div id="scene1.3.12">holiday foolery: if we walk not in the trodden</div>
51
- <div id="scene1.3.13">paths our very petticoats will catch them.</div>
52
- </div>
53
- <div id="speech8" class="character">ROSALIND</div>
54
- <div class="dialog">
55
- <div id="scene1.3.14">I could shake them off my coat: these burs are in my heart.</div>
56
- </div>
57
- <div id="speech9" class="character">CELIA</div>
58
- <div class="dialog">
59
- <div id="scene1.3.15">Hem them away.</div>
60
- </div>
61
- <div id="speech10" class="character">ROSALIND</div>
62
- <div class="dialog">
63
- <div id="scene1.3.16">I would try, if I could cry 'hem' and have him.</div>
64
- </div>
65
- <div id="speech11" class="character">CELIA</div>
66
- <div class="dialog">
67
- <div id="scene1.3.17">Come, come, wrestle with thy affections.</div>
68
- </div>
69
- <div id="speech12" class="character">ROSALIND</div>
70
- <div class="dialog">
71
- <div id="scene1.3.18">O, they take the part of a better wrestler than myself!</div>
72
- </div>
73
- <div id="speech13" class="character">CELIA</div>
74
- <div class="dialog">
75
- <div id="scene1.3.19">O, a good wish upon you! you will try in time, in</div>
76
- <div id="scene1.3.20">despite of a fall. But, turning these jests out of</div>
77
- <div id="scene1.3.21">service, let us talk in good earnest: is it</div>
78
- <div id="scene1.3.22">possible, on such a sudden, you should fall into so</div>
79
- <div id="scene1.3.23">strong a liking with old Sir Rowland's youngest son?</div>
80
- </div>
81
- <div id="speech14" class="character">ROSALIND</div>
82
- <div class="dialog">
83
- <div id="scene1.3.24">The duke my father loved his father dearly.</div>
84
- </div>
85
- <div id="speech15" class="character">CELIA</div>
86
- <div class="dialog">
87
- <div id="scene1.3.25">Doth it therefore ensue that you should love his son</div>
88
- <div id="scene1.3.26">dearly? By this kind of chase, I should hate him,</div>
89
- <div id="scene1.3.27">for my father hated his father dearly; yet I hate</div>
90
- <div id="scene1.3.28">not Orlando.</div>
91
- </div>
92
- <div id="speech16" class="character">ROSALIND</div>
93
- <div title="wtf" class="dialog">
94
- <div id="scene1.3.29">No, faith, hate him not, for my sake.</div>
95
- </div>
96
- <div id="speech17" class="character">CELIA</div>
97
- <div class="dialog">
98
- <div id="scene1.3.30">Why should I not? doth he not deserve well?</div>
99
- </div>
100
- <div id="speech18" class="character">ROSALIND</div>
101
- <div class="dialog">
102
- <div id="scene1.3.31">Let me love him for that, and do you love him</div>
103
- <div id="scene1.3.32">because I do. Look, here comes the duke.</div>
104
- </div>
105
- <div id="speech19" class="character">CELIA</div>
106
- <div class="dialog">
107
- <div id="scene1.3.33">With his eyes full of anger.</div>
108
- <div class="direction">Enter DUKE FREDERICK, with Lords</div>
109
- </div>
110
- <div id="speech20" class="character">DUKE FREDERICK</div>
111
- <div class="dialog">
112
- <div id="scene1.3.34">Mistress, dispatch you with your safest haste</div>
113
- <div id="scene1.3.35">And get you from our court.</div>
114
- </div>
115
- <div id="speech21" class="character">ROSALIND</div>
116
- <div class="dialog">
117
- <div id="scene1.3.36">Me, uncle?</div>
118
- </div>
119
- <div id="speech22" class="character">DUKE FREDERICK</div>
120
- <div class="dialog">
121
- <div id="scene1.3.37">You, cousin</div>
122
- <div id="scene1.3.38">Within these ten days if that thou be'st found</div>
123
- <div id="scene1.3.39">So near our public court as twenty miles,</div>
124
- <div id="scene1.3.40">Thou diest for it.</div>
125
- </div>
126
- <div id="speech23" class="character">ROSALIND</div>
127
- <div class="dialog">
128
- <div id="scene1.3.41"> I do beseech your grace,</div>
129
- <div id="scene1.3.42">Let me the knowledge of my fault bear with me:</div>
130
- <div id="scene1.3.43">If with myself I hold intelligence</div>
131
- <div id="scene1.3.44">Or have acquaintance with mine own desires,</div>
132
- <div id="scene1.3.45">If that I do not dream or be not frantic,--</div>
133
- <div id="scene1.3.46">As I do trust I am not--then, dear uncle,</div>
134
- <div id="scene1.3.47">Never so much as in a thought unborn</div>
135
- <div id="scene1.3.48">Did I offend your highness.</div>
136
- </div>
137
- <div id="speech24" class="character">DUKE FREDERICK</div>
138
- <div class="dialog">
139
- <div id="scene1.3.49">Thus do all traitors:</div>
140
- <div id="scene1.3.50">If their purgation did consist in words,</div>
141
- <div id="scene1.3.51">They are as innocent as grace itself:</div>
142
- <div id="scene1.3.52">Let it suffice thee that I trust thee not.</div>
143
- </div>
144
- <div id="speech25" class="character">ROSALIND</div>
145
- <div class="dialog">
146
- <div id="scene1.3.53">Yet your mistrust cannot make me a traitor:</div>
147
- <div id="scene1.3.54">Tell me whereon the likelihood depends.</div>
148
- </div>
149
- <div id="speech26" class="character">DUKE FREDERICK</div>
150
- <div class="dialog">
151
- <div id="scene1.3.55">Thou art thy father's daughter; there's enough.</div>
152
- </div>
153
- <div id="speech27" class="character">ROSALIND</div>
154
- <div class="dialog">
155
- <div id="scene1.3.56">So was I when your highness took his dukedom;</div>
156
- <div id="scene1.3.57">So was I when your highness banish'd him:</div>
157
- <div id="scene1.3.58">Treason is not inherited, my lord;</div>
158
- <div id="scene1.3.59">Or, if we did derive it from our friends,</div>
159
- <div id="scene1.3.60">What's that to me? my father was no traitor:</div>
160
- <div id="scene1.3.61">Then, good my liege, mistake me not so much</div>
161
- <div id="scene1.3.62">To think my poverty is treacherous.</div>
162
- </div>
163
- <div id="speech28" class="character">CELIA</div>
164
- <div class="dialog">
165
- <div id="scene1.3.63">Dear sovereign, hear me speak.</div>
166
- </div>
167
- <div id="speech29" class="character">DUKE FREDERICK</div>
168
- <div class="dialog">
169
- <div id="scene1.3.64">Ay, Celia; we stay'd her for your sake,</div>
170
- <div id="scene1.3.65">Else had she with her father ranged along.</div>
171
- </div>
172
- <div id="speech30" class="character">CELIA</div>
173
- <div class="dialog">
174
- <div id="scene1.3.66">I did not then entreat to have her stay;</div>
175
- <div id="scene1.3.67">It was your pleasure and your own remorse:</div>
176
- <div id="scene1.3.68">I was too young that time to value her;</div>
177
- <div id="scene1.3.69">But now I know her: if she be a traitor,</div>
178
- <div id="scene1.3.70">Why so am I; we still have slept together,</div>
179
- <div id="scene1.3.71">Rose at an instant, learn'd, play'd, eat together,</div>
180
- <div id="scene1.3.72">And wheresoever we went, like Juno's swans,</div>
181
- <div id="scene1.3.73">Still we went coupled and inseparable.</div>
182
- </div>
183
- <div id="speech31" class="character">DUKE FREDERICK</div>
184
- <div class="dialog">
185
- <div id="scene1.3.74">She is too subtle for thee; and her smoothness,</div>
186
- <div id="scene1.3.75">Her very silence and her patience</div>
187
- <div id="scene1.3.76">Speak to the people, and they pity her.</div>
188
- <div id="scene1.3.77">Thou art a fool: she robs thee of thy name;</div>
189
- <div id="scene1.3.78">And thou wilt show more bright and seem more virtuous</div>
190
- <div id="scene1.3.79">When she is gone. Then open not thy lips:</div>
191
- <div id="scene1.3.80">Firm and irrevocable is my doom</div>
192
- <div id="scene1.3.81">Which I have pass'd upon her; she is banish'd.</div>
193
- </div>
194
- <div id="speech32" class="character">CELIA</div>
195
- <div class="dialog">
196
- <div id="scene1.3.82">Pronounce that sentence then on me, my liege:</div>
197
- <div id="scene1.3.83">I cannot live out of her company.</div>
198
- </div>
199
- <div id="speech33" class="character">DUKE FREDERICK</div>
200
- <div class="dialog">
201
- <div id="scene1.3.84">You are a fool. You, niece, provide yourself:</div>
202
- <div id="scene1.3.85">If you outstay the time, upon mine honour,</div>
203
- <div id="scene1.3.86">And in the greatness of my word, you die.</div>
204
- <div class="direction">Exeunt DUKE FREDERICK and Lords</div>
205
- </div>
206
- <div id="speech34" class="character">CELIA</div>
207
- <div class="dialog">
208
- <div id="scene1.3.87">O my poor Rosalind, whither wilt thou go?</div>
209
- <div id="scene1.3.88">Wilt thou change fathers? I will give thee mine.</div>
210
- <div id="scene1.3.89">I charge thee, be not thou more grieved than I am.</div>
211
- </div>
212
- <div id="speech35" class="character">ROSALIND</div>
213
- <div class="dialog">
214
- <div id="scene1.3.90">I have more cause.</div>
215
- </div>
216
- <div id="speech36" class="character">CELIA</div>
217
- <div class="dialog">
218
- <div id="scene1.3.91"> Thou hast not, cousin;</div>
219
- <div id="scene1.3.92">Prithee be cheerful: know'st thou not, the duke</div>
220
- <div id="scene1.3.93">Hath banish'd me, his daughter?</div>
221
- </div>
222
- <div id="speech37" class="character">ROSALIND</div>
223
- <div class="dialog">
224
- <div id="scene1.3.94">That he hath not.</div>
225
- </div>
226
- <div id="speech38" class="character">CELIA</div>
227
- <div class="dialog">
228
- <div id="scene1.3.95">No, hath not? Rosalind lacks then the love</div>
229
- <div id="scene1.3.96">Which teacheth thee that thou and I am one:</div>
230
- <div id="scene1.3.97">Shall we be sunder'd? shall we part, sweet girl?</div>
231
- <div id="scene1.3.98">No: let my father seek another heir.</div>
232
- <div id="scene1.3.99">Therefore devise with me how we may fly,</div>
233
- <div id="scene1.3.100">Whither to go and what to bear with us;</div>
234
- <div id="scene1.3.101">And do not seek to take your change upon you,</div>
235
- <div id="scene1.3.102">To bear your griefs yourself and leave me out;</div>
236
- <div id="scene1.3.103">For, by this heaven, now at our sorrows pale,</div>
237
- <div id="scene1.3.104">Say what thou canst, I'll go along with thee.</div>
238
- </div>
239
- <div id="speech39" class="character">ROSALIND</div>
240
- <div class="dialog">
241
- <div id="scene1.3.105">Why, whither shall we go?</div>
242
- </div>
243
- <div id="speech40" class="character">CELIA</div>
244
- <div class="dialog">
245
- <div id="scene1.3.106">To seek my uncle in the forest of Arden.</div>
246
- </div>
247
- <div id="speech41" class="character">ROSALIND</div>
248
- <div class="dialog">
249
- <div id="scene1.3.107">Alas, what danger will it be to us,</div>
250
- <div id="scene1.3.108">Maids as we are, to travel forth so far!</div>
251
- <div id="scene1.3.109">Beauty provoketh thieves sooner than gold.</div>
252
- </div>
253
- <div id="speech42" class="character">CELIA</div>
254
- <div class="dialog">
255
- <div id="scene1.3.110">I'll put myself in poor and mean attire</div>
256
- <div id="scene1.3.111">And with a kind of umber smirch my face;</div>
257
- <div id="scene1.3.112">The like do you: so shall we pass along</div>
258
- <div id="scene1.3.113">And never stir assailants.</div>
259
- </div>
260
- <div id="speech43" class="character">ROSALIND</div>
261
- <div class="dialog">
262
- <div id="scene1.3.114">Were it not better,</div>
263
- <div id="scene1.3.115">Because that I am more than common tall,</div>
264
- <div id="scene1.3.116">That I did suit me all points like a man?</div>
265
- <div id="scene1.3.117">A gallant curtle-axe upon my thigh,</div>
266
- <div id="scene1.3.118">A boar-spear in my hand; and--in my heart</div>
267
- <div id="scene1.3.119">Lie there what hidden woman's fear there will--</div>
268
- <div id="scene1.3.120">We'll have a swashing and a martial outside,</div>
269
- <div id="scene1.3.121">As many other mannish cowards have</div>
270
- <div id="scene1.3.122">That do outface it with their semblances.</div>
271
- </div>
272
- <div id="speech44" class="character">CELIA</div>
273
- <div class="dialog">
274
- <div id="scene1.3.123">What shall I call thee when thou art a man?</div>
275
- </div>
276
- <div id="speech45" class="character">ROSALIND</div>
277
- <div class="dialog">
278
- <div id="scene1.3.124">I'll have no worse a name than Jove's own page;</div>
279
- <div id="scene1.3.125">And therefore look you call me Ganymede.</div>
280
- <div id="scene1.3.126">But what will you be call'd?</div>
281
- </div>
282
- <div id="speech46" class="character">CELIA</div>
283
- <div class="dialog">
284
- <div id="scene1.3.127">Something that hath a reference to my state</div>
285
- <div id="scene1.3.128">No longer Celia, but Aliena.</div>
286
- </div>
287
- <div id="speech47" class="character">ROSALIND</div>
288
- <div class="dialog">
289
- <div id="scene1.3.129">But, cousin, what if we assay'd to steal</div>
290
- <div id="scene1.3.130">The clownish fool out of your father's court?</div>
291
- <div id="scene1.3.131">Would he not be a comfort to our travel?</div>
292
- </div>
293
- <div id="speech48" class="character">CELIA</div>
294
- <div class="dialog">
295
- <div id="scene1.3.132">He'll go along o'er the wide world with me;</div>
296
- <div id="scene1.3.133">Leave me alone to woo him. Let's away,</div>
297
- <div id="scene1.3.134">And get our jewels and our wealth together,</div>
298
- <div id="scene1.3.135">Devise the fittest time and safest way</div>
299
- <div id="scene1.3.136">To hide us from pursuit that will be made</div>
300
- <div id="scene1.3.137">After my flight. Now go we in content</div>
301
- <div id="scene1.3.138">To liberty and not to banishment.</div>
302
- <div class="direction">Exeunt</div>
303
- </div>
304
- </div>
305
- </div>
306
- </div>
307
- </body>
308
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php DELETED
@@ -1,413 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of the Symfony package.
5
- *
6
- * (c) Fabien Potencier <fabien@symfony.com>
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
- namespace Symfony\Component\CssSelector\Tests\XPath;
13
-
14
- use PHPUnit\Framework\TestCase;
15
- use Symfony\Component\CssSelector\Node\ElementNode;
16
- use Symfony\Component\CssSelector\Node\FunctionNode;
17
- use Symfony\Component\CssSelector\Parser\Parser;
18
- use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension;
19
- use Symfony\Component\CssSelector\XPath\Translator;
20
- use Symfony\Component\CssSelector\XPath\XPathExpr;
21
-
22
- class TranslatorTest extends TestCase
23
- {
24
- /** @dataProvider getXpathLiteralTestData */
25
- public function testXpathLiteral($value, $literal)
26
- {
27
- $this->assertEquals($literal, Translator::getXpathLiteral($value));
28
- }
29
-
30
- /** @dataProvider getCssToXPathTestData */
31
- public function testCssToXPath($css, $xpath)
32
- {
33
- $translator = new Translator();
34
- $translator->registerExtension(new HtmlExtension($translator));
35
- $this->assertEquals($xpath, $translator->cssToXPath($css, ''));
36
- }
37
-
38
- public function testCssToXPathPseudoElement()
39
- {
40
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
41
- $translator = new Translator();
42
- $translator->registerExtension(new HtmlExtension($translator));
43
- $translator->cssToXPath('e::first-line');
44
- }
45
-
46
- public function testGetExtensionNotExistsExtension()
47
- {
48
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
49
- $translator = new Translator();
50
- $translator->registerExtension(new HtmlExtension($translator));
51
- $translator->getExtension('fake');
52
- }
53
-
54
- public function testAddCombinationNotExistsExtension()
55
- {
56
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
57
- $translator = new Translator();
58
- $translator->registerExtension(new HtmlExtension($translator));
59
- $parser = new Parser();
60
- $xpath = $parser->parse('*')[0];
61
- $combinedXpath = $parser->parse('*')[0];
62
- $translator->addCombination('fake', $xpath, $combinedXpath);
63
- }
64
-
65
- public function testAddFunctionNotExistsFunction()
66
- {
67
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
68
- $translator = new Translator();
69
- $translator->registerExtension(new HtmlExtension($translator));
70
- $xpath = new XPathExpr();
71
- $function = new FunctionNode(new ElementNode(), 'fake');
72
- $translator->addFunction($xpath, $function);
73
- }
74
-
75
- public function testAddPseudoClassNotExistsClass()
76
- {
77
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
78
- $translator = new Translator();
79
- $translator->registerExtension(new HtmlExtension($translator));
80
- $xpath = new XPathExpr();
81
- $translator->addPseudoClass($xpath, 'fake');
82
- }
83
-
84
- public function testAddAttributeMatchingClassNotExistsClass()
85
- {
86
- $this->expectException('Symfony\Component\CssSelector\Exception\ExpressionErrorException');
87
- $translator = new Translator();
88
- $translator->registerExtension(new HtmlExtension($translator));
89
- $xpath = new XPathExpr();
90
- $translator->addAttributeMatching($xpath, '', '', '');
91
- }
92
-
93
- /** @dataProvider getXmlLangTestData */
94
- public function testXmlLang($css, array $elementsId)
95
- {
96
- $translator = new Translator();
97
- $document = new \SimpleXMLElement(file_get_contents(__DIR__.'/Fixtures/lang.xml'));
98
- $elements = $document->xpath($translator->cssToXPath($css));
99
- $this->assertCount(\count($elementsId), $elements);
100
- foreach ($elements as $element) {
101
- $this->assertContains((string) $element->attributes()->id, $elementsId);
102
- }
103
- }
104
-
105
- /** @dataProvider getHtmlIdsTestData */
106
- public function testHtmlIds($css, array $elementsId)
107
- {
108
- $translator = new Translator();
109
- $translator->registerExtension(new HtmlExtension($translator));
110
- $document = new \DOMDocument();
111
- $document->strictErrorChecking = false;
112
- $internalErrors = libxml_use_internal_errors(true);
113
- $document->loadHTMLFile(__DIR__.'/Fixtures/ids.html');
114
- $document = simplexml_import_dom($document);
115
- $elements = $document->xpath($translator->cssToXPath($css));
116
- $this->assertCount(\count($elementsId), $elementsId);
117
- foreach ($elements as $element) {
118
- if (null !== $element->attributes()->id) {
119
- $this->assertContains((string) $element->attributes()->id, $elementsId);
120
- }
121
- }
122
- libxml_clear_errors();
123
- libxml_use_internal_errors($internalErrors);
124
- }
125
-
126
- /** @dataProvider getHtmlShakespearTestData */
127
- public function testHtmlShakespear($css, $count)
128
- {
129
- $translator = new Translator();
130
- $translator->registerExtension(new HtmlExtension($translator));
131
- $document = new \DOMDocument();
132
- $document->strictErrorChecking = false;
133
- $document->loadHTMLFile(__DIR__.'/Fixtures/shakespear.html');
134
- $document = simplexml_import_dom($document);
135
- $bodies = $document->xpath('//body');
136
- $elements = $bodies[0]->xpath($translator->cssToXPath($css));
137
- $this->assertCount($count, $elements);
138
- }
139
-
140
- public function testOnlyOfTypeFindsSingleChildrenOfGivenType()
141
- {
142
- $translator = new Translator();
143
- $translator->registerExtension(new HtmlExtension($translator));
144
- $document = new \DOMDocument();
145
- $document->loadHTML(<<<'HTML'
146
- <html>
147
- <body>
148
- <p>
149
- <span>A</span>
150
- </p>
151
- <p>
152
- <span>B</span>
153
- <span>C</span>
154
- </p>
155
- </body>
156
- </html>
157
- HTML
158
- );
159
-
160
- $xpath = new \DOMXPath($document);
161
- $nodeList = $xpath->query($translator->cssToXPath('span:only-of-type'));
162
-
163
- $this->assertSame(1, $nodeList->length);
164
- $this->assertSame('A', $nodeList->item(0)->textContent);
165
- }
166
-
167
- public function getXpathLiteralTestData()
168
- {
169
- return [
170
- ['foo', "'foo'"],
171
- ["foo's bar", '"foo\'s bar"'],
172
- ["foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'],
173
- ["foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'],
174
- ];
175
- }
176
-
177
- public function getCssToXPathTestData()
178
- {
179
- return [
180
- ['*', '*'],
181
- ['e', 'e'],
182
- ['*|e', 'e'],
183
- ['e|f', 'e:f'],
184
- ['e[foo]', 'e[@foo]'],
185
- ['e[foo|bar]', 'e[@foo:bar]'],
186
- ['e[foo="bar"]', "e[@foo = 'bar']"],
187
- ['e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"],
188
- ['e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"],
189
- ['e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"],
190
- ['e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"],
191
- ['e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"],
192
- ['e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"],
193
- ['e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"],
194
- ['e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"],
195
- ['e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"],
196
- ['e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"],
197
- ['e:nth-of-type(1)', '*/e[position() = 1]'],
198
- ['e:nth-last-of-type(1)', '*/e[position() = last() - 0]'],
199
- ['div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"],
200
- ['e:first-child', "*/*[(name() = 'e') and (position() = 1)]"],
201
- ['e:last-child', "*/*[(name() = 'e') and (position() = last())]"],
202
- ['e:first-of-type', '*/e[position() = 1]'],
203
- ['e:last-of-type', '*/e[position() = last()]'],
204
- ['e:only-child', "*/*[(name() = 'e') and (last() = 1)]"],
205
- ['e:only-of-type', 'e[count(preceding-sibling::e)=0 and count(following-sibling::e)=0]'],
206
- ['e:empty', 'e[not(*) and not(string-length())]'],
207
- ['e:EmPTY', 'e[not(*) and not(string-length())]'],
208
- ['e:root', 'e[not(parent::*)]'],
209
- ['e:hover', 'e[0]'],
210
- ['e:contains("foo")', "e[contains(string(.), 'foo')]"],
211
- ['e:ConTains(foo)', "e[contains(string(.), 'foo')]"],
212
- ['e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"],
213
- ['e#myid', "e[@id = 'myid']"],
214
- ['e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'],
215
- ['e:nOT(*)', 'e[0]'],
216
- ['e f', 'e/descendant-or-self::*/f'],
217
- ['e > f', 'e/f'],
218
- ['e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"],
219
- ['e ~ f', 'e/following-sibling::f'],
220
- ['div#container p', "div[@id = 'container']/descendant-or-self::*/p"],
221
- ];
222
- }
223
-
224
- public function getXmlLangTestData()
225
- {
226
- return [
227
- [':lang("EN")', ['first', 'second', 'third', 'fourth']],
228
- [':lang("en-us")', ['second', 'fourth']],
229
- [':lang(en-nz)', ['third']],
230
- [':lang(fr)', ['fifth']],
231
- [':lang(ru)', ['sixth']],
232
- [":lang('ZH')", ['eighth']],
233
- [':lang(de) :lang(zh)', ['eighth']],
234
- [':lang(en), :lang(zh)', ['first', 'second', 'third', 'fourth', 'eighth']],
235
- [':lang(es)', []],
236
- ];
237
- }
238
-
239
- public function getHtmlIdsTestData()
240
- {
241
- return [
242
- ['div', ['outer-div', 'li-div', 'foobar-div']],
243
- ['DIV', ['outer-div', 'li-div', 'foobar-div']], // case-insensitive in HTML
244
- ['div div', ['li-div']],
245
- ['div, div div', ['outer-div', 'li-div', 'foobar-div']],
246
- ['a[name]', ['name-anchor']],
247
- ['a[NAme]', ['name-anchor']], // case-insensitive in HTML:
248
- ['a[rel]', ['tag-anchor', 'nofollow-anchor']],
249
- ['a[rel="tag"]', ['tag-anchor']],
250
- ['a[href*="localhost"]', ['tag-anchor']],
251
- ['a[href*=""]', []],
252
- ['a[href^="http"]', ['tag-anchor', 'nofollow-anchor']],
253
- ['a[href^="http:"]', ['tag-anchor']],
254
- ['a[href^=""]', []],
255
- ['a[href$="org"]', ['nofollow-anchor']],
256
- ['a[href$=""]', []],
257
- ['div[foobar~="bc"]', ['foobar-div']],
258
- ['div[foobar~="cde"]', ['foobar-div']],
259
- ['[foobar~="ab bc"]', ['foobar-div']],
260
- ['[foobar~=""]', []],
261
- ['[foobar~=" \t"]', []],
262
- ['div[foobar~="cd"]', []],
263
- ['*[lang|="En"]', ['second-li']],
264
- ['[lang|="En-us"]', ['second-li']],
265
- // Attribute values are case sensitive
266
- ['*[lang|="en"]', []],
267
- ['[lang|="en-US"]', []],
268
- ['*[lang|="e"]', []],
269
- // ... :lang() is not.
270
- [':lang("EN")', ['second-li', 'li-div']],
271
- ['*:lang(en-US)', ['second-li', 'li-div']],
272
- [':lang("e")', []],
273
- ['li:nth-child(3)', ['third-li']],
274
- ['li:nth-child(10)', []],
275
- ['li:nth-child(2n)', ['second-li', 'fourth-li', 'sixth-li']],
276
- ['li:nth-child(even)', ['second-li', 'fourth-li', 'sixth-li']],
277
- ['li:nth-child(2n+0)', ['second-li', 'fourth-li', 'sixth-li']],
278
- ['li:nth-child(+2n+1)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']],
279
- ['li:nth-child(odd)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']],
280
- ['li:nth-child(2n+4)', ['fourth-li', 'sixth-li']],
281
- ['li:nth-child(3n+1)', ['first-li', 'fourth-li', 'seventh-li']],
282
- ['li:nth-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
283
- ['li:nth-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
284
- ['li:nth-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
285
- ['li:nth-child(n+3)', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
286
- ['li:nth-child(-n)', []],
287
- ['li:nth-child(-n-1)', []],
288
- ['li:nth-child(-n+1)', ['first-li']],
289
- ['li:nth-child(-n+3)', ['first-li', 'second-li', 'third-li']],
290
- ['li:nth-last-child(0)', []],
291
- ['li:nth-last-child(2n)', ['second-li', 'fourth-li', 'sixth-li']],
292
- ['li:nth-last-child(even)', ['second-li', 'fourth-li', 'sixth-li']],
293
- ['li:nth-last-child(2n+2)', ['second-li', 'fourth-li', 'sixth-li']],
294
- ['li:nth-last-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
295
- ['li:nth-last-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
296
- ['li:nth-last-child(n-3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
297
- ['li:nth-last-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']],
298
- ['li:nth-last-child(n+3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li']],
299
- ['li:nth-last-child(-n)', []],
300
- ['li:nth-last-child(-n-1)', []],
301
- ['li:nth-last-child(-n+1)', ['seventh-li']],
302
- ['li:nth-last-child(-n+3)', ['fifth-li', 'sixth-li', 'seventh-li']],
303
- ['ol:first-of-type', ['first-ol']],
304
- ['ol:nth-child(1)', ['first-ol']],
305
- ['ol:nth-of-type(2)', ['second-ol']],
306
- ['ol:nth-last-of-type(1)', ['second-ol']],
307
- ['span:only-child', ['foobar-span']],
308
- ['li div:only-child', ['li-div']],
309
- ['div *:only-child', ['li-div', 'foobar-span']],
310
- ['p:only-of-type', ['paragraph']],
311
- ['a:empty', ['name-anchor']],
312
- ['a:EMpty', ['name-anchor']],
313
- ['li:empty', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li']],
314
- [':root', ['html']],
315
- ['html:root', ['html']],
316
- ['li:root', []],
317
- ['* :root', []],
318
- ['*:contains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
319
- [':CONtains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
320
- ['*:contains("LInk")', []], // case sensitive
321
- ['*:contains("e")', ['html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em']],
322
- ['*:contains("E")', []], // case-sensitive
323
- ['.a', ['first-ol']],
324
- ['.b', ['first-ol']],
325
- ['*.a', ['first-ol']],
326
- ['ol.a', ['first-ol']],
327
- ['.c', ['first-ol', 'third-li', 'fourth-li']],
328
- ['*.c', ['first-ol', 'third-li', 'fourth-li']],
329
- ['ol *.c', ['third-li', 'fourth-li']],
330
- ['ol li.c', ['third-li', 'fourth-li']],
331
- ['li ~ li.c', ['third-li', 'fourth-li']],
332
- ['ol > li.c', ['third-li', 'fourth-li']],
333
- ['#first-li', ['first-li']],
334
- ['li#first-li', ['first-li']],
335
- ['*#first-li', ['first-li']],
336
- ['li div', ['li-div']],
337
- ['li > div', ['li-div']],
338
- ['div div', ['li-div']],
339
- ['div > div', []],
340
- ['div>.c', ['first-ol']],
341
- ['div > .c', ['first-ol']],
342
- ['div + div', ['foobar-div']],
343
- ['a ~ a', ['tag-anchor', 'nofollow-anchor']],
344
- ['a[rel="tag"] ~ a', ['nofollow-anchor']],
345
- ['ol#first-ol li:last-child', ['seventh-li']],
346
- ['ol#first-ol *:last-child', ['li-div', 'seventh-li']],
347
- ['#outer-div:first-child', ['outer-div']],
348
- ['#outer-div :first-child', ['name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href']],
349
- ['a[href]', ['tag-anchor', 'nofollow-anchor']],
350
- [':not(*)', []],
351
- ['a:not([href])', ['name-anchor']],
352
- ['ol :Not(li[class])', ['first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li']],
353
- // HTML-specific
354
- [':link', ['link-href', 'tag-anchor', 'nofollow-anchor', 'area-href']],
355
- [':visited', []],
356
- [':enabled', ['link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href']],
357
- [':disabled', ['checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled']],
358
- [':checked', ['checkbox-checked', 'checkbox-disabled-checked']],
359
- ];
360
- }
361
-
362
- public function getHtmlShakespearTestData()
363
- {
364
- return [
365
- ['*', 246],
366
- ['div:contains(CELIA)', 26],
367
- ['div:only-child', 22], // ?
368
- ['div:nth-child(even)', 106],
369
- ['div:nth-child(2n)', 106],
370
- ['div:nth-child(odd)', 137],
371
- ['div:nth-child(2n+1)', 137],
372
- ['div:nth-child(n)', 243],
373
- ['div:last-child', 53],
374
- ['div:first-child', 51],
375
- ['div > div', 242],
376
- ['div + div', 190],
377
- ['div ~ div', 190],
378
- ['body', 1],
379
- ['body div', 243],
380
- ['div', 243],
381
- ['div div', 242],
382
- ['div div div', 241],
383
- ['div, div, div', 243],
384
- ['div, a, span', 243],
385
- ['.dialog', 51],
386
- ['div.dialog', 51],
387
- ['div .dialog', 51],
388
- ['div.character, div.dialog', 99],
389
- ['div.direction.dialog', 0],
390
- ['div.dialog.direction', 0],
391
- ['div.dialog.scene', 1],
392
- ['div.scene.scene', 1],
393
- ['div.scene .scene', 0],
394
- ['div.direction .dialog ', 0],
395
- ['div .dialog .direction', 4],
396
- ['div.dialog .dialog .direction', 4],
397
- ['#speech5', 1],
398
- ['div#speech5', 1],
399
- ['div #speech5', 1],
400
- ['div.scene div.dialog', 49],
401
- ['div#scene1 div.dialog div', 142],
402
- ['#scene1 #speech1', 1],
403
- ['div[class]', 103],
404
- ['div[class=dialog]', 50],
405
- ['div[class^=dia]', 51],
406
- ['div[class$=log]', 50],
407
- ['div[class*=sce]', 1],
408
- ['div[class|=dialog]', 50], // ? Seems right
409
- ['div[class!=madeup]', 243], // ? Seems right
410
- ['div[class~=dialog]', 51], // ? Seems right
411
- ];
412
- }
413
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/composer.json DELETED
@@ -1,32 +0,0 @@
1
- {
2
- "name": "symfony/css-selector",
3
- "type": "library",
4
- "description": "Symfony CssSelector Component",
5
- "keywords": [],
6
- "homepage": "https://symfony.com",
7
- "license": "MIT",
8
- "authors": [
9
- {
10
- "name": "Fabien Potencier",
11
- "email": "fabien@symfony.com"
12
- },
13
- {
14
- "name": "Jean-François Simon",
15
- "email": "jeanfrancois.simon@sensiolabs.com"
16
- },
17
- {
18
- "name": "Symfony Community",
19
- "homepage": "https://symfony.com/contributors"
20
- }
21
- ],
22
- "require": {
23
- "php": "^5.5.9|>=7.0.8"
24
- },
25
- "autoload": {
26
- "psr-4": { "Symfony\\Component\\CssSelector\\": "" },
27
- "exclude-from-classmap": [
28
- "/Tests/"
29
- ]
30
- },
31
- "minimum-stability": "dev"
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/symfony/css-selector/phpunit.xml.dist DELETED
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
-
3
- <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
- xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
5
- backupGlobals="false"
6
- colors="true"
7
- bootstrap="vendor/autoload.php"
8
- failOnRisky="true"
9
- failOnWarning="true"
10
- >
11
- <php>
12
- <ini name="error_reporting" value="-1" />
13
- </php>
14
-
15
- <testsuites>
16
- <testsuite name="Symfony CssSelector Component Test Suite">
17
- <directory>./Tests/</directory>
18
- </testsuite>
19
- </testsuites>
20
-
21
- <filter>
22
- <whitelist>
23
- <directory>./</directory>
24
- <exclude>
25
- <directory>./Resources</directory>
26
- <directory>./Tests</directory>
27
- <directory>./vendor</directory>
28
- </exclude>
29
- </whitelist>
30
- </filter>
31
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-user-avatar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ProfilePress
4
  * Plugin URI: https://profilepress.net
5
  * Description: The modern WordPress membership and user profile plugin.
6
- * Version: 3.2.8
7
  * Author: ProfilePress Team
8
  * Author URI: https://profilepress.net
9
  * Text Domain: wp-user-avatar
@@ -14,7 +14,7 @@
14
  defined('ABSPATH') or die("No script kiddies please!");
15
 
16
  define('PROFILEPRESS_SYSTEM_FILE_PATH', __FILE__);
17
- define('PPRESS_VERSION_NUMBER', '3.2.8');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20
 
3
  * Plugin Name: ProfilePress
4
  * Plugin URI: https://profilepress.net
5
  * Description: The modern WordPress membership and user profile plugin.
6
+ * Version: 3.2.9
7
  * Author: ProfilePress Team
8
  * Author URI: https://profilepress.net
9
  * Text Domain: wp-user-avatar
14
  defined('ABSPATH') or die("No script kiddies please!");
15
 
16
  define('PROFILEPRESS_SYSTEM_FILE_PATH', __FILE__);
17
+ define('PPRESS_VERSION_NUMBER', '3.2.9');
18
 
19
  require __DIR__ . '/vendor/autoload.php';
20