├── .gitignore ├── class ├── ClassMap.php ├── Common │ ├── Addon │ │ ├── Addon.php │ │ ├── AddonAbstract.php │ │ ├── AddonManagerInterface.php │ │ └── AddonsFacade.php │ ├── BackupExport.php │ ├── Cli │ │ ├── Cli.php │ │ ├── CliManager.php │ │ └── Command.php │ ├── Compatibility │ │ ├── Compatibility.php │ │ └── CompatibilityManager.php │ ├── Db │ │ └── MDBWPDB.php │ ├── DryRun │ │ ├── DiffEntity.php │ │ ├── DiffGroup.php │ │ ├── DiffInterpreter.php │ │ ├── MemoryPersistence.php │ │ └── PersistenceInterface.php │ ├── Error │ │ ├── ErrorLog.php │ │ ├── HandleRemotePostError.php │ │ └── Logger.php │ ├── Exceptions │ │ ├── EmptyPropertyException.php │ │ └── SanitizationFailureException.php │ ├── Filesystem │ │ ├── Filesystem.php │ │ └── RecursiveScanner.php │ ├── FormData │ │ └── FormData.php │ ├── FullSite │ │ └── FullSiteExport.php │ ├── Helpers.php │ ├── Http │ │ ├── Helper.php │ │ ├── Http.php │ │ ├── RemotePost.php │ │ ├── Scramble.php │ │ └── WPMDBRestAPIServer.php │ ├── MF │ │ ├── Manager.php │ │ ├── MediaFilesAddon.php │ │ └── MediaFilesLocal.php │ ├── Migration │ │ ├── FinalizeMigration.php │ │ ├── Flush.php │ │ ├── InitiateMigration.php │ │ ├── MigrationHelper.php │ │ └── MigrationManager.php │ ├── MigrationPersistence │ │ └── Persistence.php │ ├── MigrationState │ │ ├── MigrationState.php │ │ ├── MigrationStateManager.php │ │ └── StateDataContainer.php │ ├── Multisite │ │ └── Multisite.php │ ├── Plugin │ │ ├── Assets.php │ │ ├── Menu.php │ │ └── PluginManagerBase.php │ ├── Profile │ │ ├── ProfileImporter.php │ │ └── ProfileManager.php │ ├── Properties │ │ ├── DynamicProperties.php │ │ └── Properties.php │ ├── Queue │ │ ├── Connection.php │ │ ├── Connections │ │ │ ├── ConnectionInterface.php │ │ │ ├── DatabaseConnection.php │ │ │ └── RedisConnection.php │ │ ├── Cron.php │ │ ├── Exceptions │ │ │ ├── ConnectionNotFoundException.php │ │ │ ├── InvalidJobTypeException.php │ │ │ └── WorkerAttemptsExceededException.php │ │ ├── Job.php │ │ ├── Jobs │ │ │ └── WPMDB_Job.php │ │ ├── Manager.php │ │ ├── Queue.php │ │ ├── QueueHelper.php │ │ ├── QueueManager.php │ │ └── Worker.php │ ├── Replace.php │ ├── Replace │ │ ├── AbstractReplacePair.php │ │ ├── CaseInsensitivePair.php │ │ ├── CaseSensitivePair.php │ │ ├── PairFactory.php │ │ ├── RegexPair.php │ │ └── ReplacePairInterface.php │ ├── Sanitize.php │ ├── Settings │ │ ├── Settings.php │ │ └── SettingsManager.php │ ├── Sql │ │ ├── Table.php │ │ └── TableHelper.php │ ├── TPF │ │ ├── Manager.php │ │ ├── ThemePluginFilesAddon.php │ │ ├── ThemePluginFilesFinalize.php │ │ ├── ThemePluginFilesLocal.php │ │ └── TransferCheck.php │ ├── Transfers │ │ ├── Abstracts │ │ │ └── TransferManagerAbstract.php │ │ └── Files │ │ │ ├── Chunker.php │ │ │ ├── Excludes.php │ │ │ ├── FileProcessor.php │ │ │ ├── Filters │ │ │ ├── FilterInterface.php │ │ │ └── WPConfigFilter.php │ │ │ ├── PluginHelper.php │ │ │ ├── TransferManager.php │ │ │ └── Util.php │ ├── UI │ │ ├── Notice.php │ │ └── TemplateBase.php │ ├── Upgrades │ │ ├── Routines │ │ │ ├── RoutineInterface.php │ │ │ ├── Routine_2_6_0.php │ │ │ └── Routine_2_6_2.php │ │ └── UpgradeRoutinesManager.php │ └── Util │ │ ├── Singleton.php │ │ ├── Util.php │ │ └── ZipAndEncode.php ├── Container.php ├── Free │ ├── ClassMap.php │ ├── Plugin │ │ └── PluginManager.php │ ├── UI │ │ └── Template.php │ └── WPMigrateDBFree.php ├── SetupProviders.php ├── WPMDBDI.php ├── WPMDBDI_Config.php ├── WPMigrateDB.php ├── autoload.php └── deactivate.php ├── compatibility ├── temp-theme │ └── functions.php ├── wp-migrate-db-pro-compatibility.php └── wp-migrate-db-pro-compatibility.php-e ├── ext ├── PluginUpdater.php └── wpmdb-ext-functions.php ├── frontend ├── build-free │ ├── asset-manifest.json │ ├── index.html │ ├── noop.css │ ├── noop.js │ └── static │ │ ├── css │ │ └── styles.513ba96d.css │ │ ├── js │ │ ├── 203.7f2d67154119.chunk.js │ │ ├── 359.fc9cb553b286.chunk.js │ │ ├── 384.847f6920035f.chunk.js │ │ ├── 393.7319be73e944.chunk.js │ │ ├── 393.7319be73e944.chunk.js.LICENSE.txt │ │ ├── 481.cdfec70d88f5.chunk.js │ │ ├── 56.4de4fca68182.chunk.js │ │ ├── 567.d5c4ec210509.js │ │ ├── 567.d5c4ec210509.js.LICENSE.txt │ │ ├── 800.e69dbe829c57.chunk.js │ │ ├── 85.c22b20bfe320.chunk.js │ │ ├── 970.d8ea5089c521.chunk.js │ │ ├── main.88fae384cc00.js │ │ ├── styles.55a1e3e50729.js │ │ └── wpmdb-runtime.509c501c8d4b.js │ │ └── media │ │ ├── action-backup-database.c3c73850.svg │ │ ├── action-export-database.52b56dcc.svg │ │ ├── action-import-database.40875856.svg │ │ ├── action-locked.524d8e4b.svg │ │ ├── action-pull.cb4ccd00.svg │ │ ├── action-push.ebccd3b6.svg │ │ ├── action-search-replace.9c9bf81f.svg │ │ ├── add-white.972fe87d.svg │ │ ├── add.0e409332.svg │ │ ├── addons-cli.acc2852c.svg │ │ ├── addons-mediafiles.ecedfa39.svg │ │ ├── addons-multisitetools.34c15ecc.svg │ │ ├── addons-other-files.eace2a2c.svg │ │ ├── addons-plugin-files.0d01933a.svg │ │ ├── addons-theme-plugins-files.cc98a300.svg │ │ ├── arrow.992a73c2.svg │ │ ├── arrow.c76607c1.svg │ │ ├── calendar.2c8b6ac1.svg │ │ ├── check-circular.02c190e9.svg │ │ ├── close.265fcfb5.svg │ │ ├── danger.e1678f77.svg │ │ ├── downCircle.eb822116.svg │ │ ├── equalCircle.0d086278.svg │ │ ├── error.58f4992a.svg │ │ ├── info.6957118a.svg │ │ ├── license-checked-blue.c304fe20.svg │ │ ├── local.8a615e13.svg │ │ ├── mdb-banner.afefa48f.svg │ │ ├── mdb-branding-transparent.edbb2b6f.svg │ │ ├── mdb-medallion.451f212d.svg │ │ ├── migration-failed.5471ea63.svg │ │ ├── multisite.b8c0ef24.svg │ │ ├── oval-close.55372175.svg │ │ ├── oval-question.93e3f70e.svg │ │ ├── plusCircle.940ad8be.svg │ │ ├── progress-section-check.2e9bfc60.svg │ │ ├── progress-spinner.121400ac.svg │ │ ├── question.c7be2b1a.svg │ │ ├── rating-star-active.45821ac6.svg │ │ ├── save-profile-btn.cebaf8c1.svg │ │ ├── search-replace-arrow.1795aa05.svg │ │ ├── search-replace-casesensitive.874c1930.svg │ │ ├── search-replace-regex.3cf90f8f.svg │ │ ├── search-replace.92ae08a9.svg │ │ ├── singlesite.e8b6fea0.svg │ │ ├── status-error.26cffd9f.svg │ │ ├── subsite.426375ab.svg │ │ ├── success.27b62f11.svg │ │ ├── testimonial-avatar.309cd834.png │ │ ├── twitter.0843a854.svg │ │ ├── upCircle.01eb07ce.svg │ │ ├── warning.57362294.svg │ │ └── wp-migrate-2-6-0.8d26599e.png ├── mdb-2.0.js ├── plugin-update │ ├── plugin-update-styles.css │ ├── plugin-update-styles.css.map │ ├── plugin-update-styles.scss │ └── plugin-update.js ├── public │ ├── index.html │ ├── noop.css │ └── noop.js └── template │ ├── README.md │ ├── gitignore │ ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json │ └── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── languages ├── wp-migrate-db-en.pot └── wp-migrate-db-pt_BR.mo ├── php-checker.php ├── react-wp-scripts.php ├── readme.txt ├── setup-mdb.php ├── setup-plugin.php ├── template ├── common │ └── muplugin-failed-update-warning.php ├── options-page-outdated-wp.php ├── options-tools-subsite.php └── options.php ├── vendor ├── autoload.php ├── brumann │ └── polyfill-unserialize │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── DisallowedClassesSubstitutor.php │ │ └── Unserialize.php ├── composer │ ├── ClassLoader.php │ ├── InstalledVersions.php │ ├── LICENSE │ ├── autoload_classmap.php │ ├── autoload_files.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── autoload_static.php │ ├── installed.json │ └── installed.php ├── container-interop │ └── container-interop │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── docs │ │ ├── ContainerInterface-meta.md │ │ ├── ContainerInterface.md │ │ ├── Delegate-lookup-meta.md │ │ ├── Delegate-lookup.md │ │ └── images │ │ │ ├── interoperating_containers.png │ │ │ ├── priority.png │ │ │ └── side_by_side_containers.png │ │ └── src │ │ └── Interop │ │ └── Container │ │ ├── ContainerInterface.php │ │ └── Exception │ │ ├── ContainerException.php │ │ └── NotFoundException.php ├── php-di │ ├── invoker │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── doc │ │ │ └── parameter-resolvers.md │ │ └── src │ │ │ ├── CallableResolver.php │ │ │ ├── Exception │ │ │ ├── InvocationException.php │ │ │ ├── NotCallableException.php │ │ │ └── NotEnoughParametersException.php │ │ │ ├── Invoker.php │ │ │ ├── InvokerInterface.php │ │ │ ├── ParameterResolver │ │ │ ├── AssociativeArrayResolver.php │ │ │ ├── Container │ │ │ │ ├── ParameterNameContainerResolver.php │ │ │ │ └── TypeHintContainerResolver.php │ │ │ ├── DefaultValueResolver.php │ │ │ ├── NumericArrayResolver.php │ │ │ ├── ParameterResolver.php │ │ │ ├── ResolverChain.php │ │ │ └── TypeHintResolver.php │ │ │ └── Reflection │ │ │ └── CallableReflection.php │ ├── php-di │ │ ├── 404.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── change-log.md │ │ ├── composer.json │ │ ├── couscous.yml │ │ ├── phpunit.xml.dist │ │ └── src │ │ │ └── DI │ │ │ ├── Annotation │ │ │ ├── Inject.php │ │ │ └── Injectable.php │ │ │ ├── Cache │ │ │ └── ArrayCache.php │ │ │ ├── Container.php │ │ │ ├── ContainerBuilder.php │ │ │ ├── Debug.php │ │ │ ├── Definition │ │ │ ├── AliasDefinition.php │ │ │ ├── ArrayDefinition.php │ │ │ ├── ArrayDefinitionExtension.php │ │ │ ├── CacheableDefinition.php │ │ │ ├── DecoratorDefinition.php │ │ │ ├── Definition.php │ │ │ ├── Dumper │ │ │ │ └── ObjectDefinitionDumper.php │ │ │ ├── EntryReference.php │ │ │ ├── EnvironmentVariableDefinition.php │ │ │ ├── Exception │ │ │ │ ├── AnnotationException.php │ │ │ │ └── DefinitionException.php │ │ │ ├── FactoryDefinition.php │ │ │ ├── HasSubDefinition.php │ │ │ ├── Helper │ │ │ │ ├── ArrayDefinitionExtensionHelper.php │ │ │ │ ├── DefinitionHelper.php │ │ │ │ ├── EnvironmentVariableDefinitionHelper.php │ │ │ │ ├── FactoryDefinitionHelper.php │ │ │ │ ├── ObjectDefinitionHelper.php │ │ │ │ ├── StringDefinitionHelper.php │ │ │ │ └── ValueDefinitionHelper.php │ │ │ ├── InstanceDefinition.php │ │ │ ├── ObjectDefinition.php │ │ │ ├── ObjectDefinition │ │ │ │ ├── MethodInjection.php │ │ │ │ └── PropertyInjection.php │ │ │ ├── Resolver │ │ │ │ ├── ArrayResolver.php │ │ │ │ ├── DecoratorResolver.php │ │ │ │ ├── DefinitionResolver.php │ │ │ │ ├── EnvironmentVariableResolver.php │ │ │ │ ├── FactoryResolver.php │ │ │ │ ├── InstanceInjector.php │ │ │ │ ├── ObjectCreator.php │ │ │ │ ├── ParameterResolver.php │ │ │ │ ├── ResolverDispatcher.php │ │ │ │ └── SelfResolver.php │ │ │ ├── SelfResolvingDefinition.php │ │ │ ├── Source │ │ │ │ ├── AnnotationReader.php │ │ │ │ ├── Autowiring.php │ │ │ │ ├── CachedDefinitionSource.php │ │ │ │ ├── DefinitionArray.php │ │ │ │ ├── DefinitionFile.php │ │ │ │ ├── DefinitionSource.php │ │ │ │ ├── MutableDefinitionSource.php │ │ │ │ └── SourceChain.php │ │ │ ├── StringDefinition.php │ │ │ └── ValueDefinition.php │ │ │ ├── DependencyException.php │ │ │ ├── Factory │ │ │ └── RequestedEntry.php │ │ │ ├── FactoryInterface.php │ │ │ ├── Invoker │ │ │ ├── DefinitionParameterResolver.php │ │ │ └── FactoryParameterResolver.php │ │ │ ├── InvokerInterface.php │ │ │ ├── NotFoundException.php │ │ │ ├── Proxy │ │ │ └── ProxyFactory.php │ │ │ ├── Scope.php │ │ │ └── functions.php │ └── phpdoc-reader │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ └── PhpDocReader │ │ ├── AnnotationException.php │ │ ├── PhpDocReader.php │ │ └── PhpParser │ │ ├── TokenParser.php │ │ └── UseStatementParser.php ├── phpoption │ └── phpoption │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── composer.json │ │ └── src │ │ └── PhpOption │ │ ├── LazyOption.php │ │ ├── None.php │ │ ├── Option.php │ │ └── Some.php ├── psr │ └── container │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── ContainerExceptionInterface.php │ │ ├── ContainerInterface.php │ │ └── NotFoundExceptionInterface.php ├── scoper-autoload.php ├── symfony │ └── polyfill-ctype │ │ ├── Ctype.php │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bootstrap.php │ │ └── composer.json └── vlucas │ └── phpdotenv │ ├── LICENSE │ ├── composer.json │ └── src │ ├── Dotenv.php │ ├── Exception │ ├── ExceptionInterface.php │ ├── InvalidFileException.php │ ├── InvalidPathException.php │ └── ValidationException.php │ ├── Loader │ ├── Lines.php │ ├── Loader.php │ ├── LoaderInterface.php │ ├── Parser.php │ └── Value.php │ ├── Regex │ └── Regex.php │ ├── Repository │ ├── AbstractRepository.php │ ├── Adapter │ │ ├── ApacheAdapter.php │ │ ├── ArrayAdapter.php │ │ ├── AvailabilityInterface.php │ │ ├── EnvConstAdapter.php │ │ ├── PutenvAdapter.php │ │ ├── ReaderInterface.php │ │ ├── ServerConstAdapter.php │ │ └── WriterInterface.php │ ├── AdapterRepository.php │ ├── RepositoryBuilder.php │ └── RepositoryInterface.php │ ├── Result │ ├── Error.php │ ├── Result.php │ └── Success.php │ ├── Store │ ├── File │ │ ├── Paths.php │ │ └── Reader.php │ ├── FileStore.php │ ├── StoreBuilder.php │ ├── StoreInterface.php │ └── StringStore.php │ └── Validator.php ├── version-lite.php └── wp-migrate-db.php /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | -------------------------------------------------------------------------------- /class/Common/Addon/AddonManagerInterface.php: -------------------------------------------------------------------------------- 1 | dynamic_properties = DynamicProperties::getInstance(); 18 | } 19 | 20 | function set_cli_migration() 21 | { 22 | DynamicProperties::getInstance()->doing_cli_migration = true; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /class/Common/Db/MDBWPDB.php: -------------------------------------------------------------------------------- 1 | dbuser, $wpdb->dbpassword, $wpdb->dbname, $wpdb->dbhost ); 15 | 16 | // TODO: Determine if it's better to extend $wpdb or just rep some of its methods 17 | } 18 | 19 | /** 20 | * Find the first table name referenced in a query. 21 | * 22 | * @param string $query The query to search. 23 | * 24 | * @return string|false $table The table name found, or false if a table couldn't be found. 25 | */ 26 | public function get_table_from_query( $query ) { 27 | return parent::get_table_from_query( $query ); 28 | } 29 | 30 | /** 31 | * Strips any invalid characters from the query and caches the stripped query for later use 32 | * 33 | * @param string $query Query to convert. 34 | * 35 | * @return string|WP_Error The converted query, or a WP_Error object if the conversion fails. 36 | */ 37 | public function strip_invalid_text_from_query( $query ) { 38 | $query = apply_filters( 'wpmdb_before_strip_invalid_text_from_query', $query ); 39 | $fallback = false; 40 | if ( method_exists( $this, 'strip_invalid_text_from_query' ) ) { 41 | $query = parent::strip_invalid_text_from_query( $query ); 42 | $this->flush(); 43 | } else { 44 | $fallback = true; 45 | } 46 | $this->last_stripped_query = apply_filters( 'wpmdb_after_strip_invalid_text_from_query', $query, $fallback ); 47 | 48 | return $this->last_stripped_query; 49 | } 50 | 51 | /** 52 | * Determine if a query has invalid text. 53 | * 54 | * @param $query query to check 55 | * 56 | * @return bool 57 | */ 58 | public function query_has_invalid_text( $query ) { 59 | return ( $query !== $this->strip_invalid_text_from_query( $query ) ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /class/Common/DryRun/DiffGroup.php: -------------------------------------------------------------------------------- 1 | persistence = $persistence; 29 | } 30 | 31 | 32 | /** 33 | * @param $table 34 | */ 35 | public function setTable($table) 36 | { 37 | $this->table = $table; 38 | } 39 | 40 | 41 | /** 42 | * @param DiffEntity $entity 43 | */ 44 | public function addEntity(DiffEntity $entity) 45 | { 46 | $this->entities[] = $entity; 47 | } 48 | 49 | 50 | /** 51 | * @return DiffEntity[] 52 | */ 53 | public function getEntities() 54 | { 55 | return $this->entities; 56 | } 57 | 58 | 59 | /** 60 | * @return mixed 61 | */ 62 | public function getTable() 63 | { 64 | return $this->table; 65 | } 66 | 67 | 68 | /** 69 | * post-find/replace procedures. 70 | */ 71 | public function finalize() { 72 | $this->persistence->add($this); 73 | $this->persistence->store(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /class/Common/DryRun/DiffInterpreter.php: -------------------------------------------------------------------------------- 1 | group = $group; 20 | } 21 | 22 | 23 | /** 24 | * Computes string difference and adds the entity to the group if diff exists. 25 | * 26 | * @param DiffEntity $entity 27 | */ 28 | public function compute(DiffEntity $entity) 29 | { 30 | if (0 !== strcmp($entity->getOriginalExpression(), $entity->getReplaceExpression())) { 31 | $this->group->addEntity($entity); 32 | } 33 | } 34 | 35 | 36 | /** 37 | * post-find/replace procedures. 38 | */ 39 | public function finalize() { 40 | $this->group->finalize(); 41 | } 42 | 43 | 44 | /** 45 | * Returns array of diff entities with unmatching strings. 46 | * 47 | * @return DiffEntity[] 48 | */ 49 | public function results() { 50 | return $this->group->getEntities(); 51 | } 52 | 53 | /** 54 | * @return DiffGroup 55 | */ 56 | public function getGroup() 57 | { 58 | return $this->group; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /class/Common/DryRun/MemoryPersistence.php: -------------------------------------------------------------------------------- 1 | store[] = $group; 24 | } 25 | 26 | 27 | /** 28 | * @param array $options 29 | * 30 | * @return DiffGroup[] 31 | */ 32 | public function retrieve($options = []) 33 | { 34 | return $this->store; 35 | } 36 | 37 | public function store() 38 | { 39 | // TODO: Implement store() method. 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /class/Common/DryRun/PersistenceInterface.php: -------------------------------------------------------------------------------- 1 | get(Http::class); 17 | 18 | // WP_Error is thrown manually by remote_post() to tell us something went wrong 19 | if (is_wp_error($response)) { 20 | { 21 | return $http->end_ajax( 22 | $response 23 | ); 24 | } 25 | } 26 | 27 | $decoded_response = json_decode($response, true); 28 | 29 | if (false === $response || !$decoded_response['success']) { 30 | $http->end_ajax( 31 | new \WP_Error( 32 | $key, 33 | $decoded_response['data'] 34 | ) 35 | ); 36 | } 37 | 38 | if (isset($decoded_response['data'])) { 39 | return $decoded_response['data']; 40 | } 41 | 42 | // if($decoded_response['success'] === false){ 43 | // return $http->end_ajax( 44 | // 45 | // ) 46 | // } 47 | 48 | return $response; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /class/Common/Exceptions/EmptyPropertyException.php: -------------------------------------------------------------------------------- 1 | props = $props; 18 | } 19 | 20 | public function permission_callback() { 21 | $cap = is_multisite() ? 'manage_network_options' : 'export'; 22 | $cap = apply_filters( 'wpmdb_ajax_cap', $cap ); 23 | 24 | // Restrict endpoint to only users who have the edit_posts capability. 25 | if ( ! current_user_can( $cap ) ) { 26 | return new \WP_Error( 'rest_forbidden', esc_html__( 'Only authenticated users can access endpoint.', 'wp-migrate-db' ), [ 'status' => 401 ] ); 27 | } 28 | 29 | return true; 30 | } 31 | 32 | public function registerRestRoute( $end_point, $args ) { 33 | if ( ! isset( $args['permissions_callback'] ) ) { 34 | $args['permission_callback'] = [ $this, 'permission_callback' ]; 35 | } 36 | 37 | register_rest_route( $this->props->rest_api_base, $end_point, $args ); 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /class/Common/MF/Manager.php: -------------------------------------------------------------------------------- 1 | get(MediaFilesAddon::class); 20 | $media_files->register(); 21 | $media_files->set_licensed($licensed); 22 | 23 | $container->get(MediaFilesLocal::class)->register(); 24 | 25 | add_filter('wpmdb_addon_registered_mf', '__return_true'); 26 | 27 | return $media_files; 28 | } 29 | 30 | public function get_license_response_key() 31 | { 32 | return 'wp-migrate-db-pro-media-files'; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /class/Common/MigrationState/StateDataContainer.php: -------------------------------------------------------------------------------- 1 | state_data` usage throughout codebase 11 | * 12 | * Generally, state_data is set in MigrationStateManager::set_post_data(); 13 | * 14 | * @TODO In future, refactor usage of state_data globally 15 | * 16 | * @package DeliciousBrains\WPMDB\Common\MigrationState 17 | */ 18 | class StateDataContainer { 19 | use Singleton; 20 | 21 | public $state_data = []; 22 | public $migration_state_manager; 23 | 24 | public function __construct( ) { } 25 | 26 | public function setData( $data ) { 27 | $this->state_data = $data; 28 | } 29 | 30 | public function getData() { 31 | return $this->state_data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /class/Common/Properties/DynamicProperties.php: -------------------------------------------------------------------------------- 1 | file = $file; 17 | } 18 | 19 | /** 20 | * Handle job logic. 21 | */ 22 | public function handle() { 23 | return true; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /class/Common/Queue/Queue.php: -------------------------------------------------------------------------------- 1 | connection = $connection; 26 | } 27 | 28 | /** 29 | * Push a job onto the queue; 30 | * 31 | * @param Job $job 32 | * @param int $delay 33 | * 34 | * @return bool|int 35 | */ 36 | public function push( Job $job, $delay = 0 ) { 37 | return $this->connection->push( $job, $delay ); 38 | } 39 | 40 | /** 41 | * Create a cron worker. 42 | * 43 | * @param int $attempts 44 | * @param int $interval 45 | * 46 | * @return Cron 47 | */ 48 | public function cron( $attempts = 3, $interval = 5 ) { 49 | if ( is_null( $this->cron ) ) { 50 | $this->cron = new Cron( get_class( $this->connection ), $this->worker( $attempts ), $interval ); 51 | $this->cron->init(); 52 | } 53 | 54 | return $this->cron; 55 | } 56 | 57 | /** 58 | * Create a new worker. 59 | * 60 | * @param int $attempts 61 | * 62 | * @return Worker 63 | */ 64 | public function worker( $attempts ) { 65 | return new Worker( $this->connection, $attempts ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /class/Common/Queue/QueueManager.php: -------------------------------------------------------------------------------- 1 | new DatabaseConnection( $GLOBALS['wpdb'] ), 59 | 'redis' => new RedisConnection(), 60 | ); 61 | 62 | return apply_filters( 'wp_queue_connections', $connections ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /class/Common/Queue/Worker.php: -------------------------------------------------------------------------------- 1 | connection = $connection; 29 | $this->attempts = $attempts; 30 | } 31 | 32 | /** 33 | * Process a job on the queue. 34 | * 35 | * @return bool 36 | */ 37 | public function process() { 38 | $job = $this->connection->pop(); 39 | 40 | if ( ! $job ) { 41 | return false; 42 | } 43 | 44 | $exception = null; 45 | 46 | try { 47 | $job->handle(); 48 | } catch ( Exception $exception ) { 49 | $job->release(); 50 | } 51 | 52 | if ( $job->attempts() >= $this->attempts ) { 53 | if ( empty( $exception ) ) { 54 | $exception = new WorkerAttemptsExceededException(); 55 | } 56 | 57 | $job->fail(); 58 | } 59 | 60 | if ( $job->failed() ) { 61 | $this->connection->failure( $job, $exception ); 62 | } else if ( $job->released() ) { 63 | $this->connection->release( $job ); 64 | } else { 65 | $this->connection->delete( $job ); 66 | } 67 | 68 | return true; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /class/Common/Replace/AbstractReplacePair.php: -------------------------------------------------------------------------------- 1 | pattern = $pattern; 29 | $this->replace = $replace; 30 | } 31 | 32 | /** 33 | * @param string $subject 34 | * @return string 35 | */ 36 | public function apply($subject) 37 | { 38 | return $subject; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /class/Common/Replace/CaseInsensitivePair.php: -------------------------------------------------------------------------------- 1 | pattern, $this->replace, $subject); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /class/Common/Replace/CaseSensitivePair.php: -------------------------------------------------------------------------------- 1 | pattern, $this->replace, $subject); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /class/Common/Replace/PairFactory.php: -------------------------------------------------------------------------------- 1 | pattern, $this->replace, $subject); 20 | 21 | if (null !== $replaced) { 22 | return $replaced; 23 | } 24 | 25 | return $subject; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /class/Common/Replace/ReplacePairInterface.php: -------------------------------------------------------------------------------- 1 | get(ThemePluginFilesAddon::class); 19 | $theme_plugin->register(); 20 | $theme_plugin->set_licensed($licensed); 21 | 22 | $container->get(ThemePluginFilesLocal::class)->register(); 23 | 24 | add_filter('wpmdb_addon_registered_tpf', '__return_true'); 25 | 26 | return $theme_plugin; 27 | } 28 | 29 | public function get_license_response_key() 30 | { 31 | return 'wp-migrate-db-pro-theme-plugin-files'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /class/Common/Transfers/Abstracts/TransferManagerAbstract.php: -------------------------------------------------------------------------------- 1 | ajax_initiate_file_migration 47 | * 48 | */ 49 | public function manage_file_transfer($remote_url, $processed, $state_data) 50 | { 51 | if ('pull' === $state_data['intent']) { 52 | return $this->handle_pull($processed, $state_data, $remote_url); 53 | } 54 | if ('savefile' === $state_data['intent']) { 55 | return $this->handle_savefile($processed, $state_data); 56 | } 57 | 58 | return $this->handle_push($processed, $state_data, $remote_url); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /class/Common/Transfers/Files/Filters/FilterInterface.php: -------------------------------------------------------------------------------- 1 | ID, 'wpmdb_dismiss_' . $notice)) { 28 | return false; 29 | } 30 | 31 | $notice_links['dismiss'] = $notice; 32 | 33 | if ('SHOW_ONCE' === $dismissLink) { 34 | update_user_meta($current_user->ID, 'wpmdb_dismiss_' . $notice, true); 35 | } 36 | } 37 | 38 | if ($reminderTime) { 39 | $reminder_set = get_user_meta($current_user->ID, 'wpmdb_reminder_' . $notice, true); 40 | // 41 | if ($reminder_set) { 42 | if (strtotime('now') < $reminder_set) { 43 | return false; 44 | } 45 | } 46 | 47 | $notice_links['reminder'] = $notice; 48 | $notice_links['reminder_time'] = $reminderTime; 49 | } 50 | 51 | return (count($notice_links) > 0) ? $notice_links : true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /class/Common/Upgrades/Routines/RoutineInterface.php: -------------------------------------------------------------------------------- 1 | current_migration->forceHighPerformanceTransfers = true; 20 | } 21 | 22 | //If pro, update profiles with addons license status 23 | if (Util::isPro()) { 24 | $available_addons = WPMDBDI::getInstance()->get(\DeliciousBrains\WPMDB\Pro\License::class)->get_available_addons_list(get_current_user_id()); 25 | $licensed_array = $available_addons ? array_keys($available_addons) : []; 26 | 27 | if (property_exists($profile, 'media_files') && in_array('wp-migrate-db-pro-media-files', $licensed_array, 28 | true)) { 29 | $profile->media_files->is_licensed = true; 30 | } 31 | 32 | if (property_exists($profile, 'multisite_tools') && in_array('wp-migrate-db-pro-multisite-tools', 33 | $licensed_array, true)) { 34 | $profile->multisite_tools->is_licensed = true; 35 | } 36 | 37 | if (property_exists($profile, 'theme_plugin_files') && in_array('wp-migrate-db-pro-theme-plugin-files', 38 | $licensed_array, true)) { 39 | $profile->theme_plugin_files->is_licensed = true; 40 | } 41 | } 42 | } 43 | 44 | public function get_target_schema_version() 45 | { 46 | return "3.7.0"; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /class/Common/Upgrades/Routines/Routine_2_6_2.php: -------------------------------------------------------------------------------- 1 | current_migration->post_types_selected); 15 | 16 | if ($has_revision && in_array('exclude_post_revisions', $profile->current_migration->advanced_options_selected)) { 17 | $profile->current_migration->advanced_options_selected = array_diff($profile->current_migration->advanced_options_selected, ['exclude_post_revisions']); 18 | } 19 | //check exclude revisions if revision is not in the selected list 20 | if (!$has_revision && 'selected' === $profile->current_migration->post_types_option && !in_array('exclude_post_revisions', $profile->current_migration->advanced_options_selected)) { 21 | $profile->current_migration->advanced_options_selected[] = 'exclude_post_revisions'; 22 | } 23 | //remove revision from selected post type list 24 | if ($has_revision && in_array('revision', $profile->current_migration->post_types_selected)) { 25 | $profile->current_migration->post_types_selected = array_values(array_filter($profile->current_migration->post_types_selected, function($value) { return $value !== 'revision'; })); 26 | } 27 | } 28 | } 29 | 30 | public function get_target_schema_version() 31 | { 32 | return "3.8.0"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /class/Common/Util/Singleton.php: -------------------------------------------------------------------------------- 1 | classes[$key] = $instance; 33 | 34 | return $instance; 35 | } 36 | 37 | //For back-compat 38 | public function add($key, $instance) 39 | { 40 | return $this; 41 | } 42 | 43 | public function has($id) 44 | { 45 | if (!array_key_exists($id, $this->classes)) { 46 | return true; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | //For back-compat 53 | public function withArguments() 54 | { 55 | //NoOp 56 | } 57 | 58 | //For back-compat 59 | public function register() 60 | { 61 | //NoOp 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /class/Free/ClassMap.php: -------------------------------------------------------------------------------- 1 | free_plugin_manager = new PluginManager( 18 | $this->settings, 19 | $this->assets, 20 | $this->util, 21 | $this->table, 22 | $this->http, 23 | $this->filesystem, 24 | $this->multisite, 25 | $this->properties, 26 | $this->migration_helper, 27 | $this->WPMDBRestAPIServer, 28 | $this->http_helper, 29 | $this->template_base, 30 | $this->notice, 31 | $this->profile_manager, 32 | $this->upgrade_routines_manager 33 | ); 34 | 35 | $this->free_template = new Template( 36 | $this->settings, 37 | $this->util, 38 | $this->profile_manager, 39 | $this->filesystem, 40 | $this->table, 41 | $this->properties, 42 | $this->free_plugin_manager 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /class/Free/UI/Template.php: -------------------------------------------------------------------------------- 1 | plugin_manager = $plugin_manager; 31 | parent::__construct( $settings, $util, $profile, $filesystem, $table, $properties ); 32 | } 33 | 34 | public function register() 35 | { 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /class/SetupProviders.php: -------------------------------------------------------------------------------- 1 | maybeAddProvider( $class ); 27 | } 28 | 29 | if ( !empty( $this->providers ) ) { 30 | $classes = $this->classes; 31 | foreach ( $this->providers as $provider ) { 32 | $vars = get_object_vars( $provider ); 33 | foreach ( $vars as $prop => $var ) { 34 | if ( !\in_array( $var, $classes, true ) ) { 35 | $classes[$prop] = $var; 36 | } 37 | } 38 | } 39 | 40 | $this->classes = $classes; 41 | } 42 | } 43 | 44 | function maybeAddProvider( $class ) 45 | { 46 | if ( class_exists( $class ) ) { 47 | $this->providers[] = new $class; 48 | } 49 | } 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /class/WPMDBDI.php: -------------------------------------------------------------------------------- 1 | addDefinitions(__DIR__ . '/WPMDBDI_Config.php'); 22 | $containerBuilder->useAutowiring(false); 23 | $container = $containerBuilder->build(); 24 | 25 | return $container; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /class/WPMDBDI_Config.php: -------------------------------------------------------------------------------- 1 | setup($is_pro); 11 | 12 | $classes = []; 13 | 14 | if ($providers !== null) { 15 | foreach ($providers->classes as $key => $class) { 16 | if ($class === null) { 17 | continue; 18 | } 19 | // Access by classname ex. Properties::class 20 | $classes[get_class($class)] = function () use ($class) { 21 | return $class; 22 | }; 23 | // Access by 'shorthand' ex. 'properties' 24 | $classes[$key] = function () use ($class) { 25 | return $class; 26 | }; 27 | } 28 | } 29 | 30 | if ($is_pro) { 31 | DeliciousBrains\WPMDB\Pro\Compatibility\Layers\Addons\Addons::substitute_classes($classes); 32 | } 33 | 34 | if (!empty($classes)) { 35 | return $classes; 36 | } 37 | 38 | throw new Exception(__("Classmap could not be generated.", 'wp-migrate-db')); 39 | -------------------------------------------------------------------------------- /class/autoload.php: -------------------------------------------------------------------------------- 1 | =' ) ) { 14 | return; 15 | } 16 | 17 | $GLOBALS['wpmdb_compatibility']['active'] = true; 18 | 19 | if ( defined( 'WP_PLUGIN_DIR' ) ) { 20 | $plugins_dir = trailingslashit( WP_PLUGIN_DIR ); 21 | 22 | } else if ( defined( 'WPMU_PLUGIN_DIR' ) ) { 23 | $plugins_dir = trailingslashit( WPMU_PLUGIN_DIR ); 24 | 25 | } else if ( defined( 'WP_CONTENT_DIR' ) ) { 26 | $plugins_dir = trailingslashit( WP_CONTENT_DIR ) . 'plugins/'; 27 | 28 | } else { 29 | $plugins_dir = plugin_dir_path( __FILE__ ) . '../plugins/'; 30 | } 31 | 32 | $compat_class_path = 'class/Common/Compatibility/Compatibility.php'; 33 | $compat_class_name = 'DeliciousBrains\WPMDB\Common\Compatibility\Compatibility'; 34 | $wpmdbpro_compatibility_class = $plugins_dir . 'wp-migrate-db-pro/' . $compat_class_path; 35 | $wpmdb_compatibility_class = $plugins_dir . 'wp-migrate-db/' . $compat_class_path; 36 | 37 | if ( file_exists( $wpmdbpro_compatibility_class ) ) { 38 | include_once $wpmdbpro_compatibility_class; 39 | } elseif ( file_exists( $wpmdb_compatibility_class ) ) { 40 | include_once $wpmdb_compatibility_class; 41 | } 42 | 43 | if ( class_exists( $compat_class_name ) ) { 44 | $compatibility = new $compat_class_name; 45 | $compatibility->register(); 46 | } 47 | -------------------------------------------------------------------------------- /compatibility/wp-migrate-db-pro-compatibility.php-e: -------------------------------------------------------------------------------- 1 | =' ) ) { 14 | return; 15 | } 16 | 17 | $GLOBALS['wpmdb_compatibility']['active'] = true; 18 | 19 | if ( defined( 'WP_PLUGIN_DIR' ) ) { 20 | $plugins_dir = trailingslashit( WP_PLUGIN_DIR ); 21 | 22 | } else if ( defined( 'WPMU_PLUGIN_DIR' ) ) { 23 | $plugins_dir = trailingslashit( WPMU_PLUGIN_DIR ); 24 | 25 | } else if ( defined( 'WP_CONTENT_DIR' ) ) { 26 | $plugins_dir = trailingslashit( WP_CONTENT_DIR ) . 'plugins/'; 27 | 28 | } else { 29 | $plugins_dir = plugin_dir_path( __FILE__ ) . '../plugins/'; 30 | } 31 | 32 | $compat_class_path = 'class/Common/Compatibility/Compatibility.php'; 33 | $compat_class_name = 'DeliciousBrains\WPMDB\Common\Compatibility\Compatibility'; 34 | $wpmdbpro_compatibility_class = $plugins_dir . 'wp-migrate-db-pro/' . $compat_class_path; 35 | $wpmdb_compatibility_class = $plugins_dir . 'wp-migrate-db/' . $compat_class_path; 36 | 37 | if ( file_exists( $wpmdbpro_compatibility_class ) ) { 38 | include_once $wpmdbpro_compatibility_class; 39 | } elseif ( file_exists( $wpmdb_compatibility_class ) ) { 40 | include_once $wpmdb_compatibility_class; 41 | } 42 | 43 | if ( class_exists( $compat_class_name ) ) { 44 | $compatibility = new $compat_class_name; 45 | $compatibility->register(); 46 | } 47 | -------------------------------------------------------------------------------- /ext/wpmdb-ext-functions.php: -------------------------------------------------------------------------------- 1 | 'wp-migrate-db', 10 | 'plugin_basename' => plugin_basename( WPMDB_FILE ), 11 | ); 12 | 13 | require_once WPMDB_PATH . 'ext/PluginUpdater.php'; 14 | new \DeliciousBrains\WPMDB\Free\PluginUpdater( $properties ); 15 | } 16 | 17 | add_action( 'admin_init', 'wpmdb_check_for_upgrades' ); 18 | } 19 | -------------------------------------------------------------------------------- /frontend/build-free/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/build-free/index.html -------------------------------------------------------------------------------- /frontend/build-free/noop.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/build-free/noop.css -------------------------------------------------------------------------------- /frontend/build-free/noop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/build-free/noop.js -------------------------------------------------------------------------------- /frontend/build-free/static/js/393.7319be73e944.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | Copyright (c) 2018 Jed Watson. 3 | Licensed under the MIT License (MIT), see 4 | http://jedwatson.github.io/classnames 5 | */ 6 | -------------------------------------------------------------------------------- /frontend/build-free/static/js/970.d8ea5089c521.chunk.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackJSONPwpmdb=self.webpackJSONPwpmdb||[]).push([[970],{46970:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(52888),r=l(82511),a=l(45494),s=l(95274);const i=e=>{var t="exclude-files-".concat(e.type),l=e=>{var t=e.type,l=(0,r.d4)((e=>e.migrations)),i=l.current_migration,p=l.local_site,u=l.remote_site;return n.createElement("p",null,(0,s.Ay)((0,a.nv)((0,a.__)('Use gitignore patterns to exclude files relative to %s',"wp-migrate-db"),"https://deliciousbrains.com/wp-migrate-db-pro/doc/ignored-files/",(()=>{var e,l,n,r,a,s="pull"===i.intent,c=s?u:p,d=c.site_details,o=d.themes_path,m=d.plugins_path,g=d.muplugins_path,_=d.content_dir,h=s?c.path:c.this_path,v=(e,t)=>void 0===e?null:e.replace(t,"").replace(/^\/|\/$/g,"");switch(t){case"themes":return null!==(e=v(o,h))&&void 0!==e?e:"wp-content/themes";case"plugins":return null!==(l=v(m,h))&&void 0!==l?l:"wp-content/plugins";case"muplugins":return null!==(n=v(g,h))&&void 0!==n?n:"wp-content/mu-plugins";case"media":return null!==(r=v(s?c.wp_upload_dir:c.this_wp_upload_dir,h))&&void 0!==r?r:"wp-content/uploads";case"others":return null!==(a=v(_,h))&&void 0!==a?a:"wp-content";default:return""}})())))};return n.createElement(n.Fragment,null,n.createElement("h4",{className:"exclude-files-title",id:t},(0,s.Ay)((0,a.nv)((0,a.__)('Excluded Files %s',"wp-migrate-db"),e.type))),n.createElement(l,{type:e.type}),n.createElement("textarea",{onChange:t=>{e.excludesUpdater(t.target.value,e.type)},value:e.excludes||"","aria-labelledby":t}))}}}]); -------------------------------------------------------------------------------- /frontend/build-free/static/js/styles.55a1e3e50729.js: -------------------------------------------------------------------------------- 1 | "use strict";(self.webpackJSONPwpmdb=self.webpackJSONPwpmdb||[]).push([[869],{14162:()=>{},14962:()=>{},18956:()=>{},25894:()=>{},34260:()=>{},36792:()=>{},38751:()=>{},44319:()=>{},44848:()=>{},49442:()=>{},51784:()=>{},63387:()=>{},65870:()=>{},66310:()=>{},68906:()=>{},69094:()=>{},70237:()=>{},71673:()=>{},73814:()=>{},77482:()=>{},98603:()=>{}}]); -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-backup-database.c3c73850.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-export-database.52b56dcc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-import-database.40875856.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-locked.524d8e4b.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-pull.cb4ccd00.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-push.ebccd3b6.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/action-search-replace.9c9bf81f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/add-white.972fe87d.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/add.0e409332.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/addons-cli.acc2852c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/addons-mediafiles.ecedfa39.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/addons-other-files.eace2a2c.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/addons-plugin-files.0d01933a.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/addons-theme-plugins-files.cc98a300.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/arrow.992a73c2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/arrow.c76607c1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/calendar.2c8b6ac1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/check-circular.02c190e9.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/close.265fcfb5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/danger.e1678f77.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/downCircle.eb822116.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/equalCircle.0d086278.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/error.58f4992a.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/info.6957118a.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/license-checked-blue.c304fe20.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/migration-failed.5471ea63.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/oval-close.55372175.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/plusCircle.940ad8be.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/progress-section-check.2e9bfc60.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/progress-spinner.121400ac.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/question.c7be2b1a.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/rating-star-active.45821ac6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/search-replace-arrow.1795aa05.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/search-replace-casesensitive.874c1930.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/search-replace-regex.3cf90f8f.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/search-replace.92ae08a9.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/singlesite.e8b6fea0.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/status-error.26cffd9f.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/success.27b62f11.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/testimonial-avatar.309cd834.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/build-free/static/media/testimonial-avatar.309cd834.png -------------------------------------------------------------------------------- /frontend/build-free/static/media/twitter.0843a854.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/upCircle.01eb07ce.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/warning.57362294.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/build-free/static/media/wp-migrate-2-6-0.8d26599e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/build-free/static/media/wp-migrate-2-6-0.8d26599e.png -------------------------------------------------------------------------------- /frontend/mdb-2.0.js: -------------------------------------------------------------------------------- 1 | //NoOp 2 | -------------------------------------------------------------------------------- /frontend/plugin-update/plugin-update-styles.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["plugin-update-styles.scss"],"names":[],"mappings":"AAAA;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAMA;AAAA;EACC;;AAEA;AAAA;EACC;EACA;;AAGD;AAAA;EACC;EACA;;AAGD;AAAA;EACC;;AAKD;AAAA;EACC;;AAGD;AAAA;EACC;EACA;;;AAKH;AAAA;EAEC;EACA;;;AAGD;EACC","file":"plugin-update-styles.css"} -------------------------------------------------------------------------------- /frontend/plugin-update/plugin-update-styles.scss: -------------------------------------------------------------------------------- 1 | .check-licence-spinner { 2 | left: 5px; 3 | position: relative; 4 | top: 2px; 5 | margin-bottom: -2px; 6 | width: 16px; 7 | height: 16px; 8 | } 9 | 10 | .wpmdb-original-update-row { 11 | display: none; 12 | } 13 | 14 | .plugin-update-tr.wpmdbpro-custom-visible, 15 | .plugin-update-tr.wpmdbpro-custom { 16 | 17 | .update-message.pre-shiny-updates { 18 | padding-left: 40px; 19 | 20 | &::before { 21 | margin-left: -30px; 22 | float: left; 23 | } 24 | 25 | p { 26 | display: inline-block; 27 | margin: 0; 28 | } 29 | 30 | span { 31 | display: block; 32 | } 33 | } 34 | 35 | .update-message.post-shiny-updates p { 36 | &::before { 37 | position: absolute; 38 | } 39 | 40 | span { 41 | margin-left: 30px; 42 | display: block; 43 | } 44 | } 45 | &.legacy-addon .update-message p::before { 46 | content: "\f182"; 47 | } 48 | 49 | } 50 | 51 | 52 | .plugins #the-list tr.wpmdbpro-has-message td, 53 | .plugins #the-list tr.wpmdbpro-has-message th { 54 | box-shadow: none; 55 | -webkit-box-shadow: none; 56 | } 57 | 58 | .plugins .plugin-update-tr .wpmdb-compat-plugin-row-error .notice{ 59 | margin-top:0; 60 | } -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/public/index.html -------------------------------------------------------------------------------- /frontend/public/noop.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/public/noop.css -------------------------------------------------------------------------------- /frontend/public/noop.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/public/noop.js -------------------------------------------------------------------------------- /frontend/template/gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /frontend/template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/frontend/template/public/favicon.ico -------------------------------------------------------------------------------- /frontend/template/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 15 | 16 | 25 | React App 26 | 27 | 28 | 29 |
30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /frontend/template/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /frontend/template/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /frontend/template/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | class App extends Component { 6 | render() { 7 | return ( 8 |
9 |
10 | logo 11 |

12 | Edit src/App.js and save to reload. 13 |

14 | 20 | Learn React 21 | 22 |
23 |
24 | ); 25 | } 26 | } 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /frontend/template/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /frontend/template/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /frontend/template/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /languages/wp-migrate-db-pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/languages/wp-migrate-db-pt_BR.mo -------------------------------------------------------------------------------- /setup-plugin.php: -------------------------------------------------------------------------------- 1 | load(); 18 | } 19 | 20 | if (!defined('WPMDB_MINIMUM_WP_VERSION')) { 21 | define('WPMDB_MINIMUM_WP_VERSION', '5.2'); 22 | } 23 | 24 | if (!defined('WPMDB_MINIMUM_PHP_VERSION')) { 25 | define('WPMDB_MINIMUM_PHP_VERSION', '5.6'); 26 | } 27 | 28 | // Silence WP 6.2 Requests library autoloader deprecation warnings 29 | // https://make.wordpress.org/core/2023/03/08/requests-library-upgraded-to-2-0-5-in-wordpress-6-2/ 30 | if ( ! defined('REQUESTS_SILENCE_PSR0_DEPRECATIONS')) { 31 | define('REQUESTS_SILENCE_PSR0_DEPRECATIONS', true); 32 | } 33 | 34 | if (!class_exists('WPMDB_PHP_Checker')) { 35 | require_once $wpmdb_base_path . '/php-checker.php'; 36 | } 37 | 38 | $php_checker = new WPMDB_PHP_Checker(__FILE__, WPMDB_MINIMUM_PHP_VERSION); 39 | if (!$php_checker->is_compatible_check()) { 40 | register_activation_hook(__FILE__, array('WPMDB_PHP_Checker', 'wpmdb_pro_php_version_too_low')); 41 | } 42 | 43 | 44 | if (!function_exists('wpmdb_deactivate_other_instances')) { 45 | require_once $wpmdb_base_path . '/class/deactivate.php'; 46 | } 47 | 48 | add_action('activated_plugin', 'wpmdb_deactivate_other_instances'); 49 | add_action('wpmdb_migration_complete', 'wpmdb_deactivate_free_instance_after_migration', 10, 1); 50 | -------------------------------------------------------------------------------- /template/common/muplugin-failed-update-warning.php: -------------------------------------------------------------------------------- 1 | Compatibility Plugin Update Failed — ', 'wp-migrate-db'); 4 | _e('We could not update the Compatibility Mode plugin because the mu-plugins folder is not writable. Please update the permissions of the mu-plugins folder to enable Compatibility Mode. ', 'wp-migrate-db'); 5 | ?> 6 | 7 | -------------------------------------------------------------------------------- /template/options-page-outdated-wp.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |

