Changeset 1782802
- Timestamp:
- 12/07/2017 04:12:10 PM (8 years ago)
- Location:
- smartling-connector/trunk
- Files:
-
- 6 edited
-
inc/Smartling/Extensions/Acf/AcfDynamicSupport.php (modified) (3 diffs)
-
inc/third-party/composer/installed.json (modified) (2 diffs)
-
inc/third-party/symfony/dependency-injection/ContainerBuilder.php (modified) (12 diffs)
-
inc/third-party/symfony/yaml/Inline.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
smartling-connector.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smartling-connector/trunk/inc/Smartling/Extensions/Acf/AcfDynamicSupport.php
r1776395 r1782802 454 454 foreach ($this->rules['copy'] as $key) { 455 455 $rules[] = [ 456 'pattern' => vsprintf(' %s', [$this->buildFullFieldName($key)]),456 'pattern' => vsprintf('^meta\/%s$', [$this->buildFullFieldName($key)]), 457 457 'action' => 'copy', 458 458 ]; … … 464 464 foreach ($this->rules['skip'] as $key) { 465 465 $rules[] = [ 466 'pattern' => vsprintf(' %s', [$this->buildFullFieldName($key)]),466 'pattern' => vsprintf('^meta\/%s$', [$this->buildFullFieldName($key)]), 467 467 'action' => 'skip', 468 468 ]; … … 474 474 foreach ($this->rules['localize'] as $key) { 475 475 $rules[] = [ 476 'pattern' => vsprintf(' %s', [$this->buildFullFieldName($key)]),476 'pattern' => vsprintf('^meta\/%s$', [$this->buildFullFieldName($key)]), 477 477 'action' => 'localize', 478 478 'value' => 'reference', -
smartling-connector/trunk/inc/third-party/composer/installed.json
r1773258 r1782802 388 388 }, 389 389 { 390 "name": "symfony/dependency-injection",391 "version": "v2.8.31",392 "version_normalized": "2.8.31.0",393 "source": {394 "type": "git",395 "url": "https://github.com/symfony/dependency-injection.git",396 "reference": "bc845111480786a9a68b39578ecdf27d9a6a44ec"397 },398 "dist": {399 "type": "zip",400 "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bc845111480786a9a68b39578ecdf27d9a6a44ec",401 "reference": "bc845111480786a9a68b39578ecdf27d9a6a44ec",402 "shasum": ""403 },404 "require": {405 "php": ">=5.3.9"406 },407 "conflict": {408 "symfony/expression-language": "<2.6"409 },410 "require-dev": {411 "symfony/config": "~2.2|~3.0.0",412 "symfony/expression-language": "~2.6|~3.0.0",413 "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7"414 },415 "suggest": {416 "symfony/config": "",417 "symfony/expression-language": "For using expressions in service container configuration",418 "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",419 "symfony/yaml": ""420 },421 "time": "2017-11-07 14:08:47",422 "type": "library",423 "extra": {424 "branch-alias": {425 "dev-master": "2.8-dev"426 }427 },428 "installation-source": "dist",429 "autoload": {430 "psr-4": {431 "Symfony\\Component\\DependencyInjection\\": ""432 },433 "exclude-from-classmap": [434 "/Tests/"435 ]436 },437 "notification-url": "https://packagist.org/downloads/",438 "license": [439 "MIT"440 ],441 "authors": [442 {443 "name": "Fabien Potencier",444 "email": "fabien@symfony.com"445 },446 {447 "name": "Symfony Community",448 "homepage": "https://symfony.com/contributors"449 }450 ],451 "description": "Symfony DependencyInjection Component",452 "homepage": "https://symfony.com"453 },454 {455 "name": "symfony/config",456 "version": "v2.8.31",457 "version_normalized": "2.8.31.0",458 "source": {459 "type": "git",460 "url": "https://github.com/symfony/config.git",461 "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196"462 },463 "dist": {464 "type": "zip",465 "url": "https://api.github.com/repos/symfony/config/zipball/f4f3f1d7090c464434bbbc3e8aa2b41149c59196",466 "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196",467 "shasum": ""468 },469 "require": {470 "php": ">=5.3.9",471 "symfony/filesystem": "~2.3|~3.0.0"472 },473 "require-dev": {474 "symfony/yaml": "~2.7|~3.0.0"475 },476 "suggest": {477 "symfony/yaml": "To use the yaml reference dumper"478 },479 "time": "2017-11-07 11:56:23",480 "type": "library",481 "extra": {482 "branch-alias": {483 "dev-master": "2.8-dev"484 }485 },486 "installation-source": "dist",487 "autoload": {488 "psr-4": {489 "Symfony\\Component\\Config\\": ""490 },491 "exclude-from-classmap": [492 "/Tests/"493 ]494 },495 "notification-url": "https://packagist.org/downloads/",496 "license": [497 "MIT"498 ],499 "authors": [500 {501 "name": "Fabien Potencier",502 "email": "fabien@symfony.com"503 },504 {505 "name": "Symfony Community",506 "homepage": "https://symfony.com/contributors"507 }508 ],509 "description": "Symfony Config Component",510 "homepage": "https://symfony.com"511 },512 {513 "name": "symfony/yaml",514 "version": "v2.8.31",515 "version_normalized": "2.8.31.0",516 "source": {517 "type": "git",518 "url": "https://github.com/symfony/yaml.git",519 "reference": "d819bf267e901727141fe828ae888486fd21236e"520 },521 "dist": {522 "type": "zip",523 "url": "https://api.github.com/repos/symfony/yaml/zipball/d819bf267e901727141fe828ae888486fd21236e",524 "reference": "d819bf267e901727141fe828ae888486fd21236e",525 "shasum": ""526 },527 "require": {528 "php": ">=5.3.9"529 },530 "time": "2017-11-05 15:25:56",531 "type": "library",532 "extra": {533 "branch-alias": {534 "dev-master": "2.8-dev"535 }536 },537 "installation-source": "dist",538 "autoload": {539 "psr-4": {540 "Symfony\\Component\\Yaml\\": ""541 },542 "exclude-from-classmap": [543 "/Tests/"544 ]545 },546 "notification-url": "https://packagist.org/downloads/",547 "license": [548 "MIT"549 ],550 "authors": [551 {552 "name": "Fabien Potencier",553 "email": "fabien@symfony.com"554 },555 {556 "name": "Symfony Community",557 "homepage": "https://symfony.com/contributors"558 }559 ],560 "description": "Symfony Yaml Component",561 "homepage": "https://symfony.com"562 },563 {564 390 "name": "smartling/api-sdk-php", 565 391 "version": "1.10.0", … … 612 438 "issues": "https://github.com/Smartling/api-sdk-php/issues" 613 439 } 440 }, 441 { 442 "name": "symfony/dependency-injection", 443 "version": "v2.8.32", 444 "version_normalized": "2.8.32.0", 445 "source": { 446 "type": "git", 447 "url": "https://github.com/symfony/dependency-injection.git", 448 "reference": "d3e81e5402c38500770eb5595d78a6d85ea9e412" 449 }, 450 "dist": { 451 "type": "zip", 452 "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d3e81e5402c38500770eb5595d78a6d85ea9e412", 453 "reference": "d3e81e5402c38500770eb5595d78a6d85ea9e412", 454 "shasum": "" 455 }, 456 "require": { 457 "php": ">=5.3.9" 458 }, 459 "conflict": { 460 "symfony/expression-language": "<2.6" 461 }, 462 "require-dev": { 463 "symfony/config": "~2.2|~3.0.0", 464 "symfony/expression-language": "~2.6|~3.0.0", 465 "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7" 466 }, 467 "suggest": { 468 "symfony/config": "", 469 "symfony/expression-language": "For using expressions in service container configuration", 470 "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", 471 "symfony/yaml": "" 472 }, 473 "time": "2017-11-23 11:13:33", 474 "type": "library", 475 "extra": { 476 "branch-alias": { 477 "dev-master": "2.8-dev" 478 } 479 }, 480 "installation-source": "dist", 481 "autoload": { 482 "psr-4": { 483 "Symfony\\Component\\DependencyInjection\\": "" 484 }, 485 "exclude-from-classmap": [ 486 "/Tests/" 487 ] 488 }, 489 "notification-url": "https://packagist.org/downloads/", 490 "license": [ 491 "MIT" 492 ], 493 "authors": [ 494 { 495 "name": "Fabien Potencier", 496 "email": "fabien@symfony.com" 497 }, 498 { 499 "name": "Symfony Community", 500 "homepage": "https://symfony.com/contributors" 501 } 502 ], 503 "description": "Symfony DependencyInjection Component", 504 "homepage": "https://symfony.com" 505 }, 506 { 507 "name": "symfony/config", 508 "version": "v2.8.32", 509 "version_normalized": "2.8.32.0", 510 "source": { 511 "type": "git", 512 "url": "https://github.com/symfony/config.git", 513 "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196" 514 }, 515 "dist": { 516 "type": "zip", 517 "url": "https://api.github.com/repos/symfony/config/zipball/f4f3f1d7090c464434bbbc3e8aa2b41149c59196", 518 "reference": "f4f3f1d7090c464434bbbc3e8aa2b41149c59196", 519 "shasum": "" 520 }, 521 "require": { 522 "php": ">=5.3.9", 523 "symfony/filesystem": "~2.3|~3.0.0" 524 }, 525 "require-dev": { 526 "symfony/yaml": "~2.7|~3.0.0" 527 }, 528 "suggest": { 529 "symfony/yaml": "To use the yaml reference dumper" 530 }, 531 "time": "2017-11-07 11:56:23", 532 "type": "library", 533 "extra": { 534 "branch-alias": { 535 "dev-master": "2.8-dev" 536 } 537 }, 538 "installation-source": "dist", 539 "autoload": { 540 "psr-4": { 541 "Symfony\\Component\\Config\\": "" 542 }, 543 "exclude-from-classmap": [ 544 "/Tests/" 545 ] 546 }, 547 "notification-url": "https://packagist.org/downloads/", 548 "license": [ 549 "MIT" 550 ], 551 "authors": [ 552 { 553 "name": "Fabien Potencier", 554 "email": "fabien@symfony.com" 555 }, 556 { 557 "name": "Symfony Community", 558 "homepage": "https://symfony.com/contributors" 559 } 560 ], 561 "description": "Symfony Config Component", 562 "homepage": "https://symfony.com" 563 }, 564 { 565 "name": "symfony/yaml", 566 "version": "v2.8.32", 567 "version_normalized": "2.8.32.0", 568 "source": { 569 "type": "git", 570 "url": "https://github.com/symfony/yaml.git", 571 "reference": "968ef42161e4bc04200119da473077f9e7015128" 572 }, 573 "dist": { 574 "type": "zip", 575 "url": "https://api.github.com/repos/symfony/yaml/zipball/968ef42161e4bc04200119da473077f9e7015128", 576 "reference": "968ef42161e4bc04200119da473077f9e7015128", 577 "shasum": "" 578 }, 579 "require": { 580 "php": ">=5.3.9" 581 }, 582 "time": "2017-11-29 09:33:18", 583 "type": "library", 584 "extra": { 585 "branch-alias": { 586 "dev-master": "2.8-dev" 587 } 588 }, 589 "installation-source": "dist", 590 "autoload": { 591 "psr-4": { 592 "Symfony\\Component\\Yaml\\": "" 593 }, 594 "exclude-from-classmap": [ 595 "/Tests/" 596 ] 597 }, 598 "notification-url": "https://packagist.org/downloads/", 599 "license": [ 600 "MIT" 601 ], 602 "authors": [ 603 { 604 "name": "Fabien Potencier", 605 "email": "fabien@symfony.com" 606 }, 607 { 608 "name": "Symfony Community", 609 "homepage": "https://symfony.com/contributors" 610 } 611 ], 612 "description": "Symfony Yaml Component", 613 "homepage": "https://symfony.com" 614 614 } 615 615 ] -
smartling-connector/trunk/inc/third-party/symfony/dependency-injection/ContainerBuilder.php
r1769276 r1782802 461 461 462 462 try { 463 $service = $this->createService($definition, $id);463 $service = $this->createService($definition, new \SplObjectStorage(), $id); 464 464 } catch (\Exception $e) { 465 465 unset($this->loading[$id]); … … 847 847 * @internal this method is public because of PHP 5.3 limitations, do not use it explicitly in your code 848 848 */ 849 public function createService(Definition $definition, $id, $tryProxy = true) 850 { 849 public function createService(Definition $definition, \SplObjectStorage $inlinedDefinitions, $id = null, $tryProxy = true) 850 { 851 if (null === $id && isset($inlinedDefinitions[$definition])) { 852 return $inlinedDefinitions[$definition]; 853 } 854 851 855 if ($definition instanceof DefinitionDecorator) { 852 856 throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id)); … … 869 873 $container, 870 874 $definition, 871 $id, function () use ($definition, $i d, $container) {872 return $container->createService($definition, $i d, false);875 $id, function () use ($definition, $inlinedDefinitions, $id, $container) { 876 return $container->createService($definition, $inlinedDefinitions, $id, false); 873 877 } 874 878 ); 875 $this->shareService($definition, $proxy, $id );879 $this->shareService($definition, $proxy, $id, $inlinedDefinitions); 876 880 877 881 return $proxy; … … 884 888 } 885 889 886 $arguments = $this-> resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())));890 $arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())), $inlinedDefinitions); 887 891 888 892 if (null !== $factory = $definition->getFactory()) { 889 893 if (is_array($factory)) { 890 $factory = array($this-> resolveServices($parameterBag->resolveValue($factory[0])), $factory[1]);894 $factory = array($this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlinedDefinitions), $factory[1]); 891 895 } elseif (!is_string($factory)) { 892 896 throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory', $id)); … … 924 928 if ($tryProxy || !$definition->isLazy()) { 925 929 // share only if proxying failed, or if not a proxy 926 $this->shareService($definition, $service, $id );927 } 928 929 $properties = $this-> resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())));930 $this->shareService($definition, $service, $id, $inlinedDefinitions); 931 } 932 933 $properties = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())), $inlinedDefinitions); 930 934 foreach ($properties as $name => $value) { 931 935 $service->$name = $value; … … 933 937 934 938 foreach ($definition->getMethodCalls() as $call) { 935 $this->callMethod($service, $call );939 $this->callMethod($service, $call, $inlinedDefinitions); 936 940 } 937 941 … … 943 947 $callable[0] = $this->get((string) $callable[0], $callable[0]->getInvalidBehavior()); 944 948 } elseif ($callable[0] instanceof Definition) { 945 $callable[0] = $this->createService($callable[0], null);949 $callable[0] = $this->createService($callable[0], $inlinedDefinitions); 946 950 } 947 951 } … … 967 971 public function resolveServices($value) 968 972 { 973 return $this->doResolveServices($value, new \SplObjectStorage()); 974 } 975 976 private function doResolveServices($value, \SplObjectStorage $inlinedDefinitions) 977 { 969 978 if (is_array($value)) { 970 979 foreach ($value as $k => $v) { 971 $value[$k] = $this-> resolveServices($v);980 $value[$k] = $this->doResolveServices($v, $inlinedDefinitions); 972 981 } 973 982 } elseif ($value instanceof Reference) { 974 983 $value = $this->get((string) $value, $value->getInvalidBehavior()); 975 984 } elseif ($value instanceof Definition) { 976 $value = $this->createService($value, null);985 $value = $this->createService($value, $inlinedDefinitions); 977 986 } elseif ($value instanceof Expression) { 978 987 $value = $this->getExpressionLanguage()->evaluate($value, array('container' => $this)); … … 1112 1121 foreach ($call[1] as $argument) { 1113 1122 if ($argument instanceof Reference && $id == (string) $argument) { 1114 $this->callMethod($this->get($definitionId), $call );1123 $this->callMethod($this->get($definitionId), $call, new \SplObjectStorage()); 1115 1124 } 1116 1125 } … … 1119 1128 } 1120 1129 1121 private function callMethod($service, $call )1130 private function callMethod($service, $call, \SplObjectStorage $inlinedDefinitions) 1122 1131 { 1123 1132 $services = self::getServiceConditionals($call[1]); … … 1129 1138 } 1130 1139 1131 call_user_func_array(array($service, $call[0]), $this-> resolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1]))));1140 call_user_func_array(array($service, $call[0]), $this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlinedDefinitions)); 1132 1141 } 1133 1142 … … 1141 1150 * @throws InactiveScopeException 1142 1151 */ 1143 private function shareService(Definition $definition, $service, $id) 1144 { 1145 if (null !== $id && $definition->isShared() && self::SCOPE_PROTOTYPE !== $scope = $definition->getScope(false)) { 1152 private function shareService(Definition $definition, $service, $id, \SplObjectStorage $inlinedDefinitions) 1153 { 1154 if (!$definition->isShared() || self::SCOPE_PROTOTYPE === $scope = $definition->getScope(false)) { 1155 return; 1156 } 1157 if (null === $id) { 1158 $inlinedDefinitions[$definition] = $service; 1159 } else { 1146 1160 if (self::SCOPE_CONTAINER !== $scope && !isset($this->scopedServices[$scope])) { 1147 1161 throw new InactiveScopeException($id, $scope); -
smartling-connector/trunk/inc/third-party/symfony/yaml/Inline.php
r1769276 r1782802 376 376 $len = strlen($mapping); 377 377 ++$i; 378 $allowOverwrite = false; 378 379 379 380 // {foo: bar, bar:foo, ...} … … 395 396 $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false); 396 397 398 if ('<<' === $key) { 399 $allowOverwrite = true; 400 } 401 397 402 // value 398 403 $done = false; … … 406 411 // Parser cannot abort this mapping earlier, since lines 407 412 // are processed sequentially. 408 if (!isset($output[$key])) { 413 // But overwriting is allowed when a merge node is used in current block. 414 if ('<<' === $key) { 415 foreach ($value as $parsedValue) { 416 $output += $parsedValue; 417 } 418 } elseif ($allowOverwrite || !isset($output[$key])) { 409 419 $output[$key] = $value; 410 420 } … … 417 427 // Parser cannot abort this mapping earlier, since lines 418 428 // are processed sequentially. 419 if (!isset($output[$key])) { 429 // But overwriting is allowed when a merge node is used in current block. 430 if ('<<' === $key) { 431 $output += $value; 432 } elseif ($allowOverwrite || !isset($output[$key])) { 420 433 $output[$key] = $value; 421 434 } … … 430 443 // Parser cannot abort this mapping earlier, since lines 431 444 // are processed sequentially. 432 if (!isset($output[$key])) { 445 // But overwriting is allowed when a merge node is used in current block. 446 if ('<<' === $key) { 447 $output += $value; 448 } elseif ($allowOverwrite || !isset($output[$key])) { 433 449 $output[$key] = $value; 434 450 } -
smartling-connector/trunk/readme.txt
r1779729 r1782802 4 4 Requires at least: 4.6 5 5 Tested up to: 4.9.1 6 Stable tag: 1.6.1 06 Stable tag: 1.6.11 7 7 License: GPLv2 or later 8 8 … … 60 60 == Changelog == 61 61 62 = 1.6.11 = 63 * Fixed possible incorrect filter selection when fields names partially match. 64 62 65 = 1.6.10 = 63 66 * Improved functionality that works with temporary files. -
smartling-connector/trunk/smartling-connector.php
r1779729 r1782802 8 8 * Plugin URI: https://www.smartling.com/translation-software/wordpress-translation-plugin/ 9 9 * Description: Integrate your Wordpress site with Smartling to upload your content and download translations. 10 * Version: 1.6.1 010 * Version: 1.6.11 11 11 * Author: Smartling 12 12 * Author URI: https://www.smartling.com
Note: See TracChangeset
for help on using the changeset viewer.