Changeset 1986677
- Timestamp:
- 12/06/2018 10:35:27 AM (7 years ago)
- Location:
- next-active-directory-integration/trunk
- Files:
-
- 8 added
- 82 edited
-
classes/Adi/Authentication/LoginService.php (modified) (10 diffs)
-
classes/Adi/Authentication/PasswordValidationService.php (modified) (1 diff)
-
classes/Adi/Configuration/ImportService.php (modified) (1 diff)
-
classes/Adi/Configuration/Ui/Layout.php (modified) (1 diff)
-
classes/Ldap/Connection.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/composer/installed.json (modified) (5 diffs)
-
vendor/monolog/monolog/CHANGELOG.md (modified) (1 diff)
-
vendor/monolog/monolog/README.md (modified) (1 diff)
-
vendor/monolog/monolog/doc/02-handlers-formatters-processors.md (modified) (1 diff)
-
vendor/monolog/monolog/doc/03-utilities.md (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/ErrorHandler.php (modified) (5 diffs)
-
vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php (modified) (6 diffs)
-
vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php (modified) (6 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php (modified) (8 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php (added)
-
vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php (modified) (6 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php (modified) (8 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Logger.php (modified) (29 diffs)
-
vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php (modified) (2 diffs)
-
vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php (added)
-
vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php (modified) (3 diffs)
-
vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php (modified) (4 diffs)
-
vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php (modified) (1 diff)
-
vendor/monolog/monolog/src/Monolog/ResettableInterface.php (added)
-
vendor/monolog/monolog/src/Monolog/SignalHandler.php (added)
-
vendor/monolog/monolog/src/Monolog/Utils.php (added)
-
vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php (modified) (2 diffs)
-
vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php (modified) (5 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php (modified) (2 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php (modified) (2 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php (modified) (2 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/InsightOpsHandlerTest.php (added)
-
vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php (modified) (3 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php (modified) (3 diffs)
-
vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/LoggerTest.php (modified) (1 diff)
-
vendor/monolog/monolog/tests/Monolog/SignalHandlerTest.php (added)
-
vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php (modified) (2 diffs)
-
vendor/psr/log/Psr/Log/Test/TestLogger.php (added)
-
vendor/psr/log/README.md (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
next-active-directory-integration/trunk/classes/Adi/Authentication/LoginService.php
r1948580 r1986677 47 47 private $roleManager; 48 48 49 private $currentUser Authenticated;49 private $currentUserHasAccessGranted; 50 50 51 51 /** … … 80 80 $this->logger = NextADInt_Core_Logger::getLogger(); 81 81 82 $this->currentUser Authenticated = false;82 $this->currentUserHasAccessGranted = false; 83 83 } 84 84 … … 89 89 { 90 90 add_filter('authenticate', array($this, 'authenticate'), 10, 3); 91 add_filter(NEXT_AD_INT_PREFIX . 'auth_before_create_or_update_user', array($this, 'beforeCreateOrUpdateUser'), 10 , 2); 92 add_filter(NEXT_AD_INT_PREFIX . 'auth_after_create_or_update_user', array($this, 'afterCreateOrUpdateUser'), 10, 3); 91 93 92 94 // disable 'lost password' feature … … 547 549 // ADI-256: user does only have a valid id if he is already inside the directory or has been created with "Auto Create User" == on 548 550 if (is_object($wpUser) && !is_wp_error($wpUser) && ($wpUser->ID > 0)) { 549 551 // state: user is authenticated, we won't explicitly set any flag 550 552 $userGuid = get_user_meta($wpUser->ID, 'next_ad_int_objectguid', true); 551 553 … … 554 556 return false; 555 557 } 558 // state: user is authorized 556 559 557 560 if ($this->userManager->isDisabled($wpUser->ID)) { … … 560 563 return false; 561 564 } 565 566 // state: user is authenticated, authorized and enabled -> grant access to WordPress 567 $this->currentUserHasAccessGranted = true; 562 568 } 563 569 … … 590 596 $credentials->setSAMAccountName($ldapAttributes->getFilteredValue('samaccountname')); 591 597 598 /** 599 * This filter can be used in order to implement custom checks validating the ldapAttributes and credentials of 600 * the user currently trying to authenticate against your Active Directory. 601 * 602 * By default this filter returns true | boolean 603 * 604 */ 605 $preCreateStatus = apply_filters(NEXT_AD_INT_PREFIX . 'auth_before_create_or_update_user', $credentials, $ldapAttributes); 606 607 if (!$preCreateStatus) { 608 $this->logger->debug('PreCreateStatus is false. The user will not be created nor updated. If this behavior is not intended, please if your custom logic for the "auth_before_create_or_update_user" filter works properly.'); 609 return false; 610 } 611 592 612 $adiUser = $this->userManager->createAdiUser($credentials, $ldapAttributes); 593 613 … … 608 628 } 609 629 610 if (is_object($wpUser)) { 611 $this->currentUserAuthenticated = true; 612 } 613 614 return $wpUser; 630 /** 631 * This filter can be used in order to implement custom checks validating the credentials, ldapAttributes and $wpUser of 632 * the user currently trying to authenticate against your Active Directory. You can intercept the authentication process 633 * by returning false. 634 * 635 * By default the $wpUser | WP_USER is returned. 636 */ 637 return apply_filters(NEXT_AD_INT_PREFIX . 'auth_after_create_or_update_user', $credentials, $ldapAttributes, $wpUser); 615 638 } 616 639 … … 720 743 * @return bool 721 744 */ 722 public function isCurrentUserAuthenticated()723 { 724 return $this->currentUser Authenticated;745 public function hasCurrentUserAccessGranted() 746 { 747 return $this->currentUserHasAccessGranted; 725 748 } 726 749 … … 796 819 return $this->roleManager; 797 820 } 821 822 /** 823 * @param NextADInt_Adi_Authentication_Credentials $credentials 824 * @param array $ldapAttributes 825 * @return boolean 826 */ 827 public function beforeCreateOrUpdateUser($credentials, $ldapAttributes) { 828 return true; 829 } 830 831 /** 832 * @param NextADInt_Adi_Authentication_Credentials $credentials 833 * @param NextADInt_Adi_User $adiUser 834 * @param WP_User $wpUser 835 * @return boolean|WP_User 836 */ 837 public function afterCreateOrUpdateUser($credentials, $adiUser, $wpUser) { 838 return $wpUser; 839 } 798 840 } -
next-active-directory-integration/trunk/classes/Adi/Authentication/PasswordValidationService.php
r1756617 r1986677 72 72 73 73 // return true for users authenticated by ADI (should never happen, but who knows?) 74 if ($this->loginService-> isCurrentUserAuthenticated()) {75 $this->logger->debug('User successfully authenticated by the "Active Directory Integration" plugin: override local (WordPress) password check.');74 if ($this->loginService->hasCurrentUserAccessGranted()) { 75 $this->logger->debug('User is enabled and has been successfully authenticated and authorized by the "Active Directory Integration" plugin: override local (WordPress) password check.'); 76 76 77 77 return true; -
next-active-directory-integration/trunk/classes/Adi/Configuration/ImportService.php
r1595001 r1986677 293 293 $configurationString = ''; 294 294 295 while (list($attribute, $setting) = each($data)) {295 foreach ($data as $attribute => $setting) { 296 296 $subsettings = array($attribute, 297 297 $setting['type'], -
next-active-directory-integration/trunk/classes/Adi/Configuration/Ui/Layout.php
r1944146 r1986677 72 72 ), 73 73 ), 74 __('Menu', 'next-active-directory-integration') => array( 75 self::DESCRIPTION => __(76 'It is also possible to only disable certain NADI features.', 77 'next-active-directory-integration' 78 ), 79 self::OPTIONS => array( 80 NextADInt_Adi_Configuration_Options::SHOW_MENU_TEST_AUTHENTICATION, 81 NextADInt_Adi_Configuration_Options::SHOW_MENU_SYNC_TO_AD,82 NextADInt_Adi_Configuration_Options::SHOW_MENU_SYNC_TO_WORDPRESS 83 ) 84 ), 85 ),74 ), 75 __('Menu', 'next-active-directory-integration') => array( 76 self::DESCRIPTION => __( 77 'It is also possible to only disable certain NADI features.', 78 'next-active-directory-integration' 79 ), 80 self::OPTIONS => array( 81 NextADInt_Adi_Configuration_Options::SHOW_MENU_TEST_AUTHENTICATION, 82 NextADInt_Adi_Configuration_Options::SHOW_MENU_SYNC_TO_AD, 83 NextADInt_Adi_Configuration_Options::SHOW_MENU_SYNC_TO_WORDPRESS 84 ) 85 ), 86 86 ), 87 87 // Tab name -
next-active-directory-integration/trunk/classes/Ldap/Connection.php
r1944146 r1986677 417 417 * 418 418 * @issue ADI-420 419 * @issue ADI-628 refactored methode since each() is flagged deprecated with PHP 7.2.5 419 420 * @param array $userInfo in adLDAP format 420 421 * @return string 421 422 */ 422 423 public function __debug($userInfo = array()) { 423 $r = '';424 $result = ""; 424 425 $maxOutputChars = 32; 425 426 426 while (list($idxOrAttribute, $value) = each($userInfo)) {427 if (!is_numeric($ idxOrAttribute)) {427 foreach ($userInfo as $key => $attribute) { 428 if (!is_numeric($key)) { 428 429 continue; 429 430 } 430 431 431 // only match the "[0] => cn" parts 432 $r .= "$value={"; 433 $data = $userInfo[$value]; 434 435 // $data = [count => 1, 0 => 'my cn'] 436 while (list($idxOfAttribute, $valueOfAttribute) = each($data)) { 437 if (!is_numeric($idxOfAttribute)) { 432 $result .= "$attribute={"; 433 $data = $userInfo[$attribute]; 434 435 foreach ($data as $index => $element) { 436 if (!is_numeric($index)) { 438 437 continue; 439 438 } 440 439 441 440 // remove any linebreaks or carriagereturns from the attributes 442 $valueOfAttribute = preg_replace("/\r\n|\r|\n/",'',$valueOfAttribute); 443 $r .= NextADInt_Core_Util_StringUtil::firstChars($valueOfAttribute, 500); 444 } 445 446 $r .= "}, "; 447 } 448 449 if (strlen($r) > 0) { 441 $element = preg_replace("/\r\n|\r|\n/",'',$element); 442 443 if ($attribute === "objectguid") { 444 try { 445 $element = NextADInt_Core_Util_StringUtil::binaryToGuid($element); 446 } catch (Exception $exception) { 447 $this->logger->error("An exception occurred trying to convert binary to GUID. Exception: " . $exception->getMessage()); 448 } 449 450 } 451 452 $result .= NextADInt_Core_Util_StringUtil::firstChars($element, 500); 453 454 } 455 456 $result .= "}, "; 457 458 } 459 460 if (strlen($result) > 0) { 450 461 // remove last ", " part if given 451 $r = substr($r, 0, -2);452 } 453 454 return $r ;462 $result = substr($result, 0, -2); 463 } 464 465 return $result; 455 466 } 456 467 -
next-active-directory-integration/trunk/index.php
r1948580 r1986677 4 4 Plugin URI: https://www.active-directory-wp.com 5 5 Description: This is the successor of the Active Directory Integration plug-in which allows you to authenticate, authorize, create and update users through Active Directory. 6 Version: 2.1. 46 Version: 2.1.5 7 7 Author: NeosIT GmbH 8 8 Author URI: http://www.neos-it.de/ -
next-active-directory-integration/trunk/readme.txt
r1948580 r1986677 4 4 Requires at least: 4.0 5 5 Tested up to: 4.9.8 6 Stable tag: 2.1. 46 Stable tag: 2.1.5 7 7 License: GPLv3 8 8 … … 127 127 For detailed information you can visit the official [GitHub repository of Active Directory Integration 2](https://github.com/NeosIT/active-directory-integration2) 128 128 129 = 2.1.5 = 130 * FIXED: replaced all references to the deprecated each-function with foreach (ADI-628) 131 * FIXED: authorization groups will now properly prevent users from logging in (ADI-664, https://wordpress.org/support/topic/authorization-groups-not-working/ Thanks to shmew22, GitHub #92 Thanks to pokertour) 132 * FIXED: the menu-visibility options were missing inside the profile-tab (ADI-663, https://wordpress.org/support/topic/menu-items-missing-3/ Thanks to 5tu) 133 * ADDED: 2 new filters to allow for custom validation during the authentication process (ADI-657, GitHub #89 Thanks to Destabilizator) 134 129 135 = 2.1.4 = 130 136 * FIXED: isUserAuthorized() prevented login for users successfully authenticated via SSO at Active Directory due username was passed instead of guid -
next-active-directory-integration/trunk/vendor/composer/installed.json
r1944146 r1986677 129 129 }, 130 130 { 131 "name": "paragonie/random_compat", 132 "version": "v2.0.17", 133 "version_normalized": "2.0.17.0", 134 "source": { 135 "type": "git", 136 "url": "https://github.com/paragonie/random_compat.git", 137 "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" 138 }, 139 "dist": { 140 "type": "zip", 141 "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", 142 "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", 143 "shasum": "" 144 }, 145 "require": { 146 "php": ">=5.2.0" 147 }, 148 "require-dev": { 149 "phpunit/phpunit": "4.*|5.*" 150 }, 151 "suggest": { 152 "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 153 }, 154 "time": "2018-07-04T16:31:37+00:00", 155 "type": "library", 156 "installation-source": "dist", 157 "autoload": { 158 "files": [ 159 "lib/random.php" 160 ] 161 }, 162 "notification-url": "https://packagist.org/downloads/", 163 "license": [ 164 "MIT" 165 ], 166 "authors": [ 167 { 168 "name": "Paragon Initiative Enterprises", 169 "email": "security@paragonie.com", 170 "homepage": "https://paragonie.com" 171 } 172 ], 173 "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 174 "keywords": [ 175 "csprng", 176 "polyfill", 177 "pseudorandom", 178 "random" 179 ] 180 }, 181 { 131 182 "name": "psr/log", 132 "version": "1. 0.2",133 "version_normalized": "1. 0.2.0",183 "version": "1.1.0", 184 "version_normalized": "1.1.0.0", 134 185 "source": { 135 186 "type": "git", 136 187 "url": "https://github.com/php-fig/log.git", 137 "reference": " 4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"138 }, 139 "dist": { 140 "type": "zip", 141 "url": "https://api.github.com/repos/php-fig/log/zipball/ 4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",142 "reference": " 4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",188 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" 189 }, 190 "dist": { 191 "type": "zip", 192 "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", 193 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", 143 194 "shasum": "" 144 195 }, … … 146 197 "php": ">=5.3.0" 147 198 }, 148 "time": "201 6-10-10T12:19:37+00:00",199 "time": "2018-11-20T15:27:04+00:00", 149 200 "type": "library", 150 201 "extra": { … … 179 230 { 180 231 "name": "monolog/monolog", 181 "version": "1.2 3.0",182 "version_normalized": "1.2 3.0.0",232 "version": "1.24.0", 233 "version_normalized": "1.24.0.0", 183 234 "source": { 184 235 "type": "git", 185 236 "url": "https://github.com/Seldaek/monolog.git", 186 "reference": " fd8c787753b3a2ad11bc60c063cff1358a32a3b4"187 }, 188 "dist": { 189 "type": "zip", 190 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/ fd8c787753b3a2ad11bc60c063cff1358a32a3b4",191 "reference": " fd8c787753b3a2ad11bc60c063cff1358a32a3b4",237 "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" 238 }, 239 "dist": { 240 "type": "zip", 241 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", 242 "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", 192 243 "shasum": "" 193 244 }, … … 225 276 "sentry/sentry": "Allow sending log messages to a Sentry server" 226 277 }, 227 "time": "201 7-06-19T01:22:40+00:00",278 "time": "2018-11-05T09:00:11+00:00", 228 279 "type": "library", 229 280 "extra": { … … 256 307 "psr-3" 257 308 ] 258 },259 {260 "name": "paragonie/random_compat",261 "version": "v2.0.17",262 "version_normalized": "2.0.17.0",263 "source": {264 "type": "git",265 "url": "https://github.com/paragonie/random_compat.git",266 "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d"267 },268 "dist": {269 "type": "zip",270 "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d",271 "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d",272 "shasum": ""273 },274 "require": {275 "php": ">=5.2.0"276 },277 "require-dev": {278 "phpunit/phpunit": "4.*|5.*"279 },280 "suggest": {281 "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."282 },283 "time": "2018-07-04T16:31:37+00:00",284 "type": "library",285 "installation-source": "dist",286 "autoload": {287 "files": [288 "lib/random.php"289 ]290 },291 "notification-url": "https://packagist.org/downloads/",292 "license": [293 "MIT"294 ],295 "authors": [296 {297 "name": "Paragon Initiative Enterprises",298 "email": "security@paragonie.com",299 "homepage": "https://paragonie.com"300 }301 ],302 "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",303 "keywords": [304 "csprng",305 "polyfill",306 "pseudorandom",307 "random"308 ]309 309 } 310 310 ] -
next-active-directory-integration/trunk/vendor/monolog/monolog/CHANGELOG.md
r1756617 r1986677 1 ### 1.24.0 (2018-11-05) 2 3 * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors 4 * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) 5 * Added a way to log signals being received using Monolog\SignalHandler 6 * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler 7 * Added InsightOpsHandler to migrate users of the LogEntriesHandler 8 * Added protection to NormalizerHandler against circular and very deep structures, it now stops normalizing at a depth of 9 9 * Added capture of stack traces to ErrorHandler when logging PHP errors 10 * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts 11 * Added forwarding of context info to FluentdFormatter 12 * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example 13 * Added ability to extend/override BrowserConsoleHandler 14 * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility 15 * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility 16 * Dropped official support for HHVM in test builds 17 * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain 18 * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases 19 * Fixed HipChatHandler bug where slack dropped messages randomly 20 * Fixed normalization of objects in Slack handlers 21 * Fixed support for PHP7's Throwable in NewRelicHandler 22 * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory 23 * Fixed table row styling issues in HtmlFormatter 24 * Fixed RavenHandler dropping the message when logging exception 25 * Fixed WhatFailureGroupHandler skipping processors when using handleBatch 26 and implement it where possible 27 * Fixed display of anonymous class names 28 1 29 ### 1.23.0 (2017-06-19) 2 30 -
next-active-directory-integration/trunk/vendor/monolog/monolog/README.md
r1756617 r1986677 3 3 [](https://packagist.org/packages/monolog/monolog) 4 4 [](https://packagist.org/packages/monolog/monolog) 5 [](https://www.versioneye.com/php/monolog:monolog/references)6 5 7 6 -
next-active-directory-integration/trunk/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md
r1756617 r1986677 56 56 - _SyslogUdpHandler_: Logs records to a remote [Syslogd](http://www.rsyslog.com/) server. 57 57 - _LogEntriesHandler_: Logs records to a [LogEntries](http://logentries.com/) account. 58 - _InsightOpsHandler_: Logs records to a [InsightOps](https://www.rapid7.com/products/insightops/) account. 58 59 59 60 ### Logging in development -
next-active-directory-integration/trunk/vendor/monolog/monolog/doc/03-utilities.md
r1756617 r1986677 6 6 - _ErrorHandler_: The `Monolog\ErrorHandler` class allows you to easily register 7 7 a Logger instance as an exception handler, error handler or fatal error handler. 8 - _SignalHandler_: The `Monolog\SignalHandler` class allows you to easily register 9 a Logger instance as a POSIX signal handler. 8 10 - _ErrorLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain log 9 11 level is reached. -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
r1756617 r1986677 15 15 use Psr\Log\LogLevel; 16 16 use Monolog\Handler\AbstractHandler; 17 use Monolog\Registry; 17 18 18 19 /** … … 39 40 private $fatalLevel; 40 41 private $reservedMemory; 42 private $lastFatalTrace; 41 43 private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); 42 44 … … 133 135 $this->logger->log( 134 136 $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel, 135 sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()),137 sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), 136 138 array('exception' => $e) 137 139 ); … … 157 159 $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL; 158 160 $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line)); 161 } else { 162 // http://php.net/manual/en/function.debug-backtrace.php 163 // As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. 164 // Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. 165 $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); 166 array_shift($trace); // Exclude handleError from trace 167 $this->lastFatalTrace = $trace; 159 168 } 160 169 … … 178 187 $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel, 179 188 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], 180 array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'] )189 array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace) 181 190 ); 182 191 -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php
r1756617 r1986677 63 63 $message = array( 64 64 'message' => $record['message'], 65 'context' => $record['context'], 65 66 'extra' => $record['extra'], 66 67 ); -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php
r1756617 r1986677 59 59 } 60 60 61 return "<tr style=\"padding: 4px; spacing: 0;text-align: left;\">\n<th style=\"background: #cccccc\" width=\"100px\">$th:</th>\n<td style=\"padding: 4px;spacing: 0;text-align: left;background: #eeeeee\">".$td."</td>\n</tr>";61 return "<tr style=\"padding: 4px;text-align: left;\">\n<th style=\"vertical-align: top;background: #ccc;color: #000\" width=\"100\">$th:</th>\n<td style=\"padding: 4px;text-align: left;vertical-align: top;background: #eee;color: #000\">".$td."</td>\n</tr>"; 62 62 } 63 63 -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
r1756617 r1986677 13 13 14 14 use Exception; 15 use Monolog\Utils; 15 16 use Throwable; 16 17 … … 139 140 * @return mixed 140 141 */ 141 protected function normalize($data) 142 { 142 protected function normalize($data, $depth = 0) 143 { 144 if ($depth > 9) { 145 return 'Over 9 levels deep, aborting normalization'; 146 } 147 143 148 if (is_array($data) || $data instanceof \Traversable) { 144 149 $normalized = array(); … … 146 151 $count = 1; 147 152 foreach ($data as $key => $value) { 148 if ($count++ > =1000) {149 $normalized['...'] = 'Over 1000 items , aborting normalization';153 if ($count++ > 1000) { 154 $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; 150 155 break; 151 156 } 152 $normalized[$key] = $this->normalize($value); 157 158 $normalized[$key] = $this->normalize($value, $depth+1); 153 159 } 154 160 … … 175 181 // TODO 2.0 only check for Throwable 176 182 if (!$e instanceof Exception && !$e instanceof Throwable) { 177 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '. get_class($e));183 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); 178 184 } 179 185 180 186 $data = array( 181 'class' => get_class($e),187 'class' => Utils::getClass($e), 182 188 'message' => $e->getMessage(), 183 189 'code' => $e->getCode(), -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php
r1756617 r1986677 11 11 12 12 namespace Monolog\Formatter; 13 14 use Monolog\Utils; 13 15 14 16 /** … … 130 132 // TODO 2.0 only check for Throwable 131 133 if (!$e instanceof \Exception && !$e instanceof \Throwable) { 132 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '. get_class($e));134 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); 133 135 } 134 136 … … 136 138 if ($previous = $e->getPrevious()) { 137 139 do { 138 $previousText .= ', '. get_class($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine();140 $previousText .= ', '.Utils::getClass($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); 139 141 } while ($previous = $previous->getPrevious()); 140 142 } 141 143 142 $str = '[object] ('. get_class($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')';144 $str = '[object] ('.Utils::getClass($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; 143 145 if ($this->includeStacktraces) { 144 146 $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n"; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php
r1756617 r1986677 11 11 12 12 namespace Monolog\Formatter; 13 14 use Monolog\Utils; 13 15 14 16 /** … … 76 78 { 77 79 $objectVars = get_object_vars($value); 78 $objectVars['class'] = get_class($value);80 $objectVars['class'] = Utils::getClass($value); 79 81 80 82 return $this->formatArray($objectVars, $nestingLevel); … … 84 86 { 85 87 $formattedException = array( 86 'class' => get_class($exception),88 'class' => Utils::getClass($exception), 87 89 'message' => $exception->getMessage(), 88 90 'code' => $exception->getCode(), -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
r1756617 r1986677 13 13 14 14 use Exception; 15 use Monolog\Utils; 15 16 16 17 /** … … 56 57 } 57 58 58 protected function normalize($data) 59 { 59 protected function normalize($data, $depth = 0) 60 { 61 if ($depth > 9) { 62 return 'Over 9 levels deep, aborting normalization'; 63 } 64 60 65 if (null === $data || is_scalar($data)) { 61 66 if (is_float($data)) { … … 76 81 $count = 1; 77 82 foreach ($data as $key => $value) { 78 if ($count++ > =1000) {83 if ($count++ > 1000) { 79 84 $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; 80 85 break; 81 86 } 82 $normalized[$key] = $this->normalize($value); 87 88 $normalized[$key] = $this->normalize($value, $depth+1); 83 89 } 84 90 … … 104 110 } 105 111 106 return sprintf("[object] (%s: %s)", get_class($data), $value);112 return sprintf("[object] (%s: %s)", Utils::getClass($data), $value); 107 113 } 108 114 … … 118 124 // TODO 2.0 only check for Throwable 119 125 if (!$e instanceof Exception && !$e instanceof \Throwable) { 120 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '. get_class($e));126 throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); 121 127 } 122 128 123 129 $data = array( 124 'class' => get_class($e),130 'class' => Utils::getClass($e), 125 131 'message' => $e->getMessage(), 126 132 'code' => $e->getCode(), … … 147 153 $data['trace'][] = $frame['file'].':'.$frame['line']; 148 154 } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { 149 // We should again normalize the frames, because it might contain invalid items155 // Simplify closures handling 150 156 $data['trace'][] = $frame['function']; 151 157 } else { 158 if (isset($frame['args'])) { 159 // Make sure that objects present as arguments are not serialized nicely but rather only 160 // as a class name to avoid any unexpected leak of sensitive information 161 $frame['args'] = array_map(function ($arg) { 162 if (is_object($arg) && !($arg instanceof \DateTime || $arg instanceof \DateTimeInterface)) { 163 return sprintf("[object] (%s)", Utils::getClass($arg)); 164 } 165 166 return $arg; 167 }, $frame['args']); 168 } 152 169 // We should again normalize the frames, because it might contain invalid items 153 170 $data['trace'][] = $this->toJson($this->normalize($frame), true); -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php
r1756617 r1986677 103 103 } 104 104 105 protected function normalize($data )105 protected function normalize($data, $depth = 0) 106 106 { 107 107 if (is_object($data) && !$data instanceof \DateTime) { … … 109 109 } 110 110 111 return parent::normalize($data );111 return parent::normalize($data, $depth); 112 112 } 113 113 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php
r1756617 r1986677 12 12 namespace Monolog\Handler; 13 13 14 use Monolog\Logger;15 14 use Monolog\Formatter\FormatterInterface; 16 15 use Monolog\Formatter\LineFormatter; 16 use Monolog\Logger; 17 use Monolog\ResettableInterface; 17 18 18 19 /** … … 21 22 * @author Jordi Boggiano <j.boggiano@seld.be> 22 23 */ 23 abstract class AbstractHandler implements HandlerInterface 24 abstract class AbstractHandler implements HandlerInterface, ResettableInterface 24 25 { 25 26 protected $level = Logger::DEBUG; … … 33 34 34 35 /** 35 * @param int $level The minimum logging level at which this handler will be triggered36 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not36 * @param int $level The minimum logging level at which this handler will be triggered 37 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 37 38 */ 38 39 public function __construct($level = Logger::DEBUG, $bubble = true) … … 142 143 * Sets the bubbling behavior. 143 144 * 144 * @param Boolean$bubble true means that this handler allows bubbling.145 * false means that bubbling is not permitted.145 * @param bool $bubble true means that this handler allows bubbling. 146 * false means that bubbling is not permitted. 146 147 * @return self 147 148 */ … … 156 157 * Gets the bubbling behavior. 157 158 * 158 * @return Booleantrue means that this handler allows bubbling.159 * false means that bubbling is not permitted.159 * @return bool true means that this handler allows bubbling. 160 * false means that bubbling is not permitted. 160 161 */ 161 162 public function getBubble() … … 175 176 } 176 177 178 public function reset() 179 { 180 foreach ($this->processors as $processor) { 181 if ($processor instanceof ResettableInterface) { 182 $processor->reset(); 183 } 184 } 185 } 186 177 187 /** 178 188 * Gets the default formatter. -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php
r1756617 r1986677 11 11 12 12 namespace Monolog\Handler; 13 14 use Monolog\ResettableInterface; 13 15 14 16 /** -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php
r1756617 r1986677 54 54 55 55 /** 56 * @param mixed $facility57 * @param int $levelThe minimum logging level at which this handler will be triggered58 * @param Boolean $bubbleWhether the messages that are handled can bubble up the stack or not56 * @param mixed $facility 57 * @param int $level The minimum logging level at which this handler will be triggered 58 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 59 59 */ 60 60 public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php
r1756617 r1986677 44 44 { 45 45 // Accumulate records 46 s elf::$records[] = $record;46 static::$records[] = $record; 47 47 48 48 // Register shutdown handler if not already done 49 if (!s elf::$initialized) {50 s elf::$initialized = true;49 if (!static::$initialized) { 50 static::$initialized = true; 51 51 $this->registerShutdownFunction(); 52 52 } … … 59 59 public static function send() 60 60 { 61 $format = s elf::getResponseFormat();61 $format = static::getResponseFormat(); 62 62 if ($format === 'unknown') { 63 63 return; 64 64 } 65 65 66 if (count(s elf::$records)) {66 if (count(static::$records)) { 67 67 if ($format === 'html') { 68 s elf::writeOutput('<script>' . self::generateScript() . '</script>');68 static::writeOutput('<script>' . static::generateScript() . '</script>'); 69 69 } elseif ($format === 'js') { 70 self::writeOutput(self::generateScript()); 71 } 72 self::reset(); 73 } 70 static::writeOutput(static::generateScript()); 71 } 72 static::resetStatic(); 73 } 74 } 75 76 public function close() 77 { 78 self::resetStatic(); 79 } 80 81 public function reset() 82 { 83 self::resetStatic(); 74 84 } 75 85 … … 77 87 * Forget all logged records 78 88 */ 79 public static function reset ()80 { 81 s elf::$records = array();89 public static function resetStatic() 90 { 91 static::$records = array(); 82 92 } 83 93 … … 134 144 { 135 145 $script = array(); 136 foreach (s elf::$records as $record) {137 $context = s elf::dump('Context', $record['context']);138 $extra = s elf::dump('Extra', $record['extra']);146 foreach (static::$records as $record) { 147 $context = static::dump('Context', $record['context']); 148 $extra = static::dump('Extra', $record['extra']); 139 149 140 150 if (empty($context) && empty($extra)) { 141 $script[] = s elf::call_array('log', self::handleStyles($record['formatted']));151 $script[] = static::call_array('log', static::handleStyles($record['formatted'])); 142 152 } else { 143 153 $script = array_merge($script, 144 array(s elf::call_array('groupCollapsed', self::handleStyles($record['formatted']))),154 array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), 145 155 $context, 146 156 $extra, 147 array(s elf::call('groupEnd'))157 array(static::call('groupEnd')) 148 158 ); 149 159 } … … 155 165 private static function handleStyles($formatted) 156 166 { 157 $args = array(s elf::quote('font-weight: normal'));167 $args = array(static::quote('font-weight: normal')); 158 168 $format = '%c' . $formatted; 159 169 preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); 160 170 161 171 foreach (array_reverse($matches) as $match) { 162 $args[] = s elf::quote(self::handleCustomStyles($match[2][0], $match[1][0]));172 $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); 163 173 $args[] = '"font-weight: normal"'; 164 174 … … 167 177 } 168 178 169 array_unshift($args, s elf::quote($format));179 array_unshift($args, static::quote($format)); 170 180 171 181 return $args; … … 199 209 return $script; 200 210 } 201 $script[] = s elf::call('log', self::quote('%c%s'), self::quote('font-weight: bold'), self::quote($title));211 $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); 202 212 foreach ($dict as $key => $value) { 203 213 $value = json_encode($value); 204 214 if (empty($value)) { 205 $value = s elf::quote('');206 } 207 $script[] = s elf::call('log', self::quote('%s: %o'), self::quote($key), $value);215 $value = static::quote(''); 216 } 217 $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value); 208 218 } 209 219 … … 221 231 $method = array_shift($args); 222 232 223 return s elf::call_array($method, $args);233 return static::call_array($method, $args); 224 234 } 225 235 -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php
r1756617 r1986677 13 13 14 14 use Monolog\Logger; 15 use Monolog\ResettableInterface; 15 16 16 17 /** … … 35 36 * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. 36 37 * @param int $level The minimum logging level at which this handler will be triggered 37 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not38 * @param Boolean$flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded38 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 39 * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded 39 40 */ 40 41 public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) … … 115 116 $this->buffer = array(); 116 117 } 118 119 public function reset() 120 { 121 $this->flush(); 122 123 parent::reset(); 124 125 if ($this->handler instanceof ResettableInterface) { 126 $this->handler->reset(); 127 } 128 } 117 129 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php
r1756617 r1986677 33 33 */ 34 34 const HEADER_NAME = 'X-ChromeLogger-Data'; 35 35 36 36 /** 37 37 * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) … … 46 46 * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending 47 47 * 48 * @var Boolean48 * @var bool 49 49 */ 50 50 protected static $overflowed = false; … … 59 59 60 60 /** 61 * @param int $level The minimum logging level at which this handler will be triggered62 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not61 * @param int $level The minimum logging level at which this handler will be triggered 62 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 63 63 */ 64 64 public function __construct($level = Logger::DEBUG, $bubble = true) … … 175 175 * Verifies if the headers are accepted by the current user agent 176 176 * 177 * @return Boolean177 * @return bool 178 178 */ 179 179 protected function headersAccepted() -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php
r1756617 r1986677 61 61 * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes 62 62 * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through 63 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not63 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 64 64 */ 65 65 public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php
r1756617 r1986677 47 47 48 48 /** 49 * @param Client $client Elastica Client object50 * @param array $options Handler configuration51 * @param int $level The minimum logging level at which this handler will be triggered52 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not49 * @param Client $client Elastica Client object 50 * @param array $options Handler configuration 51 * @param int $level The minimum logging level at which this handler will be triggered 52 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 53 53 */ 54 54 public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php
r1756617 r1986677 29 29 30 30 /** 31 * @param int $messageType Says where the error should go.32 * @param int $level The minimum logging level at which this handler will be triggered33 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not34 * @param Boolean$expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries31 * @param int $messageType Says where the error should go. 32 * @param int $level The minimum logging level at which this handler will be triggered 33 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 34 * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries 35 35 */ 36 36 public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php
r1756617 r1986677 41 41 * Whether the messages that are handled can bubble up the stack or not 42 42 * 43 * @var Boolean43 * @var bool 44 44 */ 45 45 protected $bubble; … … 49 49 * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided 50 50 * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array 51 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not51 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 52 52 */ 53 53 public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php
r1756617 r1986677 23 23 * 24 24 * @param array $record 25 * @return Boolean25 * @return bool 26 26 */ 27 27 public function isHandlerActivated(array $record); -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php
r1756617 r1986677 15 15 use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; 16 16 use Monolog\Logger; 17 use Monolog\ResettableInterface; 17 18 18 19 /** … … 42 43 * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action 43 44 * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. 44 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not45 * @param Boolean$stopBuffering Whether the handler should stop buffering after being triggered (default true)45 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 46 * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) 46 47 * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered 47 48 */ … … 131 132 public function close() 132 133 { 133 if (null !== $this->passthruLevel) { 134 $level = $this->passthruLevel; 135 $this->buffer = array_filter($this->buffer, function ($record) use ($level) { 136 return $record['level'] >= $level; 137 }); 138 if (count($this->buffer) > 0) { 139 $this->handler->handleBatch($this->buffer); 140 $this->buffer = array(); 141 } 142 } 134 $this->flushBuffer(); 143 135 } 144 136 145 /**146 * Resets the state of the handler. Stops forwarding records to the wrapped handler.147 */148 137 public function reset() 149 138 { 150 $this->buffering = true; 139 $this->flushBuffer(); 140 141 parent::reset(); 142 143 if ($this->handler instanceof ResettableInterface) { 144 $this->handler->reset(); 145 } 151 146 } 152 147 … … 161 156 $this->reset(); 162 157 } 158 159 /** 160 * Resets the state of the handler. Stops forwarding records to the wrapped handler. 161 */ 162 private function flushBuffer() 163 { 164 if (null !== $this->passthruLevel) { 165 $level = $this->passthruLevel; 166 $this->buffer = array_filter($this->buffer, function ($record) use ($level) { 167 return $record['level'] >= $level; 168 }); 169 if (count($this->buffer) > 0) { 170 $this->handler->handleBatch($this->buffer); 171 } 172 } 173 174 $this->buffer = array(); 175 $this->buffering = true; 176 } 163 177 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php
r1756617 r1986677 159 159 * Verifies if the headers are accepted by the current user agent 160 160 * 161 * @return Boolean161 * @return bool 162 162 */ 163 163 protected function headersAccepted() -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php
r1756617 r1986677 51 51 * {@inheritdoc} 52 52 */ 53 public function close()54 {55 $this->publisher = null;56 }57 58 /**59 * {@inheritdoc}60 */61 53 protected function write(array $record) 62 54 { -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php
r1756617 r1986677 13 13 14 14 use Monolog\Formatter\FormatterInterface; 15 use Monolog\ResettableInterface; 15 16 16 17 /** … … 24 25 25 26 /** 26 * @param array $handlers Array of Handlers.27 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not27 * @param array $handlers Array of Handlers. 28 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 28 29 */ 29 30 public function __construct(array $handlers, $bubble = true) … … 91 92 } 92 93 94 public function reset() 95 { 96 parent::reset(); 97 98 foreach ($this->handlers as $handler) { 99 if ($handler instanceof ResettableInterface) { 100 $handler->reset(); 101 } 102 } 103 } 104 93 105 /** 94 106 * {@inheritdoc} -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php
r1756617 r1986677 32 32 * @param array $record Partial log record containing only a level key 33 33 * 34 * @return Boolean34 * @return bool 35 35 */ 36 36 public function isHandling(array $record); … … 47 47 * 48 48 * @param array $record The record to handle 49 * @return Booleantrue means that this handler handled the record, and that bubbling is not permitted.49 * @return bool true means that this handler handled the record, and that bubbling is not permitted. 50 50 * false means the record was either not processed or that this handler allows bubbling. 51 51 */ -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php
r1756617 r1986677 12 12 namespace Monolog\Handler; 13 13 14 use Monolog\ResettableInterface; 14 15 use Monolog\Formatter\FormatterInterface; 15 16 … … 31 32 * @author Alexey Karapetov <alexey@karapetov.com> 32 33 */ 33 class HandlerWrapper implements HandlerInterface 34 class HandlerWrapper implements HandlerInterface, ResettableInterface 34 35 { 35 36 /** … … 106 107 return $this->handler->getFormatter(); 107 108 } 109 110 public function reset() 111 { 112 if ($this->handler instanceof ResettableInterface) { 113 return $this->handler->reset(); 114 } 115 } 108 116 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php
r1756617 r1986677 220 220 { 221 221 parent::write($record); 222 $this->finalizeWrite(); 223 } 224 225 /** 226 * Finalizes the request by reading some bytes and then closing the socket 227 * 228 * If we do not read some but close the socket too early, hipchat sometimes 229 * drops the request entirely. 230 */ 231 protected function finalizeWrite() 232 { 233 $res = $this->getResource(); 234 if (is_resource($res)) { 235 @fread($res, 2048); 236 } 222 237 $this->closeSocket(); 223 238 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php
r1756617 r1986677 31 31 32 32 /** 33 * @param string $eventName The name of the IFTTT Maker event that should be triggered34 * @param string $secretKey A valid IFTTT secret key35 * @param int $level The minimum logging level at which this handler will be triggered36 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not33 * @param string $eventName The name of the IFTTT Maker event that should be triggered 34 * @param string $secretKey A valid IFTTT secret key 35 * @param int $level The minimum logging level at which this handler will be triggered 36 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 37 37 */ 38 38 public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php
r1756617 r1986677 32 32 * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing 33 33 */ 34 public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true )34 public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true, $host = 'data.logentries.com') 35 35 { 36 36 if ($useSSL && !extension_loaded('openssl')) { … … 38 38 } 39 39 40 $endpoint = $useSSL ? 'ssl:// data.logentries.com:443' : 'data.logentries.com:80';40 $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; 41 41 parent::__construct($endpoint, $level, $bubble); 42 42 $this->logToken = $token; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php
r1756617 r1986677 28 28 * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced 29 29 * @param int $level The minimum logging level at which this handler will be triggered 30 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not30 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 31 31 */ 32 32 public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php
r1756617 r1986677 18 18 * Class to record a log on a NewRelic application. 19 19 * Enabling New Relic High Security mode may prevent capture of useful information. 20 * 21 * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] 20 22 * 21 23 * @see https://docs.newrelic.com/docs/agents/php-agent … … 85 87 } 86 88 87 if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) {89 if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { 88 90 newrelic_notice_error($record['message'], $record['context']['exception']); 89 91 unset($record['formatted']['context']['exception']); -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php
r1756617 r1986677 32 32 * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied 33 33 * @param int $level The minimum logging level at which this handler will be triggered 34 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not34 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 35 35 */ 36 36 public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php
r1756617 r1986677 70 70 * @param string $title Title sent to the Pushover API 71 71 * @param int $level The minimum logging level at which this handler will be triggered 72 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not73 * @param Boolean$useSSL Whether to connect via SSL. Required when pushing messages to users that are not72 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 73 * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not 74 74 * the pushover.net app owner. OpenSSL is required for this option. 75 75 * @param int $highPriorityLevel The minimum logging level at which this handler will start … … 181 181 public function useFormattedMessage($value) 182 182 { 183 $this->useFormattedMessage = (bool ean) $value;183 $this->useFormattedMessage = (bool) $value; 184 184 } 185 185 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php
r1756617 r1986677 19 19 /** 20 20 * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server 21 * using raven-php (https://github.com/getsentry/raven-php)21 * using sentry-php (https://github.com/getsentry/sentry-php) 22 22 * 23 23 * @author Marc Abramowitz <marc@marc-abramowitz.com> … … 28 28 * Translates Monolog log levels to Raven log levels. 29 29 */ 30 pr ivate$logLevels = array(30 protected $logLevels = array( 31 31 Logger::DEBUG => Raven_Client::DEBUG, 32 32 Logger::INFO => Raven_Client::INFO, … … 43 43 * software. Can be any string (git commit, version number) 44 44 */ 45 pr ivate$release;45 protected $release; 46 46 47 47 /** … … 58 58 * @param Raven_Client $ravenClient 59 59 * @param int $level The minimum logging level at which this handler will be triggered 60 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not60 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 61 61 */ 62 62 public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) … … 181 181 182 182 if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { 183 $options[' extra']['message'] = $record['formatted'];183 $options['message'] = $record['formatted']; 184 184 $this->ravenClient->captureException($record['context']['exception'], $options); 185 185 } else { … … 217 217 protected function getExtraParameters() 218 218 { 219 return array('c hecksum', 'release', 'event_id');219 return array('contexts', 'checksum', 'release', 'event_id'); 220 220 } 221 221 -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php
r1756617 r1986677 130 130 $this->flush(); 131 131 } 132 133 /** 134 * {@inheritdoc} 135 */ 136 public function reset() 137 { 138 $this->flush(); 139 140 parent::reset(); 141 } 142 143 132 144 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php
r1756617 r1986677 40 40 * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) 41 41 * @param int $level The minimum logging level at which this handler will be triggered 42 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not42 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 43 43 * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) 44 * @param Boolean$useLocking Try to lock log file before doing any writes44 * @param bool $useLocking Try to lock log file before doing any writes 45 45 */ 46 46 public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) … … 61 61 { 62 62 parent::close(); 63 64 if (true === $this->mustRotate) { 65 $this->rotate(); 66 } 67 } 68 69 /** 70 * {@inheritdoc} 71 */ 72 public function reset() 73 { 74 parent::reset(); 63 75 64 76 if (true === $this->mustRotate) { … … 167 179 $glob = str_replace( 168 180 array('{filename}', '{date}'), 169 array($fileInfo['filename'], ' *'),181 array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'), 170 182 $fileInfo['dirname'] . '/' . $this->filenameFormat 171 183 ); -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php
r1756617 r1986677 147 147 if ($this->useShortAttachment) { 148 148 $attachment['fields'][] = $this->generateAttachmentField( 149 ucfirst($key),149 $key, 150 150 $record[$key] 151 151 ); … … 230 230 * Generates attachment field 231 231 * 232 * @param string $title233 * @param string|array $value \232 * @param string $title 233 * @param string|array $value 234 234 * 235 235 * @return array … … 242 242 243 243 return array( 244 'title' => $title,244 'title' => ucfirst($title), 245 245 'value' => $value, 246 246 'short' => false … … 258 258 { 259 259 $fields = array(); 260 foreach ($ dataas $key => $value) {260 foreach ($this->normalizerFormatter->format($data) as $key => $value) { 261 261 $fields[] = $this->generateAttachmentField($key, $value); 262 262 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php
r1756617 r1986677 76 76 } 77 77 78 public function getToken() 79 { 80 return $this->token; 81 } 82 78 83 /** 79 84 * {@inheritdoc} -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php
r1756617 r1986677 71 71 } 72 72 73 public function getWebhookUrl() 74 { 75 return $this->webhookUrl; 76 } 77 73 78 /** 74 79 * {@inheritdoc} -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php
r1756617 r1986677 28 28 private $writingTimeout = 10; 29 29 private $lastSentBytes = null; 30 private $chunkSize = null; 30 31 private $persistent = false; 31 32 private $errno; … … 34 35 35 36 /** 36 * @param string $connectionString Socket connection string37 * @param int $level The minimum logging level at which this handler will be triggered38 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not37 * @param string $connectionString Socket connection string 38 * @param int $level The minimum logging level at which this handler will be triggered 39 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 39 40 */ 40 41 public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) … … 88 89 public function setPersistent($persistent) 89 90 { 90 $this->persistent = (bool ean) $persistent;91 $this->persistent = (bool) $persistent; 91 92 } 92 93 … … 129 130 130 131 /** 132 * Set chunk size. Only has effect during connection in the writing cycle. 133 * 134 * @param float $bytes 135 */ 136 public function setChunkSize($bytes) 137 { 138 $this->chunkSize = $bytes; 139 } 140 141 /** 131 142 * Get current connection string 132 143 * … … 176 187 { 177 188 return $this->writingTimeout; 189 } 190 191 /** 192 * Get current chunk size 193 * 194 * @return float 195 */ 196 public function getChunkSize() 197 { 198 return $this->chunkSize; 178 199 } 179 200 … … 218 239 219 240 return stream_set_timeout($this->resource, $seconds, $microseconds); 241 } 242 243 /** 244 * Wrapper to allow mocking 245 * 246 * @see http://php.net/manual/en/function.stream-set-chunk-size.php 247 */ 248 protected function streamSetChunkSize() 249 { 250 return stream_set_chunk_size($this->resource, $this->chunkSize); 220 251 } 221 252 … … 269 300 $this->createSocketResource(); 270 301 $this->setSocketTimeout(); 302 $this->setStreamChunkSize(); 271 303 } 272 304 … … 288 320 if (!$this->streamSetTimeout()) { 289 321 throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); 322 } 323 } 324 325 private function setStreamChunkSize() 326 { 327 if ($this->chunkSize && !$this->streamSetChunkSize()) { 328 throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); 290 329 } 291 330 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
r1756617 r1986677 33 33 * @param resource|string $stream 34 34 * @param int $level The minimum logging level at which this handler will be triggered 35 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not35 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 36 36 * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) 37 * @param Boolean$useLocking Try to lock log file before doing any writes37 * @param bool $useLocking Try to lock log file before doing any writes 38 38 * 39 39 * @throws \Exception If a missing directory is not buildable … … 168 168 $status = mkdir($dir, 0777, true); 169 169 restore_error_handler(); 170 if (false === $status ) {170 if (false === $status && !is_dir($dir)) { 171 171 throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); 172 172 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php
r1756617 r1986677 13 13 14 14 use Monolog\Logger; 15 use Monolog\Formatter\FormatterInterface; 15 16 use Monolog\Formatter\LineFormatter; 16 17 use Swift; … … 30 31 * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced 31 32 * @param int $level The minimum logging level at which this handler will be triggered 32 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not33 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 33 34 */ 34 35 public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) … … 46 47 { 47 48 $this->mailer->send($this->buildMessage($content, $records)); 49 } 50 51 /** 52 * Gets the formatter for the Swift_Message subject. 53 * 54 * @param string $format The format of the subject 55 * @return FormatterInterface 56 */ 57 protected function getSubjectFormatter($format) 58 { 59 return new LineFormatter($format); 48 60 } 49 61 … … 70 82 71 83 if ($records) { 72 $subjectFormatter = new LineFormatter($message->getSubject());84 $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); 73 85 $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); 74 86 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php
r1756617 r1986677 33 33 34 34 /** 35 * @param string $ident36 * @param mixed $facility37 * @param int $level The minimum logging level at which this handler will be triggered38 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not39 * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID35 * @param string $ident 36 * @param mixed $facility 37 * @param int $level The minimum logging level at which this handler will be triggered 38 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 39 * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID 40 40 */ 41 41 public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php
r1756617 r1986677 26 26 27 27 /** 28 * @param string $host29 * @param int $port30 * @param mixed $facility31 * @param int $level The minimum logging level at which this handler will be triggered32 * @param Boolean$bubble Whether the messages that are handled can bubble up the stack or not33 * @param string $ident Program name or tag for each log message.28 * @param string $host 29 * @param int $port 30 * @param mixed $facility 31 * @param int $level The minimum logging level at which this handler will be triggered 32 * @param bool $bubble Whether the messages that are handled can bubble up the stack or not 33 * @param string $ident Program name or tag for each log message. 34 34 */ 35 35 public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php') -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php
r1756617 r1986677 85 85 } 86 86 87 /** 88 * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records 89 * @param int $level Logger::LEVEL constant value 90 */ 87 91 public function hasRecord($record, $level) 88 92 { 89 if (is_ array($record)) {90 $record = $record['message'];93 if (is_string($record)) { 94 $record = array('message' => $record); 91 95 } 92 96 93 97 return $this->hasRecordThatPasses(function ($rec) use ($record) { 94 return $rec['message'] === $record; 98 if ($rec['message'] !== $record['message']) { 99 return false; 100 } 101 if (isset($record['context']) && $rec['context'] !== $record['context']) { 102 return false; 103 } 104 return true; 95 105 }, $level); 96 106 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php
r1756617 r1986677 49 49 public function handleBatch(array $records) 50 50 { 51 if ($this->processors) { 52 $processed = array(); 53 foreach ($records as $record) { 54 foreach ($this->processors as $processor) { 55 $processed[] = call_user_func($processor, $record); 56 } 57 } 58 $records = $processed; 59 } 60 51 61 foreach ($this->handlers as $handler) { 52 62 try { -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Logger.php
r1756617 r1986677 16 16 use Psr\Log\LoggerInterface; 17 17 use Psr\Log\InvalidArgumentException; 18 use Exception; 18 19 19 20 /** … … 25 26 * @author Jordi Boggiano <j.boggiano@seld.be> 26 27 */ 27 class Logger implements LoggerInterface 28 class Logger implements LoggerInterface, ResettableInterface 28 29 { 29 30 /** … … 135 136 136 137 /** 138 * @var callable 139 */ 140 protected $exceptionHandler; 141 142 /** 137 143 * @param string $name The logging channel 138 144 * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. … … 142 148 { 143 149 $this->name = $name; 144 $this-> handlers = $handlers;150 $this->setHandlers($handlers); 145 151 $this->processors = $processors; 146 152 } … … 282 288 * @param string $message The log message 283 289 * @param array $context The log context 284 * @return BooleanWhether the record has been processed290 * @return bool Whether the record has been processed 285 291 */ 286 292 public function addRecord($level, $message, array $context = array()) … … 330 336 ); 331 337 338 try { 339 foreach ($this->processors as $processor) { 340 $record = call_user_func($processor, $record); 341 } 342 343 while ($handler = current($this->handlers)) { 344 if (true === $handler->handle($record)) { 345 break; 346 } 347 348 next($this->handlers); 349 } 350 } catch (Exception $e) { 351 $this->handleException($e, $record); 352 } 353 354 return true; 355 } 356 357 /** 358 * Ends a log cycle and frees all resources used by handlers. 359 * 360 * Closing a Handler means flushing all buffers and freeing any open resources/handles. 361 * Handlers that have been closed should be able to accept log records again and re-open 362 * themselves on demand, but this may not always be possible depending on implementation. 363 * 364 * This is useful at the end of a request and will be called automatically on every handler 365 * when they get destructed. 366 */ 367 public function close() 368 { 369 foreach ($this->handlers as $handler) { 370 if (method_exists($handler, 'close')) { 371 $handler->close(); 372 } 373 } 374 } 375 376 /** 377 * Ends a log cycle and resets all handlers and processors to their initial state. 378 * 379 * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal 380 * state, and getting it back to a state in which it can receive log records again. 381 * 382 * This is useful in case you want to avoid logs leaking between two requests or jobs when you 383 * have a long running process like a worker or an application server serving multiple requests 384 * in one process. 385 */ 386 public function reset() 387 { 388 foreach ($this->handlers as $handler) { 389 if ($handler instanceof ResettableInterface) { 390 $handler->reset(); 391 } 392 } 393 332 394 foreach ($this->processors as $processor) { 333 $record = call_user_func($processor, $record); 334 } 335 336 while ($handler = current($this->handlers)) { 337 if (true === $handler->handle($record)) { 338 break; 395 if ($processor instanceof ResettableInterface) { 396 $processor->reset(); 339 397 } 340 341 next($this->handlers); 342 } 343 344 return true; 398 } 345 399 } 346 400 … … 348 402 * Adds a log record at the DEBUG level. 349 403 * 350 * @param string $message The log message351 * @param array $context The log context352 * @return BooleanWhether the record has been processed404 * @param string $message The log message 405 * @param array $context The log context 406 * @return bool Whether the record has been processed 353 407 */ 354 408 public function addDebug($message, array $context = array()) … … 360 414 * Adds a log record at the INFO level. 361 415 * 362 * @param string $message The log message363 * @param array $context The log context364 * @return BooleanWhether the record has been processed416 * @param string $message The log message 417 * @param array $context The log context 418 * @return bool Whether the record has been processed 365 419 */ 366 420 public function addInfo($message, array $context = array()) … … 372 426 * Adds a log record at the NOTICE level. 373 427 * 374 * @param string $message The log message375 * @param array $context The log context376 * @return BooleanWhether the record has been processed428 * @param string $message The log message 429 * @param array $context The log context 430 * @return bool Whether the record has been processed 377 431 */ 378 432 public function addNotice($message, array $context = array()) … … 384 438 * Adds a log record at the WARNING level. 385 439 * 386 * @param string $message The log message387 * @param array $context The log context388 * @return BooleanWhether the record has been processed440 * @param string $message The log message 441 * @param array $context The log context 442 * @return bool Whether the record has been processed 389 443 */ 390 444 public function addWarning($message, array $context = array()) … … 396 450 * Adds a log record at the ERROR level. 397 451 * 398 * @param string $message The log message399 * @param array $context The log context400 * @return BooleanWhether the record has been processed452 * @param string $message The log message 453 * @param array $context The log context 454 * @return bool Whether the record has been processed 401 455 */ 402 456 public function addError($message, array $context = array()) … … 408 462 * Adds a log record at the CRITICAL level. 409 463 * 410 * @param string $message The log message411 * @param array $context The log context412 * @return BooleanWhether the record has been processed464 * @param string $message The log message 465 * @param array $context The log context 466 * @return bool Whether the record has been processed 413 467 */ 414 468 public function addCritical($message, array $context = array()) … … 420 474 * Adds a log record at the ALERT level. 421 475 * 422 * @param string $message The log message423 * @param array $context The log context424 * @return BooleanWhether the record has been processed476 * @param string $message The log message 477 * @param array $context The log context 478 * @return bool Whether the record has been processed 425 479 */ 426 480 public function addAlert($message, array $context = array()) … … 432 486 * Adds a log record at the EMERGENCY level. 433 487 * 434 * @param string $message The log message435 * @param array $context The log context436 * @return BooleanWhether the record has been processed488 * @param string $message The log message 489 * @param array $context The log context 490 * @return bool Whether the record has been processed 437 491 */ 438 492 public function addEmergency($message, array $context = array()) … … 485 539 * 486 540 * @param int $level 487 * @return Boolean541 * @return bool 488 542 */ 489 543 public function isHandling($level) … … 503 557 504 558 /** 559 * Set a custom exception handler 560 * 561 * @param callable $callback 562 * @return $this 563 */ 564 public function setExceptionHandler($callback) 565 { 566 if (!is_callable($callback)) { 567 throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given'); 568 } 569 $this->exceptionHandler = $callback; 570 571 return $this; 572 } 573 574 /** 575 * @return callable 576 */ 577 public function getExceptionHandler() 578 { 579 return $this->exceptionHandler; 580 } 581 582 /** 583 * Delegates exception management to the custom exception handler, 584 * or throws the exception if no custom handler is set. 585 */ 586 protected function handleException(Exception $e, array $record) 587 { 588 if (!$this->exceptionHandler) { 589 throw $e; 590 } 591 592 call_user_func($this->exceptionHandler, $e, $record); 593 } 594 595 /** 505 596 * Adds a log record at an arbitrary level. 506 597 * … … 508 599 * 509 600 * @param mixed $level The log level 510 * @param string $message The log message511 * @param array $context The log context512 * @return BooleanWhether the record has been processed601 * @param string $message The log message 602 * @param array $context The log context 603 * @return bool Whether the record has been processed 513 604 */ 514 605 public function log($level, $message, array $context = array()) … … 524 615 * This method allows for compatibility with common interfaces. 525 616 * 526 * @param string $message The log message527 * @param array $context The log context528 * @return BooleanWhether the record has been processed617 * @param string $message The log message 618 * @param array $context The log context 619 * @return bool Whether the record has been processed 529 620 */ 530 621 public function debug($message, array $context = array()) … … 538 629 * This method allows for compatibility with common interfaces. 539 630 * 540 * @param string $message The log message541 * @param array $context The log context542 * @return BooleanWhether the record has been processed631 * @param string $message The log message 632 * @param array $context The log context 633 * @return bool Whether the record has been processed 543 634 */ 544 635 public function info($message, array $context = array()) … … 552 643 * This method allows for compatibility with common interfaces. 553 644 * 554 * @param string $message The log message555 * @param array $context The log context556 * @return BooleanWhether the record has been processed645 * @param string $message The log message 646 * @param array $context The log context 647 * @return bool Whether the record has been processed 557 648 */ 558 649 public function notice($message, array $context = array()) … … 566 657 * This method allows for compatibility with common interfaces. 567 658 * 568 * @param string $message The log message569 * @param array $context The log context570 * @return BooleanWhether the record has been processed659 * @param string $message The log message 660 * @param array $context The log context 661 * @return bool Whether the record has been processed 571 662 */ 572 663 public function warn($message, array $context = array()) … … 580 671 * This method allows for compatibility with common interfaces. 581 672 * 582 * @param string $message The log message583 * @param array $context The log context584 * @return BooleanWhether the record has been processed673 * @param string $message The log message 674 * @param array $context The log context 675 * @return bool Whether the record has been processed 585 676 */ 586 677 public function warning($message, array $context = array()) … … 594 685 * This method allows for compatibility with common interfaces. 595 686 * 596 * @param string $message The log message597 * @param array $context The log context598 * @return BooleanWhether the record has been processed687 * @param string $message The log message 688 * @param array $context The log context 689 * @return bool Whether the record has been processed 599 690 */ 600 691 public function err($message, array $context = array()) … … 608 699 * This method allows for compatibility with common interfaces. 609 700 * 610 * @param string $message The log message611 * @param array $context The log context612 * @return BooleanWhether the record has been processed701 * @param string $message The log message 702 * @param array $context The log context 703 * @return bool Whether the record has been processed 613 704 */ 614 705 public function error($message, array $context = array()) … … 622 713 * This method allows for compatibility with common interfaces. 623 714 * 624 * @param string $message The log message625 * @param array $context The log context626 * @return BooleanWhether the record has been processed715 * @param string $message The log message 716 * @param array $context The log context 717 * @return bool Whether the record has been processed 627 718 */ 628 719 public function crit($message, array $context = array()) … … 636 727 * This method allows for compatibility with common interfaces. 637 728 * 638 * @param string $message The log message639 * @param array $context The log context640 * @return BooleanWhether the record has been processed729 * @param string $message The log message 730 * @param array $context The log context 731 * @return bool Whether the record has been processed 641 732 */ 642 733 public function critical($message, array $context = array()) … … 650 741 * This method allows for compatibility with common interfaces. 651 742 * 652 * @param string $message The log message653 * @param array $context The log context654 * @return BooleanWhether the record has been processed743 * @param string $message The log message 744 * @param array $context The log context 745 * @return bool Whether the record has been processed 655 746 */ 656 747 public function alert($message, array $context = array()) … … 664 755 * This method allows for compatibility with common interfaces. 665 756 * 666 * @param string $message The log message667 * @param array $context The log context668 * @return BooleanWhether the record has been processed757 * @param string $message The log message 758 * @param array $context The log context 759 * @return bool Whether the record has been processed 669 760 */ 670 761 public function emerg($message, array $context = array()) … … 678 769 * This method allows for compatibility with common interfaces. 679 770 * 680 * @param string $message The log message681 * @param array $context The log context682 * @return BooleanWhether the record has been processed771 * @param string $message The log message 772 * @param array $context The log context 773 * @return bool Whether the record has been processed 683 774 */ 684 775 public function emergency($message, array $context = array()) -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php
r1756617 r1986677 20 20 * @author Jordi Boggiano <j.boggiano@seld.be> 21 21 */ 22 class GitProcessor 22 class GitProcessor implements ProcessorInterface 23 23 { 24 24 private $level; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php
r1756617 r1986677 25 25 * @author Jordi Boggiano <j.boggiano@seld.be> 26 26 */ 27 class IntrospectionProcessor 27 class IntrospectionProcessor implements ProcessorInterface 28 28 { 29 29 private $level; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php
r1756617 r1986677 17 17 * @author Rob Jensen 18 18 */ 19 abstract class MemoryProcessor 19 abstract class MemoryProcessor implements ProcessorInterface 20 20 { 21 21 /** … … 35 35 public function __construct($realUsage = true, $useFormatting = true) 36 36 { 37 $this->realUsage = (bool ean) $realUsage;38 $this->useFormatting = (bool ean) $useFormatting;37 $this->realUsage = (bool) $realUsage; 38 $this->useFormatting = (bool) $useFormatting; 39 39 } 40 40 -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php
r1756617 r1986677 19 19 * @author Jonathan A. Schweder <jonathanschweder@gmail.com> 20 20 */ 21 class MercurialProcessor 21 class MercurialProcessor implements ProcessorInterface 22 22 { 23 23 private $level; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php
r1756617 r1986677 17 17 * @author Andreas Hörnicke 18 18 */ 19 class ProcessIdProcessor 19 class ProcessIdProcessor implements ProcessorInterface 20 20 { 21 21 /** -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php
r1756617 r1986677 12 12 namespace Monolog\Processor; 13 13 14 use Monolog\Utils; 15 14 16 /** 15 17 * Processes a record's message according to PSR-3 rules … … 19 21 * @author Jordi Boggiano <j.boggiano@seld.be> 20 22 */ 21 class PsrLogMessageProcessor 23 class PsrLogMessageProcessor implements ProcessorInterface 22 24 { 23 25 /** … … 36 38 $replacements['{'.$key.'}'] = $val; 37 39 } elseif (is_object($val)) { 38 $replacements['{'.$key.'}'] = '[object '. get_class($val).']';40 $replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']'; 39 41 } else { 40 42 $replacements['{'.$key.'}'] = '['.gettype($val).']'; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php
r1756617 r1986677 17 17 * @author Martijn Riemers 18 18 */ 19 class TagProcessor 19 class TagProcessor implements ProcessorInterface 20 20 { 21 21 private $tags; -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php
r1756617 r1986677 12 12 namespace Monolog\Processor; 13 13 14 use Monolog\ResettableInterface; 15 14 16 /** 15 17 * Adds a unique identifier into records … … 17 19 * @author Simon Mönch <sm@webfactory.de> 18 20 */ 19 class UidProcessor 21 class UidProcessor implements ProcessorInterface, ResettableInterface 20 22 { 21 23 private $uid; … … 27 29 } 28 30 29 $this->uid = substr(hash('md5', uniqid('', true)), 0, $length); 31 32 $this->uid = $this->generateUid($length); 30 33 } 31 34 … … 44 47 return $this->uid; 45 48 } 49 50 public function reset() 51 { 52 $this->uid = $this->generateUid(strlen($this->uid)); 53 } 54 55 private function generateUid($length) 56 { 57 return substr(hash('md5', uniqid('', true)), 0, $length); 58 } 46 59 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php
r1756617 r1986677 17 17 * @author Jordi Boggiano <j.boggiano@seld.be> 18 18 */ 19 class WebProcessor 19 class WebProcessor implements ProcessorInterface 20 20 { 21 21 /** -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php
r1756617 r1986677 41 41 $formatter = new FluentdFormatter(); 42 42 $this->assertEquals( 43 '["test",0,{"message":"test"," extra":[],"level":300,"level_name":"WARNING"}]',43 '["test",0,{"message":"test","context":[],"extra":[],"level":300,"level_name":"WARNING"}]', 44 44 $formatter->format($record) 45 45 ); … … 56 56 $formatter = new FluentdFormatter(true); 57 57 $this->assertEquals( 58 '["test.error",0,{"message":"test"," extra":[]}]',58 '["test.error",0,{"message":"test","context":[],"extra":[]}]', 59 59 $formatter->format($record) 60 60 ); -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php
r1756617 r1986677 181 181 return $formattedException; 182 182 } 183 184 public function testNormalizeHandleLargeArraysWithExactly1000Items() 185 { 186 $formatter = new NormalizerFormatter(); 187 $largeArray = range(1, 1000); 188 189 $res = $formatter->format(array( 190 'level_name' => 'CRITICAL', 191 'channel' => 'test', 192 'message' => 'bar', 193 'context' => array($largeArray), 194 'datetime' => new \DateTime, 195 'extra' => array(), 196 )); 197 198 $this->assertCount(1000, $res['context'][0]); 199 $this->assertArrayNotHasKey('...', $res['context'][0]); 200 } 201 202 public function testNormalizeHandleLargeArrays() 203 { 204 $formatter = new NormalizerFormatter(); 205 $largeArray = range(1, 2000); 206 207 $res = $formatter->format(array( 208 'level_name' => 'CRITICAL', 209 'channel' => 'test', 210 'message' => 'bar', 211 'context' => array($largeArray), 212 'datetime' => new \DateTime, 213 'extra' => array(), 214 )); 215 216 $this->assertCount(1001, $res['context'][0]); 217 $this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']); 218 } 183 219 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php
r1756617 r1986677 194 194 } 195 195 196 public function testCanNormalizeReferences() 197 { 198 $formatter = new NormalizerFormatter(); 199 $x = array('foo' => 'bar'); 200 $y = array('x' => &$x); 201 $x['y'] = &$y; 202 $formatter->format($y); 203 } 204 196 205 public function testIgnoresInvalidTypes() 197 206 { … … 218 227 } 219 228 220 public function testNormalizeHandleLargeArrays ()221 { 222 $formatter = new NormalizerFormatter(); 223 $largeArray = range(1, 2000);229 public function testNormalizeHandleLargeArraysWithExactly1000Items() 230 { 231 $formatter = new NormalizerFormatter(); 232 $largeArray = range(1, 1000); 224 233 225 234 $res = $formatter->format(array( … … 233 242 234 243 $this->assertCount(1000, $res['context'][0]); 244 $this->assertArrayNotHasKey('...', $res['context'][0]); 245 } 246 247 public function testNormalizeHandleLargeArrays() 248 { 249 $formatter = new NormalizerFormatter(); 250 $largeArray = range(1, 2000); 251 252 $res = $formatter->format(array( 253 'level_name' => 'CRITICAL', 254 'channel' => 'test', 255 'message' => 'bar', 256 'context' => array($largeArray), 257 'datetime' => new \DateTime, 258 'extra' => array(), 259 )); 260 261 $this->assertCount(1001, $res['context'][0]); 235 262 $this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']); 236 263 } … … 381 408 ); 382 409 } 410 411 public function testExceptionTraceDoesNotLeakCallUserFuncArgs() 412 { 413 try { 414 $arg = new TestInfoLeak; 415 call_user_func(array($this, 'throwHelper'), $arg, $dt = new \DateTime()); 416 } catch (\Exception $e) { 417 } 418 419 $formatter = new NormalizerFormatter(); 420 $record = array('context' => array('exception' => $e)); 421 $result = $formatter->format($record); 422 423 $this->assertSame( 424 '{"function":"throwHelper","class":"Monolog\\\\Formatter\\\\NormalizerFormatterTest","type":"->","args":["[object] (Monolog\\\\Formatter\\\\TestInfoLeak)","'.$dt->format('Y-m-d H:i:s').'"]}', 425 $result['context']['exception']['trace'][0] 426 ); 427 } 428 429 private function throwHelper($arg) 430 { 431 throw new \RuntimeException('Thrown'); 432 } 383 433 } 384 434 … … 422 472 } 423 473 } 474 475 class TestInfoLeak 476 { 477 public function __toString() 478 { 479 return 'Sensitive information'; 480 } 481 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php
r1756617 r1986677 22 22 protected function setUp() 23 23 { 24 BrowserConsoleHandler::reset ();24 BrowserConsoleHandler::resetStatic(); 25 25 } 26 26 -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php
r1756617 r1986677 22 22 protected function setUp() 23 23 { 24 TestChromePHPHandler::reset ();24 TestChromePHPHandler::resetStatic(); 25 25 $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; Chrome/1.0'; 26 26 } … … 137 137 protected $headers = array(); 138 138 139 public static function reset ()139 public static function resetStatic() 140 140 { 141 141 self::$initialized = false; -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php
r1756617 r1986677 59 59 * @covers Monolog\Handler\FingersCrossedHandler::reset 60 60 */ 61 public function testHandleRes tartBufferingAfterReset()61 public function testHandleResetBufferingAfterReset() 62 62 { 63 63 $test = new TestHandler(); … … 77 77 * @covers Monolog\Handler\FingersCrossedHandler::activate 78 78 */ 79 public function testHandleRes tartBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled()79 public function testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled() 80 80 { 81 81 $test = new TestHandler(); -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php
r1756617 r1986677 22 22 public function setUp() 23 23 { 24 TestFirePHPHandler::reset ();24 TestFirePHPHandler::resetStatic(); 25 25 $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; FirePHP/1.0'; 26 26 } … … 78 78 protected $headers = array(); 79 79 80 public static function reset ()80 public static function resetStatic() 81 81 { 82 82 self::$initialized = false; -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php
r1756617 r1986677 192 192 } 193 193 194 /** 195 * @dataProvider rotationWhenSimilarFilesExistTests 196 */ 197 public function testRotationWhenSimilarFileNamesExist($dateFormat) 198 { 199 touch($old1 = __DIR__.'/Fixtures/foo-foo-'.date($dateFormat).'.rot'); 200 touch($old2 = __DIR__.'/Fixtures/foo-bar-'.date($dateFormat).'.rot'); 201 202 $log = __DIR__.'/Fixtures/foo-'.date($dateFormat).'.rot'; 203 204 $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); 205 $handler->setFormatter($this->getIdentityFormatter()); 206 $handler->setFilenameFormat('{filename}-{date}', $dateFormat); 207 $handler->handle($this->getRecord()); 208 $handler->close(); 209 210 $this->assertTrue(file_exists($log)); 211 } 212 213 public function rotationWhenSimilarFilesExistTests() 214 { 215 216 return array( 217 'Rotation is triggered when the file of the current day is not present but similar exists' 218 => array(RotatingFileHandler::FILE_PER_DAY), 219 220 'Rotation is triggered when the file of the current month is not present but similar exists' 221 => array(RotatingFileHandler::FILE_PER_MONTH), 222 223 'Rotation is triggered when the file of the current year is not present but similar exists' 224 => array(RotatingFileHandler::FILE_PER_YEAR), 225 ); 226 } 227 194 228 public function testReuseCurrentFile() 195 229 { -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php
r1756617 r1986677 321 321 ), 322 322 array( 323 'title' => ' tags',323 'title' => 'Tags', 324 324 'value' => sprintf('```%s```', json_encode($extra['tags'])), 325 325 'short' => false 326 326 ), 327 327 array( 328 'title' => ' test',328 'title' => 'Test', 329 329 'value' => $context['test'], 330 330 'short' => false … … 354 354 } 355 355 356 public function testContextHasException() 357 { 358 $record = $this->getRecord(Logger::CRITICAL, 'This is a critical message.', array('exception' => new \Exception())); 359 $slackRecord = new SlackRecord(null, null, true, null, false, true); 360 $data = $slackRecord->getSlackData($record); 361 $this->assertInternalType('string', $data['attachments'][0]['fields'][1]['value']); 362 } 363 356 364 public function testExcludeExtraAndContextFields() 357 365 { … … 369 377 $expected = array( 370 378 array( 371 'title' => ' info',379 'title' => 'Info', 372 380 'value' => sprintf('```%s```', json_encode(array('author' => 'Jordi'), $this->jsonPrettyPrintFlag)), 373 381 'short' => false 374 382 ), 375 383 array( 376 'title' => ' tags',384 'title' => 'Tags', 377 385 'value' => sprintf('```%s```', json_encode(array('web'))), 378 386 'short' => false -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php
r1756617 r1986677 78 78 } 79 79 80 public function testSetChunkSize() 81 { 82 $this->createHandler('localhost:1234'); 83 $this->handler->setChunkSize(1025); 84 $this->assertEquals(1025, $this->handler->getChunkSize()); 85 } 86 80 87 public function testSetConnectionString() 81 88 { … … 117 124 $this->handler->expects($this->once()) 118 125 ->method('streamSetTimeout') 126 ->will($this->returnValue(false)); 127 $this->writeRecord('Hello world'); 128 } 129 130 /** 131 * @expectedException UnexpectedValueException 132 */ 133 public function testExceptionIsThrownIfCannotSetChunkSize() 134 { 135 $this->setMockHandler(array('streamSetChunkSize')); 136 $this->handler->setChunkSize(8192); 137 $this->handler->expects($this->once()) 138 ->method('streamSetChunkSize') 119 139 ->will($this->returnValue(false)); 120 140 $this->writeRecord('Hello world'); … … 305 325 } 306 326 327 if (!in_array('streamSetChunkSize', $methods)) { 328 $this->handler->expects($this->any()) 329 ->method('streamSetChunkSize') 330 ->will($this->returnValue(8192)); 331 } 332 307 333 $this->handler->setFormatter($this->getIdentityFormatter()); 308 334 } -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php
r1756617 r1986677 55 55 } 56 56 57 public function testHandlerAssertEmptyContext() { 58 $handler = new TestHandler; 59 $record = $this->getRecord(Logger::WARNING, 'test', array()); 60 $this->assertFalse($handler->hasWarning(array( 61 'message' => 'test', 62 'context' => array(), 63 ))); 64 65 $handler->handle($record); 66 67 $this->assertTrue($handler->hasWarning(array( 68 'message' => 'test', 69 'context' => array(), 70 ))); 71 $this->assertFalse($handler->hasWarning(array( 72 'message' => 'test', 73 'context' => array( 74 'foo' => 'bar' 75 ), 76 ))); 77 } 78 79 public function testHandlerAssertNonEmptyContext() { 80 $handler = new TestHandler; 81 $record = $this->getRecord(Logger::WARNING, 'test', array('foo' => 'bar')); 82 $this->assertFalse($handler->hasWarning(array( 83 'message' => 'test', 84 'context' => array( 85 'foo' => 'bar' 86 ), 87 ))); 88 89 $handler->handle($record); 90 91 $this->assertTrue($handler->hasWarning(array( 92 'message' => 'test', 93 'context' => array( 94 'foo' => 'bar' 95 ), 96 ))); 97 $this->assertFalse($handler->hasWarning(array( 98 'message' => 'test', 99 'context' => array(), 100 ))); 101 } 102 57 103 public function methodProvider() 58 104 { -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php
r1756617 r1986677 89 89 90 90 /** 91 * @covers Monolog\Handler\WhatFailureGroupHandler::handleBatch 92 */ 93 public function testHandleBatchUsesProcessors() 94 { 95 $testHandlers = array(new TestHandler(), new TestHandler()); 96 $handler = new WhatFailureGroupHandler($testHandlers); 97 $handler->pushProcessor(function ($record) { 98 $record['extra']['foo'] = true; 99 100 return $record; 101 }); 102 $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); 103 foreach ($testHandlers as $test) { 104 $this->assertTrue($test->hasDebugRecords()); 105 $this->assertTrue($test->hasInfoRecords()); 106 $this->assertTrue(count($test->getRecords()) === 2); 107 $records = $test->getRecords(); 108 $this->assertTrue($records[0]['extra']['foo']); 109 $this->assertTrue($records[1]['extra']['foo']); 110 } 111 } 112 113 /** 91 114 * @covers Monolog\Handler\WhatFailureGroupHandler::handle 92 115 */ -
next-active-directory-integration/trunk/vendor/monolog/monolog/tests/Monolog/LoggerTest.php
r1756617 r1986677 546 546 ); 547 547 } 548 549 /** 550 * @covers Monolog\Logger::setExceptionHandler 551 */ 552 public function testSetExceptionHandler() 553 { 554 $logger = new Logger(__METHOD__); 555 $this->assertNull($logger->getExceptionHandler()); 556 $callback = function ($ex) { 557 }; 558 $logger->setExceptionHandler($callback); 559 $this->assertEquals($callback, $logger->getExceptionHandler()); 560 } 561 562 /** 563 * @covers Monolog\Logger::setExceptionHandler 564 * @expectedException InvalidArgumentException 565 */ 566 public function testBadExceptionHandlerType() 567 { 568 $logger = new Logger(__METHOD__); 569 $logger->setExceptionHandler(false); 570 } 571 572 /** 573 * @covers Monolog\Logger::handleException 574 * @expectedException Exception 575 */ 576 public function testDefaultHandleException() 577 { 578 $logger = new Logger(__METHOD__); 579 $handler = $this->getMock('Monolog\Handler\HandlerInterface'); 580 $handler->expects($this->any()) 581 ->method('isHandling') 582 ->will($this->returnValue(true)) 583 ; 584 $handler->expects($this->any()) 585 ->method('handle') 586 ->will($this->throwException(new \Exception('Some handler exception'))) 587 ; 588 $logger->pushHandler($handler); 589 $logger->info('test'); 590 } 591 592 /** 593 * @covers Monolog\Logger::handleException 594 * @covers Monolog\Logger::addRecord 595 */ 596 public function testCustomHandleException() 597 { 598 $logger = new Logger(__METHOD__); 599 $that = $this; 600 $logger->setExceptionHandler(function ($e, $record) use ($that) { 601 $that->assertEquals($e->getMessage(), 'Some handler exception'); 602 $that->assertTrue(is_array($record)); 603 $that->assertEquals($record['message'], 'test'); 604 }); 605 $handler = $this->getMock('Monolog\Handler\HandlerInterface'); 606 $handler->expects($this->any()) 607 ->method('isHandling') 608 ->will($this->returnValue(true)) 609 ; 610 $handler->expects($this->any()) 611 ->method('handle') 612 ->will($this->throwException(new \Exception('Some handler exception'))) 613 ; 614 $logger->pushHandler($handler); 615 $logger->info('test'); 616 } 617 618 public function testReset() 619 { 620 $logger = new Logger('app'); 621 622 $testHandler = new Handler\TestHandler(); 623 $bufferHandler = new Handler\BufferHandler($testHandler); 624 $groupHandler = new Handler\GroupHandler(array($bufferHandler)); 625 $fingersCrossedHandler = new Handler\FingersCrossedHandler($groupHandler); 626 627 $logger->pushHandler($fingersCrossedHandler); 628 629 $processorUid1 = new Processor\UidProcessor(10); 630 $uid1 = $processorUid1->getUid(); 631 $groupHandler->pushProcessor($processorUid1); 632 633 $processorUid2 = new Processor\UidProcessor(5); 634 $uid2 = $processorUid2->getUid(); 635 $logger->pushProcessor($processorUid2); 636 637 $getProperty = function ($object, $property) { 638 $reflectionProperty = new \ReflectionProperty(get_class($object), $property); 639 $reflectionProperty->setAccessible(true); 640 641 return $reflectionProperty->getValue($object); 642 }; 643 $that = $this; 644 $assertBufferOfBufferHandlerEmpty = function () use ($getProperty, $bufferHandler, $that) { 645 $that->assertEmpty($getProperty($bufferHandler, 'buffer')); 646 }; 647 $assertBuffersEmpty = function() use ($assertBufferOfBufferHandlerEmpty, $getProperty, $fingersCrossedHandler, $that) { 648 $assertBufferOfBufferHandlerEmpty(); 649 $that->assertEmpty($getProperty($fingersCrossedHandler, 'buffer')); 650 }; 651 652 $logger->debug('debug'); 653 $logger->reset(); 654 $assertBuffersEmpty(); 655 $this->assertFalse($testHandler->hasDebugRecords()); 656 $this->assertFalse($testHandler->hasErrorRecords()); 657 $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); 658 $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); 659 660 $logger->debug('debug'); 661 $logger->error('error'); 662 $logger->reset(); 663 $assertBuffersEmpty(); 664 $this->assertTrue($testHandler->hasDebugRecords()); 665 $this->assertTrue($testHandler->hasErrorRecords()); 666 $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); 667 $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); 668 669 $logger->info('info'); 670 $this->assertNotEmpty($getProperty($fingersCrossedHandler, 'buffer')); 671 $assertBufferOfBufferHandlerEmpty(); 672 $this->assertFalse($testHandler->hasInfoRecords()); 673 674 $logger->reset(); 675 $assertBuffersEmpty(); 676 $this->assertFalse($testHandler->hasInfoRecords()); 677 $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); 678 $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); 679 680 $logger->notice('notice'); 681 $logger->emergency('emergency'); 682 $logger->reset(); 683 $assertBuffersEmpty(); 684 $this->assertFalse($testHandler->hasInfoRecords()); 685 $this->assertTrue($testHandler->hasNoticeRecords()); 686 $this->assertTrue($testHandler->hasEmergencyRecords()); 687 $this->assertNotSame($uid1, $processorUid1->getUid()); 688 $this->assertNotSame($uid2, $processorUid2->getUid()); 689 } 548 690 } -
next-active-directory-integration/trunk/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
r1756617 r1986677 102 102 public function testContextCanContainAnything() 103 103 { 104 $closed = fopen('php://memory', 'r'); 105 fclose($closed); 106 104 107 $context = array( 105 108 'bool' => true, … … 111 114 'object' => new \DateTime, 112 115 'resource' => fopen('php://memory', 'r'), 116 'closed' => $closed, 113 117 ); 114 118 -
next-active-directory-integration/trunk/vendor/psr/log/README.md
r1756617 r1986677 7 7 Note that this is not a logger of its own. It is merely an interface that 8 8 describes a logger. See the specification for more details. 9 10 Installation 11 ------------ 12 13 ```bash 14 composer require psr/log 15 ``` 9 16 10 17 Usage
Note: See TracChangeset
for help on using the changeset viewer.