7 | 8 |

plugin_manager->get_plugin_title()); ?>

9 | 10 |

11 | My Account.', 15 | 'wp-migrate-db' 16 | ), 17 | esc_html($this->plugin_manager->get_plugin_title()), 18 | WPMDB_MINIMUM_WP_VERSION, 19 | 'https://deliciousbrains.com/my-account/?utm_campaign=support%2Bdocs&utm_source=MDB%2BPaid&utm_medium=insideplugin' 20 | ) 21 | ?> 22 |

23 |
24 | -------------------------------------------------------------------------------- /template/options-tools-subsite.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |

7 | 8 |

plugin_manager->get_plugin_title() ); ?>

10 | 11 |

plugin_manager->get_plugin_title() ), sprintf( '"%s"', esc_url( network_admin_url( 'settings.php?page=' . $this->props->core_slug ) ), esc_html( $this->plugin_manager->get_plugin_title() ) ) ); ?>

12 |
13 | -------------------------------------------------------------------------------- /template/options.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | util->set_time_limit_available() && !$hide_warning) { 9 | ?> 10 |
11 | PHP Function Disabled — The set_time_limit() function is currently disabled on your server. We use this function to ensure that the migration doesn't time out. We haven't disabled the plugin however, so you're free to cross your fingers and hope for the best. You may want to contact your web host to enable this function.", 'wp-migrate-db'); 13 | if (function_exists('ini_get')) { 14 | printf(__('Your current PHP run time limit is set to %s seconds.', 'wp-migrate-db'), ini_get('max_execution_time')); 15 | } ?> 16 |
17 | 20 | 21 |
22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | = 70000) { 18 | return \unserialize($serialized, $options); 19 | } 20 | if (!\array_key_exists('allowed_classes', $options) || \true === $options['allowed_classes']) { 21 | return \unserialize($serialized); 22 | } 23 | $allowedClasses = $options['allowed_classes']; 24 | if (\false === $allowedClasses) { 25 | $allowedClasses = array(); 26 | } 27 | if (!\is_array($allowedClasses)) { 28 | $allowedClasses = array(); 29 | \trigger_error('unserialize(): allowed_classes option should be array or boolean', \E_USER_WARNING); 30 | } 31 | $worker = new DisallowedClassesSubstitutor($serialized, $allowedClasses); 32 | return \unserialize($worker->getSubstitutedSerialized()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 10 | 'dbi_mdb_bbf73f3db644d3dced353b837903e74c' => $vendorDir . '/php-di/php-di/src/DI/functions.php', 11 | ); 12 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/symfony/polyfill-ctype'), 10 | 'DeliciousBrains\\WPMDB\\Container\\Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 11 | 'DeliciousBrains\\WPMDB\\Container\\PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'), 12 | 'DeliciousBrains\\WPMDB\\Container\\PhpDocReader\\' => array($vendorDir . '/php-di/phpdoc-reader/src/PhpDocReader'), 13 | 'DeliciousBrains\\WPMDB\\Container\\Invoker\\' => array($vendorDir . '/php-di/invoker/src'), 14 | 'DeliciousBrains\\WPMDB\\Container\\Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'), 15 | 'DeliciousBrains\\WPMDB\\Container\\Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), 16 | 'DeliciousBrains\\WPMDB\\Container\\DI\\' => array($vendorDir . '/php-di/php-di/src/DI'), 17 | 'DeliciousBrains\\WPMDB\\Container\\Brumann\\Polyfill\\' => array($vendorDir . '/brumann/polyfill-unserialize/src'), 18 | ); 19 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 33 | 34 | $filesToLoad = \Composer\Autoload\ComposerStaticInitc3a9210a8f67f3c808c5ed9072cde06b::$files; 35 | $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 36 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 37 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 38 | 39 | require $file; 40 | } 41 | }, null, null); 42 | foreach ($filesToLoad as $fileIdentifier => $file) { 43 | $requireFile($fileIdentifier, $file); 44 | } 45 | 46 | return $loader; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 container-interop 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "container-interop\/container-interop", 3 | "type": "library", 4 | "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", 5 | "homepage": "https:\/\/github.com\/container-interop\/container-interop", 6 | "license": "MIT", 7 | "autoload": { 8 | "psr-4": { 9 | "DeliciousBrains\\WPMDB\\Container\\Interop\\Container\\": "src\/Interop\/Container\/" 10 | } 11 | }, 12 | "require": { 13 | "psr\/container": "^1.0" 14 | } 15 | } -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/docs/images/interoperating_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/vendor/container-interop/container-interop/docs/images/interoperating_containers.png -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/docs/images/priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/vendor/container-interop/container-interop/docs/images/priority.png -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/docs/images/side_by_side_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deliciousbrains/wp-migrate-db/cc252faa607c49ba7647d9f6b75d4b9146a87bda/vendor/container-interop/container-interop/docs/images/side_by_side_containers.png -------------------------------------------------------------------------------- /vendor/container-interop/container-interop/src/Interop/Container/ContainerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class InvocationException extends \Exception 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/Exception/NotCallableException.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class NotCallableException extends InvocationException 11 | { 12 | /** 13 | * @param string $value 14 | * @param bool $containerEntry 15 | * @return self 16 | */ 17 | public static function fromInvalidCallable($value, $containerEntry = \false) 18 | { 19 | if (\is_object($value)) { 20 | $message = \sprintf('Instance of %s is not a callable', \get_class($value)); 21 | } elseif (\is_array($value) && isset($value[0]) && isset($value[1])) { 22 | $class = \is_object($value[0]) ? \get_class($value[0]) : $value[0]; 23 | $extra = \method_exists($class, '__call') ? ' A __call() method exists but magic methods are not supported.' : ''; 24 | $message = \sprintf('%s::%s() is not a callable.%s', $class, $value[1], $extra); 25 | } else { 26 | if ($containerEntry) { 27 | $message = \var_export($value, \true) . ' is neither a callable nor a valid container entry'; 28 | } else { 29 | $message = \var_export($value, \true) . ' is not a callable'; 30 | } 31 | } 32 | return new self($message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/Exception/NotEnoughParametersException.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class NotEnoughParametersException extends InvocationException 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/InvokerInterface.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | interface InvokerInterface 14 | { 15 | /** 16 | * Call the given function using the given parameters. 17 | * 18 | * @param callable $callable Function to call. 19 | * @param array $parameters Parameters to use. 20 | * 21 | * @return mixed Result of the function. 22 | * 23 | * @throws InvocationException Base exception class for all the sub-exceptions below. 24 | * @throws NotCallableException 25 | * @throws NotEnoughParametersException 26 | */ 27 | public function call($callable, array $parameters = array()); 28 | } 29 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php: -------------------------------------------------------------------------------- 1 | call($callable, ['foo' => 'bar'])` will inject the string `'bar'` 10 | * in the parameter named `$foo`. 11 | * 12 | * Parameters that are not indexed by a string are ignored. 13 | * 14 | * @author Matthieu Napoli 15 | */ 16 | class AssociativeArrayResolver implements ParameterResolver 17 | { 18 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 19 | { 20 | $parameters = $reflection->getParameters(); 21 | // Skip parameters already resolved 22 | if (!empty($resolvedParameters)) { 23 | $parameters = \array_diff_key($parameters, $resolvedParameters); 24 | } 25 | foreach ($parameters as $index => $parameter) { 26 | if (\array_key_exists($parameter->name, $providedParameters)) { 27 | $resolvedParameters[$index] = $providedParameters[$parameter->name]; 28 | } 29 | } 30 | return $resolvedParameters; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class ParameterNameContainerResolver implements ParameterResolver 14 | { 15 | /** 16 | * @var ContainerInterface 17 | */ 18 | private $container; 19 | /** 20 | * @param ContainerInterface $container The container to get entries from. 21 | */ 22 | public function __construct(ContainerInterface $container) 23 | { 24 | $this->container = $container; 25 | } 26 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 27 | { 28 | $parameters = $reflection->getParameters(); 29 | // Skip parameters already resolved 30 | if (!empty($resolvedParameters)) { 31 | $parameters = \array_diff_key($parameters, $resolvedParameters); 32 | } 33 | foreach ($parameters as $index => $parameter) { 34 | $name = $parameter->name; 35 | if ($name && $this->container->has($name)) { 36 | $resolvedParameters[$index] = $this->container->get($name); 37 | } 38 | } 39 | return $resolvedParameters; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class TypeHintContainerResolver implements ParameterResolver 14 | { 15 | /** 16 | * @var ContainerInterface 17 | */ 18 | private $container; 19 | /** 20 | * @param ContainerInterface $container The container to get entries from. 21 | */ 22 | public function __construct(ContainerInterface $container) 23 | { 24 | $this->container = $container; 25 | } 26 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 27 | { 28 | $parameters = $reflection->getParameters(); 29 | // Skip parameters already resolved 30 | if (!empty($resolvedParameters)) { 31 | $parameters = \array_diff_key($parameters, $resolvedParameters); 32 | } 33 | foreach ($parameters as $index => $parameter) { 34 | $parameterClass = $parameter->getClass(); 35 | if ($parameterClass && $this->container->has($parameterClass->name)) { 36 | $resolvedParameters[$index] = $this->container->get($parameterClass->name); 37 | } 38 | } 39 | return $resolvedParameters; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/DefaultValueResolver.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class DefaultValueResolver implements ParameterResolver 13 | { 14 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 15 | { 16 | $parameters = $reflection->getParameters(); 17 | // Skip parameters already resolved 18 | if (!empty($resolvedParameters)) { 19 | $parameters = \array_diff_key($parameters, $resolvedParameters); 20 | } 21 | foreach ($parameters as $index => $parameter) { 22 | /** @var \ReflectionParameter $parameter */ 23 | if ($parameter->isOptional()) { 24 | try { 25 | $resolvedParameters[$index] = $parameter->getDefaultValue(); 26 | } catch (ReflectionException $e) { 27 | // Can't get default values from PHP internal classes and functions 28 | } 29 | } 30 | } 31 | return $resolvedParameters; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/NumericArrayResolver.php: -------------------------------------------------------------------------------- 1 | call($callable, ['foo', 'bar'])` will simply resolve the parameters 11 | * to `['foo', 'bar']`. 12 | * 13 | * Parameters that are not indexed by a number (i.e. parameter position) 14 | * will be ignored. 15 | * 16 | * @author Matthieu Napoli 17 | */ 18 | class NumericArrayResolver implements ParameterResolver 19 | { 20 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 21 | { 22 | // Skip parameters already resolved 23 | if (!empty($resolvedParameters)) { 24 | $providedParameters = \array_diff_key($providedParameters, $resolvedParameters); 25 | } 26 | foreach ($providedParameters as $key => $value) { 27 | if (\is_int($key)) { 28 | $resolvedParameters[$key] = $value; 29 | } 30 | } 31 | return $resolvedParameters; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/ParameterResolver.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface ParameterResolver 12 | { 13 | /** 14 | * Resolves the parameters to use to call the callable. 15 | * 16 | * `$resolvedParameters` contains parameters that have already been resolved. 17 | * 18 | * Each ParameterResolver must resolve parameters that are not already 19 | * in `$resolvedParameters`. That allows to chain multiple ParameterResolver. 20 | * 21 | * @param ReflectionFunctionAbstract $reflection Reflection object for the callable. 22 | * @param array $providedParameters Parameters provided by the caller. 23 | * @param array $resolvedParameters Parameters resolved (indexed by parameter position). 24 | * 25 | * @return array 26 | */ 27 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters); 28 | } 29 | -------------------------------------------------------------------------------- /vendor/php-di/invoker/src/ParameterResolver/TypeHintResolver.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class TypeHintResolver implements ParameterResolver 15 | { 16 | public function getParameters(ReflectionFunctionAbstract $reflection, array $providedParameters, array $resolvedParameters) 17 | { 18 | $parameters = $reflection->getParameters(); 19 | // Skip parameters already resolved 20 | if (!empty($resolvedParameters)) { 21 | $parameters = \array_diff_key($parameters, $resolvedParameters); 22 | } 23 | foreach ($parameters as $index => $parameter) { 24 | $parameterClass = $parameter->getClass(); 25 | if ($parameterClass && \array_key_exists($parameterClass->name, $providedParameters)) { 26 | $resolvedParameters[$index] = $providedParameters[$parameterClass->name]; 27 | } 28 | } 29 | return $resolvedParameters; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: 404 3 | --- 4 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | [![Build Status](https://travis-ci.org/PHP-DI/PHP-DI.png?branch=master)](https://travis-ci.org/PHP-DI/PHP-DI) [![Coverage Status](https://coveralls.io/repos/PHP-DI/PHP-DI/badge.png?branch=master)](https://coveralls.io/r/PHP-DI/PHP-DI?branch=master) 4 | 5 | PHP-DI is licensed under the MIT License. 6 | 7 | 8 | ## Set up 9 | 10 | * Check out the sources using git or download them 11 | 12 | ```bash 13 | $ git clone https://github.com/PHP-DI/PHP-DI.git 14 | ``` 15 | 16 | * Install the libraries using composer: 17 | 18 | ```bash 19 | $ curl -s http://getcomposer.org/installer | php 20 | $ php composer.phar install 21 | ``` 22 | 23 | If you are running Windows or are having trouble, read [the official documentation](http://getcomposer.org/doc/00-intro.md#installation). 24 | 25 | 26 | ## Run the tests 27 | 28 | The tests are run with [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html): 29 | 30 | ```bash 31 | $ phpunit 32 | ``` 33 | 34 | 35 | ## Learning the internals 36 | 37 | Read the [How it works](doc/how-it-works.md) documentation. 38 | 39 | 40 | ## What to do? 41 | 42 | - Add tests: pick up uncovered situations in the [code coverage report](https://coveralls.io/r/PHP-DI/PHP-DI) 43 | - Resolve issues: [issue list](https://github.com/PHP-DI/PHP-DI/issues) 44 | - Improve the documentation 45 | - … 46 | 47 | 48 | ## Coding style 49 | 50 | The code follows PSR0, PSR1 and [PSR2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). 51 | 52 | Also, do not hesitate to add your name to the author list of a class in the docblock if you improve it. 53 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/LICENSE: -------------------------------------------------------------------------------- 1 | PHP-DI - PHP Dependency Injection 2 | 3 | Copyright (C) Matthieu Napoli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 6 | associated documentation files (the "Software"), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | --- 4 | 5 | [![](doc/img.png)](http://php-di.org/) 6 | 7 | [![Build Status](https://img.shields.io/travis/PHP-DI/PHP-DI.svg?style=flat-square)](https://travis-ci.org/PHP-DI/PHP-DI) 8 | [![HHVM Status](https://img.shields.io/hhvm/php-di/php-di.svg?style=flat-square)](http://hhvm.h4cc.de/package/php-di/php-di) 9 | [![Coverage Status](https://img.shields.io/coveralls/PHP-DI/PHP-DI/master.svg?style=flat-square)](https://coveralls.io/r/PHP-DI/PHP-DI?branch=master) 10 | [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/PHP-DI/PHP-DI.svg?style=flat-square)](https://scrutinizer-ci.com/g/PHP-DI/PHP-DI/?branch=master) 11 | [![Downloads per months](https://img.shields.io/packagist/dm/PHP-DI/PHP-DI.svg?style=flat-square)](https://packagist.org/packages/PHP-DI/PHP-DI) 12 | [![Total downloads](https://img.shields.io/packagist/dt/PHP-DI/PHP-DI.svg?style=flat-square)](https://packagist.org/packages/PHP-DI/PHP-DI) 13 | 14 | [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/PHP-DI/PHP-DI.svg)](http://isitmaintained.com/project/PHP-DI/PHP-DI "Average time to resolve an issue") 15 | [![Percentage of issues still open](http://isitmaintained.com/badge/open/PHP-DI/PHP-DI.svg)](http://isitmaintained.com/project/PHP-DI/PHP-DI "Percentage of issues still open") 16 | 17 | PHP-DI is a dependency injection container meant to be practical, powerful, and framework-agnostic. 18 | 19 | Read more on the website: **[php-di.org](http://php-di.org)** 20 | 21 | Join us in the Gitter chat room: [![Gitter chat](https://badges.gitter.im/PHP-DI/PHP-DI.png)](https://gitter.im/PHP-DI/PHP-DI) 22 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "php-di\/php-di", 3 | "type": "library", 4 | "description": "The dependency injection container for humans", 5 | "keywords": [ 6 | "di", 7 | "dependency injection", 8 | "container" 9 | ], 10 | "homepage": "http:\/\/php-di.org\/", 11 | "license": "MIT", 12 | "autoload": { 13 | "psr-4": { 14 | "DeliciousBrains\\WPMDB\\Container\\DI\\": "src\/DI\/" 15 | }, 16 | "files": [ 17 | "src\/DI\/functions.php" 18 | ] 19 | }, 20 | "autoload-dev": { 21 | "psr-4": { 22 | "DeliciousBrains\\WPMDB\\Container\\DI\\Test\\IntegrationTest\\": "tests\/IntegrationTest\/", 23 | "DeliciousBrains\\WPMDB\\Container\\DI\\Test\\UnitTest\\": "tests\/UnitTest\/" 24 | } 25 | }, 26 | "scripts": { 27 | "test": "phpunit" 28 | }, 29 | "require": { 30 | "php": ">=5.5.0", 31 | "container-interop\/container-interop": "~1.0", 32 | "php-di\/invoker": "^1.3.2", 33 | "php-di\/phpdoc-reader": "^2.0.1" 34 | }, 35 | "require-dev": { 36 | "phpunit\/phpunit": "~4.5", 37 | "mnapoli\/phpunit-easymock": "~0.2.0", 38 | "doctrine\/cache": "~1.4", 39 | "doctrine\/annotations": "~1.2", 40 | "ocramius\/proxy-manager": "~1.0|~2.0" 41 | }, 42 | "replace": { 43 | "mnapoli\/php-di": "*" 44 | }, 45 | "provide": { 46 | "container-interop\/container-interop-implementation": "^1.0" 47 | }, 48 | "suggest": { 49 | "doctrine\/cache": "Install it if you want to use the cache (version ~1.4)", 50 | "doctrine\/annotations": "Install it if you want to use annotations (version ~1.2)", 51 | "ocramius\/proxy-manager": "Install it if you want to use lazy injection (version ~1.0 or ~2.0)" 52 | } 53 | } -------------------------------------------------------------------------------- /vendor/php-di/php-di/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 14 | 15 | 16 | 17 | ./tests/UnitTest/ 18 | 19 | 20 | ./tests/IntegrationTest/ 21 | 22 | 23 | 24 | 25 | 26 | src 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Annotation/Injectable.php: -------------------------------------------------------------------------------- 1 | 16 | * @author Matthieu Napoli 17 | */ 18 | final class Injectable 19 | { 20 | /** 21 | * The scope of an class: prototype, singleton. 22 | * @var string|null 23 | */ 24 | private $scope; 25 | /** 26 | * Should the object be lazy-loaded. 27 | * @var bool|null 28 | */ 29 | private $lazy; 30 | /** 31 | * @param array $values 32 | */ 33 | public function __construct(array $values) 34 | { 35 | if (isset($values['scope'])) { 36 | if ($values['scope'] === 'prototype') { 37 | $this->scope = Scope::PROTOTYPE; 38 | } elseif ($values['scope'] === 'singleton') { 39 | $this->scope = Scope::SINGLETON; 40 | } else { 41 | throw new UnexpectedValueException(\sprintf("Value '%s' is not a valid scope", $values['scope'])); 42 | } 43 | } 44 | if (isset($values['lazy'])) { 45 | $this->lazy = (bool) $values['lazy']; 46 | } 47 | } 48 | /** 49 | * @return string|null 50 | */ 51 | public function getScope() 52 | { 53 | return $this->scope; 54 | } 55 | /** 56 | * @return bool|null 57 | */ 58 | public function isLazy() 59 | { 60 | return $this->lazy; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Debug.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class Debug 12 | { 13 | /** 14 | * Dump the definition to a string. 15 | * 16 | * @return string 17 | * 18 | * @deprecated You should cast the definition to string instead. 19 | * This feature was simplified: definitions can be cast to string directly. 20 | */ 21 | public static function dumpDefinition(Definition $definition) 22 | { 23 | return (string) $definition; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class AliasDefinition implements CacheableDefinition, SelfResolvingDefinition 13 | { 14 | /** 15 | * Entry name. 16 | * @var string 17 | */ 18 | private $name; 19 | /** 20 | * Name of the target entry. 21 | * @var string 22 | */ 23 | private $targetEntryName; 24 | /** 25 | * @param string $name Entry name 26 | * @param string $targetEntryName Name of the target entry 27 | */ 28 | public function __construct($name, $targetEntryName) 29 | { 30 | $this->name = $name; 31 | $this->targetEntryName = $targetEntryName; 32 | } 33 | /** 34 | * @return string Entry name 35 | */ 36 | public function getName() 37 | { 38 | return $this->name; 39 | } 40 | /** 41 | * {@inheritdoc} 42 | */ 43 | public function getScope() 44 | { 45 | return Scope::PROTOTYPE; 46 | } 47 | /** 48 | * @return string 49 | */ 50 | public function getTargetEntryName() 51 | { 52 | return $this->targetEntryName; 53 | } 54 | public function resolve(ContainerInterface $container) 55 | { 56 | return $container->get($this->getTargetEntryName()); 57 | } 58 | public function isResolvable(ContainerInterface $container) 59 | { 60 | return $container->has($this->getTargetEntryName()); 61 | } 62 | public function __toString() 63 | { 64 | return \sprintf('get(%s)', $this->targetEntryName); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/ArrayDefinitionExtension.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ArrayDefinitionExtension extends ArrayDefinition implements HasSubDefinition 13 | { 14 | /** 15 | * @var ArrayDefinition 16 | */ 17 | private $subDefinition; 18 | /** 19 | * {@inheritdoc} 20 | */ 21 | public function getValues() 22 | { 23 | if (!$this->subDefinition) { 24 | return parent::getValues(); 25 | } 26 | return \array_merge($this->subDefinition->getValues(), parent::getValues()); 27 | } 28 | /** 29 | * @return string 30 | */ 31 | public function getSubDefinitionName() 32 | { 33 | return $this->getName(); 34 | } 35 | /** 36 | * {@inheritdoc} 37 | */ 38 | public function setSubDefinition(Definition $definition) 39 | { 40 | if (!$definition instanceof ArrayDefinition) { 41 | throw new DefinitionException(\sprintf('Definition %s tries to add array entries but the previous definition is not an array', $this->getName())); 42 | } 43 | $this->subDefinition = $definition; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/CacheableDefinition.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | interface CacheableDefinition extends Definition 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/DecoratorDefinition.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class DecoratorDefinition extends FactoryDefinition implements Definition, HasSubDefinition 12 | { 13 | /** 14 | * @var Definition 15 | */ 16 | private $decorated; 17 | /** 18 | * @return string 19 | */ 20 | public function getSubDefinitionName() 21 | { 22 | return $this->getName(); 23 | } 24 | /** 25 | * @param Definition $definition 26 | */ 27 | public function setSubDefinition(Definition $definition) 28 | { 29 | $this->decorated = $definition; 30 | } 31 | /** 32 | * @return Definition 33 | */ 34 | public function getDecoratedDefinition() 35 | { 36 | return $this->decorated; 37 | } 38 | public function __toString() 39 | { 40 | return 'Decorate(' . $this->getSubDefinitionName() . ')'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Definition.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface Definition extends RequestedEntry 12 | { 13 | /** 14 | * Returns the name of the entry in the container. 15 | * 16 | * @return string 17 | */ 18 | public function getName(); 19 | /** 20 | * Returns the scope of the entry. 21 | * 22 | * @return string 23 | */ 24 | public function getScope(); 25 | /** 26 | * Definitions can be cast to string for debugging information. 27 | * 28 | * This method is not enforced by the interface yet for backward 29 | * compatibility. 30 | */ 31 | // public function __toString(); 32 | } 33 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/EntryReference.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class EntryReference implements DefinitionHelper 14 | { 15 | /** 16 | * Entry name. 17 | * @var string 18 | */ 19 | private $name; 20 | /** 21 | * @param string $entryName Entry name 22 | */ 23 | public function __construct($entryName) 24 | { 25 | $this->name = $entryName; 26 | } 27 | /** 28 | * @return string Entry name 29 | */ 30 | public function getName() 31 | { 32 | return $this->name; 33 | } 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | public function getDefinition($entryName) 38 | { 39 | return new AliasDefinition($entryName, $this->name); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Exception/AnnotationException.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class AnnotationException extends DefinitionException 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Exception/DefinitionException.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class DefinitionException extends \Exception 12 | { 13 | public static function create(Definition $definition, $message) 14 | { 15 | return new self(\sprintf('%s' . \PHP_EOL . 'Full definition:' . \PHP_EOL . '%s', $message, (string) $definition)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/HasSubDefinition.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | interface HasSubDefinition extends Definition 11 | { 12 | /** 13 | * @return string 14 | */ 15 | public function getSubDefinitionName(); 16 | /** 17 | * @param Definition $definition 18 | */ 19 | public function setSubDefinition(Definition $definition); 20 | } 21 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Helper/ArrayDefinitionExtensionHelper.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class ArrayDefinitionExtensionHelper implements DefinitionHelper 15 | { 16 | /** 17 | * @var array 18 | */ 19 | private $values = []; 20 | /** 21 | * @param array $values Values to add to the array. 22 | */ 23 | public function __construct(array $values) 24 | { 25 | $this->values = $values; 26 | } 27 | /** 28 | * @param string $entryName Container entry name 29 | * 30 | * @return ArrayDefinitionExtension 31 | */ 32 | public function getDefinition($entryName) 33 | { 34 | return new ArrayDefinitionExtension($entryName, $this->values); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Helper/DefinitionHelper.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | interface DefinitionHelper 11 | { 12 | /** 13 | * @param string $entryName Container entry name 14 | * @return \DI\Definition\Definition 15 | */ 16 | public function getDefinition($entryName); 17 | } 18 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Helper/StringDefinitionHelper.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class StringDefinitionHelper implements DefinitionHelper 11 | { 12 | /** 13 | * @var string 14 | */ 15 | private $expression; 16 | public function __construct($expression) 17 | { 18 | $this->expression = $expression; 19 | } 20 | /** 21 | * @param string $entryName Container entry name 22 | * 23 | * @return StringDefinition 24 | */ 25 | public function getDefinition($entryName) 26 | { 27 | return new StringDefinition($entryName, $this->expression); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Helper/ValueDefinitionHelper.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class ValueDefinitionHelper implements DefinitionHelper 12 | { 13 | /** 14 | * @var mixed 15 | */ 16 | private $value; 17 | /** 18 | * @param mixed $value 19 | */ 20 | public function __construct($value) 21 | { 22 | $this->value = $value; 23 | } 24 | /** 25 | * @param string $entryName Container entry name 26 | * @return ValueDefinition 27 | */ 28 | public function getDefinition($entryName) 29 | { 30 | return new ValueDefinition($entryName, $this->value); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/InstanceDefinition.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class InstanceDefinition implements Definition 13 | { 14 | /** 15 | * Instance on which to inject dependencies. 16 | * 17 | * @var object 18 | */ 19 | private $instance; 20 | /** 21 | * @var ObjectDefinition 22 | */ 23 | private $objectDefinition; 24 | /** 25 | * @param object $instance 26 | * @param ObjectDefinition $objectDefinition 27 | */ 28 | public function __construct($instance, ObjectDefinition $objectDefinition) 29 | { 30 | $this->instance = $instance; 31 | $this->objectDefinition = $objectDefinition; 32 | } 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function getName() 37 | { 38 | // Name are superfluous for instance definitions 39 | return ''; 40 | } 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function getScope() 45 | { 46 | return Scope::PROTOTYPE; 47 | } 48 | /** 49 | * @return object 50 | */ 51 | public function getInstance() 52 | { 53 | return $this->instance; 54 | } 55 | /** 56 | * @return ObjectDefinition 57 | */ 58 | public function getObjectDefinition() 59 | { 60 | return $this->objectDefinition; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/ObjectDefinition/PropertyInjection.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PropertyInjection 11 | { 12 | /** 13 | * Property name. 14 | * @var string 15 | */ 16 | private $propertyName; 17 | /** 18 | * Value that should be injected in the property. 19 | * @var mixed 20 | */ 21 | private $value; 22 | /** 23 | * Use for injecting in properties of parent classes: the class name 24 | * must be the name of the parent class because private properties 25 | * can be attached to the parent classes, not the one we are resolving. 26 | * @var string|null 27 | */ 28 | private $className; 29 | /** 30 | * @param string $propertyName Property name 31 | * @param mixed $value Value that should be injected in the property 32 | * @param string|null $className 33 | */ 34 | public function __construct($propertyName, $value, $className = null) 35 | { 36 | $this->propertyName = (string) $propertyName; 37 | $this->value = $value; 38 | $this->className = $className; 39 | } 40 | /** 41 | * @return string Property name 42 | */ 43 | public function getPropertyName() 44 | { 45 | return $this->propertyName; 46 | } 47 | /** 48 | * @return mixed Value that should be injected in the property 49 | */ 50 | public function getValue() 51 | { 52 | return $this->value; 53 | } 54 | /** 55 | * @return string|null 56 | */ 57 | public function getClassName() 58 | { 59 | return $this->className; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Resolver/DefinitionResolver.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | interface DefinitionResolver 14 | { 15 | /** 16 | * Resolve a definition to a value. 17 | * 18 | * @param Definition $definition Object that defines how the value should be obtained. 19 | * @param array $parameters Optional parameters to use to build the entry. 20 | * 21 | * @throws DefinitionException If the definition cannot be resolved. 22 | * 23 | * @return mixed Value obtained from the definition. 24 | */ 25 | public function resolve(Definition $definition, array $parameters = []); 26 | /** 27 | * Check if a definition can be resolved. 28 | * 29 | * @param Definition $definition Object that defines how the value should be obtained. 30 | * @param array $parameters Optional parameters to use to build the entry. 31 | * 32 | * @return bool 33 | */ 34 | public function isResolvable(Definition $definition, array $parameters = []); 35 | } 36 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Resolver/InstanceInjector.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | class InstanceInjector extends ObjectCreator 16 | { 17 | /** 18 | * Injects dependencies on an existing instance. 19 | * 20 | * @param InstanceDefinition $definition 21 | * 22 | * {@inheritdoc} 23 | */ 24 | public function resolve(Definition $definition, array $parameters = []) 25 | { 26 | try { 27 | $this->injectMethodsAndProperties($definition->getInstance(), $definition->getObjectDefinition()); 28 | } catch (NotFoundException $e) { 29 | $message = \sprintf('Error while injecting dependencies into %s: %s', \get_class($definition->getInstance()), $e->getMessage()); 30 | throw new DependencyException($message, 0, $e); 31 | } 32 | } 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function isResolvable(Definition $definition, array $parameters = []) 37 | { 38 | return \true; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Resolver/SelfResolver.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class SelfResolver implements DefinitionResolver 15 | { 16 | /** 17 | * @var ContainerInterface 18 | */ 19 | private $container; 20 | public function __construct(ContainerInterface $container) 21 | { 22 | $this->container = $container; 23 | } 24 | /** 25 | * @param SelfResolvingDefinition $definition 26 | * 27 | * {@inheritdoc} 28 | */ 29 | public function resolve(Definition $definition, array $parameters = []) 30 | { 31 | return $definition->resolve($this->container); 32 | } 33 | /** 34 | * @param SelfResolvingDefinition $definition 35 | * 36 | * {@inheritdoc} 37 | */ 38 | public function isResolvable(Definition $definition, array $parameters = []) 39 | { 40 | return $definition->isResolvable($this->container); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/SelfResolvingDefinition.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface SelfResolvingDefinition 12 | { 13 | /** 14 | * Resolve the definition and return the resulting value. 15 | * 16 | * @return mixed 17 | */ 18 | public function resolve(ContainerInterface $container); 19 | /** 20 | * Check if a definition can be resolved. 21 | * 22 | * @return bool 23 | */ 24 | public function isResolvable(ContainerInterface $container); 25 | } 26 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Source/Autowiring.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class Autowiring implements DefinitionSource 14 | { 15 | /** 16 | * {@inheritdoc} 17 | */ 18 | public function getDefinition($name) 19 | { 20 | if (!\class_exists($name) && !\interface_exists($name)) { 21 | return null; 22 | } 23 | $definition = new ObjectDefinition($name); 24 | // Constructor 25 | $class = new \ReflectionClass($name); 26 | $constructor = $class->getConstructor(); 27 | if ($constructor && $constructor->isPublic()) { 28 | $definition->setConstructorInjection(MethodInjection::constructor($this->getParametersDefinition($constructor))); 29 | } 30 | return $definition; 31 | } 32 | /** 33 | * Read the type-hinting from the parameters of the function. 34 | */ 35 | private function getParametersDefinition(\ReflectionFunctionAbstract $constructor) 36 | { 37 | $parameters = []; 38 | foreach ($constructor->getParameters() as $index => $parameter) { 39 | // Skip optional parameters 40 | if ($parameter->isOptional()) { 41 | continue; 42 | } 43 | $parameterClass = $parameter->getClass(); 44 | if ($parameterClass) { 45 | $parameters[$index] = new EntryReference($parameterClass->getName()); 46 | } 47 | } 48 | return $parameters; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Source/DefinitionFile.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class DefinitionFile extends DefinitionArray 12 | { 13 | /** 14 | * @var bool 15 | */ 16 | private $initialized = \false; 17 | /** 18 | * File containing definitions, or null if the definitions are given as a PHP array. 19 | * @var string|null 20 | */ 21 | private $file; 22 | /** 23 | * @param string $file File in which the definitions are returned as an array. 24 | */ 25 | public function __construct($file) 26 | { 27 | // Lazy-loading to improve performances 28 | $this->file = $file; 29 | parent::__construct([]); 30 | } 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function getDefinition($name) 35 | { 36 | $this->initialize(); 37 | return parent::getDefinition($name); 38 | } 39 | /** 40 | * Lazy-loading of the definitions. 41 | * @throws DefinitionException 42 | */ 43 | private function initialize() 44 | { 45 | if ($this->initialized === \true) { 46 | return; 47 | } 48 | $definitions = (require $this->file); 49 | if (!\is_array($definitions)) { 50 | throw new DefinitionException("File {$this->file} should return an array of definitions"); 51 | } 52 | $this->addDefinitions($definitions); 53 | $this->initialized = \true; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Source/DefinitionSource.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | interface DefinitionSource 13 | { 14 | /** 15 | * Returns the DI definition for the entry name. 16 | * 17 | * @param string $name 18 | * 19 | * @throws DefinitionException An invalid definition was found. 20 | * @return Definition|null 21 | */ 22 | public function getDefinition($name); 23 | } 24 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/Source/MutableDefinitionSource.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface MutableDefinitionSource extends DefinitionSource 12 | { 13 | public function addDefinition(Definition $definition); 14 | } 15 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/Definition/ValueDefinition.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ValueDefinition implements Definition, SelfResolvingDefinition 13 | { 14 | /** 15 | * Entry name. 16 | * @var string 17 | */ 18 | private $name; 19 | /** 20 | * @var mixed 21 | */ 22 | private $value; 23 | /** 24 | * @param string $name Entry name 25 | * @param mixed $value 26 | */ 27 | public function __construct($name, $value) 28 | { 29 | $this->name = $name; 30 | $this->value = $value; 31 | } 32 | /** 33 | * @return string Entry name 34 | */ 35 | public function getName() 36 | { 37 | return $this->name; 38 | } 39 | /** 40 | * A value definition is like a constant, there is nothing to compute, the value is the same for everyone. 41 | * 42 | * {@inheritdoc} 43 | */ 44 | public function getScope() 45 | { 46 | return Scope::SINGLETON; 47 | } 48 | /** 49 | * @return mixed 50 | */ 51 | public function getValue() 52 | { 53 | return $this->value; 54 | } 55 | public function resolve(ContainerInterface $container) 56 | { 57 | return $this->getValue(); 58 | } 59 | public function isResolvable(ContainerInterface $container) 60 | { 61 | return \true; 62 | } 63 | public function __toString() 64 | { 65 | return \sprintf('Value (%s)', \var_export($this->value, \true)); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/DependencyException.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | interface RequestedEntry 14 | { 15 | /** 16 | * Returns the name of the entry that was requested by the container. 17 | * 18 | * @return string 19 | */ 20 | public function getName(); 21 | } 22 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/FactoryInterface.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface FactoryInterface 12 | { 13 | /** 14 | * Resolves an entry by its name. If given a class name, it will return a new instance of that class. 15 | * 16 | * @param string $name Entry name or a class name. 17 | * @param array $parameters Optional parameters to use to build the entry. Use this to force specific 18 | * parameters to specific values. Parameters not defined in this array will 19 | * be automatically resolved. 20 | * 21 | * @throws \InvalidArgumentException The name parameter must be of type string. 22 | * @throws DependencyException Error while resolving the entry. 23 | * @throws NotFoundException No entry or class found for the given name. 24 | * @return mixed 25 | */ 26 | public function make($name, array $parameters = []); 27 | } 28 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/InvokerInterface.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | interface InvokerInterface extends \DeliciousBrains\WPMDB\Container\Invoker\InvokerInterface 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /vendor/php-di/php-di/src/DI/NotFoundException.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class Scope 13 | { 14 | /** 15 | * A singleton entry will be computed once and shared. 16 | * 17 | * For a class, only a single instance of the class will be created. 18 | */ 19 | const SINGLETON = 'singleton'; 20 | /** 21 | * A prototype entry will be recomputed each time it is asked. 22 | * 23 | * For a class, this will create a new instance each time. 24 | */ 25 | const PROTOTYPE = 'prototype'; 26 | /** 27 | * Method kept for backward compatibility, use the constant instead. 28 | * 29 | * @return string 30 | */ 31 | public static function SINGLETON() 32 | { 33 | return self::SINGLETON; 34 | } 35 | /** 36 | * Method kept for backward compatibility, use the constant instead. 37 | * 38 | * @return string 39 | */ 40 | public static function PROTOTYPE() 41 | { 42 | return self::PROTOTYPE; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/php-di/phpdoc-reader/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015 Matthieu Napoli 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 4 | associated documentation files (the "Software"), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial 10 | portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 13 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 15 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | -------------------------------------------------------------------------------- /vendor/php-di/phpdoc-reader/README.md: -------------------------------------------------------------------------------- 1 | # PhpDocReader 2 | 3 | [![Build Status](https://img.shields.io/travis/PHP-DI/PhpDocReader.svg)](https://travis-ci.org/mnapoli/PhpDocReader) 4 | ![](https://img.shields.io/packagist/dt/PHP-DI/phpdoc-reader.svg) 5 | 6 | This project is used by: 7 | 8 | - [PHP-DI](http://php-di.org/) 9 | - [phockito-unit-php-di](https://github.com/balihoo/phockito-unit-php-di) 10 | 11 | Fork the README to add your project here. 12 | 13 | ## Features 14 | 15 | PhpDocReader parses `@var` and `@param` values in PHP docblocks: 16 | 17 | ```php 18 | 19 | use My\Cache\Backend; 20 | 21 | class Cache 22 | { 23 | /** 24 | * @var Backend 25 | */ 26 | protected $backend; 27 | 28 | /** 29 | * @param Backend $backend 30 | */ 31 | public function __construct($backend) 32 | { 33 | } 34 | } 35 | ``` 36 | 37 | It supports namespaced class names with the same resolution rules as PHP: 38 | 39 | - fully qualified name (starting with `\`) 40 | - imported class name (eg. `use My\Cache\Backend;`) 41 | - relative class name (from the current namespace, like `SubNamespace\MyClass`) 42 | - aliased class name (eg. `use My\Cache\Backend as FooBar;`) 43 | 44 | Primitive types (`@var string`) are ignored (returns null), only valid class names are returned. 45 | 46 | ## Usage 47 | 48 | ```php 49 | $reader = new PhpDocReader(); 50 | 51 | // Read a property type (@var phpdoc) 52 | $property = new ReflectionProperty($className, $propertyName); 53 | $propertyClass = $reader->getPropertyClass($property); 54 | 55 | // Read a parameter type (@param phpdoc) 56 | $parameter = new ReflectionParameter(array($className, $methodName), $parameterName); 57 | $parameterClass = $reader->getParameterClass($parameter); 58 | ``` 59 | -------------------------------------------------------------------------------- /vendor/php-di/phpdoc-reader/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "php-di\/phpdoc-reader", 3 | "type": "library", 4 | "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", 5 | "keywords": [ 6 | "phpdoc", 7 | "reflection" 8 | ], 9 | "license": "MIT", 10 | "autoload": { 11 | "psr-4": { 12 | "DeliciousBrains\\WPMDB\\Container\\PhpDocReader\\": "src\/PhpDocReader" 13 | } 14 | }, 15 | "autoload-dev": { 16 | "psr-4": { 17 | "DeliciousBrains\\WPMDB\\Container\\UnitTest\\PhpDocReader\\": "tests\/" 18 | } 19 | }, 20 | "require": { 21 | "php": ">=5.4.0" 22 | }, 23 | "require-dev": { 24 | "phpunit\/phpunit": "~4.6" 25 | } 26 | } -------------------------------------------------------------------------------- /vendor/php-di/phpdoc-reader/src/PhpDocReader/AnnotationException.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | class AnnotationException extends \Exception 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /vendor/phpoption/phpoption/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | @docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base update 3 | @docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base bin all update 4 | 5 | phpunit: 6 | @rm -f bootstrap/cache/*.php && docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:7.4-cli 7 | 8 | phpstan-analyze-src: 9 | @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze src -c phpstan.src.neon.dist 10 | 11 | phpstan-analyze-tests: 12 | @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze tests -c phpstan.tests.neon.dist 13 | 14 | psalm-analyze: 15 | @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli 16 | 17 | psalm-show-info: 18 | @docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --show-info=true 19 | 20 | test: phpunit phpstan-analyze-src phpstan-analyze-tests psalm-analyze 21 | 22 | clean: 23 | @rm -rf .phpunit.result.cache composer.lock vendor vendor-bin/*/composer.lock vendor-bin/*/vendor 24 | -------------------------------------------------------------------------------- /vendor/phpoption/phpoption/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpoption\/phpoption", 3 | "description": "Option Type for PHP", 4 | "keywords": [ 5 | "php", 6 | "option", 7 | "language", 8 | "type" 9 | ], 10 | "license": "Apache-2.0", 11 | "authors": [ 12 | { 13 | "name": "Johannes M. Schmitt", 14 | "email": "schmittjoh@gmail.com" 15 | }, 16 | { 17 | "name": "Graham Campbell", 18 | "email": "graham@alt-three.com" 19 | } 20 | ], 21 | "require": { 22 | "php": "^5.5.9 || ^7.0 || ^8.0" 23 | }, 24 | "require-dev": { 25 | "bamarni\/composer-bin-plugin": "^1.4.1", 26 | "phpunit\/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "DeliciousBrains\\WPMDB\\Container\\PhpOption\\": "src\/PhpOption\/" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { 35 | "DeliciousBrains\\WPMDB\\Container\\PhpOption\\Tests\\": "tests\/PhpOption\/Tests\/" 36 | } 37 | }, 38 | "config": { 39 | "preferred-install": "dist" 40 | }, 41 | "extra": { 42 | "branch-alias": { 43 | "dev-master": "1.7-dev" 44 | } 45 | }, 46 | "minimum-stability": "dev", 47 | "prefer-stable": true 48 | } -------------------------------------------------------------------------------- /vendor/psr/container/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2016 container-interop 4 | Copyright (c) 2016 PHP Framework Interoperability Group 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/psr/container/README.md: -------------------------------------------------------------------------------- 1 | # PSR Container 2 | 3 | This repository holds all interfaces/classes/traits related to [PSR-11](https://github.com/container-interop/fig-standards/blob/master/proposed/container.md). 4 | 5 | Note that this is not a container implementation of its own. See the specification for more details. 6 | -------------------------------------------------------------------------------- /vendor/psr/container/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr\/container", 3 | "type": "library", 4 | "description": "Common Container Interface (PHP FIG PSR-11)", 5 | "keywords": [ 6 | "psr", 7 | "psr-11", 8 | "container", 9 | "container-interop", 10 | "container-interface" 11 | ], 12 | "homepage": "https:\/\/github.com\/php-fig\/container", 13 | "license": "MIT", 14 | "authors": [ 15 | { 16 | "name": "PHP-FIG", 17 | "homepage": "http:\/\/www.php-fig.org\/" 18 | } 19 | ], 20 | "require": { 21 | "php": ">=5.3.0" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "DeliciousBrains\\WPMDB\\Container\\Psr\\Container\\": "src\/" 26 | } 27 | }, 28 | "extra": { 29 | "branch-alias": { 30 | "dev-master": "1.0.x-dev" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /vendor/psr/container/src/ContainerExceptionInterface.php: -------------------------------------------------------------------------------- 1 | =5.3.3" 25 | }, 26 | "autoload": { 27 | "psr-4": { 28 | "DeliciousBrains\\WPMDB\\Container\\Symfony\\Polyfill\\Ctype\\": "" 29 | }, 30 | "files": [ 31 | "bootstrap.php" 32 | ] 33 | }, 34 | "suggest": { 35 | "ext-ctype": "For best performance" 36 | }, 37 | "minimum-stability": "dev", 38 | "extra": { 39 | "branch-alias": { 40 | "dev-main": "1.19-dev" 41 | }, 42 | "thanks": { 43 | "name": "symfony\/polyfill", 44 | "url": "https:\/\/github.com\/symfony\/polyfill" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2014, Graham Campbell. 4 | Copyright (c) 2013, Vance Lucas. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | 3. Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | public function load(RepositoryInterface $repository, $content); 19 | } 20 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Loader/Value.php: -------------------------------------------------------------------------------- 1 | chars = $chars; 30 | $this->vars = $vars; 31 | } 32 | /** 33 | * Create an empty value instance. 34 | * 35 | * @return \Dotenv\Loader\Value 36 | */ 37 | public static function blank() 38 | { 39 | return new self('', []); 40 | } 41 | /** 42 | * Create a new value instance, appending the character. 43 | * 44 | * @param string $char 45 | * @param bool $var 46 | * 47 | * @return \Dotenv\Loader\Value 48 | */ 49 | public function append($char, $var) 50 | { 51 | return new self($this->chars . $char, $var ? \array_merge($this->vars, [\strlen($this->chars)]) : $this->vars); 52 | } 53 | /** 54 | * Get the string representation of the parsed value. 55 | * 56 | * @return string 57 | */ 58 | public function getChars() 59 | { 60 | return $this->chars; 61 | } 62 | /** 63 | * Get the locations of the variables in the value. 64 | * 65 | * @return int[] 66 | */ 67 | public function getVars() 68 | { 69 | $vars = $this->vars; 70 | \rsort($vars); 71 | return $vars; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | public function get($name) 30 | { 31 | return None::create(); 32 | } 33 | /** 34 | * Set an environment variable. 35 | * 36 | * Only if an existing apache variable exists do we overwrite it. 37 | * 38 | * @param non-empty-string $name 39 | * @param string|null $value 40 | * 41 | * @return void 42 | */ 43 | public function set($name, $value = null) 44 | { 45 | if (\apache_getenv($name) === \false) { 46 | return; 47 | } 48 | \apache_setenv($name, (string) $value); 49 | } 50 | /** 51 | * Clear an environment variable. 52 | * 53 | * @param non-empty-string $name 54 | * 55 | * @return void 56 | */ 57 | public function clear($name) 58 | { 59 | // Nothing to do here. 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | private $variables = []; 15 | /** 16 | * Determines if the adapter is supported. 17 | * 18 | * @return bool 19 | */ 20 | public function isSupported() 21 | { 22 | return \true; 23 | } 24 | /** 25 | * Get an environment variable, if it exists. 26 | * 27 | * @param non-empty-string $name 28 | * 29 | * @return \PhpOption\Option 30 | */ 31 | public function get($name) 32 | { 33 | if (!\array_key_exists($name, $this->variables)) { 34 | return None::create(); 35 | } 36 | return Some::create($this->variables[$name]); 37 | } 38 | /** 39 | * Set an environment variable. 40 | * 41 | * @param non-empty-string $name 42 | * @param string|null $value 43 | * 44 | * @return void 45 | */ 46 | public function set($name, $value = null) 47 | { 48 | $this->variables[$name] = $value; 49 | } 50 | /** 51 | * Clear an environment variable. 52 | * 53 | * @param non-empty-string $name 54 | * 55 | * @return void 56 | */ 57 | public function clear($name) 58 | { 59 | unset($this->variables[$name]); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/AvailabilityInterface.php: -------------------------------------------------------------------------------- 1 | 24 | */ 25 | public function get($name) 26 | { 27 | if (!\array_key_exists($name, $_ENV)) { 28 | return None::create(); 29 | } 30 | $value = $_ENV[$name]; 31 | if (\is_scalar($value)) { 32 | /** @var \PhpOption\Option */ 33 | return Some::create((string) $value); 34 | } 35 | if (null === $value) { 36 | /** @var \PhpOption\Option */ 37 | return Some::create(null); 38 | } 39 | return None::create(); 40 | } 41 | /** 42 | * Set an environment variable. 43 | * 44 | * @param non-empty-string $name 45 | * @param string|null $value 46 | * 47 | * @return void 48 | */ 49 | public function set($name, $value = null) 50 | { 51 | $_ENV[$name] = $value; 52 | } 53 | /** 54 | * Clear an environment variable. 55 | * 56 | * @param non-empty-string $name 57 | * 58 | * @return void 59 | */ 60 | public function clear($name) 61 | { 62 | unset($_ENV[$name]); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | public function get($name) 25 | { 26 | /** @var \PhpOption\Option */ 27 | return Option::fromValue(\getenv($name), \false); 28 | } 29 | /** 30 | * Set an environment variable. 31 | * 32 | * @param non-empty-string $name 33 | * @param string|null $value 34 | * 35 | * @return void 36 | */ 37 | public function set($name, $value = null) 38 | { 39 | \putenv("{$name}={$value}"); 40 | } 41 | /** 42 | * Clear an environment variable. 43 | * 44 | * @param non-empty-string $name 45 | * 46 | * @return void 47 | */ 48 | public function clear($name) 49 | { 50 | \putenv($name); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function get($name); 15 | } 16 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php: -------------------------------------------------------------------------------- 1 | 24 | */ 25 | public function get($name) 26 | { 27 | if (!\array_key_exists($name, $_SERVER)) { 28 | return None::create(); 29 | } 30 | $value = $_SERVER[$name]; 31 | if (\is_scalar($value)) { 32 | /** @var \PhpOption\Option */ 33 | return Some::create((string) $value); 34 | } 35 | if (null === $value) { 36 | /** @var \PhpOption\Option */ 37 | return Some::create(null); 38 | } 39 | return None::create(); 40 | } 41 | /** 42 | * Set an environment variable. 43 | * 44 | * @param non-empty-string $name 45 | * @param string|null $value 46 | * 47 | * @return void 48 | */ 49 | public function set($name, $value = null) 50 | { 51 | $_SERVER[$name] = $value; 52 | } 53 | /** 54 | * Clear an environment variable. 55 | * 56 | * @param non-empty-string $name 57 | * 58 | * @return void 59 | */ 60 | public function clear($name) 61 | { 62 | unset($_SERVER[$name]); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | interface RepositoryInterface extends ArrayAccess 10 | { 11 | /** 12 | * Tells whether environment variable has been defined. 13 | * 14 | * @param string $name 15 | * 16 | * @return bool 17 | */ 18 | public function has($name); 19 | /** 20 | * Get an environment variable. 21 | * 22 | * @param string $name 23 | * 24 | * @throws \InvalidArgumentException 25 | * 26 | * @return string|null 27 | */ 28 | public function get($name); 29 | /** 30 | * Set an environment variable. 31 | * 32 | * @param string $name 33 | * @param string|null $value 34 | * 35 | * @throws \InvalidArgumentException 36 | * 37 | * @return void 38 | */ 39 | public function set($name, $value = null); 40 | /** 41 | * Clear an environment variable. 42 | * 43 | * @param string $name 44 | * 45 | * @throws \InvalidArgumentException 46 | * 47 | * @return void 48 | */ 49 | public function clear($name); 50 | } 51 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Result/Result.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | public abstract function success(); 17 | /** 18 | * Get the success value, if possible. 19 | * 20 | * @throws \RuntimeException 21 | * 22 | * @return T 23 | */ 24 | public function getSuccess() 25 | { 26 | return $this->success()->get(); 27 | } 28 | /** 29 | * Map over the success value. 30 | * 31 | * @template S 32 | * 33 | * @param callable(T):S $f 34 | * 35 | * @return \Dotenv\Result\Result 36 | */ 37 | public abstract function mapSuccess(callable $f); 38 | /** 39 | * Get the error option value. 40 | * 41 | * @return \PhpOption\Option 42 | */ 43 | public abstract function error(); 44 | /** 45 | * Get the error value, if possible. 46 | * 47 | * @throws \RuntimeException 48 | * 49 | * @return E 50 | */ 51 | public function getError() 52 | { 53 | return $this->error()->get(); 54 | } 55 | /** 56 | * Map over the error value. 57 | * 58 | * @template F 59 | * 60 | * @param callable(E):F $f 61 | * 62 | * @return \Dotenv\Result\Result 63 | */ 64 | public abstract function mapError(callable $f); 65 | } 66 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Store/File/Paths.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | public static function read(array $filePaths, $shortCircuit = \true) 21 | { 22 | $output = []; 23 | foreach ($filePaths as $filePath) { 24 | $content = self::readFromFile($filePath); 25 | if ($content->isDefined()) { 26 | $output[$filePath] = $content->get(); 27 | if ($shortCircuit) { 28 | break; 29 | } 30 | } 31 | } 32 | return $output; 33 | } 34 | /** 35 | * Read the given file. 36 | * 37 | * @param string $filePath 38 | * 39 | * @return \PhpOption\Option 40 | */ 41 | private static function readFromFile($filePath) 42 | { 43 | $content = @\file_get_contents($filePath); 44 | /** @var \PhpOption\Option */ 45 | return Option::fromValue($content, \false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Store/FileStore.php: -------------------------------------------------------------------------------- 1 | filePaths = $filePaths; 32 | $this->shortCircuit = $shortCircuit; 33 | } 34 | /** 35 | * Read the content of the environment file(s). 36 | * 37 | * @throws \Dotenv\Exception\InvalidPathException 38 | * 39 | * @return string 40 | */ 41 | public function read() 42 | { 43 | if ($this->filePaths === []) { 44 | throw new InvalidPathException('At least one environment file path must be provided.'); 45 | } 46 | $contents = Reader::read($this->filePaths, $this->shortCircuit); 47 | if (\count($contents) > 0) { 48 | return \implode("\n", $contents); 49 | } 50 | throw new InvalidPathException(\sprintf('Unable to read any of the environment file(s) at [%s].', \implode(', ', $this->filePaths))); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/vlucas/phpdotenv/src/Store/StoreInterface.php: -------------------------------------------------------------------------------- 1 | content = $content; 23 | } 24 | /** 25 | * Read the content of the environment file(s). 26 | * 27 | * @return string 28 | */ 29 | public function read() 30 | { 31 | return $this->content; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /version-lite.php: -------------------------------------------------------------------------------- 1 |