Changeset 3420880
- Timestamp:
- 12/16/2025 10:29:00 AM (4 months ago)
- Location:
- speechkit
- Files:
-
- 407 added
- 2 deleted
- 48 edited
-
tags/6.0.3 (added)
-
tags/6.0.3/LICENSE.txt (added)
-
tags/6.0.3/assets (added)
-
tags/6.0.3/assets/lang-codes.json (added)
-
tags/6.0.3/build (added)
-
tags/6.0.3/build/Component (added)
-
tags/6.0.3/build/Component/Post (added)
-
tags/6.0.3/build/Component/Post/AddPlayer (added)
-
tags/6.0.3/build/Component/Post/AddPlayer/block.json (added)
-
tags/6.0.3/build/index.asset.php (added)
-
tags/6.0.3/build/index.js (added)
-
tags/6.0.3/build/settings.asset.php (added)
-
tags/6.0.3/build/settings.js (added)
-
tags/6.0.3/changelog.txt (added)
-
tags/6.0.3/composer.json (added)
-
tags/6.0.3/index.php (added)
-
tags/6.0.3/languages (added)
-
tags/6.0.3/languages/speechkit.pot (added)
-
tags/6.0.3/readme.txt (added)
-
tags/6.0.3/speechkit.php (added)
-
tags/6.0.3/src (added)
-
tags/6.0.3/src/Compatibility (added)
-
tags/6.0.3/src/Compatibility/WPGraphQL (added)
-
tags/6.0.3/src/Compatibility/WPGraphQL/WPGraphQL.php (added)
-
tags/6.0.3/src/Component (added)
-
tags/6.0.3/src/Component/Plugin (added)
-
tags/6.0.3/src/Component/Plugin/Panel (added)
-
tags/6.0.3/src/Component/Plugin/Panel/DocumentSetting (added)
-
tags/6.0.3/src/Component/Plugin/Panel/DocumentSetting/index.js (added)
-
tags/6.0.3/src/Component/Plugin/Panel/Prepublish (added)
-
tags/6.0.3/src/Component/Plugin/Panel/Prepublish/index.js (added)
-
tags/6.0.3/src/Component/Plugin/Sidebar (added)
-
tags/6.0.3/src/Component/Plugin/Sidebar/index.js (added)
-
tags/6.0.3/src/Component/Post (added)
-
tags/6.0.3/src/Component/Post/AddPlayer (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/AddPlayer.css (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/AddPlayer.php (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/block.json (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/index.js (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/tinymce-button.png (added)
-
tags/6.0.3/src/Component/Post/AddPlayer/tinymce.js (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/BlockAttributes.php (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/addAttributes.js (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/addControls.js (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/check.js (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/index.js (added)
-
tags/6.0.3/src/Component/Post/BlockAttributes/isBeyondwordsSupportedBlock.js (added)
-
tags/6.0.3/src/Component/Post/DisplayPlayer (added)
-
tags/6.0.3/src/Component/Post/DisplayPlayer/DisplayPlayer.php (added)
-
tags/6.0.3/src/Component/Post/DisplayPlayer/check.js (added)
-
tags/6.0.3/src/Component/Post/DisplayPlayer/index.js (added)
-
tags/6.0.3/src/Component/Post/ErrorNotice (added)
-
tags/6.0.3/src/Component/Post/ErrorNotice/ErrorNotice.php (added)
-
tags/6.0.3/src/Component/Post/ErrorNotice/check.js (added)
-
tags/6.0.3/src/Component/Post/ErrorNotice/error-notice.css (added)
-
tags/6.0.3/src/Component/Post/ErrorNotice/index.js (added)
-
tags/6.0.3/src/Component/Post/GenerateAudio (added)
-
tags/6.0.3/src/Component/Post/GenerateAudio/GenerateAudio.php (added)
-
tags/6.0.3/src/Component/Post/GenerateAudio/index.js (added)
-
tags/6.0.3/src/Component/Post/Metabox (added)
-
tags/6.0.3/src/Component/Post/Metabox/Metabox.css (added)
-
tags/6.0.3/src/Component/Post/Metabox/Metabox.php (added)
-
tags/6.0.3/src/Component/Post/OpenSidebar (added)
-
tags/6.0.3/src/Component/Post/OpenSidebar/index.js (added)
-
tags/6.0.3/src/Component/Post/Panel (added)
-
tags/6.0.3/src/Component/Post/Panel/Help (added)
-
tags/6.0.3/src/Component/Post/Panel/Help/index.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/Inspect.php (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/fetch (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/fetch/index.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/fetch/utils.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/index.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/js (added)
-
tags/6.0.3/src/Component/Post/Panel/Inspect/js/inspect.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Player (added)
-
tags/6.0.3/src/Component/Post/Panel/Player/index.js (added)
-
tags/6.0.3/src/Component/Post/Panel/Prepublish (added)
-
tags/6.0.3/src/Component/Post/Panel/Prepublish/index.js (added)
-
tags/6.0.3/src/Component/Post/PendingNotice (added)
-
tags/6.0.3/src/Component/Post/PendingNotice/check.js (added)
-
tags/6.0.3/src/Component/Post/PendingNotice/index.js (added)
-
tags/6.0.3/src/Component/Post/PlayAudio (added)
-
tags/6.0.3/src/Component/Post/PlayAudio/check.js (added)
-
tags/6.0.3/src/Component/Post/PlayAudio/hooks.js (added)
-
tags/6.0.3/src/Component/Post/PlayAudio/index.js (added)
-
tags/6.0.3/src/Component/Post/PlayerContent (added)
-
tags/6.0.3/src/Component/Post/PlayerContent/PlayerContent.php (added)
-
tags/6.0.3/src/Component/Post/PlayerContent/index.js (added)
-
tags/6.0.3/src/Component/Post/PlayerStyle (added)
-
tags/6.0.3/src/Component/Post/PlayerStyle/PlayerStyle.php (added)
-
tags/6.0.3/src/Component/Post/PlayerStyle/index.js (added)
-
tags/6.0.3/src/Component/Post/Post.php (added)
-
tags/6.0.3/src/Component/Post/PostContentUtils.php (added)
-
tags/6.0.3/src/Component/Post/PostMetaUtils.php (added)
-
tags/6.0.3/src/Component/Post/SelectVoice (added)
-
tags/6.0.3/src/Component/Post/SelectVoice/SelectVoice.php (added)
-
tags/6.0.3/src/Component/Post/SelectVoice/classic-metabox.js (added)
-
tags/6.0.3/src/Component/Post/SelectVoice/index.js (added)
-
tags/6.0.3/src/Component/Post/Sidebar (added)
-
tags/6.0.3/src/Component/Post/Sidebar/PostSidebar.css (added)
-
tags/6.0.3/src/Component/Post/Sidebar/Sidebar.php (added)
-
tags/6.0.3/src/Component/Post/Sidebar/index.js (added)
-
tags/6.0.3/src/Component/Posts (added)
-
tags/6.0.3/src/Component/Posts/BulkEdit (added)
-
tags/6.0.3/src/Component/Posts/BulkEdit/BulkEdit.php (added)
-
tags/6.0.3/src/Component/Posts/BulkEdit/Notices.php (added)
-
tags/6.0.3/src/Component/Posts/Column (added)
-
tags/6.0.3/src/Component/Posts/Column/Column.php (added)
-
tags/6.0.3/src/Component/Settings (added)
-
tags/6.0.3/src/Component/Settings/Fields (added)
-
tags/6.0.3/src/Component/Settings/Fields/ApiKey (added)
-
tags/6.0.3/src/Component/Settings/Fields/ApiKey/ApiKey.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/AutoPublish (added)
-
tags/6.0.3/src/Component/Settings/Fields/AutoPublish/AutoPublish.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/CallToAction (added)
-
tags/6.0.3/src/Component/Settings/Fields/CallToAction/CallToAction.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/IncludeExcerpt (added)
-
tags/6.0.3/src/Component/Settings/Fields/IncludeExcerpt/IncludeExcerpt.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/IncludeTitle (added)
-
tags/6.0.3/src/Component/Settings/Fields/IncludeTitle/IncludeTitle.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/IntegrationMethod (added)
-
tags/6.0.3/src/Component/Settings/Fields/IntegrationMethod/IntegrationMethod.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/Language (added)
-
tags/6.0.3/src/Component/Settings/Fields/Language/Language.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/Language/index.js (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlaybackControls (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlaybackControls/PlaybackControls.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlaybackFromSegments (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlaybackFromSegments/PlaybackFromSegments.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerColors (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerColors/PlayerColors.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerStyle (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerStyle/PlayerStyle.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerUI (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerUI/PlayerUI.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PlayerUI/index.js (added)
-
tags/6.0.3/src/Component/Settings/Fields/PreselectGenerateAudio (added)
-
tags/6.0.3/src/Component/Settings/Fields/PreselectGenerateAudio/PreselectGenerateAudio.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/PreselectGenerateAudio/index.js (added)
-
tags/6.0.3/src/Component/Settings/Fields/PreselectGenerateAudio/post.js (added)
-
tags/6.0.3/src/Component/Settings/Fields/ProjectId (added)
-
tags/6.0.3/src/Component/Settings/Fields/ProjectId/ProjectId.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/SpeakingRate (added)
-
tags/6.0.3/src/Component/Settings/Fields/SpeakingRate/BodyVoiceSpeakingRate.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/SpeakingRate/TitleVoiceSpeakingRate.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/TextHighlighting (added)
-
tags/6.0.3/src/Component/Settings/Fields/TextHighlighting/TextHighlighting.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/Voice (added)
-
tags/6.0.3/src/Component/Settings/Fields/Voice/BodyVoice.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/Voice/TitleVoice.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/Voice/Voice.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/WidgetPosition (added)
-
tags/6.0.3/src/Component/Settings/Fields/WidgetPosition/WidgetPosition.php (added)
-
tags/6.0.3/src/Component/Settings/Fields/WidgetStyle (added)
-
tags/6.0.3/src/Component/Settings/Fields/WidgetStyle/WidgetStyle.php (added)
-
tags/6.0.3/src/Component/Settings/Notices (added)
-
tags/6.0.3/src/Component/Settings/Notices/index.js (added)
-
tags/6.0.3/src/Component/Settings/Settings.php (added)
-
tags/6.0.3/src/Component/Settings/SettingsUtils.php (added)
-
tags/6.0.3/src/Component/Settings/Sync.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Content (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Content/Content.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Credentials (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Credentials/Credentials.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Player (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Player/Player.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Pronunciations (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Pronunciations/Pronunciations.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Summarization (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Summarization/Summarization.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Voices (added)
-
tags/6.0.3/src/Component/Settings/Tabs/Voices/Voices.php (added)
-
tags/6.0.3/src/Component/Settings/Tabs/index.js (added)
-
tags/6.0.3/src/Component/Settings/index.js (added)
-
tags/6.0.3/src/Component/Settings/settings.css (added)
-
tags/6.0.3/src/Component/SiteHealth (added)
-
tags/6.0.3/src/Component/SiteHealth/SiteHealth.php (added)
-
tags/6.0.3/src/Core (added)
-
tags/6.0.3/src/Core/ApiClient.php (added)
-
tags/6.0.3/src/Core/Core.php (added)
-
tags/6.0.3/src/Core/CoreUtils.php (added)
-
tags/6.0.3/src/Core/Environment.php (added)
-
tags/6.0.3/src/Core/Interactions (added)
-
tags/6.0.3/src/Core/Interactions/index.js (added)
-
tags/6.0.3/src/Core/Interactions/store (added)
-
tags/6.0.3/src/Core/Interactions/store/actions.js (added)
-
tags/6.0.3/src/Core/Interactions/store/index.js (added)
-
tags/6.0.3/src/Core/Interactions/store/reducer.js (added)
-
tags/6.0.3/src/Core/Interactions/store/selectors.js (added)
-
tags/6.0.3/src/Core/Player (added)
-
tags/6.0.3/src/Core/Player/ConfigBuilder.php (added)
-
tags/6.0.3/src/Core/Player/Player.php (added)
-
tags/6.0.3/src/Core/Player/Renderer (added)
-
tags/6.0.3/src/Core/Player/Renderer/Amp.php (added)
-
tags/6.0.3/src/Core/Player/Renderer/Base.php (added)
-
tags/6.0.3/src/Core/Player/Renderer/Javascript.php (added)
-
tags/6.0.3/src/Core/Request.php (added)
-
tags/6.0.3/src/Core/Settings (added)
-
tags/6.0.3/src/Core/Settings/index.js (added)
-
tags/6.0.3/src/Core/Settings/store (added)
-
tags/6.0.3/src/Core/Settings/store/actions.js (added)
-
tags/6.0.3/src/Core/Settings/store/controls.js (added)
-
tags/6.0.3/src/Core/Settings/store/index.js (added)
-
tags/6.0.3/src/Core/Settings/store/reducer.js (added)
-
tags/6.0.3/src/Core/Settings/store/resolvers.js (added)
-
tags/6.0.3/src/Core/Settings/store/selectors.js (added)
-
tags/6.0.3/src/Core/Uninstaller.php (added)
-
tags/6.0.3/src/Core/Updater.php (added)
-
tags/6.0.3/src/Core/index.js (added)
-
tags/6.0.3/src/Plugin.php (added)
-
tags/6.0.3/src/index.js (added)
-
tags/6.0.3/uninstall.php (added)
-
tags/6.0.3/vendor (added)
-
tags/6.0.3/vendor/autoload.php (added)
-
tags/6.0.3/vendor/bin (added)
-
tags/6.0.3/vendor/composer (added)
-
tags/6.0.3/vendor/composer/ClassLoader.php (added)
-
tags/6.0.3/vendor/composer/InstalledVersions.php (added)
-
tags/6.0.3/vendor/composer/LICENSE (added)
-
tags/6.0.3/vendor/composer/autoload_classmap.php (added)
-
tags/6.0.3/vendor/composer/autoload_files.php (added)
-
tags/6.0.3/vendor/composer/autoload_namespaces.php (added)
-
tags/6.0.3/vendor/composer/autoload_psr4.php (added)
-
tags/6.0.3/vendor/composer/autoload_real.php (added)
-
tags/6.0.3/vendor/composer/autoload_static.php (added)
-
tags/6.0.3/vendor/composer/installed.json (added)
-
tags/6.0.3/vendor/composer/installed.php (added)
-
tags/6.0.3/vendor/symfony (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/.gitignore (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/CHANGELOG.md (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/LICENSE (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/README.md (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/composer.json (added)
-
tags/6.0.3/vendor/symfony/deprecation-contracts/function.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/AbstractUriElement.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/CHANGELOG.md (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Crawler.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field/ChoiceFormField.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field/FileFormField.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field/FormField.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field/InputFormField.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Field/TextareaFormField.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Form.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/FormFieldRegistry.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Image.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/LICENSE (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Link.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/README.md (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test/Constraint (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test/Constraint/CrawlerSelectorAttributeValueSame.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test/Constraint/CrawlerSelectorExists.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextContains.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextSame.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/UriResolver.php (added)
-
tags/6.0.3/vendor/symfony/dom-crawler/composer.json (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/Ctype.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/LICENSE (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/README.md (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/bootstrap.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/bootstrap80.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-ctype/composer.json (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/Grapheme.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/LICENSE (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/README.md (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/bootstrap.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/bootstrap80.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-grapheme/composer.json (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/LICENSE (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Normalizer.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/README.md (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/stubs (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/unidata (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/bootstrap.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-intl-normalizer/composer.json (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/LICENSE (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Mbstring.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/README.md (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources/unidata (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/bootstrap.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/bootstrap80.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-mbstring/composer.json (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80 (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/LICENSE (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Php80.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/PhpToken.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/README.md (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/bootstrap.php (added)
-
tags/6.0.3/vendor/symfony/polyfill-php80/composer.json (added)
-
tags/6.0.3/vendor/symfony/property-access (added)
-
tags/6.0.3/vendor/symfony/property-access/CHANGELOG.md (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/AccessException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/ExceptionInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/InvalidArgumentException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/InvalidPropertyPathException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/NoSuchIndexException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/NoSuchPropertyException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/OutOfBoundsException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/RuntimeException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/UnexpectedTypeException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/Exception/UninitializedPropertyException.php (added)
-
tags/6.0.3/vendor/symfony/property-access/LICENSE (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyAccess.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyAccessor.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyAccessorBuilder.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyAccessorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyPath.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyPathBuilder.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyPathInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyPathIterator.php (added)
-
tags/6.0.3/vendor/symfony/property-access/PropertyPathIteratorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-access/README.md (added)
-
tags/6.0.3/vendor/symfony/property-access/composer.json (added)
-
tags/6.0.3/vendor/symfony/property-info (added)
-
tags/6.0.3/vendor/symfony/property-info/CHANGELOG.md (added)
-
tags/6.0.3/vendor/symfony/property-info/DependencyInjection (added)
-
tags/6.0.3/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php (added)
-
tags/6.0.3/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/ConstructorArgumentTypeExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/ConstructorExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/PhpDocExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/PhpStanExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/ReflectionExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Extractor/SerializerExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/LICENSE (added)
-
tags/6.0.3/vendor/symfony/property-info/PhpStan (added)
-
tags/6.0.3/vendor/symfony/property-info/PhpStan/NameScope.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PhpStan/NameScopeFactory.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyAccessExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyDescriptionExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyInfoCacheExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyInfoExtractor.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyInfoExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyInitializableExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyListExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyReadInfo.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyReadInfoExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyTypeExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyWriteInfo.php (added)
-
tags/6.0.3/vendor/symfony/property-info/PropertyWriteInfoExtractorInterface.php (added)
-
tags/6.0.3/vendor/symfony/property-info/README.md (added)
-
tags/6.0.3/vendor/symfony/property-info/Type.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Util (added)
-
tags/6.0.3/vendor/symfony/property-info/Util/PhpDocTypeHelper.php (added)
-
tags/6.0.3/vendor/symfony/property-info/Util/PhpStanTypeHelper.php (added)
-
tags/6.0.3/vendor/symfony/property-info/composer.json (added)
-
tags/6.0.3/vendor/symfony/string (added)
-
tags/6.0.3/vendor/symfony/string/AbstractString.php (added)
-
tags/6.0.3/vendor/symfony/string/AbstractUnicodeString.php (added)
-
tags/6.0.3/vendor/symfony/string/ByteString.php (added)
-
tags/6.0.3/vendor/symfony/string/CHANGELOG.md (added)
-
tags/6.0.3/vendor/symfony/string/CodePointString.php (added)
-
tags/6.0.3/vendor/symfony/string/Exception (added)
-
tags/6.0.3/vendor/symfony/string/Exception/ExceptionInterface.php (added)
-
tags/6.0.3/vendor/symfony/string/Exception/InvalidArgumentException.php (added)
-
tags/6.0.3/vendor/symfony/string/Exception/RuntimeException.php (added)
-
tags/6.0.3/vendor/symfony/string/Inflector (added)
-
tags/6.0.3/vendor/symfony/string/Inflector/EnglishInflector.php (added)
-
tags/6.0.3/vendor/symfony/string/Inflector/FrenchInflector.php (added)
-
tags/6.0.3/vendor/symfony/string/Inflector/InflectorInterface.php (added)
-
tags/6.0.3/vendor/symfony/string/LICENSE (added)
-
tags/6.0.3/vendor/symfony/string/LazyString.php (added)
-
tags/6.0.3/vendor/symfony/string/README.md (added)
-
tags/6.0.3/vendor/symfony/string/Resources (added)
-
tags/6.0.3/vendor/symfony/string/Resources/bin (added)
-
tags/6.0.3/vendor/symfony/string/Resources/data (added)
-
tags/6.0.3/vendor/symfony/string/Resources/data/wcswidth_table_wide.php (added)
-
tags/6.0.3/vendor/symfony/string/Resources/data/wcswidth_table_zero.php (added)
-
tags/6.0.3/vendor/symfony/string/Resources/functions.php (added)
-
tags/6.0.3/vendor/symfony/string/Slugger (added)
-
tags/6.0.3/vendor/symfony/string/Slugger/AsciiSlugger.php (added)
-
tags/6.0.3/vendor/symfony/string/Slugger/SluggerInterface.php (added)
-
tags/6.0.3/vendor/symfony/string/UnicodeString.php (added)
-
tags/6.0.3/vendor/symfony/string/composer.json (added)
-
trunk/composer.json (modified) (1 diff)
-
trunk/languages/speechkit.pot (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/speechkit.php (modified) (2 diffs)
-
trunk/src/Component/Settings/Sync.php (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/bin (added)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_files.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (4 diffs)
-
trunk/vendor/composer/installed.json (modified) (7 diffs)
-
trunk/vendor/composer/installed.php (modified) (5 diffs)
-
trunk/vendor/symfony/deprecation-contracts/.gitignore (added)
-
trunk/vendor/symfony/deprecation-contracts/LICENSE (modified) (1 diff)
-
trunk/vendor/symfony/deprecation-contracts/README.md (modified) (1 diff)
-
trunk/vendor/symfony/deprecation-contracts/composer.json (modified) (2 diffs)
-
trunk/vendor/symfony/property-info/CHANGELOG.md (modified) (1 diff)
-
trunk/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php (modified) (1 diff)
-
trunk/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php (modified) (1 diff)
-
trunk/vendor/symfony/property-info/Extractor/ConstructorExtractor.php (modified) (1 diff)
-
trunk/vendor/symfony/property-info/Extractor/PhpDocExtractor.php (modified) (17 diffs)
-
trunk/vendor/symfony/property-info/Extractor/PhpStanExtractor.php (modified) (15 diffs)
-
trunk/vendor/symfony/property-info/Extractor/ReflectionExtractor.php (modified) (26 diffs)
-
trunk/vendor/symfony/property-info/Extractor/SerializerExtractor.php (modified) (3 diffs)
-
trunk/vendor/symfony/property-info/LICENSE (modified) (1 diff)
-
trunk/vendor/symfony/property-info/PhpStan/NameScope.php (modified) (3 diffs)
-
trunk/vendor/symfony/property-info/PhpStan/NameScopeFactory.php (modified) (2 diffs)
-
trunk/vendor/symfony/property-info/PropertyInfoCacheExtractor.php (modified) (8 diffs)
-
trunk/vendor/symfony/property-info/PropertyInfoExtractor.php (modified) (8 diffs)
-
trunk/vendor/symfony/property-info/PropertyReadInfo.php (modified) (2 diffs)
-
trunk/vendor/symfony/property-info/PropertyWriteInfo.php (modified) (2 diffs)
-
trunk/vendor/symfony/property-info/Type.php (modified) (4 diffs)
-
trunk/vendor/symfony/property-info/Util/PhpDocTypeHelper.php (modified) (7 diffs)
-
trunk/vendor/symfony/property-info/Util/PhpStanTypeHelper.php (modified) (3 diffs)
-
trunk/vendor/symfony/property-info/composer.json (modified) (2 diffs)
-
trunk/vendor/symfony/string/AbstractString.php (modified) (30 diffs)
-
trunk/vendor/symfony/string/AbstractUnicodeString.php (modified) (31 diffs)
-
trunk/vendor/symfony/string/ByteString.php (modified) (25 diffs)
-
trunk/vendor/symfony/string/CHANGELOG.md (modified) (1 diff)
-
trunk/vendor/symfony/string/CodePointString.php (modified) (11 diffs)
-
trunk/vendor/symfony/string/Inflector/EnglishInflector.php (modified) (6 diffs)
-
trunk/vendor/symfony/string/Inflector/FrenchInflector.php (modified) (2 diffs)
-
trunk/vendor/symfony/string/Inflector/SpanishInflector.php (deleted)
-
trunk/vendor/symfony/string/LazyString.php (modified) (7 diffs)
-
trunk/vendor/symfony/string/Resources/data/wcswidth_table_wide.php (modified) (1 diff)
-
trunk/vendor/symfony/string/Resources/data/wcswidth_table_zero.php (modified) (1 diff)
-
trunk/vendor/symfony/string/Resources/functions.php (modified) (1 diff)
-
trunk/vendor/symfony/string/Slugger/AsciiSlugger.php (modified) (7 diffs)
-
trunk/vendor/symfony/string/TruncateMode.php (deleted)
-
trunk/vendor/symfony/string/UnicodeString.php (modified) (15 diffs)
-
trunk/vendor/symfony/string/composer.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
speechkit/trunk/composer.json
r3393083 r3420880 12 12 "require-dev": { 13 13 "automattic/vipwpcs": "^3.0.1", 14 "behat/behat": "^3. 24",14 "behat/behat": "^3.13", 15 15 "bordoni/phpass": "^0.3.6", 16 16 "dealerdirect/phpcodesniffer-composer-installer": "^1.1.2", 17 "doctrine/instantiator": "^ 2.0",17 "doctrine/instantiator": "^1.5", 18 18 "ergebnis/composer-normalize": "^2.48.2", 19 19 "php-parallel-lint/php-parallel-lint": "^1.4", 20 20 "phpmd/phpmd": "^2.15", 21 "phpro/grumphp": "^ 2.15",21 "phpro/grumphp": "^1.16", 22 22 "phpunit/phpunit": "^9.6", 23 23 "rector/rector": "^2.2", 24 24 "rregeer/phpunit-coverage-check": "^0.3.1", 25 25 "squizlabs/php_codesniffer": "^3.9.2", 26 "symfony/css-selector": "^ 7.3",27 "symfony/error-handler": "^ 7.3",28 "symfony/filesystem": "^ 7.3",29 "symfony/finder": "^ 7.3",30 "symfony/http-client": "^ 7.3",26 "symfony/css-selector": "^5.4", 27 "symfony/error-handler": "^5.4", 28 "symfony/filesystem": "^5.4", 29 "symfony/finder": "^5.4", 30 "symfony/http-client": "^5.4", 31 31 "symfony/polyfill-mbstring": "^1.33", 32 "symfony/string": "^ 7.3",33 "symfony/translation-contracts": "^ 3.6",34 "symfony/var-exporter": "^ 7.3",32 "symfony/string": "^5.4", 33 "symfony/translation-contracts": "^2.5", 34 "symfony/var-exporter": "^5.4", 35 35 "vlucas/phpdotenv": "^5.6", 36 36 "wp-cli/wp-cli-bundle": "^2.12", -
speechkit/trunk/languages/speechkit.pot
r3409610 r3420880 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: BeyondWords - Text-to-Speech 6.0. 2\n"5 "Project-Id-Version: BeyondWords - Text-to-Speech 6.0.3\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/speechkit\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-12- 03T13:35:04+00:00\n"12 "POT-Creation-Date: 2025-12-16T10:06:48+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
speechkit/trunk/readme.txt
r3409610 r3420880 4 4 Donate link: https://beyondwords.io 5 5 Tags: text-to-speech, tts, audio, AI, voice cloning 6 Stable tag: 6.0. 27 Requires PHP: 8. 16 Stable tag: 6.0.3 7 Requires PHP: 8.0 8 8 Tested up to: 6.9 9 9 License: GPLv2 or later … … 77 77 == Changelog == 78 78 79 = 6.0.3 = 80 81 Release date: 16th December 2025 82 83 **Compatibility** 84 85 * [#473](https://github.com/beyondwords-io/wordpress-plugin/pull/473) Reintroduce support for **PHP 8.0**. 86 79 87 = 6.0.2 = 80 88 … … 134 142 **Compatibility** 135 143 136 * **PHP 8.1** is now our minimum supported version.144 * ~~**PHP 8.1** is now our minimum supported version.~~ 137 145 138 146 -------- -
speechkit/trunk/speechkit.php
r3409610 r3420880 16 16 * Author: BeyondWords 17 17 * Author URI: https://beyondwords.io 18 * Version: 6.0. 218 * Version: 6.0.3 19 19 * License: GPL-2.0+ 20 20 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 21 21 * Text Domain: speechkit 22 22 * Domain Path: /languages 23 * Requires PHP: 8. 123 * Requires PHP: 8.0 24 24 * Requires at least: 5.8 25 25 */ … … 36 36 // Define constants 37 37 // phpcs:disable 38 define('BEYONDWORDS__PLUGIN_VERSION', '6.0. 2');38 define('BEYONDWORDS__PLUGIN_VERSION', '6.0.3'); 39 39 define('BEYONDWORDS__PLUGIN_DIR', plugin_dir_path(__FILE__)); 40 40 define('BEYONDWORDS__PLUGIN_URI', plugin_dir_url(__FILE__)); -
speechkit/trunk/src/Component/Settings/Sync.php
r3393083 r3420880 152 152 * @since 5.0.0 153 153 * @since 6.0.0 Make static. 154 * @since 6.0.3 Check path is readable before getting value. 154 155 * 155 156 * @return boolean … … 174 175 175 176 foreach (self::MAP_SETTINGS as $optionName => $path) { 176 $value = $propertyAccessor->getValue($responses, $path); 177 178 if ($value !== null) { 179 update_option($optionName, $value, false); 180 $updated = true; 177 if ($propertyAccessor->isReadable($responses, $path)) { 178 $value = $propertyAccessor->getValue($responses, $path); 179 if ($value !== null) { 180 update_option($optionName, $value, false); 181 $updated = true; 182 } 181 183 } 182 184 } -
speechkit/trunk/vendor/autoload.php
r3393083 r3420880 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit 871f668f3d5222a0e58403030261d782::getLoader();22 return ComposerAutoloaderInit5e43b82cc73cdb7142c707a11e389a7d::getLoader(); -
speechkit/trunk/vendor/composer/autoload_classmap.php
r3393083 r3420880 145 145 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => $vendorDir . '/symfony/string/Inflector/FrenchInflector.php', 146 146 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => $vendorDir . '/symfony/string/Inflector/InflectorInterface.php', 147 'Symfony\\Component\\String\\Inflector\\SpanishInflector' => $vendorDir . '/symfony/string/Inflector/SpanishInflector.php',148 147 'Symfony\\Component\\String\\LazyString' => $vendorDir . '/symfony/string/LazyString.php', 149 148 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php', 150 149 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php', 151 'Symfony\\Component\\String\\TruncateMode' => $vendorDir . '/symfony/string/TruncateMode.php',152 150 'Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php', 153 151 'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php', -
speechkit/trunk/vendor/composer/autoload_files.php
r3393083 r3420880 7 7 8 8 return array( 9 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', 9 10 '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 10 11 '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', … … 12 13 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', 13 14 '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', 14 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',15 15 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', 16 16 ); -
speechkit/trunk/vendor/composer/autoload_real.php
r3393083 r3420880 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 871f668f3d5222a0e58403030261d7825 class ComposerAutoloaderInit5e43b82cc73cdb7142c707a11e389a7d 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 871f668f3d5222a0e58403030261d782', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit5e43b82cc73cdb7142c707a11e389a7d', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 871f668f3d5222a0e58403030261d782', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit5e43b82cc73cdb7142c707a11e389a7d', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 871f668f3d5222a0e58403030261d782::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); 33 33 $loader->register(true); 34 34 35 $filesToLoad = \Composer\Autoload\ComposerStaticInit 871f668f3d5222a0e58403030261d782::$files;35 $filesToLoad = \Composer\Autoload\ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d::$files; 36 36 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 37 37 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
speechkit/trunk/vendor/composer/autoload_static.php
r3403395 r3420880 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 871f668f3d5222a0e58403030261d7827 class ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d 8 8 { 9 9 public static $files = array ( 10 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', 10 11 '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', 11 12 '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', … … 13 14 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 14 15 '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', 15 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',16 16 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', 17 17 ); … … 218 218 'Symfony\\Component\\String\\Inflector\\FrenchInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/FrenchInflector.php', 219 219 'Symfony\\Component\\String\\Inflector\\InflectorInterface' => __DIR__ . '/..' . '/symfony/string/Inflector/InflectorInterface.php', 220 'Symfony\\Component\\String\\Inflector\\SpanishInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/SpanishInflector.php',221 220 'Symfony\\Component\\String\\LazyString' => __DIR__ . '/..' . '/symfony/string/LazyString.php', 222 221 'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php', 223 222 'Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php', 224 'Symfony\\Component\\String\\TruncateMode' => __DIR__ . '/..' . '/symfony/string/TruncateMode.php',225 223 'Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php', 226 224 'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php', … … 237 235 { 238 236 return \Closure::bind(function () use ($loader) { 239 $loader->prefixLengthsPsr4 = ComposerStaticInit 871f668f3d5222a0e58403030261d782::$prefixLengthsPsr4;240 $loader->prefixDirsPsr4 = ComposerStaticInit 871f668f3d5222a0e58403030261d782::$prefixDirsPsr4;241 $loader->classMap = ComposerStaticInit 871f668f3d5222a0e58403030261d782::$classMap;237 $loader->prefixLengthsPsr4 = ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d::$prefixLengthsPsr4; 238 $loader->prefixDirsPsr4 = ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d::$prefixDirsPsr4; 239 $loader->classMap = ComposerStaticInit5e43b82cc73cdb7142c707a11e389a7d::$classMap; 242 240 243 241 }, null, ClassLoader::class); -
speechkit/trunk/vendor/composer/installed.json
r3393083 r3420880 3 3 { 4 4 "name": "symfony/deprecation-contracts", 5 "version": "v3. 6.0",6 "version_normalized": "3. 6.0.0",5 "version": "v3.0.2", 6 "version_normalized": "3.0.2.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/symfony/deprecation-contracts.git", 10 "reference": " 63afe740e99a13ba87ec199bb07bbdee937a5b62"11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/ 63afe740e99a13ba87ec199bb07bbdee937a5b62",15 "reference": " 63afe740e99a13ba87ec199bb07bbdee937a5b62",16 "shasum": "" 17 }, 18 "require": { 19 "php": ">=8. 1"20 }, 21 "time": "202 4-09-25T14:21:43+00:00",10 "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", 15 "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", 16 "shasum": "" 17 }, 18 "require": { 19 "php": ">=8.0.2" 20 }, 21 "time": "2022-01-02T09:55:41+00:00", 22 22 "type": "library", 23 23 "extra": { … … 27 27 }, 28 28 "branch-alias": { 29 "dev-main": "3. 6-dev"29 "dev-main": "3.0-dev" 30 30 } 31 31 }, … … 53 53 "homepage": "https://symfony.com", 54 54 "support": { 55 "source": "https://github.com/symfony/deprecation-contracts/tree/v3. 6.0"55 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" 56 56 }, 57 57 "funding": [ … … 669 669 { 670 670 "name": "symfony/property-info", 671 "version": "v6. 4.24",672 "version_normalized": "6. 4.24.0",671 "version": "v6.0.19", 672 "version_normalized": "6.0.19.0", 673 673 "source": { 674 674 "type": "git", 675 675 "url": "https://github.com/symfony/property-info.git", 676 "reference": " 1056ae3621eeddd78d7c5ec074f1c1784324eec6"677 }, 678 "dist": { 679 "type": "zip", 680 "url": "https://api.github.com/repos/symfony/property-info/zipball/ 1056ae3621eeddd78d7c5ec074f1c1784324eec6",681 "reference": " 1056ae3621eeddd78d7c5ec074f1c1784324eec6",682 "shasum": "" 683 }, 684 "require": { 685 "php": ">=8. 1",686 "symfony/string": "^5.4|^6.0 |^7.0"676 "reference": "e6dfb2223b21768d3b2ae033a5e1f9d205184d45" 677 }, 678 "dist": { 679 "type": "zip", 680 "url": "https://api.github.com/repos/symfony/property-info/zipball/e6dfb2223b21768d3b2ae033a5e1f9d205184d45", 681 "reference": "e6dfb2223b21768d3b2ae033a5e1f9d205184d45", 682 "shasum": "" 683 }, 684 "require": { 685 "php": ">=8.0.2", 686 "symfony/string": "^5.4|^6.0" 687 687 }, 688 688 "conflict": { 689 "doctrine/annotations": "<1.12",690 689 "phpdocumentor/reflection-docblock": "<5.2", 691 "phpdocumentor/type-resolver": "<1.5.1", 692 "symfony/cache": "<5.4", 693 "symfony/dependency-injection": "<5.4|>=6.0,<6.4", 694 "symfony/serializer": "<5.4" 690 "phpdocumentor/type-resolver": "<1.4.0", 691 "symfony/dependency-injection": "<5.4" 695 692 }, 696 693 "require-dev": { 697 "doctrine/annotations": "^1.1 2|^2",694 "doctrine/annotations": "^1.10.4|^2", 698 695 "phpdocumentor/reflection-docblock": "^5.2", 699 "phpstan/phpdoc-parser": "^1.0|^2.0", 700 "symfony/cache": "^5.4|^6.0|^7.0", 701 "symfony/dependency-injection": "^5.4|^6.0|^7.0", 702 "symfony/serializer": "^5.4|^6.4|^7.0" 703 }, 704 "time": "2025-07-14T16:38:25+00:00", 696 "phpstan/phpdoc-parser": "^1.0", 697 "symfony/cache": "^5.4|^6.0", 698 "symfony/dependency-injection": "^5.4|^6.0", 699 "symfony/serializer": "^5.4|^6.0" 700 }, 701 "suggest": { 702 "phpdocumentor/reflection-docblock": "To use the PHPDoc", 703 "psr/cache-implementation": "To cache results", 704 "symfony/doctrine-bridge": "To use Doctrine metadata", 705 "symfony/serializer": "To use Serializer metadata" 706 }, 707 "time": "2023-01-15T17:21:41+00:00", 705 708 "type": "library", 706 709 "installation-source": "dist", … … 738 741 ], 739 742 "support": { 740 "source": "https://github.com/symfony/property-info/tree/v6.4.24" 741 }, 742 "funding": [ 743 { 744 "url": "https://symfony.com/sponsor", 745 "type": "custom" 746 }, 747 { 748 "url": "https://github.com/fabpot", 749 "type": "github" 750 }, 751 { 752 "url": "https://github.com/nicolas-grekas", 743 "source": "https://github.com/symfony/property-info/tree/v6.0.19" 744 }, 745 "funding": [ 746 { 747 "url": "https://symfony.com/sponsor", 748 "type": "custom" 749 }, 750 { 751 "url": "https://github.com/fabpot", 753 752 "type": "github" 754 753 }, … … 762 761 { 763 762 "name": "symfony/string", 764 "version": "v 7.3.4",765 "version_normalized": " 7.3.4.0",763 "version": "v5.4.47", 764 "version_normalized": "5.4.47.0", 766 765 "source": { 767 766 "type": "git", 768 767 "url": "https://github.com/symfony/string.git", 769 "reference": " f96476035142921000338bad71e5247fbc138872"770 }, 771 "dist": { 772 "type": "zip", 773 "url": "https://api.github.com/repos/symfony/string/zipball/ f96476035142921000338bad71e5247fbc138872",774 "reference": " f96476035142921000338bad71e5247fbc138872",775 "shasum": "" 776 }, 777 "require": { 778 "php": ">= 8.2",768 "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" 769 }, 770 "dist": { 771 "type": "zip", 772 "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", 773 "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", 774 "shasum": "" 775 }, 776 "require": { 777 "php": ">=7.2.5", 779 778 "symfony/polyfill-ctype": "~1.8", 780 779 "symfony/polyfill-intl-grapheme": "~1.0", 781 780 "symfony/polyfill-intl-normalizer": "~1.0", 782 "symfony/polyfill-mbstring": "~1.0" 781 "symfony/polyfill-mbstring": "~1.0", 782 "symfony/polyfill-php80": "~1.15" 783 783 }, 784 784 "conflict": { 785 "symfony/translation-contracts": " <2.5"785 "symfony/translation-contracts": ">=3.0" 786 786 }, 787 787 "require-dev": { 788 "symfony/emoji": "^7.1", 789 "symfony/http-client": "^6.4|^7.0", 790 "symfony/intl": "^6.4|^7.0", 791 "symfony/translation-contracts": "^2.5|^3.0", 792 "symfony/var-exporter": "^6.4|^7.0" 793 }, 794 "time": "2025-09-11T14:36:48+00:00", 788 "symfony/error-handler": "^4.4|^5.0|^6.0", 789 "symfony/http-client": "^4.4|^5.0|^6.0", 790 "symfony/translation-contracts": "^1.1|^2", 791 "symfony/var-exporter": "^4.4|^5.0|^6.0" 792 }, 793 "time": "2024-11-10T20:33:58+00:00", 795 794 "type": "library", 796 795 "installation-source": "dist", … … 831 830 ], 832 831 "support": { 833 "source": "https://github.com/symfony/string/tree/v7.3.4" 834 }, 835 "funding": [ 836 { 837 "url": "https://symfony.com/sponsor", 838 "type": "custom" 839 }, 840 { 841 "url": "https://github.com/fabpot", 842 "type": "github" 843 }, 844 { 845 "url": "https://github.com/nicolas-grekas", 832 "source": "https://github.com/symfony/string/tree/v5.4.47" 833 }, 834 "funding": [ 835 { 836 "url": "https://symfony.com/sponsor", 837 "type": "custom" 838 }, 839 { 840 "url": "https://github.com/fabpot", 846 841 "type": "github" 847 842 }, -
speechkit/trunk/vendor/composer/installed.php
r3409610 r3420880 2 2 'root' => array( 3 3 'name' => 'beyondwords/wordpress', 4 'pretty_version' => 'v6.0. 2',5 'version' => '6.0. 2.0',6 'reference' => ' 288c1c84ef0d24436a2a1fbae43422644783aa8a',4 'pretty_version' => 'v6.0.3', 5 'version' => '6.0.3.0', 6 'reference' => '33b10a56962d32e32c8f742469c937f483589233', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'beyondwords/wordpress' => array( 14 'pretty_version' => 'v6.0. 2',15 'version' => '6.0. 2.0',16 'reference' => ' 288c1c84ef0d24436a2a1fbae43422644783aa8a',14 'pretty_version' => 'v6.0.3', 15 'version' => '6.0.3.0', 16 'reference' => '33b10a56962d32e32c8f742469c937f483589233', 17 17 'type' => 'project', 18 18 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'symfony/deprecation-contracts' => array( 23 'pretty_version' => 'v3. 6.0',24 'version' => '3. 6.0.0',25 'reference' => ' 63afe740e99a13ba87ec199bb07bbdee937a5b62',23 'pretty_version' => 'v3.0.2', 24 'version' => '3.0.2.0', 25 'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', … … 93 93 ), 94 94 'symfony/property-info' => array( 95 'pretty_version' => 'v6. 4.24',96 'version' => '6. 4.24.0',97 'reference' => ' 1056ae3621eeddd78d7c5ec074f1c1784324eec6',95 'pretty_version' => 'v6.0.19', 96 'version' => '6.0.19.0', 97 'reference' => 'e6dfb2223b21768d3b2ae033a5e1f9d205184d45', 98 98 'type' => 'library', 99 99 'install_path' => __DIR__ . '/../symfony/property-info', … … 102 102 ), 103 103 'symfony/string' => array( 104 'pretty_version' => 'v 7.3.4',105 'version' => ' 7.3.4.0',106 'reference' => ' f96476035142921000338bad71e5247fbc138872',104 'pretty_version' => 'v5.4.47', 105 'version' => '5.4.47.0', 106 'reference' => '136ca7d72f72b599f2631aca474a4f8e26719799', 107 107 'type' => 'library', 108 108 'install_path' => __DIR__ . '/../symfony/string', -
speechkit/trunk/vendor/symfony/deprecation-contracts/LICENSE
r3169191 r3420880 1 Copyright (c) 2020- presentFabien Potencier1 Copyright (c) 2020-2022 Fabien Potencier 2 2 3 3 Permission is hereby granted, free of charge, to any person obtaining a copy -
speechkit/trunk/vendor/symfony/deprecation-contracts/README.md
r3169191 r3420880 23 23 `Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` 24 24 25 While not recommended, the deprecation notices can be completely ignored by declaring an empty25 While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty 26 26 `function trigger_deprecation() {}` in your application. -
speechkit/trunk/vendor/symfony/deprecation-contracts/composer.json
r3393083 r3420880 16 16 ], 17 17 "require": { 18 "php": ">=8. 1"18 "php": ">=8.0.2" 19 19 }, 20 20 "autoload": { … … 26 26 "extra": { 27 27 "branch-alias": { 28 "dev-main": "3. 6-dev"28 "dev-main": "3.0-dev" 29 29 }, 30 30 "thanks": { -
speechkit/trunk/vendor/symfony/property-info/CHANGELOG.md
r3169191 r3420880 1 1 CHANGELOG 2 2 ========= 3 4 6.45 ---6 7 * Make properties writable when a setter in camelCase exists, similar to the camelCase getter8 9 6.110 ---11 12 * Add support for phpDocumentor and PHPStan pseudo-types13 * Add PHP 8.0 promoted properties `@param` mutation support to `PhpDocExtractor`14 * Add PHP 8.0 promoted properties `@param` mutation support to `PhpStanExtractor`15 3 16 4 6.0 -
speechkit/trunk/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php
r3169191 r3420880 26 26 use PriorityTaggedServiceTrait; 27 27 28 public function process(ContainerBuilder $container): void 28 /** 29 * {@inheritdoc} 30 */ 31 public function process(ContainerBuilder $container) 29 32 { 30 33 if (!$container->hasDefinition('property_info.constructor_extractor')) { -
speechkit/trunk/vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php
r3169191 r3420880 27 27 28 28 /** 29 * @return void29 * {@inheritdoc} 30 30 */ 31 31 public function process(ContainerBuilder $container) -
speechkit/trunk/vendor/symfony/property-info/Extractor/ConstructorExtractor.php
r3169191 r3420880 21 21 final class ConstructorExtractor implements PropertyTypeExtractorInterface 22 22 { 23 private $extractors; 24 23 25 /** 24 26 * @param iterable<int, ConstructorArgumentTypeExtractorInterface> $extractors 25 27 */ 26 public function __construct( 27 private readonly iterable $extractors = [],28 ) {28 public function __construct(iterable $extractors = []) 29 { 30 $this->extractors = $extractors; 29 31 } 30 32 33 /** 34 * {@inheritdoc} 35 */ 31 36 public function getTypes(string $class, string $property, array $context = []): ?array 32 37 { -
speechkit/trunk/vendor/symfony/property-info/Extractor/PhpDocExtractor.php
r3393083 r3420880 39 39 * @var array<string, array{DocBlock|null, int|null, string|null}> 40 40 */ 41 private array$docBlocks = [];41 private $docBlocks = []; 42 42 43 43 /** 44 44 * @var Context[] 45 45 */ 46 private array$contexts = [];47 48 private DocBlockFactoryInterface$docBlockFactory;49 private ContextFactory$contextFactory;50 private PhpDocTypeHelper$phpDocTypeHelper;51 private array$mutatorPrefixes;52 private array$accessorPrefixes;53 private array$arrayMutatorPrefixes;46 private $contexts = []; 47 48 private $docBlockFactory; 49 private $contextFactory; 50 private $phpDocTypeHelper; 51 private $mutatorPrefixes; 52 private $accessorPrefixes; 53 private $arrayMutatorPrefixes; 54 54 55 55 /** … … 58 58 * @param string[]|null $arrayMutatorPrefixes 59 59 */ 60 public function __construct( ?DocBlockFactoryInterface $docBlockFactory = null, ?array $mutatorPrefixes = null, ?array $accessorPrefixes = null, ?array $arrayMutatorPrefixes = null)60 public function __construct(DocBlockFactoryInterface $docBlockFactory = null, array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) 61 61 { 62 62 if (!class_exists(DocBlockFactory::class)) { 63 throw new \LogicException( \sprintf('Unable to use the "%s" class as the "phpdocumentor/reflection-docblock" package is not installed. Try running composer require "phpdocumentor/reflection-docblock".', __CLASS__));63 throw new \LogicException(sprintf('Unable to use the "%s" class as the "phpdocumentor/reflection-docblock" package is not installed.', __CLASS__)); 64 64 } 65 65 … … 72 72 } 73 73 74 /** 75 * {@inheritdoc} 76 */ 74 77 public function getShortDescription(string $class, string $property, array $context = []): ?string 75 78 { 76 /** @var DocBlock $docBlock */79 /** @var $docBlock DocBlock */ 77 80 [$docBlock] = $this->getDocBlock($class, $property); 78 81 if (!$docBlock) { … … 99 102 } 100 103 104 /** 105 * {@inheritdoc} 106 */ 101 107 public function getLongDescription(string $class, string $property, array $context = []): ?string 102 108 { 103 /** @var DocBlock $docBlock */109 /** @var $docBlock DocBlock */ 104 110 [$docBlock] = $this->getDocBlock($class, $property); 105 111 if (!$docBlock) { … … 112 118 } 113 119 120 /** 121 * {@inheritdoc} 122 */ 114 123 public function getTypes(string $class, string $property, array $context = []): ?array 115 124 { 116 /** @var DocBlock $docBlock */125 /** @var $docBlock DocBlock */ 117 126 [$docBlock, $source, $prefix] = $this->getDocBlock($class, $property); 118 127 if (!$docBlock) { … … 120 129 } 121 130 122 $tag = match ($source) { 123 self::PROPERTY => 'var', 124 self::ACCESSOR => 'return', 125 self::MUTATOR => 'param', 126 }; 131 switch ($source) { 132 case self::PROPERTY: 133 $tag = 'var'; 134 break; 135 136 case self::ACCESSOR: 137 $tag = 'return'; 138 break; 139 140 case self::MUTATOR: 141 $tag = 'param'; 142 break; 143 } 127 144 128 145 $parentClass = null; … … 139 156 140 157 case 'parent': 141 if (false !== $resolvedClass = $parentClass ?? = get_parent_class($class)) {158 if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { 142 159 break; 143 160 } … … 165 182 } 166 183 184 /** 185 * {@inheritdoc} 186 */ 167 187 public function getTypesFromConstructor(string $class, string $property): ?array 168 188 { … … 192 212 try { 193 213 $reflectionClass = new \ReflectionClass($class); 194 } catch (\ReflectionException ) {214 } catch (\ReflectionException $e) { 195 215 return null; 196 216 } … … 204 224 205 225 return $this->filterDocBlockParams($docBlock, $property); 206 } catch (\InvalidArgumentException ) {226 } catch (\InvalidArgumentException $e) { 207 227 return null; 208 228 } … … 211 231 private function filterDocBlockParams(DocBlock $docBlock, string $allowedParam): DocBlock 212 232 { 213 $tags = array_values(array_filter($docBlock->getTagsByName('param'), fn ($tag) => $tag instanceof DocBlock\Tags\Param && $allowedParam === $tag->getVariableName())); 233 $tags = array_values(array_filter($docBlock->getTagsByName('param'), function ($tag) use ($allowedParam) { 234 return $tag instanceof DocBlock\Tags\Param && $allowedParam === $tag->getVariableName(); 235 })); 214 236 215 237 return new DocBlock($docBlock->getSummary(), $docBlock->getDescription(), $tags, $docBlock->getContext(), … … 222 244 private function getDocBlock(string $class, string $property): array 223 245 { 224 $propertyHash = \sprintf('%s::%s', $class, $property);246 $propertyHash = sprintf('%s::%s', $class, $property); 225 247 226 248 if (isset($this->docBlocks[$propertyHash])) { … … 228 250 } 229 251 230 try {231 $reflectionProperty = new \ReflectionProperty($class, $property);232 } catch (\ReflectionException) {233 $reflectionProperty = null;234 }235 236 252 $ucFirstProperty = ucfirst($property); 237 253 238 254 switch (true) { 239 case $reflectionProperty?->isPromoted() && $docBlock = $this->getDocBlockFromConstructor($class, $property):240 $data = [$docBlock, self::MUTATOR, null];241 break;242 243 255 case $docBlock = $this->getDocBlockFromProperty($class, $property): 244 256 $data = [$docBlock, self::PROPERTY, null]; … … 265 277 try { 266 278 $reflectionProperty = new \ReflectionProperty($class, $property); 267 } catch (\ReflectionException ) {279 } catch (\ReflectionException $e) { 268 280 return null; 269 281 } … … 279 291 try { 280 292 return $this->docBlockFactory->create($reflectionProperty, $this->createFromReflector($reflector)); 281 } catch (\InvalidArgumentException|\RuntimeException ) {293 } catch (\InvalidArgumentException|\RuntimeException $e) { 282 294 return null; 283 295 } … … 302 314 303 315 if ( 304 (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) 305 ||(self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1)316 (self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters()) || 317 (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1) 306 318 ) { 307 319 break; 308 320 } 309 } catch (\ReflectionException ) {321 } catch (\ReflectionException $e) { 310 322 // Try the next prefix if the method doesn't exist 311 323 } … … 326 338 try { 327 339 return [$this->docBlockFactory->create($reflectionMethod, $this->createFromReflector($reflector)), $prefix]; 328 } catch (\InvalidArgumentException|\RuntimeException ) {340 } catch (\InvalidArgumentException|\RuntimeException $e) { 329 341 return null; 330 342 } -
speechkit/trunk/vendor/symfony/property-info/Extractor/PhpStanExtractor.php
r3393083 r3420880 12 12 namespace Symfony\Component\PropertyInfo\Extractor; 13 13 14 use phpDocumentor\Reflection\Types\ContextFactory;15 14 use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode; 16 15 use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; … … 22 21 use PHPStan\PhpDocParser\Parser\TokenIterator; 23 22 use PHPStan\PhpDocParser\Parser\TypeParser; 24 use PHPStan\PhpDocParser\ParserConfig;25 23 use Symfony\Component\PropertyInfo\PhpStan\NameScopeFactory; 26 24 use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; … … 39 37 private const MUTATOR = 2; 40 38 41 private PhpDocParser $phpDocParser; 42 private Lexer $lexer; 43 private NameScopeFactory $nameScopeFactory; 39 /** @var PhpDocParser */ 40 private $phpDocParser; 41 42 /** @var Lexer */ 43 private $lexer; 44 45 /** @var NameScopeFactory */ 46 private $nameScopeFactory; 44 47 45 48 /** @var array<string, array{PhpDocNode|null, int|null, string|null, string|null}> */ 46 private array$docBlocks = [];47 private PhpStanTypeHelper$phpStanTypeHelper;48 private array$mutatorPrefixes;49 private array$accessorPrefixes;50 private array$arrayMutatorPrefixes;49 private $docBlocks = []; 50 private $phpStanTypeHelper; 51 private $mutatorPrefixes; 52 private $accessorPrefixes; 53 private $arrayMutatorPrefixes; 51 54 52 55 /** … … 55 58 * @param list<string>|null $arrayMutatorPrefixes 56 59 */ 57 public function __construct(?array $mutatorPrefixes = null, ?array $accessorPrefixes = null, ?array $arrayMutatorPrefixes = null) 58 { 59 if (!class_exists(ContextFactory::class)) { 60 throw new \LogicException(\sprintf('Unable to use the "%s" class as the "phpdocumentor/type-resolver" package is not installed. Try running composer require "phpdocumentor/type-resolver".', __CLASS__)); 61 } 62 63 if (!class_exists(PhpDocParser::class)) { 64 throw new \LogicException(\sprintf('Unable to use the "%s" class as the "phpstan/phpdoc-parser" package is not installed. Try running composer require "phpstan/phpdoc-parser".', __CLASS__)); 65 } 66 60 public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) 61 { 67 62 $this->phpStanTypeHelper = new PhpStanTypeHelper(); 68 63 $this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes; … … 70 65 $this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes; 71 66 72 if (class_exists(ParserConfig::class)) { 73 $parserConfig = new ParserConfig([]); 74 $this->phpDocParser = new PhpDocParser($parserConfig, new TypeParser($parserConfig, new ConstExprParser($parserConfig)), new ConstExprParser($parserConfig)); 75 $this->lexer = new Lexer($parserConfig); 76 } else { 77 $this->phpDocParser = new PhpDocParser(new TypeParser(new ConstExprParser()), new ConstExprParser()); 78 $this->lexer = new Lexer(); 79 } 67 $this->phpDocParser = new PhpDocParser(new TypeParser(new ConstExprParser()), new ConstExprParser()); 68 $this->lexer = new Lexer(); 80 69 $this->nameScopeFactory = new NameScopeFactory(); 81 70 } … … 111 100 } 112 101 113 if (114 $tagDocNode->value instanceof ParamTagValueNode115 && null === $prefix116 && $tagDocNode->value->parameterName !== '$'.$property117 ) {118 continue;119 }120 121 102 foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) { 122 103 switch ($type->getClassName()) { … … 127 108 128 109 case 'parent': 129 if (false !== $resolvedClass = $parentClass ?? = get_parent_class($class)) {110 if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) { 130 111 break; 131 112 } … … 174 155 try { 175 156 $reflectionClass = new \ReflectionClass($class); 176 } catch (\ReflectionException ) {157 } catch (\ReflectionException $e) { 177 158 return null; 178 159 } … … 182 163 } 183 164 184 if (!$rawDocNode = $reflectionConstructor->getDocComment()) { 185 return null; 186 } 187 188 $phpDocNode = $this->getPhpDocNode($rawDocNode); 165 $rawDocNode = $reflectionConstructor->getDocComment(); 166 $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); 167 $phpDocNode = $this->phpDocParser->parse($tokens); 168 $tokens->consumeTokenType(Lexer::TOKEN_END); 189 169 190 170 return $this->filterDocBlockParams($phpDocNode, $property); … … 193 173 private function filterDocBlockParams(PhpDocNode $docNode, string $allowedParam): ?ParamTagValueNode 194 174 { 195 $tags = array_values(array_filter($docNode->getTagsByName('@param'), fn ($tagNode) => $tagNode instanceof PhpDocTagNode && ('$'.$allowedParam) === $tagNode->value->parameterName)); 175 $tags = array_values(array_filter($docNode->getTagsByName('@param'), function ($tagNode) use ($allowedParam) { 176 return $tagNode instanceof PhpDocTagNode && ('$'.$allowedParam) === $tagNode->value->parameterName; 177 })); 196 178 197 179 if (!$tags) { … … 215 197 $ucFirstProperty = ucfirst($property); 216 198 217 if ([$docBlock, $ source, $declaringClass] = $this->getDocBlockFromProperty($class, $property)) {218 $data = [$docBlock, $source, null, $declaringClass];199 if ([$docBlock, $declaringClass] = $this->getDocBlockFromProperty($class, $property)) { 200 $data = [$docBlock, self::PROPERTY, null, $declaringClass]; 219 201 } elseif ([$docBlock, $_, $declaringClass] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR)) { 220 202 $data = [$docBlock, self::ACCESSOR, null, $declaringClass]; … … 229 211 230 212 /** 231 * @return array{PhpDocNode, int,string}|null213 * @return array{PhpDocNode, string}|null 232 214 */ 233 215 private function getDocBlockFromProperty(string $class, string $property): ?array … … 236 218 try { 237 219 $reflectionProperty = new \ReflectionProperty($class, $property); 238 } catch (\ReflectionException) { 239 return null; 240 } 241 242 $reflector = $reflectionProperty->getDeclaringClass(); 243 244 foreach ($reflector->getTraits() as $trait) { 245 if ($trait->hasProperty($property)) { 246 return $this->getDocBlockFromProperty($trait->getName(), $property); 247 } 248 } 249 250 // Type can be inside property docblock as `@var` 251 $rawDocNode = $reflectionProperty->getDocComment(); 252 $phpDocNode = $rawDocNode ? $this->getPhpDocNode($rawDocNode) : null; 253 $source = self::PROPERTY; 254 255 if (!$phpDocNode?->getTagsByName('@var')) { 256 $phpDocNode = null; 257 } 258 259 // or in the constructor as `@param` for promoted properties 260 if (!$phpDocNode && $reflectionProperty->isPromoted()) { 261 $constructor = new \ReflectionMethod($class, '__construct'); 262 $rawDocNode = $constructor->getDocComment(); 263 $phpDocNode = $rawDocNode ? $this->getPhpDocNode($rawDocNode) : null; 264 $source = self::MUTATOR; 265 } 266 267 if (!$phpDocNode) { 268 return null; 269 } 270 271 return [$phpDocNode, $source, $reflectionProperty->class]; 220 } catch (\ReflectionException $e) { 221 return null; 222 } 223 224 if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) { 225 return null; 226 } 227 228 $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); 229 $phpDocNode = $this->phpDocParser->parse($tokens); 230 $tokens->consumeTokenType(Lexer::TOKEN_END); 231 232 return [$phpDocNode, $reflectionProperty->class]; 272 233 } 273 234 … … 295 256 break; 296 257 } 297 } catch (\ReflectionException ) {258 } catch (\ReflectionException $e) { 298 259 // Try the next prefix if the method doesn't exist 299 260 } … … 308 269 } 309 270 310 $phpDocNode = $this->getPhpDocNode($rawDocNode);311 312 return [$phpDocNode, $prefix, $reflectionMethod->class];313 }314 315 private function getPhpDocNode(string $rawDocNode): PhpDocNode316 {317 271 $tokens = new TokenIterator($this->lexer->tokenize($rawDocNode)); 318 272 $phpDocNode = $this->phpDocParser->parse($tokens); 319 273 $tokens->consumeTokenType(Lexer::TOKEN_END); 320 274 321 return $phpDocNode;275 return [$phpDocNode, $prefix, $reflectionMethod->class]; 322 276 } 323 277 } -
speechkit/trunk/vendor/symfony/property-info/Extractor/ReflectionExtractor.php
r3393083 r3420880 67 67 ]; 68 68 69 private array $mutatorPrefixes; 70 private array $accessorPrefixes; 71 private array $arrayMutatorPrefixes; 72 private bool $enableConstructorExtraction; 73 private int $methodReflectionFlags; 74 private int $magicMethodsFlags; 75 private int $propertyReflectionFlags; 76 private InflectorInterface $inflector; 77 private array $arrayMutatorPrefixesFirst; 78 private array $arrayMutatorPrefixesLast; 69 private $mutatorPrefixes; 70 private $accessorPrefixes; 71 private $arrayMutatorPrefixes; 72 private $enableConstructorExtraction; 73 private $methodReflectionFlags; 74 private $magicMethodsFlags; 75 private $propertyReflectionFlags; 76 private $inflector; 77 78 private $arrayMutatorPrefixesFirst; 79 private $arrayMutatorPrefixesLast; 79 80 80 81 /** … … 83 84 * @param string[]|null $arrayMutatorPrefixes 84 85 */ 85 public function __construct( ?array $mutatorPrefixes = null, ?array $accessorPrefixes = null, ?array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, ?InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET)86 public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET) 86 87 { 87 88 $this->mutatorPrefixes = $mutatorPrefixes ?? self::$defaultMutatorPrefixes; … … 98 99 } 99 100 101 /** 102 * {@inheritdoc} 103 */ 100 104 public function getProperties(string $class, array $context = []): ?array 101 105 { 102 106 try { 103 107 $reflectionClass = new \ReflectionClass($class); 104 } catch (\ReflectionException ) {108 } catch (\ReflectionException $e) { 105 109 return null; 106 110 } … … 133 137 } 134 138 139 /** 140 * {@inheritdoc} 141 */ 135 142 public function getTypes(string $class, string $property, array $context = []): ?array 136 143 { … … 144 151 145 152 if ( 146 ($context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction) 147 &&$fromConstructor = $this->extractFromConstructor($class, $property)153 ($context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction) && 154 $fromConstructor = $this->extractFromConstructor($class, $property) 148 155 ) { 149 156 return $fromConstructor; … … 157 164 } 158 165 166 /** 167 * {@inheritdoc} 168 */ 159 169 public function getTypesFromConstructor(string $class, string $property): ?array 160 170 { 161 171 try { 162 172 $reflection = new \ReflectionClass($class); 163 } catch (\ReflectionException ) {173 } catch (\ReflectionException $e) { 164 174 return null; 165 175 } … … 182 192 private function getReflectionParameterFromConstructor(string $property, \ReflectionMethod $reflectionConstructor): ?\ReflectionParameter 183 193 { 194 $reflectionParameter = null; 184 195 foreach ($reflectionConstructor->getParameters() as $reflectionParameter) { 185 196 if ($reflectionParameter->getName() === $property) { … … 191 202 } 192 203 204 /** 205 * {@inheritdoc} 206 */ 193 207 public function isReadable(string $class, string $property, array $context = []): ?bool 194 208 { … … 200 214 } 201 215 216 /** 217 * {@inheritdoc} 218 */ 202 219 public function isWritable(string $class, string $property, array $context = []): ?bool 203 220 { … … 206 223 } 207 224 208 // First test with the camelized property name209 [$reflectionMethod] = $this->getMutatorMethod($class, $this->camelize($property));210 if (null !== $reflectionMethod) {211 return true;212 }213 214 // Otherwise check for the old way215 225 [$reflectionMethod] = $this->getMutatorMethod($class, $property); 216 226 … … 218 228 } 219 229 230 /** 231 * {@inheritdoc} 232 */ 220 233 public function isInitializable(string $class, string $property, array $context = []): ?bool 221 234 { 222 235 try { 223 236 $reflectionClass = new \ReflectionClass($class); 224 } catch (\ReflectionException ) {237 } catch (\ReflectionException $e) { 225 238 return null; 226 239 } … … 243 256 } 244 257 258 /** 259 * {@inheritdoc} 260 */ 245 261 public function getReadInfo(string $class, string $property, array $context = []): ?PropertyReadInfo 246 262 { 247 263 try { 248 264 $reflClass = new \ReflectionClass($class); 249 } catch (\ReflectionException ) {265 } catch (\ReflectionException $e) { 250 266 return null; 251 267 } … … 275 291 } 276 292 277 if ($allowMagicGet && $reflClass->hasMethod('__get') && (($r = $reflClass->getMethod('__get'))->getModifiers() & $this->methodReflectionFlags)) { 278 return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, $r->returnsReference()); 279 } 280 281 if ($hasProperty && (($r = $reflClass->getProperty($property))->getModifiers() & $this->propertyReflectionFlags)) { 282 return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($r), $r->isStatic(), true); 293 if ($allowMagicGet && $reflClass->hasMethod('__get') && ($reflClass->getMethod('__get')->getModifiers() & $this->methodReflectionFlags)) { 294 return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false); 295 } 296 297 if ($hasProperty && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { 298 $reflProperty = $reflClass->getProperty($property); 299 300 return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($reflProperty), $reflProperty->isStatic(), true); 283 301 } 284 302 … … 290 308 } 291 309 310 /** 311 * {@inheritdoc} 312 */ 292 313 public function getWriteInfo(string $class, string $property, array $context = []): ?PropertyWriteInfo 293 314 { 294 315 try { 295 316 $reflClass = new \ReflectionClass($class); 296 } catch (\ReflectionException ) {317 } catch (\ReflectionException $e) { 297 318 return null; 298 319 } … … 363 384 if ($reflClass->hasProperty($property) && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) { 364 385 $reflProperty = $reflClass->getProperty($property); 365 if (!$reflProperty->isReadOnly()) { 366 return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, $this->getWriteVisiblityForProperty($reflProperty), $reflProperty->isStatic()); 367 } 368 369 $errors[] = [\sprintf('The property "%s" in class "%s" is a promoted readonly property.', $property, $reflClass->getName())]; 370 $allowMagicSet = $allowMagicCall = false; 386 387 return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, $this->getWriteVisiblityForProperty($reflProperty), $reflProperty->isStatic()); 371 388 } 372 389 … … 390 407 391 408 if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) { 392 $errors[] = [ \sprintf(409 $errors[] = [sprintf( 393 410 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. 394 411 'the new value must be an array or an instance of \Traversable', … … 424 441 425 442 if (1 === \count($type) && \in_array($prefix, $this->arrayMutatorPrefixes)) { 426 $type = [new Type(Type::BUILTIN_TYPE_ARRAY, $this->isNullableProperty($class, $property), null, true, new Type(Type::BUILTIN_TYPE_INT), $type[0])];443 $type = [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type[0])]; 427 444 } 428 445 … … 462 479 try { 463 480 $reflectionClass = new \ReflectionClass($class); 464 } catch (\ReflectionException ) {481 } catch (\ReflectionException $e) { 465 482 return null; 466 483 } … … 499 516 return $types; 500 517 } 501 } catch (\ReflectionException ) {518 } catch (\ReflectionException $e) { 502 519 return null; 503 520 } … … 565 582 566 583 return null !== $reflectionPropertyType && $reflectionPropertyType->allowsNull(); 567 } catch (\ReflectionException ) {584 } catch (\ReflectionException $e) { 568 585 // Return false if the property doesn't exist 569 586 } … … 577 594 $reflectionProperty = new \ReflectionProperty($class, $property); 578 595 579 if ($writeAccessRequired) { 580 if ($reflectionProperty->isReadOnly()) { 581 return false; 582 } 583 584 if (\PHP_VERSION_ID >= 80400 && $reflectionProperty->isProtectedSet()) { 585 return (bool) ($this->propertyReflectionFlags & \ReflectionProperty::IS_PROTECTED); 586 } 587 588 if (\PHP_VERSION_ID >= 80400 && $reflectionProperty->isPrivateSet()) { 589 return (bool) ($this->propertyReflectionFlags & \ReflectionProperty::IS_PRIVATE); 590 } 591 592 if (\PHP_VERSION_ID >= 80400 && $reflectionProperty->isVirtual() && !$reflectionProperty->hasHook(\PropertyHookType::Set)) { 593 return false; 594 } 596 if (\PHP_VERSION_ID >= 80100 && $writeAccessRequired && $reflectionProperty->isReadOnly()) { 597 return false; 595 598 } 596 599 597 600 return (bool) ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags); 598 } catch (\ReflectionException ) {601 } catch (\ReflectionException $e) { 599 602 // Return false if the property doesn't exist 600 603 } … … 623 626 return [$reflectionMethod, $prefix]; 624 627 } 625 } catch (\ReflectionException ) {628 } catch (\ReflectionException $e) { 626 629 // Return null if the property doesn't exist 627 630 } … … 655 658 } 656 659 657 // Parameter can be optional to allow things like: method( ?array $foo = null)660 // Parameter can be optional to allow things like: method(array $foo = null) 658 661 if ($reflectionMethod->getNumberOfParameters() >= 1) { 659 662 return [$reflectionMethod, $prefix]; 660 663 } 661 } catch (\ReflectionException ) {664 } catch (\ReflectionException $e) { 662 665 // Try the next prefix if the method doesn't exist 663 666 } … … 722 725 723 726 if ($addMethodFound && !$removeMethodFound) { 724 $errors[] = [ \sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod)];727 $errors[] = [sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod)]; 725 728 } elseif (!$addMethodFound && $removeMethodFound) { 726 $errors[] = [ \sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod)];729 $errors[] = [sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod)]; 727 730 } 728 731 } … … 742 745 743 746 if (\ReflectionMethod::IS_PUBLIC === $this->methodReflectionFlags && !$method->isPublic()) { 744 $errors[] = \sprintf('The method "%s" in class "%s" was found but does not have public access.', $methodName, $class->getName());747 $errors[] = sprintf('The method "%s" in class "%s" was found but does not have public access.', $methodName, $class->getName()); 745 748 } elseif ($method->getNumberOfRequiredParameters() > $parameters || $method->getNumberOfParameters() < $parameters) { 746 $errors[] = \sprintf('The method "%s" in class "%s" requires %d arguments, but should accept only %d.', $methodName, $class->getName(), $method->getNumberOfRequiredParameters(), $parameters);749 $errors[] = sprintf('The method "%s" in class "%s" requires %d arguments, but should accept only %d.', $methodName, $class->getName(), $method->getNumberOfRequiredParameters(), $parameters); 747 750 } else { 748 751 return [true, $errors]; … … 833 836 private function getWriteVisiblityForProperty(\ReflectionProperty $reflectionProperty): string 834 837 { 835 if (\PHP_VERSION_ID >= 80400) {836 if ($reflectionProperty->isVirtual() && !$reflectionProperty->hasHook(\PropertyHookType::Set)) {837 return PropertyWriteInfo::VISIBILITY_PRIVATE;838 }839 840 if ($reflectionProperty->isPrivateSet()) {841 return PropertyWriteInfo::VISIBILITY_PRIVATE;842 }843 844 if ($reflectionProperty->isProtectedSet()) {845 return PropertyWriteInfo::VISIBILITY_PROTECTED;846 }847 }848 849 838 if ($reflectionProperty->isPrivate()) { 850 839 return PropertyWriteInfo::VISIBILITY_PRIVATE; -
speechkit/trunk/vendor/symfony/property-info/Extractor/SerializerExtractor.php
r3393083 r3420880 24 24 class SerializerExtractor implements PropertyListExtractorInterface 25 25 { 26 public function __construct( 27 private readonly ClassMetadataFactoryInterface $classMetadataFactory, 28 ) { 26 private $classMetadataFactory; 27 28 public function __construct(ClassMetadataFactoryInterface $classMetadataFactory) 29 { 30 $this->classMetadataFactory = $classMetadataFactory; 29 31 } 30 32 33 /** 34 * {@inheritdoc} 35 */ 31 36 public function getProperties(string $class, array $context = []): ?array 32 37 { … … 35 40 } 36 41 37 if (!$this->classMetadataFactory-> hasMetadataFor($class)) {42 if (!$this->classMetadataFactory->getMetadataFor($class)) { 38 43 return null; 39 44 } … … 43 48 44 49 foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) { 45 if (!$serializerAttributeMetadata->isIgnored() && (null === $context['serializer_groups'] || array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { 50 $ignored = method_exists($serializerAttributeMetadata, 'isIgnored') && $serializerAttributeMetadata->isIgnored(); 51 if (!$ignored && (null === $context['serializer_groups'] || array_intersect($context['serializer_groups'], $serializerAttributeMetadata->getGroups()))) { 46 52 $properties[] = $serializerAttributeMetadata->getName(); 47 53 } -
speechkit/trunk/vendor/symfony/property-info/LICENSE
r3169191 r3420880 1 Copyright (c) 2015- presentFabien Potencier1 Copyright (c) 2015-2023 Fabien Potencier 2 2 3 3 Permission is hereby granted, free of charge, to any person obtaining a copy -
speechkit/trunk/vendor/symfony/property-info/PhpStan/NameScope.php
r3393083 r3420880 23 23 final class NameScope 24 24 { 25 private string$calledClassName;26 private string$namespace;25 private $calledClassName; 26 private $namespace; 27 27 /** @var array<string, string> alias(string) => fullName(string) */ 28 private array$uses;28 private $uses; 29 29 30 30 public function __construct(string $calledClassName, string $namespace, array $uses = []) … … 37 37 public function resolveStringName(string $name): string 38 38 { 39 if ( str_starts_with($name, '\\')) {39 if (0 === strpos($name, '\\')) { 40 40 return ltrim($name, '\\'); 41 41 } … … 49 49 array_shift($nameParts); 50 50 51 return \sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts));51 return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts)); 52 52 } 53 53 54 54 if (null !== $this->namespace) { 55 return \sprintf('%s\\%s', $this->namespace, $name);55 return sprintf('%s\\%s', $this->namespace, $name); 56 56 } 57 57 -
speechkit/trunk/vendor/symfony/property-info/PhpStan/NameScopeFactory.php
r3393083 r3420880 21 21 final class NameScopeFactory 22 22 { 23 public function create(string $calledClassName, ?string $declaringClassName = null): NameScope23 public function create(string $calledClassName, string $declaringClassName = null): NameScope 24 24 { 25 $declaringClassName ??=$calledClassName;25 $declaringClassName = $declaringClassName ?? $calledClassName; 26 26 27 27 $path = explode('\\', $calledClassName); … … 57 57 if (\is_string($fileName) && is_file($fileName)) { 58 58 if (false === $contents = file_get_contents($fileName)) { 59 throw new \RuntimeException( \sprintf('Unable to read file "%s".', $fileName));59 throw new \RuntimeException(sprintf('Unable to read file "%s".', $fileName)); 60 60 } 61 61 -
speechkit/trunk/vendor/symfony/property-info/PropertyInfoCacheExtractor.php
r3169191 r3420880 23 23 class PropertyInfoCacheExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface 24 24 { 25 private array $arrayCache = []; 25 private $propertyInfoExtractor; 26 private $cacheItemPool; 27 private $arrayCache = []; 26 28 27 public function __construct( 28 private readonly PropertyInfoExtractorInterface $propertyInfoExtractor,29 private readonly CacheItemPoolInterface $cacheItemPool,30 ) {29 public function __construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) 30 { 31 $this->propertyInfoExtractor = $propertyInfoExtractor; 32 $this->cacheItemPool = $cacheItemPool; 31 33 } 32 34 35 /** 36 * {@inheritdoc} 37 */ 33 38 public function isReadable(string $class, string $property, array $context = []): ?bool 34 39 { … … 36 41 } 37 42 43 /** 44 * {@inheritdoc} 45 */ 38 46 public function isWritable(string $class, string $property, array $context = []): ?bool 39 47 { … … 41 49 } 42 50 51 /** 52 * {@inheritdoc} 53 */ 43 54 public function getShortDescription(string $class, string $property, array $context = []): ?string 44 55 { … … 46 57 } 47 58 59 /** 60 * {@inheritdoc} 61 */ 48 62 public function getLongDescription(string $class, string $property, array $context = []): ?string 49 63 { … … 51 65 } 52 66 67 /** 68 * {@inheritdoc} 69 */ 53 70 public function getProperties(string $class, array $context = []): ?array 54 71 { … … 56 73 } 57 74 75 /** 76 * {@inheritdoc} 77 */ 58 78 public function getTypes(string $class, string $property, array $context = []): ?array 59 79 { … … 61 81 } 62 82 83 /** 84 * {@inheritdoc} 85 */ 63 86 public function isInitializable(string $class, string $property, array $context = []): ?bool 64 87 { … … 73 96 try { 74 97 $serializedArguments = serialize($arguments); 75 } catch (\Exception ) {98 } catch (\Exception $exception) { 76 99 // If arguments are not serializable, skip the cache 77 100 return $this->propertyInfoExtractor->{$method}(...$arguments); -
speechkit/trunk/vendor/symfony/property-info/PropertyInfoExtractor.php
r3169191 r3420880 21 21 class PropertyInfoExtractor implements PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface 22 22 { 23 private $listExtractors; 24 private $typeExtractors; 25 private $descriptionExtractors; 26 private $accessExtractors; 27 private $initializableExtractors; 28 23 29 /** 24 30 * @param iterable<mixed, PropertyListExtractorInterface> $listExtractors … … 28 34 * @param iterable<mixed, PropertyInitializableExtractorInterface> $initializableExtractors 29 35 */ 30 public function __construct( 31 private readonly iterable $listExtractors = [],32 private readonly iterable $typeExtractors = [],33 private readonly iterable $descriptionExtractors = [],34 private readonly iterable $accessExtractors = [],35 private readonly iterable $initializableExtractors = [],36 ) {36 public function __construct(iterable $listExtractors = [], iterable $typeExtractors = [], iterable $descriptionExtractors = [], iterable $accessExtractors = [], iterable $initializableExtractors = []) 37 { 38 $this->listExtractors = $listExtractors; 39 $this->typeExtractors = $typeExtractors; 40 $this->descriptionExtractors = $descriptionExtractors; 41 $this->accessExtractors = $accessExtractors; 42 $this->initializableExtractors = $initializableExtractors; 37 43 } 38 44 45 /** 46 * {@inheritdoc} 47 */ 39 48 public function getProperties(string $class, array $context = []): ?array 40 49 { … … 42 51 } 43 52 53 /** 54 * {@inheritdoc} 55 */ 44 56 public function getShortDescription(string $class, string $property, array $context = []): ?string 45 57 { … … 47 59 } 48 60 61 /** 62 * {@inheritdoc} 63 */ 49 64 public function getLongDescription(string $class, string $property, array $context = []): ?string 50 65 { … … 52 67 } 53 68 69 /** 70 * {@inheritdoc} 71 */ 54 72 public function getTypes(string $class, string $property, array $context = []): ?array 55 73 { … … 57 75 } 58 76 77 /** 78 * {@inheritdoc} 79 */ 59 80 public function isReadable(string $class, string $property, array $context = []): ?bool 60 81 { … … 62 83 } 63 84 85 /** 86 * {@inheritdoc} 87 */ 64 88 public function isWritable(string $class, string $property, array $context = []): ?bool 65 89 { … … 67 91 } 68 92 93 /** 94 * {@inheritdoc} 95 */ 69 96 public function isInitializable(string $class, string $property, array $context = []): ?bool 70 97 { -
speechkit/trunk/vendor/symfony/property-info/PropertyReadInfo.php
r3233685 r3420880 16 16 * 17 17 * @author Joel Wurtz <jwurtz@jolicode.com> 18 * 19 * @internal 18 20 */ 19 21 final class PropertyReadInfo … … 26 28 public const VISIBILITY_PRIVATE = 'private'; 27 29 28 public function __construct( 29 private readonly string $type, 30 private readonly string $name, 31 private readonly string $visibility, 32 private readonly bool $static, 33 private readonly bool $byRef, 34 ) { 30 private $type; 31 32 private $name; 33 34 private $visibility; 35 36 private $static; 37 38 private $byRef; 39 40 public function __construct(string $type, string $name, string $visibility, bool $static, bool $byRef) 41 { 42 $this->type = $type; 43 $this->name = $name; 44 $this->visibility = $visibility; 45 $this->static = $static; 46 $this->byRef = $byRef; 35 47 } 36 48 -
speechkit/trunk/vendor/symfony/property-info/PropertyWriteInfo.php
r3233685 r3420880 16 16 * 17 17 * @author Joel Wurtz <jwurtz@jolicode.com> 18 * 19 * @internal 18 20 */ 19 21 final class PropertyWriteInfo … … 29 31 public const VISIBILITY_PRIVATE = 'private'; 30 32 31 private ?self $adderInfo = null; 32 private ?self $removerInfo = null; 33 private array $errors = []; 33 private $type; 34 private $name; 35 private $visibility; 36 private $static; 37 private $adderInfo; 38 private $removerInfo; 39 private $errors = []; 34 40 35 public function __construct( 36 private readonly string $type = self::TYPE_NONE,37 private readonly ?string $name = null,38 private readonly ?string $visibility = null,39 private readonly ?bool $static = null,40 ) {41 public function __construct(string $type = self::TYPE_NONE, string $name = null, string $visibility = null, bool $static = null) 42 { 43 $this->type = $type; 44 $this->name = $name; 45 $this->visibility = $visibility; 46 $this->static = $static; 41 47 } 42 48 -
speechkit/trunk/vendor/symfony/property-info/Type.php
r3393083 r3420880 64 64 ]; 65 65 66 private string$builtinType;67 private bool$nullable;68 private ?string$class;69 private bool$collection;70 private array$collectionKeyType;71 private array$collectionValueType;66 private $builtinType; 67 private $nullable; 68 private $class; 69 private $collection; 70 private $collectionKeyType; 71 private $collectionValueType; 72 72 73 73 /** … … 77 77 * @throws \InvalidArgumentException 78 78 */ 79 public function __construct(string $builtinType, bool $nullable = false, ?string $class = null, bool $collection = false, array|self|null $collectionKeyType = null, array|self|null$collectionValueType = null)79 public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, array|Type $collectionKeyType = null, array|Type $collectionValueType = null) 80 80 { 81 81 if (!\in_array($builtinType, self::$builtinTypes)) { 82 throw new \InvalidArgumentException( \sprintf('"%s" is not a valid PHP type.', $builtinType));82 throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType)); 83 83 } 84 84 … … 91 91 } 92 92 93 private function validateCollectionArgument(array| self|null $collectionArgument, int $argumentIndex, string $argumentName): ?array93 private function validateCollectionArgument(array|Type|null $collectionArgument, int $argumentIndex, string $argumentName): ?array 94 94 { 95 95 if (null === $collectionArgument) { … … 100 100 foreach ($collectionArgument as $type) { 101 101 if (!$type instanceof self) { 102 throw new \TypeError( \sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", array value "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument)));102 throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", array value "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument))); 103 103 } 104 104 } -
speechkit/trunk/vendor/symfony/property-info/Util/PhpDocTypeHelper.php
r3393083 r3420880 12 12 namespace Symfony\Component\PropertyInfo\Util; 13 13 14 use phpDocumentor\Reflection\PseudoType;15 14 use phpDocumentor\Reflection\PseudoTypes\ConstExpression; 16 15 use phpDocumentor\Reflection\PseudoTypes\List_; … … 19 18 use phpDocumentor\Reflection\Types\Collection; 20 19 use phpDocumentor\Reflection\Types\Compound; 21 use phpDocumentor\Reflection\Types\Integer;22 20 use phpDocumentor\Reflection\Types\Null_; 23 21 use phpDocumentor\Reflection\Types\Nullable; 24 use phpDocumentor\Reflection\Types\String_;25 22 use Symfony\Component\PropertyInfo\Type; 26 23 … … 106 103 * Creates a {@see Type} from a PHPDoc type. 107 104 */ 108 private function createType(DocType $type, bool $nullable ): ?Type109 { 110 $docType = (string) $type;105 private function createType(DocType $type, bool $nullable, string $docType = null): ?Type 106 { 107 $docType = $docType ?? (string) $type; 111 108 112 109 if ($type instanceof Collection) { … … 119 116 [$phpType, $class] = $this->getPhpTypeAndClass((string) $fqsen); 120 117 121 $collection = is_a($class, \Traversable::class, true) || is_a($class, \ArrayAccess::class, true); 122 123 // it's safer to fall back to other extractors if the generic type is too abstract 124 if (!$collection && !class_exists($class)) { 125 return null; 126 } 127 128 $keys = $this->getTypes($type->getKeyType()); 129 $values = $this->getTypes($type->getValueType()); 130 131 return new Type($phpType, $nullable, $class, $collection, $keys, $values); 118 $key = $this->getTypes($type->getKeyType()); 119 $value = $this->getTypes($type->getValueType()); 120 121 // More than 1 type returned means it is a Compound type, which is 122 // not handled by Type, so better use a null value. 123 $key = 1 === \count($key) ? $key[0] : null; 124 $value = 1 === \count($value) ? $value[0] : null; 125 126 return new Type($phpType, $nullable, $class, true, $key, $value); 132 127 } 133 128 … … 137 132 } 138 133 139 if (str_ends_with($docType, '[]') && $type instanceof Array_) {140 $collectionKeyType s= new Type(Type::BUILTIN_TYPE_INT);141 $collectionValueType s = $this->getTypes($type->getValueType());142 143 return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType s, $collectionValueTypes);134 if (str_ends_with($docType, '[]')) { 135 $collectionKeyType = new Type(Type::BUILTIN_TYPE_INT); 136 $collectionValueType = $this->createType($type, false, substr($docType, 0, -2)); 137 138 return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType); 144 139 } 145 140 … … 147 142 // array<value> is converted to x[] which is handled above 148 143 // so it's only necessary to handle array<key, value> here 149 $collectionKeyTypes = $this->getTypes($type->getKeyType()); 144 $collectionKeyType = $this->getTypes($type->getKeyType())[0]; 145 150 146 $collectionValueTypes = $this->getTypes($type->getValueType()); 151 152 return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyTypes, $collectionValueTypes); 153 } 154 155 if ($type instanceof PseudoType) { 156 if ($type->underlyingType() instanceof Integer) { 157 return new Type(Type::BUILTIN_TYPE_INT, $nullable, null); 158 } elseif ($type->underlyingType() instanceof String_) { 159 return new Type(Type::BUILTIN_TYPE_STRING, $nullable, null); 160 } 147 if (1 != \count($collectionValueTypes)) { 148 // the Type class does not support union types yet, so assume that no type was defined 149 $collectionValueType = null; 150 } else { 151 $collectionValueType = $collectionValueTypes[0]; 152 } 153 154 return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType); 161 155 } 162 156 … … 173 167 private function normalizeType(string $docType): string 174 168 { 175 return match ($docType) { 176 'integer' => 'int', 177 'boolean' => 'bool', 169 switch ($docType) { 170 case 'integer': 171 return 'int'; 172 173 case 'boolean': 174 return 'bool'; 175 178 176 // real is not part of the PHPDoc standard, so we ignore it 179 'double' => 'float', 180 'callback' => 'callable', 181 'void' => 'null', 182 default => $docType, 183 }; 177 case 'double': 178 return 'float'; 179 180 case 'callback': 181 return 'callable'; 182 183 case 'void': 184 return 'null'; 185 186 default: 187 return $docType; 188 } 184 189 } 185 190 -
speechkit/trunk/vendor/symfony/property-info/Util/PhpStanTypeHelper.php
r3393083 r3420880 116 116 } 117 117 if ($node instanceof GenericTypeNode) { 118 if ('class-string' === $node->type->name) {119 return [new Type(Type::BUILTIN_TYPE_STRING)];120 }121 122 118 [$mainType] = $this->extractTypes($node->type, $nameScope); 123 119 124 120 if (Type::BUILTIN_TYPE_INT === $mainType->getBuiltinType()) { 125 121 return [$mainType]; 126 }127 128 $collection = $mainType->isCollection() || is_a($mainType->getClassName(), \Traversable::class, true) || is_a($mainType->getClassName(), \ArrayAccess::class, true);129 130 // it's safer to fall back to other extractors if the generic type is too abstract131 if (!$collection && !class_exists($mainType->getClassName()) && !interface_exists($mainType->getClassName(), false)) {132 return [];133 122 } 134 123 … … 148 137 } 149 138 150 return [new Type($mainType->getBuiltinType(), $mainType->isNullable(), $mainType->getClassName(), $collection, $collectionKeyTypes, $collectionKeyValues)];139 return [new Type($mainType->getBuiltinType(), $mainType->isNullable(), $mainType->getClassName(), true, $collectionKeyTypes, $collectionKeyValues)]; 151 140 } 152 141 if ($node instanceof ArrayShapeNode) { … … 177 166 } 178 167 179 return match ($node->name) { 180 'integer', 181 'positive-int', 182 'negative-int' => [new Type(Type::BUILTIN_TYPE_INT)], 183 'double' => [new Type(Type::BUILTIN_TYPE_FLOAT)], 184 'list', 185 'non-empty-list' => [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT))], 186 'non-empty-array' => [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)], 187 'mixed' => [], // mixed seems to be ignored in all other extractors 188 'parent' => [new Type(Type::BUILTIN_TYPE_OBJECT, false, $node->name)], 189 'static', 190 'self' => [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())], 191 'class-string', 192 'html-escaped-string', 193 'lowercase-string', 194 'non-empty-lowercase-string', 195 'non-empty-string', 196 'numeric-string', 197 'trait-string', 198 'interface-string', 199 'literal-string' => [new Type(Type::BUILTIN_TYPE_STRING)], 200 'void' => [new Type(Type::BUILTIN_TYPE_NULL)], 201 'scalar' => [new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_FLOAT), new Type(Type::BUILTIN_TYPE_STRING), new Type(Type::BUILTIN_TYPE_BOOL)], 202 'number' => [new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_FLOAT)], 203 'numeric' => [new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_FLOAT), new Type(Type::BUILTIN_TYPE_STRING)], 204 'array-key' => [new Type(Type::BUILTIN_TYPE_STRING), new Type(Type::BUILTIN_TYPE_INT)], 205 default => [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveStringName($node->name))], 206 }; 168 switch ($node->name) { 169 case 'integer': 170 return [new Type(Type::BUILTIN_TYPE_INT)]; 171 case 'list': 172 case 'non-empty-list': 173 return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT))]; 174 case 'non-empty-array': 175 return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)]; 176 case 'mixed': 177 return []; // mixed seems to be ignored in all other extractors 178 case 'parent': 179 return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $node->name)]; 180 case 'static': 181 case 'self': 182 return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())]; 183 case 'void': 184 return [new Type(Type::BUILTIN_TYPE_NULL)]; 185 } 186 187 return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveStringName($node->name))]; 207 188 } 208 189 -
speechkit/trunk/vendor/symfony/property-info/composer.json
r3393083 r3420880 6 6 "property", 7 7 "type", 8 " phpdoc",8 "PHPDoc", 9 9 "symfony", 10 10 "validator", … … 24 24 ], 25 25 "require": { 26 "php": ">=8. 1",27 "symfony/string": "^5.4|^6.0 |^7.0"26 "php": ">=8.0.2", 27 "symfony/string": "^5.4|^6.0" 28 28 }, 29 29 "require-dev": { 30 "doctrine/annotations": "^1.12|^2", 31 "symfony/serializer": "^5.4|^6.4|^7.0", 32 "symfony/cache": "^5.4|^6.0|^7.0", 33 "symfony/dependency-injection": "^5.4|^6.0|^7.0", 30 "symfony/serializer": "^5.4|^6.0", 31 "symfony/cache": "^5.4|^6.0", 32 "symfony/dependency-injection": "^5.4|^6.0", 34 33 "phpdocumentor/reflection-docblock": "^5.2", 35 "phpstan/phpdoc-parser": "^1.0|^2.0" 34 "phpstan/phpdoc-parser": "^1.0", 35 "doctrine/annotations": "^1.10.4|^2" 36 36 }, 37 37 "conflict": { 38 "doctrine/annotations": "<1.12",39 38 "phpdocumentor/reflection-docblock": "<5.2", 40 "phpdocumentor/type-resolver": "<1.5.1", 41 "symfony/dependency-injection": "<5.4|>=6.0,<6.4", 42 "symfony/cache": "<5.4", 43 "symfony/serializer": "<5.4" 39 "phpdocumentor/type-resolver": "<1.4.0", 40 "symfony/dependency-injection": "<5.4" 41 }, 42 "suggest": { 43 "psr/cache-implementation": "To cache results", 44 "symfony/doctrine-bridge": "To use Doctrine metadata", 45 "phpdocumentor/reflection-docblock": "To use the PHPDoc", 46 "symfony/serializer": "To use Serializer metadata" 44 47 }, 45 48 "autoload": { -
speechkit/trunk/vendor/symfony/string/AbstractString.php
r3393083 r3420880 40 40 public const PREG_SPLIT_OFFSET_CAPTURE = \PREG_SPLIT_OFFSET_CAPTURE; 41 41 42 protected string$string = '';43 protected ?bool$ignoreCase = false;42 protected $string = ''; 43 protected $ignoreCase = false; 44 44 45 45 abstract public function __construct(string $string = ''); … … 75 75 foreach ($values as $k => $v) { 76 76 if (\is_string($k) && '' !== $k && $k !== $j = (string) new static($k)) { 77 $keys ??=array_keys($values);77 $keys = $keys ?? array_keys($values); 78 78 $keys[$i] = $j; 79 79 } … … 93 93 /** 94 94 * @param string|string[] $needle 95 */ 96 public function after(string|iterable $needle, bool $includeNeedle = false, int $offset = 0): static 95 * 96 * @return static 97 */ 98 public function after($needle, bool $includeNeedle = false, int $offset = 0): self 97 99 { 98 100 $str = clone $this; 99 101 $i = \PHP_INT_MAX; 100 102 101 if (\is_string($needle)) { 102 $needle = [$needle]; 103 } 104 105 foreach ($needle as $n) { 103 foreach ((array) $needle as $n) { 106 104 $n = (string) $n; 107 105 $j = $this->indexOf($n, $offset); … … 126 124 /** 127 125 * @param string|string[] $needle 128 */ 129 public function afterLast(string|iterable $needle, bool $includeNeedle = false, int $offset = 0): static 126 * 127 * @return static 128 */ 129 public function afterLast($needle, bool $includeNeedle = false, int $offset = 0): self 130 130 { 131 131 $str = clone $this; 132 132 $i = null; 133 133 134 if (\is_string($needle)) { 135 $needle = [$needle]; 136 } 137 138 foreach ($needle as $n) { 134 foreach ((array) $needle as $n) { 139 135 $n = (string) $n; 140 136 $j = $this->indexOfLast($n, $offset); … … 157 153 } 158 154 159 abstract public function append(string ...$suffix): static; 155 /** 156 * @return static 157 */ 158 abstract public function append(string ...$suffix): self; 160 159 161 160 /** 162 161 * @param string|string[] $needle 163 */ 164 public function before(string|iterable $needle, bool $includeNeedle = false, int $offset = 0): static 162 * 163 * @return static 164 */ 165 public function before($needle, bool $includeNeedle = false, int $offset = 0): self 165 166 { 166 167 $str = clone $this; 167 168 $i = \PHP_INT_MAX; 168 169 169 if (\is_string($needle)) { 170 $needle = [$needle]; 171 } 172 173 foreach ($needle as $n) { 170 foreach ((array) $needle as $n) { 174 171 $n = (string) $n; 175 172 $j = $this->indexOf($n, $offset); … … 194 191 /** 195 192 * @param string|string[] $needle 196 */ 197 public function beforeLast(string|iterable $needle, bool $includeNeedle = false, int $offset = 0): static 193 * 194 * @return static 195 */ 196 public function beforeLast($needle, bool $includeNeedle = false, int $offset = 0): self 198 197 { 199 198 $str = clone $this; 200 199 $i = null; 201 200 202 if (\is_string($needle)) { 203 $needle = [$needle]; 204 } 205 206 foreach ($needle as $n) { 201 foreach ((array) $needle as $n) { 207 202 $n = (string) $n; 208 203 $j = $this->indexOfLast($n, $offset); … … 235 230 } 236 231 237 abstract public function camel(): static; 232 /** 233 * @return static 234 */ 235 abstract public function camel(): self; 238 236 239 237 /** … … 242 240 abstract public function chunk(int $length = 1): array; 243 241 244 public function collapseWhitespace(): static 242 /** 243 * @return static 244 */ 245 public function collapseWhitespace(): self 245 246 { 246 247 $str = clone $this; … … 253 254 * @param string|string[] $needle 254 255 */ 255 public function containsAny( string|iterable$needle): bool256 public function containsAny($needle): bool 256 257 { 257 258 return null !== $this->indexOf($needle); … … 261 262 * @param string|string[] $suffix 262 263 */ 263 public function endsWith( string|iterable$suffix): bool264 { 265 if ( \is_string($suffix)) {266 throw new \TypeError( \sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));264 public function endsWith($suffix): bool 265 { 266 if (!\is_array($suffix) && !$suffix instanceof \Traversable) { 267 throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); 267 268 } 268 269 … … 276 277 } 277 278 278 public function ensureEnd(string $suffix): static 279 /** 280 * @return static 281 */ 282 public function ensureEnd(string $suffix): self 279 283 { 280 284 if (!$this->endsWith($suffix)) { … … 288 292 } 289 293 290 public function ensureStart(string $prefix): static 294 /** 295 * @return static 296 */ 297 public function ensureStart(string $prefix): self 291 298 { 292 299 $prefix = new static($prefix); … … 310 317 * @param string|string[] $string 311 318 */ 312 public function equalsTo( string|iterable$string): bool313 { 314 if ( \is_string($string)) {315 throw new \TypeError( \sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));319 public function equalsTo($string): bool 320 { 321 if (!\is_array($string) && !$string instanceof \Traversable) { 322 throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); 316 323 } 317 324 … … 325 332 } 326 333 327 abstract public function folded(): static; 328 329 public function ignoreCase(): static 334 /** 335 * @return static 336 */ 337 abstract public function folded(): self; 338 339 /** 340 * @return static 341 */ 342 public function ignoreCase(): self 330 343 { 331 344 $str = clone $this; … … 338 351 * @param string|string[] $needle 339 352 */ 340 public function indexOf( string|iterable$needle, int $offset = 0): ?int341 { 342 if ( \is_string($needle)) {343 throw new \TypeError( \sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));353 public function indexOf($needle, int $offset = 0): ?int 354 { 355 if (!\is_array($needle) && !$needle instanceof \Traversable) { 356 throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); 344 357 } 345 358 … … 360 373 * @param string|string[] $needle 361 374 */ 362 public function indexOfLast( string|iterable$needle, int $offset = 0): ?int363 { 364 if ( \is_string($needle)) {365 throw new \TypeError( \sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));375 public function indexOfLast($needle, int $offset = 0): ?int 376 { 377 if (!\is_array($needle) && !$needle instanceof \Traversable) { 378 throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); 366 379 } 367 380 … … 384 397 } 385 398 386 abstract public function join(array $strings, ?string $lastGlue = null): static; 399 /** 400 * @return static 401 */ 402 abstract public function join(array $strings, ?string $lastGlue = null): self; 387 403 388 404 public function jsonSerialize(): string … … 393 409 abstract public function length(): int; 394 410 395 abstract public function lower(): static; 411 /** 412 * @return static 413 */ 414 abstract public function lower(): self; 396 415 397 416 /** … … 404 423 abstract public function match(string $regexp, int $flags = 0, int $offset = 0): array; 405 424 406 abstract public function padBoth(int $length, string $padStr = ' '): static; 407 408 abstract public function padEnd(int $length, string $padStr = ' '): static; 409 410 abstract public function padStart(int $length, string $padStr = ' '): static; 411 412 abstract public function prepend(string ...$prefix): static; 413 414 public function repeat(int $multiplier): static 425 /** 426 * @return static 427 */ 428 abstract public function padBoth(int $length, string $padStr = ' '): self; 429 430 /** 431 * @return static 432 */ 433 abstract public function padEnd(int $length, string $padStr = ' '): self; 434 435 /** 436 * @return static 437 */ 438 abstract public function padStart(int $length, string $padStr = ' '): self; 439 440 /** 441 * @return static 442 */ 443 abstract public function prepend(string ...$prefix): self; 444 445 /** 446 * @return static 447 */ 448 public function repeat(int $multiplier): self 415 449 { 416 450 if (0 > $multiplier) { 417 throw new InvalidArgumentException( \sprintf('Multiplier must be positive, %d given.', $multiplier));451 throw new InvalidArgumentException(sprintf('Multiplier must be positive, %d given.', $multiplier)); 418 452 } 419 453 … … 424 458 } 425 459 426 abstract public function replace(string $from, string $to): static; 427 428 abstract public function replaceMatches(string $fromRegexp, string|callable $to): static; 429 430 abstract public function reverse(): static; 431 432 abstract public function slice(int $start = 0, ?int $length = null): static; 433 434 abstract public function snake(): static; 435 436 public function kebab(): static 437 { 438 return $this->snake()->replace('_', '-'); 439 } 440 441 public function pascal(): static 442 { 443 return $this->camel()->title(); 444 } 445 446 abstract public function splice(string $replacement, int $start = 0, ?int $length = null): static; 460 /** 461 * @return static 462 */ 463 abstract public function replace(string $from, string $to): self; 464 465 /** 466 * @param string|callable $to 467 * 468 * @return static 469 */ 470 abstract public function replaceMatches(string $fromRegexp, $to): self; 471 472 /** 473 * @return static 474 */ 475 abstract public function reverse(): self; 476 477 /** 478 * @return static 479 */ 480 abstract public function slice(int $start = 0, ?int $length = null): self; 481 482 /** 483 * @return static 484 */ 485 abstract public function snake(): self; 486 487 /** 488 * @return static 489 */ 490 abstract public function splice(string $replacement, int $start = 0, ?int $length = null): self; 447 491 448 492 /** … … 459 503 } 460 504 461 set_error_handler(static f n ($t, $m) => throw new InvalidArgumentException($m));505 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 462 506 463 507 try { 464 508 if (false === $chunks = preg_split($delimiter, $this->string, $limit, $flags)) { 465 throw new RuntimeException('Splitting failed with error: '.preg_last_error_msg()); 509 $lastError = preg_last_error(); 510 511 foreach (get_defined_constants(true)['pcre'] as $k => $v) { 512 if ($lastError === $v && '_ERROR' === substr($k, -6)) { 513 throw new RuntimeException('Splitting failed with '.$k.'.'); 514 } 515 } 516 517 throw new RuntimeException('Splitting failed with unknown error code.'); 466 518 } 467 519 } finally { … … 489 541 * @param string|string[] $prefix 490 542 */ 491 public function startsWith( string|iterable$prefix): bool492 { 493 if ( \is_string($prefix)) {494 throw new \TypeError( \sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class));543 public function startsWith($prefix): bool 544 { 545 if (!\is_array($prefix) && !$prefix instanceof \Traversable) { 546 throw new \TypeError(sprintf('Method "%s()" must be overridden by class "%s" to deal with non-iterable values.', __FUNCTION__, static::class)); 495 547 } 496 548 … … 504 556 } 505 557 506 abstract public function title(bool $allWords = false): static; 558 /** 559 * @return static 560 */ 561 abstract public function title(bool $allWords = false): self; 507 562 508 563 public function toByteString(?string $toEncoding = null): ByteString … … 518 573 } 519 574 575 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 576 520 577 try { 521 $b->string = mb_convert_encoding($this->string, $toEncoding, 'UTF-8'); 522 } catch (\ValueError $e) { 523 if (!\function_exists('iconv')) { 524 throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); 525 } 526 527 $b->string = iconv('UTF-8', $toEncoding, $this->string); 578 try { 579 $b->string = mb_convert_encoding($this->string, $toEncoding, 'UTF-8'); 580 } catch (InvalidArgumentException|\ValueError $e) { 581 if (!\function_exists('iconv')) { 582 if ($e instanceof \ValueError) { 583 throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); 584 } 585 throw $e; 586 } 587 588 $b->string = iconv('UTF-8', $toEncoding, $this->string); 589 } 590 } finally { 591 restore_error_handler(); 528 592 } 529 593 … … 546 610 } 547 611 548 abstract public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static; 549 550 abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static; 612 /** 613 * @return static 614 */ 615 abstract public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; 616 617 /** 618 * @return static 619 */ 620 abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; 551 621 552 622 /** 553 623 * @param string|string[] $prefix 554 */ 555 public function trimPrefix($prefix): static 556 { 557 if (\is_array($prefix) || $prefix instanceof \Traversable) { // don't use is_iterable(), it's slow 624 * 625 * @return static 626 */ 627 public function trimPrefix($prefix): self 628 { 629 if (\is_array($prefix) || $prefix instanceof \Traversable) { 558 630 foreach ($prefix as $s) { 559 631 $t = $this->trimPrefix($s); … … 582 654 } 583 655 584 abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static; 656 /** 657 * @return static 658 */ 659 abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self; 585 660 586 661 /** 587 662 * @param string|string[] $suffix 588 */ 589 public function trimSuffix($suffix): static 590 { 591 if (\is_array($suffix) || $suffix instanceof \Traversable) { // don't use is_iterable(), it's slow 663 * 664 * @return static 665 */ 666 public function trimSuffix($suffix): self 667 { 668 if (\is_array($suffix) || $suffix instanceof \Traversable) { 592 669 foreach ($suffix as $s) { 593 670 $t = $this->trimSuffix($s); … … 616 693 } 617 694 618 public function truncate(int $length, string $ellipsis = '', bool|TruncateMode $cut = TruncateMode::Char): static 695 /** 696 * @return static 697 */ 698 public function truncate(int $length, string $ellipsis = '', bool $cut = true): self 619 699 { 620 700 $stringLength = $this->length(); … … 630 710 } 631 711 632 $desiredLength = $length; 633 if (TruncateMode::WordAfter === $cut || !$cut) { 712 if (!$cut) { 634 713 if (null === $length = $this->indexOf([' ', "\r", "\n", "\t"], ($length ?: 1) - 1)) { 635 714 return clone $this; … … 637 716 638 717 $length += $ellipsisLength; 639 } elseif (TruncateMode::WordBefore === $cut && null !== $this->indexOf([' ', "\r", "\n", "\t"], ($length ?: 1) - 1)) {640 $length += $ellipsisLength;641 718 } 642 719 643 720 $str = $this->slice(0, $length - $ellipsisLength); 644 721 645 if (TruncateMode::WordBefore === $cut) {646 if (0 === $ellipsisLength && $desiredLength === $this->indexOf([' ', "\r", "\n", "\t"], $length)) {647 return $str;648 }649 650 $str = $str->beforeLast([' ', "\r", "\n", "\t"]);651 }652 653 722 return $ellipsisLength ? $str->trimEnd()->append($ellipsis) : $str; 654 723 } 655 724 656 abstract public function upper(): static; 725 /** 726 * @return static 727 */ 728 abstract public function upper(): self; 657 729 658 730 /** … … 661 733 abstract public function width(bool $ignoreAnsiDecoration = true): int; 662 734 663 public function wordwrap(int $width = 75, string $break = "\n", bool $cut = false): static 735 /** 736 * @return static 737 */ 738 public function wordwrap(int $width = 75, string $break = "\n", bool $cut = false): self 664 739 { 665 740 $lines = '' !== $break ? $this->split($break) : [clone $this]; -
speechkit/trunk/vendor/symfony/string/AbstractUnicodeString.php
r3393083 r3420880 41 41 private const FOLD_TO = ['i̇', 'μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι', 'ss', 'ʼn', 'ǰ', 'ΐ', 'ΰ', 'եւ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'aʾ', 'ss', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἀι', 'ἁι', 'ἂι', 'ἃι', 'ἄι', 'ἅι', 'ἆι', 'ἇι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ἠι', 'ἡι', 'ἢι', 'ἣι', 'ἤι', 'ἥι', 'ἦι', 'ἧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὠι', 'ὡι', 'ὢι', 'ὣι', 'ὤι', 'ὥι', 'ὦι', 'ὧι', 'ὰι', 'αι', 'άι', 'ᾶ', 'ᾶι', 'αι', 'ὴι', 'ηι', 'ήι', 'ῆ', 'ῆι', 'ηι', 'ῒ', 'ῖ', 'ῗ', 'ῢ', 'ῤ', 'ῦ', 'ῧ', 'ὼι', 'ωι', 'ώι', 'ῶ', 'ῶι', 'ωι', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'st', 'st', 'մն', 'մե', 'մի', 'վն', 'մխ']; 42 42 43 // the subset of upper case mappings that map one code point to many code points 44 private const UPPER_FROM = ['ß', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'ſt', 'st', 'և', 'ﬓ', 'ﬔ', 'ﬕ', 'ﬖ', 'ﬗ', 'ʼn', 'ΐ', 'ΰ', 'ǰ', 'ẖ', 'ẗ', 'ẘ', 'ẙ', 'ẚ', 'ὐ', 'ὒ', 'ὔ', 'ὖ', 'ᾶ', 'ῆ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'ῢ', 'ΰ', 'ῤ', 'ῦ', 'ῧ', 'ῶ']; 45 private const UPPER_TO = ['SS', 'FF', 'FI', 'FL', 'FFI', 'FFL', 'ST', 'ST', 'ԵՒ', 'ՄՆ', 'ՄԵ', 'ՄԻ', 'ՎՆ', 'ՄԽ', 'ʼN', 'Ϊ́', 'Ϋ́', 'J̌', 'H̱', 'T̈', 'W̊', 'Y̊', 'Aʾ', 'Υ̓', 'Υ̓̀', 'Υ̓́', 'Υ̓͂', 'Α͂', 'Η͂', 'Ϊ̀', 'Ϊ́', 'Ι͂', 'Ϊ͂', 'Ϋ̀', 'Ϋ́', 'Ρ̓', 'Υ͂', 'Ϋ͂', 'Ω͂']; 46 43 47 // the subset of https://github.com/unicode-org/cldr/blob/master/common/transforms/Latin-ASCII.xml that is not in NFKD 44 48 private const TRANSLIT_FROM = ['Æ', 'Ð', 'Ø', 'Þ', 'ß', 'æ', 'ð', 'ø', 'þ', 'Đ', 'đ', 'Ħ', 'ħ', 'ı', 'ĸ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'ʼn', 'Ŋ', 'ŋ', 'Œ', 'œ', 'Ŧ', 'ŧ', 'ƀ', 'Ɓ', 'Ƃ', 'ƃ', 'Ƈ', 'ƈ', 'Ɖ', 'Ɗ', 'Ƌ', 'ƌ', 'Ɛ', 'Ƒ', 'ƒ', 'Ɠ', 'ƕ', 'Ɩ', 'Ɨ', 'Ƙ', 'ƙ', 'ƚ', 'Ɲ', 'ƞ', 'Ƣ', 'ƣ', 'Ƥ', 'ƥ', 'ƫ', 'Ƭ', 'ƭ', 'Ʈ', 'Ʋ', 'Ƴ', 'ƴ', 'Ƶ', 'ƶ', 'DŽ', 'Dž', 'dž', 'Ǥ', 'ǥ', 'ȡ', 'Ȥ', 'ȥ', 'ȴ', 'ȵ', 'ȶ', 'ȷ', 'ȸ', 'ȹ', 'Ⱥ', 'Ȼ', 'ȼ', 'Ƚ', 'Ⱦ', 'ȿ', 'ɀ', 'Ƀ', 'Ʉ', 'Ɇ', 'ɇ', 'Ɉ', 'ɉ', 'Ɍ', 'ɍ', 'Ɏ', 'ɏ', 'ɓ', 'ɕ', 'ɖ', 'ɗ', 'ɛ', 'ɟ', 'ɠ', 'ɡ', 'ɢ', 'ɦ', 'ɧ', 'ɨ', 'ɪ', 'ɫ', 'ɬ', 'ɭ', 'ɱ', 'ɲ', 'ɳ', 'ɴ', 'ɶ', 'ɼ', 'ɽ', 'ɾ', 'ʀ', 'ʂ', 'ʈ', 'ʉ', 'ʋ', 'ʏ', 'ʐ', 'ʑ', 'ʙ', 'ʛ', 'ʜ', 'ʝ', 'ʟ', 'ʠ', 'ʣ', 'ʥ', 'ʦ', 'ʪ', 'ʫ', 'ᴀ', 'ᴁ', 'ᴃ', 'ᴄ', 'ᴅ', 'ᴆ', 'ᴇ', 'ᴊ', 'ᴋ', 'ᴌ', 'ᴍ', 'ᴏ', 'ᴘ', 'ᴛ', 'ᴜ', 'ᴠ', 'ᴡ', 'ᴢ', 'ᵫ', 'ᵬ', 'ᵭ', 'ᵮ', 'ᵯ', 'ᵰ', 'ᵱ', 'ᵲ', 'ᵳ', 'ᵴ', 'ᵵ', 'ᵶ', 'ᵺ', 'ᵻ', 'ᵽ', 'ᵾ', 'ᶀ', 'ᶁ', 'ᶂ', 'ᶃ', 'ᶄ', 'ᶅ', 'ᶆ', 'ᶇ', 'ᶈ', 'ᶉ', 'ᶊ', 'ᶌ', 'ᶍ', 'ᶎ', 'ᶏ', 'ᶑ', 'ᶒ', 'ᶓ', 'ᶖ', 'ᶙ', 'ẚ', 'ẜ', 'ẝ', 'ẞ', 'Ỻ', 'ỻ', 'Ỽ', 'ỽ', 'Ỿ', 'ỿ', '©', '®', '₠', '₢', '₣', '₤', '₧', '₺', '₹', 'ℌ', '℞', '㎧', '㎮', '㏆', '㏗', '㏞', '㏟', '¼', '½', '¾', '⅓', '⅔', '⅕', '⅖', '⅗', '⅘', '⅙', '⅚', '⅛', '⅜', '⅝', '⅞', '⅟', '〇', '‘', '’', '‚', '‛', '“', '”', '„', '‟', '′', '″', '〝', '〞', '«', '»', '‹', '›', '‐', '‑', '‒', '–', '—', '―', '︱', '︲', '﹘', '‖', '⁄', '⁅', '⁆', '⁎', '、', '。', '〈', '〉', '《', '》', '〔', '〕', '〘', '〙', '〚', '〛', '︑', '︒', '︹', '︺', '︽', '︾', '︿', '﹀', '﹑', '﹝', '﹞', '⦅', '⦆', '。', '、', '×', '÷', '−', '∕', '∖', '∣', '∥', '≪', '≫', '⦅', '⦆']; 45 49 private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))']; 46 50 47 private static array $transliterators = []; 48 private static array $tableZero; 49 private static array $tableWide; 50 51 public static function fromCodePoints(int ...$codes): static 51 private static $transliterators = []; 52 private static $tableZero; 53 private static $tableWide; 54 55 /** 56 * @return static 57 */ 58 public static function fromCodePoints(int ...$codes): self 52 59 { 53 60 $string = ''; … … 118 125 $s = str_replace(["a\u{0308}", "o\u{0308}", "u\u{0308}", "A\u{0308}", "O\u{0308}", "U\u{0308}"], ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], $s); 119 126 } elseif (\function_exists('transliterator_transliterate')) { 120 if (null === $transliterator = self::$transliterators[$rule] ?? = \Transliterator::create($rule)) {127 if (null === $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule)) { 121 128 if ('any-latin/bgn' === $rule) { 122 129 $rule = 'any-latin'; 123 $transliterator = self::$transliterators[$rule] ?? = \Transliterator::create($rule);130 $transliterator = self::$transliterators[$rule] ?? self::$transliterators[$rule] = \Transliterator::create($rule); 124 131 } 125 132 126 133 if (null === $transliterator) { 127 throw new InvalidArgumentException( \sprintf('Unknown transliteration rule "%s".', $rule));134 throw new InvalidArgumentException(sprintf('Unknown transliteration rule "%s".', $rule)); 128 135 } 129 136 … … 136 143 $s = preg_replace('/[^\x00-\x7F]/u', '?', $s); 137 144 } else { 138 $previousLocale = setlocale(\LC_CTYPE, 0); 139 try { 140 setlocale(\LC_CTYPE, 'C'); 141 $s = @preg_replace_callback('/[^\x00-\x7F]/u', static function ($c) { 142 $c = (string) iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]); 143 144 if ('' === $c && '' === iconv('UTF-8', 'ASCII//TRANSLIT', '²')) { 145 throw new \LogicException(\sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class)); 146 } 147 148 return 1 < \strlen($c) ? ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?'); 149 }, $s); 150 } finally { 151 setlocale(\LC_CTYPE, $previousLocale); 152 } 145 $s = @preg_replace_callback('/[^\x00-\x7F]/u', static function ($c) { 146 $c = (string) iconv('UTF-8', 'ASCII//TRANSLIT', $c[0]); 147 148 if ('' === $c && '' === iconv('UTF-8', 'ASCII//TRANSLIT', '²')) { 149 throw new \LogicException(sprintf('"%s" requires a translit-able iconv implementation, try installing "gnu-libiconv" if you\'re using Alpine Linux.', static::class)); 150 } 151 152 return 1 < \strlen($c) ? ltrim($c, '\'`"^~') : ('' !== $c ? $c : '?'); 153 }, $s); 153 154 } 154 155 } … … 159 160 } 160 161 161 public function camel(): static 162 { 163 $str = clone $this; 164 $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?!\p{Lu})/u', static function ($m) { 165 static $i = 0; 166 162 public function camel(): parent 163 { 164 $str = clone $this; 165 $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?!\p{Lu})/u', static function ($m) use (&$i) { 167 166 return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); 168 167 }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); … … 191 190 } 192 191 193 public function folded(bool $compat = true): static194 { 195 $str = clone $this; 196 197 if (!$compat || !\defined('Normalizer::NFKC_CF')) {192 public function folded(bool $compat = true): parent 193 { 194 $str = clone $this; 195 196 if (!$compat || \PHP_VERSION_ID < 70300 || !\defined('Normalizer::NFKC_CF')) { 198 197 $str->string = normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC); 199 198 $str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $str->string), 'UTF-8'); … … 205 204 } 206 205 207 public function join(array $strings, ?string $lastGlue = null): static206 public function join(array $strings, ?string $lastGlue = null): parent 208 207 { 209 208 $str = clone $this; … … 219 218 } 220 219 221 public function lower(): static220 public function lower(): parent 222 221 { 223 222 $str = clone $this; … … 225 224 226 225 return $str; 227 }228 229 /**230 * @param string $locale In the format language_region (e.g. tr_TR)231 */232 public function localeLower(string $locale): static233 {234 if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Lower')) {235 $str = clone $this;236 $str->string = $transliterator->transliterate($str->string);237 238 return $str;239 }240 241 return $this->lower();242 226 } 243 227 … … 250 234 } 251 235 252 set_error_handler(static f n ($t, $m) => throw new InvalidArgumentException($m));236 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 253 237 254 238 try { 255 239 if (false === $match($regexp.'u', $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { 256 throw new RuntimeException('Matching failed with error: '.preg_last_error_msg()); 240 $lastError = preg_last_error(); 241 242 foreach (get_defined_constants(true)['pcre'] as $k => $v) { 243 if ($lastError === $v && '_ERROR' === substr($k, -6)) { 244 throw new RuntimeException('Matching failed with '.$k.'.'); 245 } 246 } 247 248 throw new RuntimeException('Matching failed with unknown error code.'); 257 249 } 258 250 } finally { … … 263 255 } 264 256 265 public function normalize(int $form = self::NFC): static 257 /** 258 * @return static 259 */ 260 public function normalize(int $form = self::NFC): self 266 261 { 267 262 if (!\in_array($form, [self::NFC, self::NFD, self::NFKC, self::NFKD])) { … … 275 270 } 276 271 277 public function padBoth(int $length, string $padStr = ' '): static272 public function padBoth(int $length, string $padStr = ' '): parent 278 273 { 279 274 if ('' === $padStr || !preg_match('//u', $padStr)) { … … 287 282 } 288 283 289 public function padEnd(int $length, string $padStr = ' '): static284 public function padEnd(int $length, string $padStr = ' '): parent 290 285 { 291 286 if ('' === $padStr || !preg_match('//u', $padStr)) { … … 299 294 } 300 295 301 public function padStart(int $length, string $padStr = ' '): static296 public function padStart(int $length, string $padStr = ' '): parent 302 297 { 303 298 if ('' === $padStr || !preg_match('//u', $padStr)) { … … 311 306 } 312 307 313 public function replaceMatches(string $fromRegexp, string|callable $to): static308 public function replaceMatches(string $fromRegexp, $to): parent 314 309 { 315 310 if ($this->ignoreCase) { … … 318 313 319 314 if (\is_array($to) || $to instanceof \Closure) { 315 if (!\is_callable($to)) { 316 throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); 317 } 318 320 319 $replace = 'preg_replace_callback'; 321 320 $to = static function (array $m) use ($to): string { … … 334 333 } 335 334 336 set_error_handler(static f n ($t, $m) => throw new InvalidArgumentException($m));335 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 337 336 338 337 try { … … 341 340 342 341 foreach (get_defined_constants(true)['pcre'] as $k => $v) { 343 if ($lastError === $v && str_ends_with($k, '_ERROR')) {342 if ($lastError === $v && '_ERROR' === substr($k, -6)) { 344 343 throw new RuntimeException('Matching failed with '.$k.'.'); 345 344 } … … 358 357 } 359 358 360 public function reverse(): static359 public function reverse(): parent 361 360 { 362 361 $str = clone $this; … … 366 365 } 367 366 368 public function snake(): static367 public function snake(): parent 369 368 { 370 369 $str = $this->camel(); … … 374 373 } 375 374 376 public function title(bool $allWords = false): static375 public function title(bool $allWords = false): parent 377 376 { 378 377 $str = clone $this; … … 380 379 $limit = $allWords ? -1 : 1; 381 380 382 $str->string = preg_replace_callback('/\b./u', static fn (array $m): string => mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'), $str->string, $limit); 383 384 return $str; 385 } 386 387 /** 388 * @param string $locale In the format language_region (e.g. tr_TR) 389 */ 390 public function localeTitle(string $locale): static 391 { 392 if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Title')) { 393 $str = clone $this; 394 $str->string = $transliterator->transliterate($str->string); 395 396 return $str; 397 } 398 399 return $this->title(); 400 } 401 402 public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static 381 $str->string = preg_replace_callback('/\b./u', static function (array $m): string { 382 return mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); 383 }, $str->string, $limit); 384 385 return $str; 386 } 387 388 public function trim(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent 403 389 { 404 390 if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { … … 413 399 } 414 400 415 public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static401 public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent 416 402 { 417 403 if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { … … 426 412 } 427 413 428 public function trimPrefix($prefix): static414 public function trimPrefix($prefix): parent 429 415 { 430 416 if (!$this->ignoreCase) { … … 446 432 } 447 433 448 public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): static434 public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent 449 435 { 450 436 if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) { … … 459 445 } 460 446 461 public function trimSuffix($suffix): static447 public function trimSuffix($suffix): parent 462 448 { 463 449 if (!$this->ignoreCase) { … … 479 465 } 480 466 481 public function upper(): static467 public function upper(): parent 482 468 { 483 469 $str = clone $this; 484 470 $str->string = mb_strtoupper($str->string, 'UTF-8'); 485 471 486 return $str; 487 } 488 489 /** 490 * @param string $locale In the format language_region (e.g. tr_TR) 491 */ 492 public function localeUpper(string $locale): static 493 { 494 if (null !== $transliterator = $this->getLocaleTransliterator($locale, 'Upper')) { 495 $str = clone $this; 496 $str->string = $transliterator->transliterate($str->string); 497 498 return $str; 499 } 500 501 return $this->upper(); 472 if (\PHP_VERSION_ID < 70300) { 473 $str->string = str_replace(self::UPPER_FROM, self::UPPER_TO, $str->string); 474 } 475 476 return $str; 502 477 } 503 478 … … 507 482 $s = str_replace(["\x00", "\x05", "\x07"], '', $this->string); 508 483 509 if ( str_contains($s, "\r")) {484 if (false !== strpos($s, "\r")) { 510 485 $s = str_replace(["\r\n", "\r"], "\n", $s); 511 486 } … … 534 509 } 535 510 536 private function pad(int $len, self $pad, int $type): static 511 /** 512 * @return static 513 */ 514 private function pad(int $len, self $pad, int $type): parent 537 515 { 538 516 $sLen = $this->length(); … … 598 576 } 599 577 600 self::$tableZero ??= require __DIR__.'/Resources/data/wcswidth_table_zero.php'; 578 if (null === self::$tableZero) { 579 self::$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php'; 580 } 601 581 602 582 if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) { … … 615 595 } 616 596 617 self::$tableWide ??= require __DIR__.'/Resources/data/wcswidth_table_wide.php'; 597 if (null === self::$tableWide) { 598 self::$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php'; 599 } 618 600 619 601 if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) { … … 639 621 return $width; 640 622 } 641 642 private function getLocaleTransliterator(string $locale, string $id): ?\Transliterator643 {644 $rule = $locale.'-'.$id;645 if (\array_key_exists($rule, self::$transliterators)) {646 return self::$transliterators[$rule];647 }648 649 if (null !== $transliterator = self::$transliterators[$rule] = \Transliterator::create($rule)) {650 return $transliterator;651 }652 653 // Try to find a parent locale (nl_BE -> nl)654 if (false === $i = strpos($locale, '_')) {655 return null;656 }657 658 $parentRule = substr_replace($locale, '-'.$id, $i);659 660 // Parent locale was already cached, return and store as current locale661 if (\array_key_exists($parentRule, self::$transliterators)) {662 return self::$transliterators[$rule] = self::$transliterators[$parentRule];663 }664 665 // Create transliterator based on parent locale and cache the result on both initial and parent locale values666 $transliterator = \Transliterator::create($parentRule);667 668 return self::$transliterators[$rule] = self::$transliterators[$parentRule] = $transliterator;669 }670 623 } -
speechkit/trunk/vendor/symfony/string/ByteString.php
r3393083 r3420880 12 12 namespace Symfony\Component\String; 13 13 14 use Random\Randomizer;15 14 use Symfony\Component\String\Exception\ExceptionInterface; 16 15 use Symfony\Component\String\Exception\InvalidArgumentException; … … 47 46 { 48 47 if ($length <= 0) { 49 throw new InvalidArgumentException( \sprintf('A strictly positive length is expected, "%d" given.', $length));50 } 51 52 $alphabet ??=self::ALPHABET_ALPHANUMERIC;48 throw new InvalidArgumentException(sprintf('A strictly positive length is expected, "%d" given.', $length)); 49 } 50 51 $alphabet = $alphabet ?? self::ALPHABET_ALPHANUMERIC; 53 52 $alphabetSize = \strlen($alphabet); 54 53 $bits = (int) ceil(log($alphabetSize, 2.0)); 55 54 if ($bits <= 0 || $bits > 56) { 56 55 throw new InvalidArgumentException('The length of the alphabet must in the [2^1, 2^56] range.'); 57 }58 59 if (\PHP_VERSION_ID >= 80300) {60 return new static((new Randomizer())->getBytesFromString($alphabet, $length));61 56 } 62 57 … … 98 93 } 99 94 100 public function append(string ...$suffix): static95 public function append(string ...$suffix): parent 101 96 { 102 97 $str = clone $this; … … 106 101 } 107 102 108 public function camel(): static103 public function camel(): parent 109 104 { 110 105 $str = clone $this; … … 138 133 } 139 134 140 public function endsWith( string|iterable|AbstractString$suffix): bool141 { 142 if ($suffix instanceof AbstractString) {135 public function endsWith($suffix): bool 136 { 137 if ($suffix instanceof parent) { 143 138 $suffix = $suffix->string; 144 } elseif ( !\is_string($suffix)) {139 } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { 145 140 return parent::endsWith($suffix); 141 } else { 142 $suffix = (string) $suffix; 146 143 } 147 144 … … 149 146 } 150 147 151 public function equalsTo( string|iterable|AbstractString$string): bool152 { 153 if ($string instanceof AbstractString) {148 public function equalsTo($string): bool 149 { 150 if ($string instanceof parent) { 154 151 $string = $string->string; 155 } elseif ( !\is_string($string)) {152 } elseif (\is_array($string) || $string instanceof \Traversable) { 156 153 return parent::equalsTo($string); 154 } else { 155 $string = (string) $string; 157 156 } 158 157 … … 164 163 } 165 164 166 public function folded(): static165 public function folded(): parent 167 166 { 168 167 $str = clone $this; … … 172 171 } 173 172 174 public function indexOf( string|iterable|AbstractString$needle, int $offset = 0): ?int175 { 176 if ($needle instanceof AbstractString) {173 public function indexOf($needle, int $offset = 0): ?int 174 { 175 if ($needle instanceof parent) { 177 176 $needle = $needle->string; 178 } elseif ( !\is_string($needle)) {177 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 179 178 return parent::indexOf($needle, $offset); 179 } else { 180 $needle = (string) $needle; 180 181 } 181 182 … … 189 190 } 190 191 191 public function indexOfLast( string|iterable|AbstractString$needle, int $offset = 0): ?int192 { 193 if ($needle instanceof AbstractString) {192 public function indexOfLast($needle, int $offset = 0): ?int 193 { 194 if ($needle instanceof parent) { 194 195 $needle = $needle->string; 195 } elseif ( !\is_string($needle)) {196 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 196 197 return parent::indexOfLast($needle, $offset); 198 } else { 199 $needle = (string) $needle; 197 200 } 198 201 … … 211 214 } 212 215 213 public function join(array $strings, ?string $lastGlue = null): static216 public function join(array $strings, ?string $lastGlue = null): parent 214 217 { 215 218 $str = clone $this; … … 226 229 } 227 230 228 public function lower(): static231 public function lower(): parent 229 232 { 230 233 $str = clone $this; … … 242 245 } 243 246 244 set_error_handler(static f n ($t, $m) => throw new InvalidArgumentException($m));247 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 245 248 246 249 try { 247 250 if (false === $match($regexp, $this->string, $matches, $flags | \PREG_UNMATCHED_AS_NULL, $offset)) { 248 throw new RuntimeException('Matching failed with error: '.preg_last_error_msg());249 }250 } finally {251 restore_error_handler();252 }253 254 return $matches;255 }256 257 public function padBoth(int $length, string $padStr = ' '): static258 {259 $str = clone $this;260 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_BOTH);261 262 return $str;263 }264 265 public function padEnd(int $length, string $padStr = ' '): static266 {267 $str = clone $this;268 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_RIGHT);269 270 return $str;271 }272 273 public function padStart(int $length, string $padStr = ' '): static274 {275 $str = clone $this;276 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_LEFT);277 278 return $str;279 }280 281 public function prepend(string ...$prefix): static282 {283 $str = clone $this;284 $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$str->string;285 286 return $str;287 }288 289 public function replace(string $from, string $to): static290 {291 $str = clone $this;292 293 if ('' !== $from) {294 $str->string = $this->ignoreCase ? str_ireplace($from, $to, $this->string) : str_replace($from, $to, $this->string);295 }296 297 return $str;298 }299 300 public function replaceMatches(string $fromRegexp, string|callable $to): static301 {302 if ($this->ignoreCase) {303 $fromRegexp .= 'i';304 }305 306 $replace = \is_array($to) || $to instanceof \Closure ? 'preg_replace_callback' : 'preg_replace';307 308 set_error_handler(static fn ($t, $m) => throw new InvalidArgumentException($m));309 310 try {311 if (null === $string = $replace($fromRegexp, $to, $this->string)) {312 251 $lastError = preg_last_error(); 313 252 314 253 foreach (get_defined_constants(true)['pcre'] as $k => $v) { 315 if ($lastError === $v && str_ends_with($k, '_ERROR')) {254 if ($lastError === $v && '_ERROR' === substr($k, -6)) { 316 255 throw new RuntimeException('Matching failed with '.$k.'.'); 317 256 } … … 324 263 } 325 264 265 return $matches; 266 } 267 268 public function padBoth(int $length, string $padStr = ' '): parent 269 { 270 $str = clone $this; 271 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_BOTH); 272 273 return $str; 274 } 275 276 public function padEnd(int $length, string $padStr = ' '): parent 277 { 278 $str = clone $this; 279 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_RIGHT); 280 281 return $str; 282 } 283 284 public function padStart(int $length, string $padStr = ' '): parent 285 { 286 $str = clone $this; 287 $str->string = str_pad($this->string, $length, $padStr, \STR_PAD_LEFT); 288 289 return $str; 290 } 291 292 public function prepend(string ...$prefix): parent 293 { 294 $str = clone $this; 295 $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$str->string; 296 297 return $str; 298 } 299 300 public function replace(string $from, string $to): parent 301 { 302 $str = clone $this; 303 304 if ('' !== $from) { 305 $str->string = $this->ignoreCase ? str_ireplace($from, $to, $this->string) : str_replace($from, $to, $this->string); 306 } 307 308 return $str; 309 } 310 311 public function replaceMatches(string $fromRegexp, $to): parent 312 { 313 if ($this->ignoreCase) { 314 $fromRegexp .= 'i'; 315 } 316 317 if (\is_array($to)) { 318 if (!\is_callable($to)) { 319 throw new \TypeError(sprintf('Argument 2 passed to "%s::replaceMatches()" must be callable, array given.', static::class)); 320 } 321 322 $replace = 'preg_replace_callback'; 323 } else { 324 $replace = $to instanceof \Closure ? 'preg_replace_callback' : 'preg_replace'; 325 } 326 327 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 328 329 try { 330 if (null === $string = $replace($fromRegexp, $to, $this->string)) { 331 $lastError = preg_last_error(); 332 333 foreach (get_defined_constants(true)['pcre'] as $k => $v) { 334 if ($lastError === $v && '_ERROR' === substr($k, -6)) { 335 throw new RuntimeException('Matching failed with '.$k.'.'); 336 } 337 } 338 339 throw new RuntimeException('Matching failed with unknown error code.'); 340 } 341 } finally { 342 restore_error_handler(); 343 } 344 326 345 $str = clone $this; 327 346 $str->string = $string; … … 330 349 } 331 350 332 public function reverse(): static351 public function reverse(): parent 333 352 { 334 353 $str = clone $this; … … 338 357 } 339 358 340 public function slice(int $start = 0, ?int $length = null): static341 { 342 $str = clone $this; 343 $str->string = substr($this->string, $start, $length ?? \PHP_INT_MAX);344 345 return $str; 346 } 347 348 public function snake(): static359 public function slice(int $start = 0, ?int $length = null): parent 360 { 361 $str = clone $this; 362 $str->string = (string) substr($this->string, $start, $length ?? \PHP_INT_MAX); 363 364 return $str; 365 } 366 367 public function snake(): parent 349 368 { 350 369 $str = $this->camel(); … … 354 373 } 355 374 356 public function splice(string $replacement, int $start = 0, ?int $length = null): static375 public function splice(string $replacement, int $start = 0, ?int $length = null): parent 357 376 { 358 377 $str = clone $this; … … 364 383 public function split(string $delimiter, ?int $limit = null, ?int $flags = null): array 365 384 { 366 if (1 > $limit ??=\PHP_INT_MAX) {385 if (1 > $limit = $limit ?? \PHP_INT_MAX) { 367 386 throw new InvalidArgumentException('Split limit must be a positive integer.'); 368 387 } … … 389 408 } 390 409 391 public function startsWith( string|iterable|AbstractString$prefix): bool392 { 393 if ($prefix instanceof AbstractString) {410 public function startsWith($prefix): bool 411 { 412 if ($prefix instanceof parent) { 394 413 $prefix = $prefix->string; 395 414 } elseif (!\is_string($prefix)) { … … 400 419 } 401 420 402 public function title(bool $allWords = false): static421 public function title(bool $allWords = false): parent 403 422 { 404 423 $str = clone $this; … … 423 442 } 424 443 425 set_error_handler(static f n ($t, $m) => throw new InvalidArgumentException($m));444 set_error_handler(static function ($t, $m) { throw new InvalidArgumentException($m); }); 426 445 427 446 try { … … 442 461 443 462 if (!$validEncoding) { 444 throw new InvalidArgumentException( \sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252'));463 throw new InvalidArgumentException(sprintf('Invalid "%s" string.', $fromEncoding ?? 'Windows-1252')); 445 464 } 446 465 … … 450 469 } 451 470 452 public function trim(string $chars = " \t\n\r\0\x0B\x0C"): static471 public function trim(string $chars = " \t\n\r\0\x0B\x0C"): parent 453 472 { 454 473 $str = clone $this; … … 458 477 } 459 478 460 public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C"): static479 public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C"): parent 461 480 { 462 481 $str = clone $this; … … 466 485 } 467 486 468 public function trimStart(string $chars = " \t\n\r\0\x0B\x0C"): static487 public function trimStart(string $chars = " \t\n\r\0\x0B\x0C"): parent 469 488 { 470 489 $str = clone $this; … … 474 493 } 475 494 476 public function upper(): static495 public function upper(): parent 477 496 { 478 497 $str = clone $this; -
speechkit/trunk/vendor/symfony/string/CHANGELOG.md
r3393083 r3420880 1 1 CHANGELOG 2 2 ========= 3 4 7.35 ---6 7 * Add the `AbstractString::pascal()` method8 9 7.210 ---11 12 * Add `TruncateMode` enum to handle more truncate methods13 * Add the `AbstractString::kebab()` method14 15 7.116 ---17 18 * Add `localeLower()`, `localeUpper()`, `localeTitle()` methods to `AbstractUnicodeString`19 20 6.221 ---22 23 * Add support for emoji in `AsciiSlugger`24 3 25 4 5.4 -
speechkit/trunk/vendor/symfony/string/CodePointString.php
r3393083 r3420880 34 34 } 35 35 36 public function append(string ...$suffix): static36 public function append(string ...$suffix): AbstractString 37 37 { 38 38 $str = clone $this; … … 81 81 } 82 82 83 public function endsWith( string|iterable|AbstractString$suffix): bool83 public function endsWith($suffix): bool 84 84 { 85 85 if ($suffix instanceof AbstractString) { 86 86 $suffix = $suffix->string; 87 } elseif ( !\is_string($suffix)) {87 } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { 88 88 return parent::endsWith($suffix); 89 } else { 90 $suffix = (string) $suffix; 89 91 } 90 92 … … 100 102 } 101 103 102 public function equalsTo( string|iterable|AbstractString$string): bool104 public function equalsTo($string): bool 103 105 { 104 106 if ($string instanceof AbstractString) { 105 107 $string = $string->string; 106 } elseif ( !\is_string($string)) {108 } elseif (\is_array($string) || $string instanceof \Traversable) { 107 109 return parent::equalsTo($string); 110 } else { 111 $string = (string) $string; 108 112 } 109 113 … … 115 119 } 116 120 117 public function indexOf( string|iterable|AbstractString$needle, int $offset = 0): ?int121 public function indexOf($needle, int $offset = 0): ?int 118 122 { 119 123 if ($needle instanceof AbstractString) { 120 124 $needle = $needle->string; 121 } elseif ( !\is_string($needle)) {125 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 122 126 return parent::indexOf($needle, $offset); 127 } else { 128 $needle = (string) $needle; 123 129 } 124 130 … … 132 138 } 133 139 134 public function indexOfLast( string|iterable|AbstractString$needle, int $offset = 0): ?int140 public function indexOfLast($needle, int $offset = 0): ?int 135 141 { 136 142 if ($needle instanceof AbstractString) { 137 143 $needle = $needle->string; 138 } elseif ( !\is_string($needle)) {144 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 139 145 return parent::indexOfLast($needle, $offset); 146 } else { 147 $needle = (string) $needle; 140 148 } 141 149 … … 154 162 } 155 163 156 public function prepend(string ...$prefix): static164 public function prepend(string ...$prefix): AbstractString 157 165 { 158 166 $str = clone $this; … … 166 174 } 167 175 168 public function replace(string $from, string $to): static176 public function replace(string $from, string $to): AbstractString 169 177 { 170 178 $str = clone $this; … … 187 195 } 188 196 189 public function slice(int $start = 0, ?int $length = null): static197 public function slice(int $start = 0, ?int $length = null): AbstractString 190 198 { 191 199 $str = clone $this; … … 195 203 } 196 204 197 public function splice(string $replacement, int $start = 0, ?int $length = null): static205 public function splice(string $replacement, int $start = 0, ?int $length = null): AbstractString 198 206 { 199 207 if (!preg_match('//u', $replacement)) { … … 211 219 public function split(string $delimiter, ?int $limit = null, ?int $flags = null): array 212 220 { 213 if (1 > $limit ??=\PHP_INT_MAX) {221 if (1 > $limit = $limit ?? \PHP_INT_MAX) { 214 222 throw new InvalidArgumentException('Split limit must be a positive integer.'); 215 223 } … … 240 248 } 241 249 242 public function startsWith( string|iterable|AbstractString$prefix): bool250 public function startsWith($prefix): bool 243 251 { 244 252 if ($prefix instanceof AbstractString) { 245 253 $prefix = $prefix->string; 246 } elseif ( !\is_string($prefix)) {254 } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { 247 255 return parent::startsWith($prefix); 256 } else { 257 $prefix = (string) $prefix; 248 258 } 249 259 -
speechkit/trunk/vendor/symfony/string/Inflector/EnglishInflector.php
r3393083 r3420880 26 26 // Fifth entry: singular suffix, normal 27 27 28 // insignias (insigne), insignia (insigne)29 ['saingisni', 9, true, true, 'insigne'],30 ['aingisni', 8, true, true, 'insigne'],31 32 // passersby (passerby)33 ['ybsressap', 9, true, true, 'passerby'],34 35 // nodes (node)36 ['sedon', 5, true, true, 'node'],37 38 28 // bacteria (bacterium) 39 29 ['airetcab', 8, true, true, 'bacterium'], 40 30 41 // issues (issue)42 ['seussi', 6, true, true, 'issue'],43 44 31 // corpora (corpus) 45 32 ['aroproc', 7, true, true, 'corpus'], … … 50 37 // curricula (curriculum) 51 38 ['alucirruc', 9, true, true, 'curriculum'], 52 53 // quora (quorum)54 ['arouq', 5, true, true, 'quorum'],55 39 56 40 // genera (genus) … … 179 163 // edges (edge) 180 164 ['segd', 4, true, true, 'dge'], 181 182 // outages (outage) - specific fix to avoid 'outag'183 ['segatuo', 7, true, true, 'outage'],184 165 185 166 // roses (rose), garages (garage), cassettes (cassette), … … 213 194 // Fifth entry: plural suffix, normal 214 195 215 // passerby (passersby)216 ['ybressap', 8, true, true, 'passersby'],217 218 // insigne (insignia, insignias)219 ['engisni', 7, true, true, ['insignia', 'insignias']],220 221 // nodes (node)222 ['edon', 4, true, true, 'nodes'],223 224 196 // axes (axis) 225 197 ['sixa', 4, false, false, 'axes'], … … 296 268 // albums (album) 297 269 ['mubla', 5, true, true, 'albums'], 298 299 // quorums (quorum)300 ['murouq', 6, true, true, ['quora', 'quorums']],301 270 302 271 // bacteria (bacterium), curricula (curriculum), media (medium), memoranda (memorandum), phenomena (phenomenon), strata (stratum) … … 358 327 // conspectuses (conspectus), prospectuses (prospectus) 359 328 ['sutcep', 6, true, true, 'pectuses'], 360 361 // nexuses (nexus)362 ['suxen', 5, false, false, 'nexuses'],363 329 364 330 // fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius) -
speechkit/trunk/vendor/symfony/string/Inflector/FrenchInflector.php
r3393083 r3420880 111 111 private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; 112 112 113 /** 114 * {@inheritdoc} 115 */ 113 116 public function singularize(string $plural): array 114 117 { … … 128 131 } 129 132 133 /** 134 * {@inheritdoc} 135 */ 130 136 public function pluralize(string $singular): array 131 137 { -
speechkit/trunk/vendor/symfony/string/LazyString.php
r3393083 r3420880 19 19 class LazyString implements \Stringable, \JsonSerializable 20 20 { 21 private \Closure|string$value;21 private $value; 22 22 23 23 /** 24 24 * @param callable|array $callback A callable or a [Closure, method] lazy-callable 25 * 26 * @return static 25 27 */ 26 public static function fromCallable( callable|array $callback, mixed ...$arguments): static28 public static function fromCallable($callback, ...$arguments): self 27 29 { 28 if ( \is_array($callback) && !\is_callable($callback) && !(($callback[0] ?? null) instanceof \Closure || 2 <\count($callback))) {29 throw new \TypeError( \sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, '['.implode(', ', array_map('get_debug_type', $callback)).']'));30 if (!\is_callable($callback) && !(\is_array($callback) && isset($callback[0]) && $callback[0] instanceof \Closure && 2 >= \count($callback))) { 31 throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a callable or a [Closure, method] lazy-callable, "%s" given.', __METHOD__, get_debug_type($callback))); 30 32 } 31 33 32 34 $lazyString = new static(); 33 $lazyString->value = static function () use (&$callback, &$arguments): string { 34 static $value; 35 35 $lazyString->value = static function () use (&$callback, &$arguments, &$value): string { 36 36 if (null !== $arguments) { 37 37 if (!\is_callable($callback)) { 38 38 $callback[0] = $callback[0](); 39 $callback[1] ??='__invoke';39 $callback[1] = $callback[1] ?? '__invoke'; 40 40 } 41 41 $value = $callback(...$arguments); 42 $callback = !\is_scalar($value) && !$value instanceof \Stringable ? self::getPrettyName($callback) : 'callable';42 $callback = self::getPrettyName($callback); 43 43 $arguments = null; 44 44 } … … 50 50 } 51 51 52 public static function fromStringable(string|int|float|bool|\Stringable $value): static 52 /** 53 * @param string|int|float|bool|\Stringable $value 54 * 55 * @return static 56 */ 57 public static function fromStringable($value): self 53 58 { 59 if (!self::isStringable($value)) { 60 throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a scalar or a stringable object, "%s" given.', __METHOD__, get_debug_type($value))); 61 } 62 54 63 if (\is_object($value)) { 55 return static::fromCallable( $value->__toString(...));64 return static::fromCallable([$value, '__toString']); 56 65 } 57 66 … … 65 74 * Tells whether the provided value can be cast to string. 66 75 */ 67 final public static function isStringable( mixed$value): bool76 final public static function isStringable($value): bool 68 77 { 69 return \is_string($value) || $value instanceof \Stringable || \is_scalar($value);78 return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : \is_scalar($value)); 70 79 } 71 80 … … 73 82 * Casts scalars and stringable objects to strings. 74 83 * 84 * @param object|string|int|float|bool $value 85 * 75 86 * @throws \TypeError When the provided value is not stringable 76 87 */ 77 final public static function resolve( \Stringable|string|int|float|bool$value): string88 final public static function resolve($value): string 78 89 { 79 90 return $value; 80 91 } 81 92 82 public function __toString(): string 93 /** 94 * @return string 95 */ 96 public function __toString() 83 97 { 84 98 if (\is_string($this->value)) { … … 89 103 return $this->value = ($this->value)(); 90 104 } catch (\Throwable $e) { 91 if (\TypeError::class === $e::class&& __FILE__ === $e->getFile()) {105 if (\TypeError::class === \get_class($e) && __FILE__ === $e->getFile()) { 92 106 $type = explode(', ', $e->getMessage()); 93 107 $type = substr(array_pop($type), 0, -\strlen(' returned')); … … 95 109 $callback = $r->getStaticVariables()['callback']; 96 110 97 $e = new \TypeError(\sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type)); 111 $e = new \TypeError(sprintf('Return value of %s() passed to %s::fromCallable() must be of the type string, %s returned.', $callback, static::class, $type)); 112 } 113 114 if (\PHP_VERSION_ID < 70400) { 115 // leverage the ErrorHandler component with graceful fallback when it's not available 116 return trigger_error($e, \E_USER_ERROR); 98 117 } 99 118 … … 130 149 $r = new \ReflectionFunction($callback); 131 150 132 if ( $r->isAnonymous() || !$class = $r->getClosureCalledClass()) {151 if (str_contains($r->name, '{closure') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { 133 152 return $r->name; 134 153 } -
speechkit/trunk/vendor/symfony/string/Resources/data/wcswidth_table_wide.php
r3393083 r3420880 2 2 3 3 /* 4 * This file is part of the Symfony package.5 *6 * (c) Fabien Potencier <fabien@symfony.com>7 *8 4 * This file has been auto-generated by the Symfony String Component for internal use. 9 5 * 10 6 * Unicode version: 16.0.0 11 7 * Date: 2024-09-11T08:21:22+00:00 12 *13 * For the full copyright and license information, please view the LICENSE14 * file that was distributed with this source code.15 8 */ 16 9 -
speechkit/trunk/vendor/symfony/string/Resources/data/wcswidth_table_zero.php
r3393083 r3420880 2 2 3 3 /* 4 * This file is part of the Symfony package.5 *6 * (c) Fabien Potencier <fabien@symfony.com>7 *8 4 * This file has been auto-generated by the Symfony String Component for internal use. 9 5 * 10 6 * Unicode version: 16.0.0 11 7 * Date: 2024-09-11T08:21:22+00:00 12 *13 * For the full copyright and license information, please view the LICENSE14 * file that was distributed with this source code.15 8 */ 16 9 -
speechkit/trunk/vendor/symfony/string/Resources/functions.php
r3393083 r3420880 32 32 function s(?string $string = ''): AbstractString 33 33 { 34 $string ??='';34 $string = $string ?? ''; 35 35 36 36 return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string); -
speechkit/trunk/vendor/symfony/string/Slugger/AsciiSlugger.php
r3393083 r3420880 12 12 namespace Symfony\Component\String\Slugger; 13 13 14 use Symfony\Component\Emoji\EmojiTransliterator;15 14 use Symfony\Component\String\AbstractUnicodeString; 16 15 use Symfony\Component\String\UnicodeString; … … 56 55 ]; 57 56 58 private \Closure|array $symbolsMap = [ 57 private $defaultLocale; 58 private $symbolsMap = [ 59 59 'en' => ['@' => 'at', '&' => 'and'], 60 60 ]; 61 private bool|string $emoji = false;62 61 63 62 /** … … 66 65 * @var \Transliterator[] 67 66 */ 68 private array$transliterators = [];67 private $transliterators = []; 69 68 70 public function __construct( 71 private ?string $defaultLocale = null, 72 array|\Closure|null $symbolsMap = null, 73 ) { 69 /** 70 * @param array|\Closure|null $symbolsMap 71 */ 72 public function __construct(?string $defaultLocale = null, $symbolsMap = null) 73 { 74 if (null !== $symbolsMap && !\is_array($symbolsMap) && !$symbolsMap instanceof \Closure) { 75 throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be array, Closure or null, "%s" given.', __METHOD__, \gettype($symbolsMap))); 76 } 77 78 $this->defaultLocale = $defaultLocale; 74 79 $this->symbolsMap = $symbolsMap ?? $this->symbolsMap; 75 80 } 76 81 77 public function setLocale(string $locale): void 82 /** 83 * {@inheritdoc} 84 */ 85 public function setLocale($locale) 78 86 { 79 87 $this->defaultLocale = $locale; 80 88 } 81 89 82 public function getLocale(): string 90 /** 91 * {@inheritdoc} 92 */ 93 public function getLocale() 83 94 { 84 95 return $this->defaultLocale; … … 86 97 87 98 /** 88 * @param bool|string $emoji true will use the same locale, 89 * false will disable emoji, 90 * and a string to use a specific locale 99 * {@inheritdoc} 91 100 */ 92 public function withEmoji(bool|string $emoji = true): static93 {94 if (false !== $emoji && !class_exists(EmojiTransliterator::class)) {95 throw new \LogicException(\sprintf('You cannot use the "%s()" method as the "symfony/emoji" package is not installed. Try running "composer require symfony/emoji".', __METHOD__));96 }97 98 $new = clone $this;99 $new->emoji = $emoji;100 101 return $new;102 }103 104 101 public function slug(string $string, string $separator = '-', ?string $locale = null): AbstractUnicodeString 105 102 { 106 $locale ??=$this->defaultLocale;103 $locale = $locale ?? $this->defaultLocale; 107 104 108 105 $transliterator = []; 109 if ($locale && ('de' === $locale || str_starts_with($locale, 'de_'))) {106 if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) { 110 107 // Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl) 111 108 $transliterator = ['de-ASCII']; … … 114 111 } 115 112 116 if ($emojiTransliterator = $this->createEmojiTransliterator($locale)) {117 $transliterator[] = $emojiTransliterator;118 }119 120 113 if ($this->symbolsMap instanceof \Closure) { 121 114 // If the symbols map is passed as a closure, there is no need to fallback to the parent locale 122 115 // as the closure can just provide substitutions for all locales of interest. 123 116 $symbolsMap = $this->symbolsMap; 124 array_unshift($transliterator, static fn ($s) => $symbolsMap($s, $locale)); 117 array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) { 118 return $symbolsMap($s, $locale); 119 }); 125 120 } 126 121 … … 129 124 if (\is_array($this->symbolsMap)) { 130 125 $map = null; 131 if (isset($this->symbolsMap[$locale ?? ''])) {132 $map = $this->symbolsMap[$locale ?? ''];126 if (isset($this->symbolsMap[$locale])) { 127 $map = $this->symbolsMap[$locale]; 133 128 } else { 134 129 $parent = self::getParentLocale($locale); … … 174 169 } 175 170 176 private function createEmojiTransliterator(?string $locale): ?EmojiTransliterator177 {178 if (\is_string($this->emoji)) {179 $locale = $this->emoji;180 } elseif (!$this->emoji) {181 return null;182 }183 184 while (null !== $locale) {185 try {186 return EmojiTransliterator::create("emoji-$locale");187 } catch (\IntlException) {188 $locale = self::getParentLocale($locale);189 }190 }191 192 return null;193 }194 195 171 private static function getParentLocale(?string $locale): ?string 196 172 { -
speechkit/trunk/vendor/symfony/string/UnicodeString.php
r3393083 r3420880 35 35 public function __construct(string $string = '') 36 36 { 37 if ('' === $string || normalizer_is_normalized($this->string = $string)) { 38 return; 39 } 40 41 if (false === $string = normalizer_normalize($string)) { 37 $this->string = normalizer_is_normalized($string) ? $string : normalizer_normalize($string); 38 39 if (false === $this->string) { 42 40 throw new InvalidArgumentException('Invalid UTF-8 string.'); 43 41 } 44 45 $this->string = $string; 46 } 47 48 public function append(string ...$suffix): static 42 } 43 44 public function append(string ...$suffix): AbstractString 49 45 { 50 46 $str = clone $this; 51 47 $str->string = $this->string.(1 >= \count($suffix) ? ($suffix[0] ?? '') : implode('', $suffix)); 52 53 if (normalizer_is_normalized($str->string)) { 54 return $str; 55 } 56 57 if (false === $string = normalizer_normalize($str->string)) { 48 normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); 49 50 if (false === $str->string) { 58 51 throw new InvalidArgumentException('Invalid UTF-8 string.'); 59 52 } 60 61 $str->string = $string;62 53 63 54 return $str; … … 92 83 } 93 84 94 public function endsWith( string|iterable|AbstractString$suffix): bool85 public function endsWith($suffix): bool 95 86 { 96 87 if ($suffix instanceof AbstractString) { 97 88 $suffix = $suffix->string; 98 } elseif ( !\is_string($suffix)) {89 } elseif (\is_array($suffix) || $suffix instanceof \Traversable) { 99 90 return parent::endsWith($suffix); 91 } else { 92 $suffix = (string) $suffix; 100 93 } 101 94 … … 114 107 } 115 108 116 public function equalsTo( string|iterable|AbstractString$string): bool109 public function equalsTo($string): bool 117 110 { 118 111 if ($string instanceof AbstractString) { 119 112 $string = $string->string; 120 } elseif ( !\is_string($string)) {113 } elseif (\is_array($string) || $string instanceof \Traversable) { 121 114 return parent::equalsTo($string); 115 } else { 116 $string = (string) $string; 122 117 } 123 118 … … 132 127 } 133 128 134 public function indexOf( string|iterable|AbstractString$needle, int $offset = 0): ?int129 public function indexOf($needle, int $offset = 0): ?int 135 130 { 136 131 if ($needle instanceof AbstractString) { 137 132 $needle = $needle->string; 138 } elseif ( !\is_string($needle)) {133 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 139 134 return parent::indexOf($needle, $offset); 135 } else { 136 $needle = (string) $needle; 140 137 } 141 138 … … 149 146 try { 150 147 $i = $this->ignoreCase ? grapheme_stripos($this->string, $needle, $offset) : grapheme_strpos($this->string, $needle, $offset); 151 } catch (\ValueError ) {148 } catch (\ValueError $e) { 152 149 return null; 153 150 } … … 156 153 } 157 154 158 public function indexOfLast( string|iterable|AbstractString$needle, int $offset = 0): ?int155 public function indexOfLast($needle, int $offset = 0): ?int 159 156 { 160 157 if ($needle instanceof AbstractString) { 161 158 $needle = $needle->string; 162 } elseif ( !\is_string($needle)) {159 } elseif (\is_array($needle) || $needle instanceof \Traversable) { 163 160 return parent::indexOfLast($needle, $offset); 161 } else { 162 $needle = (string) $needle; 164 163 } 165 164 … … 186 185 } 187 186 188 public function join(array $strings, ?string $lastGlue = null): static187 public function join(array $strings, ?string $lastGlue = null): AbstractString 189 188 { 190 189 $str = parent::join($strings, $lastGlue); … … 199 198 } 200 199 201 public function normalize(int $form = self::NFC): static 200 /** 201 * @return static 202 */ 203 public function normalize(int $form = self::NFC): parent 202 204 { 203 205 $str = clone $this; … … 215 217 } 216 218 217 public function prepend(string ...$prefix): static219 public function prepend(string ...$prefix): AbstractString 218 220 { 219 221 $str = clone $this; 220 222 $str->string = (1 >= \count($prefix) ? ($prefix[0] ?? '') : implode('', $prefix)).$this->string; 221 222 if (normalizer_is_normalized($str->string)) { 223 return $str; 224 } 225 226 if (false === $string = normalizer_normalize($str->string)) { 223 normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); 224 225 if (false === $str->string) { 227 226 throw new InvalidArgumentException('Invalid UTF-8 string.'); 228 227 } 229 228 230 $str->string = $string; 231 232 return $str; 233 } 234 235 public function replace(string $from, string $to): static 229 return $str; 230 } 231 232 public function replace(string $from, string $to): AbstractString 236 233 { 237 234 $str = clone $this; … … 250 247 251 248 $str->string = $result.$tail; 252 253 if (normalizer_is_normalized($str->string)) { 254 return $str; 255 } 256 257 if (false === $string = normalizer_normalize($str->string)) { 249 normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); 250 251 if (false === $str->string) { 258 252 throw new InvalidArgumentException('Invalid UTF-8 string.'); 259 253 } 260 261 $str->string = $string; 262 } 263 264 return $str; 265 } 266 267 public function replaceMatches(string $fromRegexp, string|callable $to): static 254 } 255 256 return $str; 257 } 258 259 public function replaceMatches(string $fromRegexp, $to): AbstractString 268 260 { 269 261 $str = parent::replaceMatches($fromRegexp, $to); … … 273 265 } 274 266 275 public function slice(int $start = 0, ?int $length = null): static 276 { 277 $str = clone $this; 278 267 public function slice(int $start = 0, ?int $length = null): AbstractString 268 { 269 $str = clone $this; 270 271 if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { 272 $start = 0; 273 } 279 274 $str->string = (string) grapheme_substr($this->string, $start, $length ?? 2147483647); 280 275 … … 282 277 } 283 278 284 public function splice(string $replacement, int $start = 0, ?int $length = null): static 285 { 286 $str = clone $this; 287 279 public function splice(string $replacement, int $start = 0, ?int $length = null): AbstractString 280 { 281 $str = clone $this; 282 283 if (\PHP_VERSION_ID < 80000 && 0 > $start && grapheme_strlen($this->string) < -$start) { 284 $start = 0; 285 } 288 286 $start = $start ? \strlen(grapheme_substr($this->string, 0, $start)) : 0; 289 $length = $length ? \strlen(grapheme_substr($this->string, $start, $length )) : $length;287 $length = $length ? \strlen(grapheme_substr($this->string, $start, $length ?? 2147483647)) : $length; 290 288 $str->string = substr_replace($this->string, $replacement, $start, $length ?? 2147483647); 291 292 if (normalizer_is_normalized($str->string)) { 293 return $str; 294 } 295 296 if (false === $string = normalizer_normalize($str->string)) { 289 normalizer_is_normalized($str->string) ?: $str->string = normalizer_normalize($str->string); 290 291 if (false === $str->string) { 297 292 throw new InvalidArgumentException('Invalid UTF-8 string.'); 298 293 } 299 294 300 $str->string = $string;301 302 295 return $str; 303 296 } … … 305 298 public function split(string $delimiter, ?int $limit = null, ?int $flags = null): array 306 299 { 307 if (1 > $limit ??=2147483647) {300 if (1 > $limit = $limit ?? 2147483647) { 308 301 throw new InvalidArgumentException('Split limit must be a positive integer.'); 309 302 } … … 341 334 } 342 335 343 public function startsWith( string|iterable|AbstractString$prefix): bool336 public function startsWith($prefix): bool 344 337 { 345 338 if ($prefix instanceof AbstractString) { 346 339 $prefix = $prefix->string; 347 } elseif ( !\is_string($prefix)) {340 } elseif (\is_array($prefix) || $prefix instanceof \Traversable) { 348 341 return parent::startsWith($prefix); 342 } else { 343 $prefix = (string) $prefix; 349 344 } 350 345 … … 363 358 } 364 359 365 public function __wakeup() : void360 public function __wakeup() 366 361 { 367 362 if (!\is_string($this->string)) { -
speechkit/trunk/vendor/symfony/string/composer.json
r3393083 r3420880 17 17 ], 18 18 "require": { 19 "php": ">= 8.2",19 "php": ">=7.2.5", 20 20 "symfony/polyfill-ctype": "~1.8", 21 21 "symfony/polyfill-intl-grapheme": "~1.0", 22 22 "symfony/polyfill-intl-normalizer": "~1.0", 23 "symfony/polyfill-mbstring": "~1.0" 23 "symfony/polyfill-mbstring": "~1.0", 24 "symfony/polyfill-php80": "~1.15" 24 25 }, 25 26 "require-dev": { 26 "symfony/emoji": "^7.1", 27 "symfony/http-client": "^6.4|^7.0", 28 "symfony/intl": "^6.4|^7.0", 29 "symfony/translation-contracts": "^2.5|^3.0", 30 "symfony/var-exporter": "^6.4|^7.0" 27 "symfony/error-handler": "^4.4|^5.0|^6.0", 28 "symfony/http-client": "^4.4|^5.0|^6.0", 29 "symfony/translation-contracts": "^1.1|^2", 30 "symfony/var-exporter": "^4.4|^5.0|^6.0" 31 31 }, 32 32 "conflict": { 33 "symfony/translation-contracts": " <2.5"33 "symfony/translation-contracts": ">=3.0" 34 34 }, 35 35 "autoload": {
Note: See TracChangeset
for help on using the changeset viewer.