From 32cb11a39f72726060ae12deca7b62137ec73a77 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sat, 14 Sep 2024 21:31:01 +0200 Subject: [PATCH 1/3] build: Add script to fix strict-types Signed-off-by: provokateurin --- build/fix-strict-types.php | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 build/fix-strict-types.php diff --git a/build/fix-strict-types.php b/build/fix-strict-types.php new file mode 100755 index 0000000000000..5d1a10e7a4416 --- /dev/null +++ b/build/fix-strict-types.php @@ -0,0 +1,56 @@ +#!/usr/bin/env php +createForHostVersion(); + +$nodeTraverser = new NodeTraverser(); +$nodeTraverser->addVisitor(new CloningVisitor()); +$nodeTraverser->addVisitor(new NameResolver()); + +$prettyPrinter = new PrettyPrinter\Standard(); + +$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('lib')); + +/** @var SplFileInfo $info */ +foreach ($iterator as $info) { + if ($info->getType() !== 'file' || $info->getExtension() !== 'php') { + continue; + } + + error_log($info->getRealPath()); + + $code = file_get_contents($info->getRealPath()); + $oldStmts = $parser->parse($code); + $oldTokens = $parser->getTokens(); + $newStmts = $nodeTraverser->traverse($oldStmts); + + $hasStrictTypes = false; + foreach ($newStmts as $stmt) { + if ($stmt instanceof Declare_) { + $hasStrictTypes = true; + break; + } + } + + if (!$hasStrictTypes) { + array_unshift($newStmts, new Declare_([new DeclareItem('strict_types', new PhpParser\Node\Scalar\Int_(1))])); + file_put_contents($info->getRealPath(), $prettyPrinter->printFormatPreserving($newStmts, $oldStmts, $oldTokens)); + } +} From 001260223e544b6b583cbd9a9a87f11273c1642d Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sat, 14 Sep 2024 21:31:19 +0200 Subject: [PATCH 2/3] fix(lib): Declare strict-types Signed-off-by: provokateurin --- lib/composer/autoload.php | 1 + lib/composer/composer/ClassLoader.php | 4 ++-- lib/composer/composer/InstalledVersions.php | 4 ++-- lib/composer/composer/autoload_classmap.php | 1 + lib/composer/composer/autoload_files.php | 1 + lib/composer/composer/autoload_namespaces.php | 1 + lib/composer/composer/autoload_psr4.php | 1 + lib/composer/composer/autoload_real.php | 4 ++-- lib/composer/composer/autoload_static.php | 4 ++-- lib/composer/composer/installed.php | 7 +++++-- lib/composer/composer/platform_check.php | 1 + lib/private/Accounts/AccountManager.php | 2 +- lib/private/Accounts/Hooks.php | 2 ++ lib/private/Activity/EventMerger.php | 2 ++ lib/private/Activity/Manager.php | 2 ++ lib/private/AllConfig.php | 2 ++ lib/private/App/AppManager.php | 2 ++ lib/private/App/AppStore/Bundles/Bundle.php | 2 ++ lib/private/App/AppStore/Bundles/BundleFetcher.php | 2 ++ lib/private/App/AppStore/Bundles/EducationBundle.php | 2 ++ lib/private/App/AppStore/Bundles/EnterpriseBundle.php | 2 ++ lib/private/App/AppStore/Bundles/GroupwareBundle.php | 2 ++ lib/private/App/AppStore/Bundles/PublicSectorBundle.php | 2 ++ lib/private/App/AppStore/Bundles/SocialSharingBundle.php | 2 ++ lib/private/App/AppStore/Fetcher/AppDiscoverFetcher.php | 3 ++- lib/private/App/AppStore/Fetcher/AppFetcher.php | 2 ++ lib/private/App/AppStore/Fetcher/CategoryFetcher.php | 2 ++ lib/private/App/AppStore/Fetcher/Fetcher.php | 2 ++ lib/private/App/AppStore/Version/Version.php | 2 ++ lib/private/App/AppStore/Version/VersionParser.php | 2 ++ lib/private/App/DependencyAnalyzer.php | 2 ++ lib/private/App/InfoParser.php | 2 ++ lib/private/App/Platform.php | 2 ++ lib/private/App/PlatformRepository.php | 2 ++ .../AppFramework/DependencyInjection/DIContainer.php | 2 ++ lib/private/AppFramework/Http.php | 1 + lib/private/AppFramework/Http/Output.php | 1 + lib/private/AppFramework/Middleware/OCSMiddleware.php | 2 ++ .../PublicShare/Exceptions/NeedAuthenticationException.php | 2 ++ .../Middleware/PublicShare/PublicShareMiddleware.php | 2 ++ .../AppFramework/Middleware/Security/CORSMiddleware.php | 1 + .../Security/Exceptions/AppNotEnabledException.php | 2 ++ .../Exceptions/CrossSiteRequestForgeryException.php | 1 + .../Security/Exceptions/ExAppRequiredException.php | 1 + .../Exceptions/LaxSameSiteCookieFailedException.php | 2 ++ .../Security/Exceptions/NotConfirmedException.php | 2 ++ .../Security/Exceptions/NotLoggedInException.php | 1 + .../Middleware/Security/PasswordConfirmationMiddleware.php | 2 ++ .../Middleware/Security/SameSiteCookieMiddleware.php | 2 ++ lib/private/AppFramework/OCS/BaseResponse.php | 2 ++ lib/private/AppFramework/OCS/V1Response.php | 2 ++ lib/private/AppFramework/OCS/V2Response.php | 2 ++ lib/private/AppFramework/Routing/RouteActionHandler.php | 1 + lib/private/AppFramework/Utility/SimpleContainer.php | 1 + lib/private/AppScriptDependency.php | 3 ++- lib/private/AppScriptSort.php | 3 ++- lib/private/Archive/Archive.php | 1 + lib/private/Archive/TAR.php | 1 + lib/private/Archive/ZIP.php | 1 + .../Authentication/Exceptions/LoginRequiredException.php | 1 + .../Exceptions/PasswordLoginForbiddenException.php | 1 + .../Exceptions/PasswordlessTokenException.php | 1 + .../Exceptions/TwoFactorAuthRequiredException.php | 1 + .../Exceptions/UserAlreadyLoggedInException.php | 1 + .../Authentication/LoginCredentials/Credentials.php | 2 ++ lib/private/Authentication/Token/TokenCleanupJob.php | 2 ++ lib/private/BackgroundJob/JobList.php | 1 + lib/private/Cache/CappedMemoryCache.php | 1 + lib/private/Cache/File.php | 1 + lib/private/Collaboration/AutoComplete/Manager.php | 2 ++ lib/private/Collaboration/Collaborators/GroupPlugin.php | 2 ++ lib/private/Collaboration/Collaborators/LookupPlugin.php | 2 ++ lib/private/Collaboration/Collaborators/MailPlugin.php | 2 ++ .../Collaboration/Collaborators/RemoteGroupPlugin.php | 2 ++ lib/private/Collaboration/Collaborators/RemotePlugin.php | 2 ++ lib/private/Collaboration/Collaborators/Search.php | 2 ++ lib/private/Collaboration/Collaborators/SearchResult.php | 2 ++ lib/private/Collaboration/Collaborators/UserPlugin.php | 2 ++ lib/private/Color.php | 2 ++ lib/private/Command/AsyncBus.php | 1 + lib/private/Command/CallableJob.php | 1 + lib/private/Command/ClosureJob.php | 1 + lib/private/Command/CommandJob.php | 1 + lib/private/Command/CronBus.php | 2 ++ lib/private/Command/FileAccess.php | 1 + lib/private/Command/QueueBus.php | 1 + lib/private/Comments/Comment.php | 1 + lib/private/Comments/Manager.php | 1 + lib/private/Comments/ManagerFactory.php | 1 + lib/private/Config.php | 1 + lib/private/Console/Application.php | 1 + lib/private/Console/TimestampFormatter.php | 1 + lib/private/Contacts/ContactsMenu/ActionFactory.php | 2 ++ lib/private/Contacts/ContactsMenu/Actions/LinkAction.php | 2 ++ lib/private/Contacts/ContactsMenu/ContactsStore.php | 2 +- lib/private/Contacts/ContactsMenu/Manager.php | 2 ++ .../Contacts/ContactsMenu/Providers/EMailProvider.php | 2 ++ .../Contacts/ContactsMenu/Providers/ProfileProvider.php | 2 +- lib/private/ContactsManager.php | 1 + lib/private/DB/Adapter.php | 1 + lib/private/DB/AdapterMySQL.php | 1 + lib/private/DB/AdapterOCI8.php | 1 + lib/private/DB/AdapterPgSql.php | 1 + lib/private/DB/AdapterSqlite.php | 1 + lib/private/DB/ConnectionFactory.php | 1 + lib/private/DB/MigrationException.php | 1 + lib/private/DB/MigrationService.php | 2 ++ lib/private/DB/Migrator.php | 1 + lib/private/DB/MySqlTools.php | 2 ++ lib/private/DB/OCSqlitePlatform.php | 1 + lib/private/DB/OracleConnection.php | 1 + lib/private/DB/PgSqlTools.php | 1 + lib/private/DB/QueryBuilder/CompositeExpression.php | 2 +- .../QueryBuilder/ExpressionBuilder/ExpressionBuilder.php | 1 + .../ExpressionBuilder/MySqlExpressionBuilder.php | 1 + .../ExpressionBuilder/OCIExpressionBuilder.php | 1 + .../ExpressionBuilder/PgSqlExpressionBuilder.php | 1 + .../ExpressionBuilder/SqliteExpressionBuilder.php | 2 ++ .../DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php | 2 ++ .../DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php | 2 ++ .../QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php | 2 ++ .../QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php | 2 ++ lib/private/DB/QueryBuilder/Literal.php | 1 + lib/private/DB/QueryBuilder/Parameter.php | 1 + lib/private/DB/QueryBuilder/QueryBuilder.php | 1 + lib/private/DB/QueryBuilder/QueryFunction.php | 1 + lib/private/DB/QueryBuilder/QuoteHelper.php | 1 + lib/private/DB/SQLiteMigrator.php | 1 + lib/private/DB/SQLiteSessionInit.php | 1 + lib/private/DB/SchemaWrapper.php | 2 ++ lib/private/DatabaseException.php | 1 + lib/private/DatabaseSetupException.php | 1 + lib/private/DateTimeFormatter.php | 1 + lib/private/DateTimeZone.php | 1 + lib/private/Diagnostics/Event.php | 2 ++ lib/private/Diagnostics/EventLogger.php | 2 ++ lib/private/Diagnostics/Query.php | 1 + lib/private/Diagnostics/QueryLogger.php | 1 + lib/private/DirectEditing/Manager.php | 2 ++ lib/private/DirectEditing/Token.php | 2 ++ lib/private/Encryption/DecryptAll.php | 1 + lib/private/Encryption/EncryptionWrapper.php | 1 + .../Encryption/Exceptions/DecryptionFailedException.php | 1 + .../Encryption/Exceptions/EmptyEncryptionDataException.php | 1 + .../Encryption/Exceptions/EncryptionFailedException.php | 1 + .../Exceptions/EncryptionHeaderKeyExistsException.php | 1 + .../Exceptions/EncryptionHeaderToLargeException.php | 1 + .../Encryption/Exceptions/ModuleAlreadyExistsException.php | 1 + .../Encryption/Exceptions/ModuleDoesNotExistsException.php | 1 + .../Encryption/Exceptions/UnknownCipherException.php | 1 + lib/private/Encryption/File.php | 1 + lib/private/Encryption/HookManager.php | 1 + lib/private/Encryption/Keys/Storage.php | 2 ++ lib/private/Encryption/Manager.php | 1 + lib/private/Encryption/Update.php | 1 + lib/private/Encryption/Util.php | 1 + lib/private/Federation/CloudFederationFactory.php | 2 ++ lib/private/Federation/CloudFederationNotification.php | 2 ++ lib/private/Federation/CloudFederationShare.php | 2 ++ lib/private/Files/Cache/Cache.php | 1 + lib/private/Files/Cache/CacheDependencies.php | 1 + lib/private/Files/Cache/CacheEntry.php | 1 + lib/private/Files/Cache/FailedCache.php | 1 + lib/private/Files/Cache/HomeCache.php | 1 + lib/private/Files/Cache/HomePropagator.php | 1 + lib/private/Files/Cache/MoveFromCacheTrait.php | 1 + lib/private/Files/Cache/Propagator.php | 1 + lib/private/Files/Cache/QuerySearchHelper.php | 2 ++ lib/private/Files/Cache/Scanner.php | 1 + lib/private/Files/Cache/SearchBuilder.php | 3 ++- lib/private/Files/Cache/Storage.php | 1 + lib/private/Files/Cache/StorageGlobal.php | 1 + lib/private/Files/Cache/Updater.php | 1 + lib/private/Files/Cache/Watcher.php | 1 + lib/private/Files/Cache/Wrapper/CacheJail.php | 1 + lib/private/Files/Cache/Wrapper/CachePermissionsMask.php | 1 + lib/private/Files/Cache/Wrapper/CacheWrapper.php | 1 + lib/private/Files/Cache/Wrapper/JailPropagator.php | 2 ++ lib/private/Files/Config/CachedMountFileInfo.php | 2 ++ lib/private/Files/Config/CachedMountInfo.php | 1 + lib/private/Files/Config/LazyStorageMountInfo.php | 1 + lib/private/Files/Config/MountProviderCollection.php | 1 + lib/private/Files/Config/UserMountCache.php | 1 + lib/private/Files/Config/UserMountCacheListener.php | 1 + lib/private/Files/FileInfo.php | 1 + lib/private/Files/Filesystem.php | 1 + lib/private/Files/Lock/LockManager.php | 1 + lib/private/Files/Mount/CacheMountProvider.php | 1 + lib/private/Files/Mount/LocalHomeMountProvider.php | 1 + lib/private/Files/Mount/MountPoint.php | 1 + lib/private/Files/Mount/MoveableMount.php | 1 + lib/private/Files/Mount/ObjectHomeMountProvider.php | 1 + lib/private/Files/Node/File.php | 1 + lib/private/Files/Node/Folder.php | 2 ++ lib/private/Files/Node/LazyRoot.php | 1 + lib/private/Files/Node/Node.php | 1 + lib/private/Files/Node/NonExistingFile.php | 1 + lib/private/Files/Node/NonExistingFolder.php | 1 + lib/private/Files/Node/Root.php | 1 + lib/private/Files/Notify/Change.php | 2 ++ lib/private/Files/Notify/RenameChange.php | 2 ++ lib/private/Files/ObjectStore/Azure.php | 2 ++ lib/private/Files/ObjectStore/HomeObjectStoreStorage.php | 1 + lib/private/Files/ObjectStore/Mapper.php | 1 + lib/private/Files/ObjectStore/ObjectStoreScanner.php | 1 + lib/private/Files/ObjectStore/ObjectStoreStorage.php | 1 + lib/private/Files/ObjectStore/S3.php | 2 ++ lib/private/Files/ObjectStore/S3ConnectionTrait.php | 2 ++ lib/private/Files/ObjectStore/S3ObjectTrait.php | 1 + lib/private/Files/ObjectStore/S3Signature.php | 2 ++ lib/private/Files/ObjectStore/StorageObjectStore.php | 2 ++ lib/private/Files/ObjectStore/Swift.php | 1 + .../Files/Search/QueryOptimizer/FlattenNestedBool.php | 1 + .../FlattenSingleArgumentBinaryOperation.php | 1 + .../Search/QueryOptimizer/MergeDistributiveOperations.php | 1 + lib/private/Files/Search/QueryOptimizer/OrEqualsToIn.php | 1 + .../Files/Search/QueryOptimizer/ReplacingOptimizerStep.php | 1 + lib/private/Files/Search/QueryOptimizer/SplitLargeIn.php | 1 + lib/private/Files/Search/SearchBinaryOperator.php | 2 ++ lib/private/Files/Search/SearchOrder.php | 2 ++ lib/private/Files/Search/SearchQuery.php | 2 ++ lib/private/Files/SimpleFS/SimpleFile.php | 2 ++ lib/private/Files/SimpleFS/SimpleFolder.php | 2 ++ lib/private/Files/Storage/Common.php | 1 + lib/private/Files/Storage/CommonTest.php | 1 + lib/private/Files/Storage/DAV.php | 1 + lib/private/Files/Storage/FailedStorage.php | 1 + lib/private/Files/Storage/Home.php | 1 + lib/private/Files/Storage/Local.php | 1 + lib/private/Files/Storage/LocalTempFileTrait.php | 1 + lib/private/Files/Storage/PolyFill/CopyDirectory.php | 1 + lib/private/Files/Storage/Storage.php | 1 + lib/private/Files/Storage/StorageFactory.php | 1 + lib/private/Files/Storage/Temporary.php | 1 + lib/private/Files/Storage/Wrapper/Availability.php | 1 + lib/private/Files/Storage/Wrapper/Encoding.php | 1 + .../Files/Storage/Wrapper/EncodingDirectoryWrapper.php | 1 + lib/private/Files/Storage/Wrapper/Encryption.php | 1 + lib/private/Files/Storage/Wrapper/Jail.php | 1 + lib/private/Files/Storage/Wrapper/KnownMtime.php | 1 + lib/private/Files/Storage/Wrapper/PermissionsMask.php | 1 + lib/private/Files/Storage/Wrapper/Quota.php | 1 + lib/private/Files/Storage/Wrapper/Wrapper.php | 1 + lib/private/Files/Stream/Encryption.php | 1 + lib/private/Files/Stream/Quota.php | 1 + lib/private/Files/Stream/SeekableHttpStream.php | 2 ++ lib/private/Files/Type/Loader.php | 1 + lib/private/Files/Type/TemplateManager.php | 1 + lib/private/Files/Utils/Scanner.php | 1 + lib/private/Files/View.php | 1 + lib/private/ForbiddenException.php | 1 + lib/private/GlobalScale/Config.php | 2 ++ lib/private/Group/Backend.php | 1 + lib/private/Group/Database.php | 1 + lib/private/Group/Group.php | 1 + lib/private/Group/Manager.php | 1 + lib/private/Group/MetaData.php | 1 + lib/private/Hooks/BasicEmitter.php | 2 ++ lib/private/Hooks/Emitter.php | 2 ++ lib/private/Hooks/EmitterTrait.php | 2 ++ lib/private/Hooks/PublicEmitter.php | 2 ++ .../Exceptions/InvalidSignatureException.php | 1 + lib/private/L10N/L10NString.php | 1 + lib/private/L10N/LanguageNotFoundException.php | 2 ++ lib/private/LargeFileHelper.php | 2 ++ lib/private/Lock/DBLockingProvider.php | 1 + lib/private/Lockdown/Filesystem/NullCache.php | 2 ++ lib/private/Lockdown/Filesystem/NullStorage.php | 2 ++ lib/private/Lockdown/LockdownManager.php | 2 ++ lib/private/Log/ExceptionSerializer.php | 2 ++ lib/private/Log/File.php | 1 + lib/private/Log/LogDetails.php | 2 ++ lib/private/Log/LogFactory.php | 2 ++ lib/private/Log/Rotate.php | 1 + lib/private/Log/Syslog.php | 1 + lib/private/Log/Systemdlog.php | 2 ++ lib/private/Memcache/APCu.php | 2 ++ lib/private/Memcache/ArrayCache.php | 2 ++ lib/private/Memcache/CADTrait.php | 2 ++ lib/private/Memcache/CASTrait.php | 2 ++ lib/private/Memcache/Cache.php | 2 ++ lib/private/Memcache/Factory.php | 2 ++ lib/private/Memcache/Memcached.php | 2 ++ lib/private/Memcache/NullCache.php | 2 ++ lib/private/Memcache/Redis.php | 2 ++ lib/private/Memcache/WithLocalCache.php | 1 + lib/private/Migration/BackgroundRepair.php | 1 + lib/private/Migration/ConsoleOutput.php | 2 ++ lib/private/Migration/NullOutput.php | 2 ++ lib/private/Migration/SimpleOutput.php | 2 ++ lib/private/NaturalSort.php | 1 + lib/private/NaturalSort_DefaultCollator.php | 1 + lib/private/NavigationManager.php | 1 + lib/private/NeedsUpdateException.php | 1 + lib/private/NotSquareException.php | 1 + lib/private/OCS/CoreCapabilities.php | 1 + lib/private/OCS/Provider.php | 1 + lib/private/Preview/BMP.php | 1 + lib/private/Preview/Bitmap.php | 1 + lib/private/Preview/Bundled.php | 2 ++ lib/private/Preview/Font.php | 1 + lib/private/Preview/GIF.php | 1 + lib/private/Preview/Generator.php | 2 ++ lib/private/Preview/GeneratorHelper.php | 2 ++ lib/private/Preview/IMagickSupport.php | 1 + lib/private/Preview/Illustrator.php | 1 + lib/private/Preview/Image.php | 1 + lib/private/Preview/Imaginary.php | 3 ++- lib/private/Preview/ImaginaryPDF.php | 2 +- lib/private/Preview/JPEG.php | 1 + lib/private/Preview/Krita.php | 2 ++ lib/private/Preview/MP3.php | 1 + lib/private/Preview/MSOffice2003.php | 1 + lib/private/Preview/MSOffice2007.php | 1 + lib/private/Preview/MSOfficeDoc.php | 1 + lib/private/Preview/MarkDown.php | 1 + lib/private/Preview/MimeIconProvider.php | 2 ++ lib/private/Preview/Movie.php | 1 + lib/private/Preview/Office.php | 1 + lib/private/Preview/OpenDocument.php | 1 + lib/private/Preview/PDF.php | 1 + lib/private/Preview/PNG.php | 1 + lib/private/Preview/Photoshop.php | 1 + lib/private/Preview/Postscript.php | 1 + lib/private/Preview/Provider.php | 1 + lib/private/Preview/SGI.php | 2 ++ lib/private/Preview/SVG.php | 1 + lib/private/Preview/StarOffice.php | 1 + lib/private/Preview/TGA.php | 2 ++ lib/private/Preview/TIFF.php | 1 + lib/private/Preview/TXT.php | 1 + lib/private/Preview/XBitmap.php | 1 + lib/private/PreviewManager.php | 1 + lib/private/PreviewNotAvailableException.php | 2 ++ lib/private/RedisFactory.php | 1 + lib/private/Remote/Api/ApiBase.php | 2 ++ lib/private/Remote/Api/ApiCollection.php | 2 ++ lib/private/Remote/Api/ApiFactory.php | 2 ++ lib/private/Remote/Api/NotFoundException.php | 2 ++ lib/private/Remote/Api/OCS.php | 2 ++ lib/private/Remote/Credentials.php | 2 ++ lib/private/Remote/Instance.php | 2 ++ lib/private/Remote/InstanceFactory.php | 2 ++ lib/private/Remote/User.php | 2 ++ lib/private/Repair.php | 1 + lib/private/Repair/AddCleanupUpdaterBackupsJob.php | 2 ++ lib/private/Repair/AddMetadataGenerationJob.php | 2 ++ lib/private/Repair/CleanTags.php | 1 + lib/private/Repair/ClearFrontendCaches.php | 2 ++ lib/private/Repair/ClearGeneratedAvatarCache.php | 2 ++ lib/private/Repair/ClearGeneratedAvatarCacheJob.php | 2 ++ lib/private/Repair/Collation.php | 1 + lib/private/Repair/MoveUpdaterStepFile.php | 2 ++ lib/private/Repair/NC13/AddLogRotateJob.php | 2 ++ lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php | 2 ++ lib/private/Repair/OldGroupMembershipShares.php | 1 + lib/private/Repair/Owncloud/CleanPreviews.php | 2 ++ lib/private/Repair/Owncloud/DropAccountTermsTable.php | 2 ++ lib/private/Repair/Owncloud/MigrateOauthTables.php | 2 ++ lib/private/Repair/Owncloud/MoveAvatars.php | 2 ++ lib/private/Repair/Owncloud/SaveAccountsTableData.php | 2 ++ lib/private/Repair/Owncloud/UpdateLanguageCodes.php | 2 ++ lib/private/Repair/RepairInvalidShares.php | 1 + lib/private/Repair/RepairMimeTypes.php | 1 + lib/private/RepairException.php | 1 + lib/private/RichObjectStrings/Validator.php | 2 ++ lib/private/Route/CachingRouter.php | 1 + lib/private/Route/Route.php | 1 + lib/private/Route/Router.php | 1 + lib/private/Server.php | 2 ++ lib/private/ServerNotAvailableException.php | 1 + lib/private/ServiceUnavailableException.php | 1 + lib/private/Session/CryptoWrapper.php | 1 + lib/private/Settings/AuthorizedGroup.php | 1 + lib/private/Settings/AuthorizedGroupMapper.php | 1 + lib/private/Settings/Manager.php | 3 ++- lib/private/Settings/Section.php | 2 ++ lib/private/Setup/AbstractDatabase.php | 1 + lib/private/Setup/MySQL.php | 1 + lib/private/Setup/OCI.php | 1 + lib/private/Setup/PostgreSQL.php | 1 + lib/private/Setup/Sqlite.php | 1 + lib/private/Share/Constants.php | 1 + lib/private/Share/Helper.php | 1 + lib/private/Share/Share.php | 1 + lib/private/Share20/DefaultShareProvider.php | 1 + lib/private/Share20/Exception/BackendError.php | 2 ++ lib/private/Share20/Exception/InvalidShare.php | 2 ++ lib/private/Share20/Exception/ProviderException.php | 1 + lib/private/Share20/Hooks.php | 1 + lib/private/Share20/LegacyHooks.php | 2 ++ lib/private/Share20/Manager.php | 1 + lib/private/Share20/ProviderFactory.php | 1 + lib/private/Share20/Share.php | 1 + lib/private/Share20/ShareAttributes.php | 1 + lib/private/Share20/ShareDisableChecker.php | 1 + lib/private/Share20/ShareHelper.php | 2 ++ lib/private/StreamImage.php | 1 + lib/private/Streamer.php | 1 + lib/private/SubAdmin.php | 1 + lib/private/SystemConfig.php | 1 + lib/private/TagManager.php | 1 + lib/private/Tagging/Tag.php | 1 + lib/private/Tagging/TagMapper.php | 1 + lib/private/Tags.php | 1 + lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php | 1 + lib/private/TaskProcessing/SynchronousBackgroundJob.php | 1 + lib/private/Teams/TeamManager.php | 3 ++- lib/private/TempManager.php | 1 + lib/private/Template/Base.php | 1 + lib/private/Template/CSSResourceLocator.php | 1 + lib/private/Template/JSCombiner.php | 2 ++ lib/private/Template/JSResourceLocator.php | 1 + lib/private/Template/ResourceLocator.php | 1 + lib/private/Template/ResourceNotFoundException.php | 1 + lib/private/Template/TemplateFileLocator.php | 1 + lib/private/TemplateLayout.php | 1 + lib/private/Updater/VersionCheck.php | 1 + lib/private/User/Backend.php | 1 + lib/private/User/LoginException.php | 1 + lib/private/User/Manager.php | 1 + lib/private/User/NoUserException.php | 1 + lib/private/User/Session.php | 2 ++ lib/private/User/User.php | 1 + lib/private/legacy/OC_Defaults.php | 2 +- lib/private/legacy/OC_Files.php | 1 + lib/private/legacy/OC_Helper.php | 1 + lib/private/legacy/OC_Hook.php | 1 + lib/private/legacy/OC_JSON.php | 1 + lib/private/legacy/OC_Response.php | 1 + lib/private/legacy/OC_Template.php | 1 + lib/private/legacy/OC_User.php | 1 + lib/private/legacy/OC_Util.php | 1 + lib/private/legacy/template/functions.php | 1 + lib/public/Accounts/PropertyDoesNotExistException.php | 2 ++ lib/public/Activity/IConsumer.php | 2 +- lib/public/Activity/IEventMerger.php | 2 ++ lib/public/Activity/IExtension.php | 1 + lib/public/Activity/IFilter.php | 2 ++ lib/public/Activity/IProvider.php | 2 ++ lib/public/Activity/ISetting.php | 2 ++ lib/public/App/AppPathNotFoundException.php | 2 ++ lib/public/App/IAppManager.php | 1 + lib/public/App/ManagerEvent.php | 1 + lib/public/AppFramework/ApiController.php | 1 + lib/public/AppFramework/Controller.php | 1 + lib/public/AppFramework/Db/Entity.php | 1 + lib/public/AppFramework/Http.php | 1 + lib/public/AppFramework/Http/ContentSecurityPolicy.php | 1 + lib/public/AppFramework/Http/DataDisplayResponse.php | 1 + lib/public/AppFramework/Http/DataDownloadResponse.php | 1 + lib/public/AppFramework/Http/DataResponse.php | 1 + lib/public/AppFramework/Http/DownloadResponse.php | 1 + .../AppFramework/Http/EmptyContentSecurityPolicy.php | 1 + lib/public/AppFramework/Http/FileDisplayResponse.php | 2 ++ lib/public/AppFramework/Http/ICallbackResponse.php | 1 + lib/public/AppFramework/Http/IOutput.php | 1 + lib/public/AppFramework/Http/JSONResponse.php | 1 + lib/public/AppFramework/Http/NotFoundResponse.php | 1 + lib/public/AppFramework/Http/RedirectResponse.php | 1 + lib/public/AppFramework/Http/Response.php | 1 + lib/public/AppFramework/Http/StreamResponse.php | 1 + .../AppFramework/Http/Template/ExternalShareMenuAction.php | 2 ++ lib/public/AppFramework/Http/Template/IMenuAction.php | 2 ++ lib/public/AppFramework/Http/Template/LinkMenuAction.php | 2 ++ .../AppFramework/Http/Template/PublicTemplateResponse.php | 2 ++ lib/public/AppFramework/Http/Template/SimpleMenuAction.php | 2 ++ lib/public/AppFramework/Http/TemplateResponse.php | 1 + lib/public/AppFramework/Middleware.php | 1 + lib/public/AppFramework/OCS/OCSBadRequestException.php | 2 ++ lib/public/AppFramework/OCS/OCSException.php | 2 ++ lib/public/AppFramework/OCS/OCSForbiddenException.php | 2 ++ lib/public/AppFramework/OCS/OCSNotFoundException.php | 2 ++ .../AppFramework/OCS/OCSPreconditionFailedException.php | 2 ++ lib/public/AppFramework/OCSController.php | 1 + .../Exceptions/CredentialsUnavailableException.php | 2 ++ .../Exceptions/PasswordUnavailableException.php | 2 ++ lib/public/Authentication/IApacheBackend.php | 2 +- lib/public/Authentication/IProvideUserSecretBackend.php | 3 ++- .../Authentication/LoginCredentials/ICredentials.php | 2 ++ lib/public/BackgroundJob/IJob.php | 1 + lib/public/BackgroundJob/IJobList.php | 1 + lib/public/BeforeSabrePubliclyLoadedEvent.php | 2 ++ lib/public/Cache/CappedMemoryCache.php | 1 + .../Calendar/BackendTemporarilyUnavailableException.php | 2 ++ lib/public/Calendar/IMetadataProvider.php | 2 ++ lib/public/Calendar/Resource/IBackend.php | 2 ++ lib/public/Calendar/Resource/IResource.php | 2 ++ lib/public/Calendar/Resource/IResourceMetadata.php | 2 ++ lib/public/Calendar/Room/IBackend.php | 2 ++ lib/public/Calendar/Room/IRoom.php | 2 ++ lib/public/Calendar/Room/IRoomMetadata.php | 2 ++ lib/public/Capabilities/ICapability.php | 1 + lib/public/Capabilities/IPublicCapability.php | 2 ++ lib/public/Collaboration/AutoComplete/IManager.php | 2 ++ lib/public/Collaboration/AutoComplete/ISorter.php | 2 ++ lib/public/Collaboration/Collaborators/ISearch.php | 2 ++ lib/public/Collaboration/Collaborators/ISearchPlugin.php | 2 ++ lib/public/Collaboration/Collaborators/ISearchResult.php | 2 ++ .../Collaboration/Collaborators/SearchResultType.php | 2 ++ lib/public/Color.php | 2 ++ lib/public/Command/IBus.php | 1 + lib/public/Command/ICommand.php | 1 + lib/public/Comments/CommentsEntityEvent.php | 1 + lib/public/Comments/CommentsEvent.php | 1 + lib/public/Comments/IComment.php | 1 + lib/public/Comments/ICommentsEventHandler.php | 2 ++ lib/public/Comments/ICommentsManager.php | 1 + lib/public/Comments/ICommentsManagerFactory.php | 1 + lib/public/Comments/IllegalIDChangeException.php | 1 + lib/public/Comments/MessageTooLongException.php | 1 + lib/public/Comments/NotFoundException.php | 1 + lib/public/Console/ConsoleEvent.php | 1 + lib/public/Contacts/ContactsMenu/IAction.php | 2 ++ lib/public/Contacts/ContactsMenu/IActionFactory.php | 2 ++ lib/public/Contacts/ContactsMenu/IContactsStore.php | 2 ++ lib/public/Contacts/ContactsMenu/IEntry.php | 2 ++ lib/public/Contacts/ContactsMenu/ILinkAction.php | 2 ++ lib/public/Contacts/IManager.php | 2 +- lib/public/DB/ISchemaWrapper.php | 2 ++ lib/public/DB/QueryBuilder/ICompositeExpression.php | 1 + lib/public/DB/QueryBuilder/IExpressionBuilder.php | 1 + lib/public/DB/QueryBuilder/IFunctionBuilder.php | 2 ++ lib/public/DB/QueryBuilder/ILiteral.php | 1 + lib/public/DB/QueryBuilder/IParameter.php | 1 + lib/public/DB/QueryBuilder/IQueryBuilder.php | 1 + lib/public/DB/QueryBuilder/IQueryFunction.php | 1 + lib/public/Diagnostics/IEvent.php | 1 + lib/public/Diagnostics/IEventLogger.php | 1 + lib/public/Diagnostics/IQuery.php | 1 + lib/public/Diagnostics/IQueryLogger.php | 1 + lib/public/DirectEditing/ACreateEmpty.php | 2 ++ lib/public/DirectEditing/ACreateFromTemplate.php | 2 ++ lib/public/DirectEditing/ATemplate.php | 2 ++ lib/public/DirectEditing/IToken.php | 2 ++ lib/public/DirectEditing/RegisterDirectEditorEvent.php | 2 ++ .../Encryption/Exceptions/GenericEncryptionException.php | 1 + lib/public/Encryption/IEncryptionModule.php | 1 + lib/public/Encryption/IFile.php | 1 + lib/public/Encryption/IManager.php | 1 + lib/public/Encryption/Keys/IStorage.php | 1 + .../Federation/Exceptions/ActionNotSupportedException.php | 2 ++ .../Exceptions/AuthenticationFailedException.php | 2 ++ lib/public/Federation/Exceptions/BadRequestException.php | 2 ++ .../Exceptions/ProviderAlreadyExistsException.php | 2 ++ .../Exceptions/ProviderCouldNotAddShareException.php | 2 ++ .../Exceptions/ProviderDoesNotExistsException.php | 2 ++ lib/public/Federation/ICloudFederationFactory.php | 2 ++ lib/public/Federation/ICloudFederationNotification.php | 2 ++ lib/public/Federation/ICloudFederationProvider.php | 2 ++ lib/public/Federation/ICloudFederationProviderManager.php | 2 ++ lib/public/Federation/ICloudFederationShare.php | 2 ++ lib/public/Files.php | 3 ++- lib/public/Files/AlreadyExistsException.php | 2 +- lib/public/Files/AppData/IAppDataFactory.php | 1 + lib/public/Files/Cache/ICache.php | 1 + lib/public/Files/Cache/ICacheEntry.php | 1 + lib/public/Files/Cache/IPropagator.php | 1 + lib/public/Files/Cache/IScanner.php | 1 + lib/public/Files/Cache/IUpdater.php | 1 + lib/public/Files/Cache/IWatcher.php | 1 + lib/public/Files/Config/ICachedMountFileInfo.php | 2 ++ lib/public/Files/Config/ICachedMountInfo.php | 1 + lib/public/Files/Config/IHomeMountProvider.php | 1 + lib/public/Files/Config/IMountProvider.php | 1 + lib/public/Files/Config/IMountProviderCollection.php | 1 + lib/public/Files/Config/IUserMountCache.php | 1 + lib/public/Files/DavUtil.php | 3 ++- lib/public/Files/EmptyFileNameException.php | 2 ++ lib/public/Files/EntityTooLargeException.php | 2 +- lib/public/Files/File.php | 2 +- lib/public/Files/FileInfo.php | 1 + lib/public/Files/FileNameTooLongException.php | 2 +- lib/public/Files/Folder.php | 2 +- lib/public/Files/ForbiddenException.php | 2 +- lib/public/Files/GenericFileException.php | 2 ++ lib/public/Files/IAppData.php | 2 ++ lib/public/Files/IHomeStorage.php | 2 +- lib/public/Files/IMimeTypeDetector.php | 2 +- lib/public/Files/IMimeTypeLoader.php | 1 + lib/public/Files/IRootFolder.php | 1 + lib/public/Files/InvalidCharacterInPathException.php | 2 +- lib/public/Files/InvalidContentException.php | 2 +- lib/public/Files/InvalidDirectoryException.php | 2 ++ lib/public/Files/InvalidPathException.php | 2 +- lib/public/Files/LockNotAcquiredException.php | 2 +- lib/public/Files/Mount/IMountPoint.php | 1 + lib/public/Files/Node.php | 2 +- lib/public/Files/NotEnoughSpaceException.php | 2 +- lib/public/Files/NotFoundException.php | 2 +- lib/public/Files/NotPermittedException.php | 2 +- lib/public/Files/Notify/IChange.php | 2 ++ lib/public/Files/Notify/INotifyHandler.php | 2 ++ lib/public/Files/Notify/IRenameChange.php | 2 ++ lib/public/Files/ObjectStore/IObjectStore.php | 1 + lib/public/Files/ReservedWordException.php | 2 +- lib/public/Files/Search/ISearchBinaryOperator.php | 2 ++ lib/public/Files/Search/ISearchComparison.php | 2 ++ lib/public/Files/Search/ISearchOperator.php | 2 ++ lib/public/Files/Search/ISearchOrder.php | 2 ++ lib/public/Files/Search/ISearchQuery.php | 2 ++ lib/public/Files/SimpleFS/ISimpleFile.php | 2 ++ lib/public/Files/SimpleFS/ISimpleFolder.php | 2 ++ lib/public/Files/SimpleFS/ISimpleRoot.php | 2 ++ lib/public/Files/Storage.php | 2 +- lib/public/Files/Storage/IDisableEncryptionStorage.php | 2 ++ lib/public/Files/Storage/ILockingStorage.php | 1 + lib/public/Files/Storage/INotifyStorage.php | 2 ++ lib/public/Files/Storage/IStorage.php | 2 +- lib/public/Files/Storage/IStorageFactory.php | 1 + lib/public/Files/StorageAuthException.php | 1 + lib/public/Files/StorageBadConfigException.php | 1 + lib/public/Files/StorageConnectionException.php | 1 + lib/public/Files/StorageInvalidException.php | 2 +- lib/public/Files/StorageNotAvailableException.php | 2 +- lib/public/Files/StorageTimeoutException.php | 1 + lib/public/Files/Template/FieldType.php | 2 +- lib/public/Files/Template/InvalidFieldTypeException.php | 2 +- lib/public/Files/Template/RegisterTemplateCreatorEvent.php | 3 ++- lib/public/Files/UnseekableException.php | 2 +- lib/public/GlobalScale/IConfig.php | 2 ++ lib/public/Group/Backend/INamedBackend.php | 2 ++ lib/public/GroupInterface.php | 2 +- lib/public/HintException.php | 1 + lib/public/IAddressBook.php | 3 ++- lib/public/IAvatar.php | 1 + lib/public/ICache.php | 2 +- lib/public/IConfig.php | 2 +- lib/public/IContainer.php | 2 +- lib/public/IDBConnection.php | 2 +- lib/public/IDateTimeFormatter.php | 1 + lib/public/IDateTimeZone.php | 1 + lib/public/IEventSource.php | 1 + lib/public/IGroupManager.php | 1 + lib/public/IMemcache.php | 2 +- lib/public/IMemcacheTTL.php | 1 + lib/public/INavigationManager.php | 2 +- lib/public/IPreview.php | 2 +- lib/public/IStreamImage.php | 1 + lib/public/ITagManager.php | 2 +- lib/public/ITags.php | 2 +- lib/public/ITempManager.php | 1 + lib/public/IUser.php | 1 + lib/public/IUserBackend.php | 2 +- lib/public/IUserManager.php | 1 + lib/public/IUserSession.php | 2 +- lib/public/Image.php | 2 +- lib/public/L10N/ILanguageIterator.php | 1 + lib/public/LDAP/IDeletionFlagSupport.php | 2 ++ lib/public/LDAP/ILDAPProvider.php | 2 ++ lib/public/LDAP/ILDAPProviderFactory.php | 2 ++ lib/public/Lockdown/ILockdownManager.php | 2 ++ lib/public/Log/IFileBased.php | 2 ++ lib/public/Log/ILogFactory.php | 2 ++ lib/public/Log/IWriter.php | 2 ++ lib/public/Log/RotationTrait.php | 2 ++ lib/public/Migration/BigIntMigration.php | 1 + lib/public/Migration/IOutput.php | 1 + lib/public/Migration/IRepairStep.php | 1 + lib/public/Preview/IMimeIconProvider.php | 1 + lib/public/Preview/IProvider.php | 1 + lib/public/Remote/Api/IApiCollection.php | 2 ++ lib/public/Remote/Api/IApiFactory.php | 2 ++ lib/public/Remote/Api/ICapabilitiesApi.php | 2 ++ lib/public/Remote/Api/IUserApi.php | 2 ++ lib/public/Remote/ICredentials.php | 2 ++ lib/public/Remote/IInstance.php | 2 ++ lib/public/Remote/IInstanceFactory.php | 2 ++ lib/public/Remote/IUser.php | 2 ++ lib/public/RichObjectStrings/Definitions.php | 2 ++ lib/public/RichObjectStrings/IValidator.php | 2 ++ lib/public/RichObjectStrings/InvalidObjectExeption.php | 2 ++ lib/public/Route/IRoute.php | 1 + lib/public/Route/IRouter.php | 1 + lib/public/SabrePluginEvent.php | 1 + lib/public/SabrePluginException.php | 1 + lib/public/Search/PagedProvider.php | 1 + lib/public/Search/Provider.php | 1 + lib/public/Search/Result.php | 1 + .../Session/Exceptions/SessionNotAvailableException.php | 1 + lib/public/Settings/IDelegatedSettings.php | 1 + lib/public/Settings/IIconSection.php | 2 ++ lib/public/Settings/IManager.php | 3 ++- lib/public/Settings/ISettings.php | 2 ++ lib/public/Share.php | 2 +- lib/public/Share/Exceptions/GenericShareException.php | 1 + lib/public/Share/Exceptions/IllegalIDChangeException.php | 1 + lib/public/Share/Exceptions/ShareNotFound.php | 1 + lib/public/Share/IAttributes.php | 2 ++ lib/public/Share/IManager.php | 1 + lib/public/Share/IProviderFactory.php | 1 + lib/public/Share/IShare.php | 1 + lib/public/Share/IShareHelper.php | 2 ++ lib/public/Share/IShareProvider.php | 1 + lib/public/Share/IShareProviderSupportsAccept.php | 1 + lib/public/Share/IShareProviderWithNotification.php | 1 + lib/public/Share_Backend.php | 2 +- lib/public/Share_Backend_Collection.php | 2 +- lib/public/Share_Backend_File_Dependent.php | 2 +- lib/public/SpeechToText/ISpeechToTextProviderWithId.php | 1 + lib/public/TaskProcessing/Events/TaskFailedEvent.php | 1 + lib/public/TaskProcessing/Events/TaskSuccessfulEvent.php | 1 + lib/public/TaskProcessing/Exception/NotFoundException.php | 1 + .../Exception/PreConditionNotMetException.php | 1 + .../TaskProcessing/Exception/UnauthorizedException.php | 1 + .../TaskProcessing/Exception/ValidationException.php | 1 + lib/public/TaskProcessing/ShapeDescriptor.php | 1 + lib/public/TaskProcessing/ShapeEnumValue.php | 1 + lib/public/Teams/ITeamManager.php | 3 ++- lib/public/Teams/ITeamResourceProvider.php | 3 ++- lib/public/Teams/Team.php | 3 ++- lib/public/Teams/TeamResource.php | 3 ++- lib/public/Template.php | 1 + lib/public/TextProcessing/Events/TaskFailedEvent.php | 1 + lib/public/TextProcessing/Events/TaskSuccessfulEvent.php | 1 + .../TextProcessing/Exception/TaskFailureException.php | 1 + lib/public/TextToImage/Exception/TaskFailureException.php | 2 +- lib/public/TextToImage/Exception/TaskNotFoundException.php | 2 +- lib/public/TextToImage/Exception/TextToImageException.php | 2 +- lib/public/UserInterface.php | 2 +- lib/public/Util.php | 2 +- lib/public/WorkflowEngine/ICheck.php | 2 ++ lib/public/WorkflowEngine/IManager.php | 2 ++ lib/public/WorkflowEngine/IOperation.php | 2 ++ 724 files changed, 1005 insertions(+), 82 deletions(-) diff --git a/lib/composer/autoload.php b/lib/composer/autoload.php index b3b39129e7a8c..2df3ba5866251 100644 --- a/lib/composer/autoload.php +++ b/lib/composer/autoload.php @@ -1,5 +1,6 @@ array( 'name' => '__root__', 'pretty_version' => 'dev-master', @@ -20,4 +23,4 @@ 'dev_requirement' => false, ), ), -); +); \ No newline at end of file diff --git a/lib/composer/composer/platform_check.php b/lib/composer/composer/platform_check.php index 4c3a5d68f144c..723fc3f4da436 100644 --- a/lib/composer/composer/platform_check.php +++ b/lib/composer/composer/platform_check.php @@ -1,5 +1,6 @@ Date: Sun, 15 Sep 2024 15:33:10 +0200 Subject: [PATCH 3/3] wip --- .../ContactsMenu/ContactsStoreTest.php | 20 +++++++++---------- tests/lib/Files/Mount/MountPointTest.php | 4 ++-- tests/lib/Files/ViewTest.php | 6 ++++-- tests/lib/Template/ResourceLocatorTest.php | 18 ++++++++--------- tests/lib/TemplateFunctionsTest.php | 8 ++++---- tests/lib/User/ManagerTest.php | 2 +- tests/lib/User/SessionTest.php | 2 +- 7 files changed, 31 insertions(+), 29 deletions(-) diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index a3151d0b04096..e04de52490f75 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -77,10 +77,10 @@ public function testGetContactsWithoutFilter(): void { ->with($this->equalTo(''), $this->equalTo(['FN', 'EMAIL'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', ], [ - 'UID' => 567, + 'UID' => '567', 'FN' => 'Darren Roner', 'EMAIL' => [ 'darren@roner.au' @@ -110,7 +110,7 @@ public function testGetContactsHidesOwnEntry(): void { 'UID' => 'user123', ], [ - 'UID' => 567, + 'UID' => '567', 'FN' => 'Darren Roner', 'EMAIL' => [ 'darren@roner.au' @@ -138,10 +138,10 @@ public function testGetContactsWithoutBinaryImage(): void { ->with($this->equalTo(''), $this->equalTo(['FN', 'EMAIL'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', ], [ - 'UID' => 567, + 'UID' => '567', 'FN' => 'Darren Roner', 'EMAIL' => [ 'darren@roner.au' @@ -167,10 +167,10 @@ public function testGetContactsWithoutAvatarURI(): void { ->with($this->equalTo(''), $this->equalTo(['FN', 'EMAIL'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', ], [ - 'UID' => 567, + 'UID' => '567', 'FN' => 'Darren Roner', 'EMAIL' => [ 'darren@roner.au' @@ -868,7 +868,7 @@ public function testFindOneUser(): void { ->with($this->equalTo('a567'), $this->equalTo(['UID'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', 'isLocalSystemBook' => false ], [ @@ -899,7 +899,7 @@ public function testFindOneEMail(): void { ->with($this->equalTo('darren@roner.au'), $this->equalTo(['EMAIL'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', 'isLocalSystemBook' => false ], [ @@ -939,7 +939,7 @@ public function testFindOneNoMatches(): void { ->with($this->equalTo('a567'), $this->equalTo(['UID'])) ->willReturn([ [ - 'UID' => 123, + 'UID' => '123', 'isLocalSystemBook' => false ], [ diff --git a/tests/lib/Files/Mount/MountPointTest.php b/tests/lib/Files/Mount/MountPointTest.php index eda61feb24946..db04b1114fc00 100644 --- a/tests/lib/Files/Mount/MountPointTest.php +++ b/tests/lib/Files/Mount/MountPointTest.php @@ -18,7 +18,7 @@ public function testGetStorage(): void { $storage = $this->createMock(Storage::class); $storage->expects($this->once()) ->method('getId') - ->willReturn(123); + ->willReturn('123'); $loader = $this->createMock(StorageFactory::class); $loader->expects($this->once()) @@ -34,7 +34,7 @@ public function testGetStorage(): void { ); $this->assertEquals($storage, $mountPoint->getStorage()); - $this->assertEquals(123, $mountPoint->getStorageId()); + $this->assertEquals('123', $mountPoint->getStorageId()); $this->assertEquals('/mountpoint/', $mountPoint->getMountPoint()); $mountPoint->setMountPoint('another'); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 0a029889fb1bc..4a47f081b907e 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1750,6 +1750,8 @@ public function basicOperationProviderForLocks() { ILockingProvider::LOCK_SHARED, ILockingProvider::LOCK_EXCLUSIVE, ILockingProvider::LOCK_SHARED, + null, + 0, ], // ---- delete hook ---- @@ -2515,7 +2517,7 @@ public function testRemoveMoveableMountPoint(): void { ->willReturn($mountPoint); $mount->expects($this->once()) ->method('removeMount') - ->willReturn('foo'); + ->willReturn(true); $mount->expects($this->any()) ->method('getInternalPath') ->willReturn(''); @@ -2548,7 +2550,7 @@ public function testRemoveMoveableMountPoint(): void { //Delete the mountpoint $view = new View('/' . $this->user . '/files'); - $this->assertEquals('foo', $view->rmdir('mount')); + $this->assertEquals(true, $view->rmdir('mount')); } public function mimeFilterProvider() { diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 65d4c7938f958..3de1298ab3af4 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -41,12 +41,12 @@ public function testFind(): void { $locator = $this->getResourceLocator('theme'); $locator->expects($this->once()) ->method('doFind') - ->with('foo'); + ->with('app/foo'); $locator->expects($this->once()) ->method('doFindTheme') - ->with('foo'); + ->with('app/foo'); /** @var \OC\Template\ResourceLocator $locator */ - $locator->find(['foo']); + $locator->find(['app/foo']); } public function testFindNotFound(): void { @@ -59,17 +59,17 @@ public function testFindNotFound(): void { ['core' => 'map'], ['3rd' => 'party'], ['foo' => 'bar']); $locator->expects($this->once()) ->method('doFind') - ->with('foo') - ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); + ->with('app/foo') + ->will($this->throwException(new ResourceNotFoundException('app/foo', 'map'))); $locator->expects($this->once()) ->method('doFindTheme') - ->with('foo') - ->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); + ->with('app/foo') + ->will($this->throwException(new ResourceNotFoundException('app/foo', 'map'))); $this->logger->expects($this->exactly(2)) ->method('debug') - ->with($this->stringContains('map/foo')); + ->with($this->stringContains('map/app/foo')); /** @var \OC\Template\ResourceLocator $locator */ - $locator->find(['foo']); + $locator->find(['app/foo']); } public function testAppendIfExist(): void { diff --git a/tests/lib/TemplateFunctionsTest.php b/tests/lib/TemplateFunctionsTest.php index a693a39c580cf..a3b2cfe1bb067 100644 --- a/tests/lib/TemplateFunctionsTest.php +++ b/tests/lib/TemplateFunctionsTest.php @@ -170,12 +170,12 @@ public function testRelativeDateLastYear(): void { public function testRelativeDateYearsAgo(): void { $currentTime = 1380703592; $elementTime = $currentTime - 86400 * 365.25 * 2; - $result = (string)relative_modified_date($elementTime, $currentTime, true); + $result = (string)relative_modified_date((int)$elementTime, $currentTime, true); $this->assertEquals('2 years ago', $result); $elementTime = $currentTime - 86400 * 365.25 * 3; - $result = (string)relative_modified_date($elementTime, $currentTime, true); + $result = (string)relative_modified_date((int)$elementTime, $currentTime, true); $this->assertEquals('3 years ago', $result); } @@ -264,12 +264,12 @@ public function testRelativeTimeLastYear(): void { public function testRelativeTimeYearsAgo(): void { $currentTime = 1380703592; $elementTime = $currentTime - 86400 * 365.25 * 2; - $result = (string)relative_modified_date($elementTime, $currentTime, false); + $result = (string)relative_modified_date((int)$elementTime, $currentTime, false); $this->assertEquals('2 years ago', $result); $elementTime = $currentTime - 86400 * 365.25 * 3; - $result = (string)relative_modified_date($elementTime, $currentTime, false); + $result = (string)relative_modified_date((int)$elementTime, $currentTime, false); $this->assertEquals('3 years ago', $result); } diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index 302cba4ea2b8d..bc6a41fb07c5c 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -154,7 +154,7 @@ public function testCheckPassword(): void { $backend->expects($this->once()) ->method('checkPassword') ->with($this->equalTo('foo'), $this->equalTo('bar')) - ->willReturn(true); + ->willReturn('foo'); $backend->expects($this->any()) ->method('implementsActions') diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index fad5d11565c00..1702ef1fbeca6 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -970,7 +970,7 @@ public function testCreateRememberedSessionToken(): void { ->method('generateToken') ->with($sessionId, $uid, $loginName, $password, 'Firefox', IToken::TEMPORARY_TOKEN, IToken::REMEMBER); - $this->assertTrue($userSession->createSessionToken($request, $uid, $loginName, $password, true)); + $this->assertTrue($userSession->createSessionToken($request, $uid, $loginName, $password, IToken::REMEMBER)); } public function testCreateSessionTokenWithTokenPassword(): void {