├── .docker
├── .gitignore
└── global.env
├── .github
├── .metadata.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── COPYING.txt
├── LICENSE.txt
├── README.md
├── SplitDb82Cest.php
├── SplitDbCest.php
├── autoload.php
├── bin
└── ece-tools
├── bootstrap.php
├── codeception.dist.yml
├── composer.json
├── config
├── README.md
├── eol.yaml
├── scenario.xsd
├── schema.error.yaml
├── schema.yaml
└── services.xml
├── dist
├── .log.env.md
├── error-codes.md
└── front-static.php.dist
├── scenario
├── build
│ ├── generate.xml
│ └── transfer.xml
├── deploy.xml
└── post-deploy.xml
├── src
├── App
│ ├── Container.php
│ ├── ContainerException.php
│ ├── ContainerInterface.php
│ ├── Error.php
│ ├── ErrorHandler.php
│ ├── ErrorInfo.php
│ ├── GenericException.php
│ ├── Logger.php
│ ├── Logger
│ │ ├── Error
│ │ │ ├── Reader.php
│ │ │ └── ReaderInterface.php
│ │ ├── Formatter
│ │ │ ├── ErrorFormatterFactory.php
│ │ │ ├── JsonErrorFormatter.php
│ │ │ └── LineFormatter.php
│ │ ├── Gelf
│ │ │ ├── Handler.php
│ │ │ ├── HandlerFactory.php
│ │ │ ├── MessageFormatter.php
│ │ │ └── TransportFactory.php
│ │ ├── HandlerFactory.php
│ │ ├── LineFormatterFactory.php
│ │ ├── Pool.php
│ │ ├── Prepare
│ │ │ └── ErrorLogFile.php
│ │ ├── Processor
│ │ │ └── SanitizeProcessor.php
│ │ └── Sanitizer.php
│ └── LoggerException.php
├── Application.php
├── Cli.php
├── Command
│ ├── ApplyPatches.php
│ ├── Backup
│ │ ├── FileList.php
│ │ └── Restore.php
│ ├── BackupList.php
│ ├── BackupRestore.php
│ ├── Build.php
│ ├── Build
│ │ ├── Generate.php
│ │ └── Transfer.php
│ ├── ConfigCreate.php
│ ├── ConfigDump.php
│ ├── ConfigDump
│ │ └── Generate.php
│ ├── ConfigShow.php
│ ├── ConfigShow
│ │ └── Renderer.php
│ ├── ConfigUpdate.php
│ ├── ConfigValidate.php
│ ├── CronDisable.php
│ ├── CronEnable.php
│ ├── CronKill.php
│ ├── CronUnlock.php
│ ├── DbDump.php
│ ├── Deploy.php
│ ├── Dev
│ │ ├── GenerateSchemaError.php
│ │ ├── UpdateComposer.php
│ │ └── UpdateComposer
│ │ │ ├── ClearModuleRequirements.php
│ │ │ ├── ComposerGenerator.php
│ │ │ └── clear_module_requirements.php.tpl
│ ├── ErrorShow.php
│ ├── GenerateSchema.php
│ ├── ModuleRefresh.php
│ ├── PostDeploy.php
│ ├── RunCommand.php
│ └── Wizard
│ │ ├── IdealState.php
│ │ ├── MasterSlave.php
│ │ ├── ScdOnBuild.php
│ │ ├── ScdOnDemand.php
│ │ ├── ScdOnDeploy.php
│ │ ├── SplitDbState.php
│ │ └── Util
│ │ └── OutputFormatter.php
├── Composer
│ └── ClearAutoload.php
├── Config
│ ├── AdminData.php
│ ├── AdminDataInterface.php
│ ├── Amqp.php
│ ├── Application
│ │ └── HookChecker.php
│ ├── ConfigException.php
│ ├── ConfigMerger.php
│ ├── Database
│ │ ├── ConfigInterface.php
│ │ ├── DbConfig.php
│ │ └── ResourceConfig.php
│ ├── Environment.php
│ ├── Environment
│ │ ├── Reader.php
│ │ └── ReaderInterface.php
│ ├── EnvironmentData.php
│ ├── EnvironmentDataInterface.php
│ ├── Factory
│ │ └── Cache.php
│ ├── GlobalSection.php
│ ├── Log.php
│ ├── Magento
│ │ ├── Env
│ │ │ ├── Reader.php
│ │ │ ├── ReaderInterface.php
│ │ │ ├── Writer.php
│ │ │ └── WriterInterface.php
│ │ ├── Shared
│ │ │ ├── Reader.php
│ │ │ ├── ReaderInterface.php
│ │ │ ├── Resolver.php
│ │ │ ├── Writer.php
│ │ │ └── WriterInterface.php
│ │ ├── System.php
│ │ └── SystemInterface.php
│ ├── Module.php
│ ├── RemoteStorage.php
│ ├── RepositoryFactory.php
│ ├── Schema.php
│ ├── Schema
│ │ ├── Formatter.php
│ │ ├── FormatterInterface.php
│ │ ├── Validator.php
│ │ └── Validator
│ │ │ ├── Range.php
│ │ │ ├── SplitDb.php
│ │ │ ├── ValidatorFactory.php
│ │ │ └── ValidatorInterface.php
│ ├── SearchEngine.php
│ ├── SearchEngine
│ │ └── ElasticSuite.php
│ ├── Stage
│ │ ├── Build.php
│ │ ├── BuildInterface.php
│ │ ├── Deploy.php
│ │ ├── Deploy
│ │ │ ├── EnvironmentConfig.php
│ │ │ └── MergedConfig.php
│ │ ├── DeployInterface.php
│ │ ├── PostDeploy.php
│ │ └── PostDeployInterface.php
│ ├── StageConfigInterface.php
│ ├── State.php
│ ├── System
│ │ └── Variables.php
│ ├── SystemConfigInterface.php
│ ├── Validator
│ │ ├── Build
│ │ │ ├── AppropriateVersion.php
│ │ │ ├── BalerSupport.php
│ │ │ ├── ComposerFile.php
│ │ │ ├── ConfigFileExists.php
│ │ │ ├── ConfigFileStructure.php
│ │ │ ├── MagentoAppYaml.php
│ │ │ ├── ModulesExists.php
│ │ │ ├── OpcacheExcludePaths.php
│ │ │ ├── ScdOptionsIgnorance.php
│ │ │ ├── StageConfig.php
│ │ │ └── UnsupportedBuildOptionsIni.php
│ │ ├── CompositeValidator.php
│ │ ├── Deploy
│ │ │ ├── AdminData.php
│ │ │ ├── AppropriateVersion.php
│ │ │ ├── DatabaseConfiguration.php
│ │ │ ├── DatabaseSplitConnection.php
│ │ │ ├── DebugLogging.php
│ │ │ ├── DeprecatedSearchEngine.php
│ │ │ ├── DeprecatedSplitDb.php
│ │ │ ├── DeprecatedVariables.php
│ │ │ ├── ElasticSearchIntegrity.php
│ │ │ ├── ElasticSearchUsage.php
│ │ │ ├── ElasticSearchVersion.php
│ │ │ ├── ElasticSuiteIntegrity.php
│ │ │ ├── EnvironmentVariables.php
│ │ │ ├── JsonFormatVariable.php
│ │ │ ├── MageModeVariable.php
│ │ │ ├── MagentoCloudVariables.php
│ │ │ ├── OpenSearchElasticSearchBothInstalled.php
│ │ │ ├── OpenSearchIntegrity.php
│ │ │ ├── PhpVersion.php
│ │ │ ├── PostDeploy.php
│ │ │ ├── RemovedSplitDb.php
│ │ │ ├── ReportDirNestingLevel.php
│ │ │ ├── ResourceConfiguration.php
│ │ │ ├── ScdOptionsIgnorance.php
│ │ │ ├── SearchConfiguration.php
│ │ │ ├── ServiceEol.php
│ │ │ ├── ServiceVersion.php
│ │ │ ├── SessionConfiguration.php
│ │ │ ├── SessionCredentials.php
│ │ │ ├── SolrIntegrity.php
│ │ │ ├── SplitDb.php
│ │ │ └── Variable
│ │ │ │ └── ConfigurationChecker.php
│ │ ├── GlobalStage
│ │ │ ├── ScdOnBuild.php
│ │ │ ├── ScdOnDeploy.php
│ │ │ └── SkipHtmlMinification.php
│ │ ├── IdealState.php
│ │ ├── Result
│ │ │ ├── Error.php
│ │ │ └── Success.php
│ │ ├── ResultFactory.php
│ │ └── ResultInterface.php
│ ├── ValidatorException.php
│ ├── ValidatorFactory.php
│ └── ValidatorInterface.php
├── Cron
│ ├── JobUnlocker.php
│ └── Switcher.php
├── DB
│ ├── Connection.php
│ ├── ConnectionInterface.php
│ ├── Data
│ │ ├── Connection.php
│ │ ├── ConnectionFactory.php
│ │ ├── ConnectionInterface.php
│ │ ├── ConnectionTypes.php
│ │ ├── RelationshipConnection.php
│ │ └── RelationshipConnectionFactory.php
│ ├── Dump.php
│ ├── DumpGenerator.php
│ ├── DumpInterface.php
│ ├── DumpProcessor.php
│ └── PDOException.php
├── ExtensionRegistrar.php
├── Filesystem
│ ├── BackupList.php
│ ├── ConfigFileList.php
│ ├── DirectoryCopier
│ │ ├── CopyStrategy.php
│ │ ├── CopySubFolderStrategy.php
│ │ ├── StrategyFactory.php
│ │ ├── StrategyInterface.php
│ │ ├── SubSymlinkStrategy.php
│ │ └── SymlinkStrategy.php
│ ├── DirectoryList.php
│ ├── Driver
│ │ └── File.php
│ ├── FileList.php
│ ├── FileSystemException.php
│ ├── Flag
│ │ ├── ConfigurationMismatchException.php
│ │ ├── Manager.php
│ │ └── Pool.php
│ ├── Reader
│ │ └── ReaderInterface.php
│ ├── RecoverableDirectoryList.php
│ ├── SystemList.php
│ └── Writer
│ │ └── WriterInterface.php
├── Http
│ ├── ClientFactory.php
│ ├── PoolFactory.php
│ ├── RequestFactory.php
│ └── TransferStatsHandler.php
├── OnFail
│ └── Action
│ │ ├── ActionException.php
│ │ ├── ActionInterface.php
│ │ ├── CreateDeployFailedFlag.php
│ │ └── SkipAction.php
├── Package
│ ├── MagentoVersion.php
│ ├── Manager.php
│ └── UndefinedPackageException.php
├── Patch
│ └── Manager.php
├── PlatformVariable
│ ├── Decoder.php
│ └── DecoderInterface.php
├── Scenario
│ ├── Collector
│ │ ├── Action.php
│ │ ├── Scenario.php
│ │ └── Step.php
│ ├── Exception
│ │ ├── ProcessorException.php
│ │ └── ValidationException.php
│ ├── Merger.php
│ ├── PathResolver.php
│ ├── Processor.php
│ ├── Resolver.php
│ └── Sorter.php
├── Service
│ ├── Adapter
│ │ ├── CredisFactory.php
│ │ └── CvalkeyFactory.php
│ ├── Aurora.php
│ ├── Database.php
│ ├── Detector
│ │ └── DatabaseType.php
│ ├── ElasticSearch.php
│ ├── EolValidator.php
│ ├── OpenSearch.php
│ ├── Php.php
│ ├── RabbitMq.php
│ ├── Redis.php
│ ├── Redis
│ │ └── Version.php
│ ├── RedisSession.php
│ ├── Search
│ │ └── AbstractService.php
│ ├── ServiceException.php
│ ├── ServiceFactory.php
│ ├── ServiceInterface.php
│ ├── ServiceMismatchException.php
│ ├── Validator.php
│ ├── Valkey.php
│ ├── Valkey
│ │ └── Version.php
│ └── ValkeySession.php
├── Shell
│ ├── MagentoShell.php
│ ├── Process.php
│ ├── ProcessException.php
│ ├── ProcessFactory.php
│ ├── ProcessInterface.php
│ ├── Shell.php
│ ├── ShellException.php
│ ├── ShellFactory.php
│ ├── ShellInterface.php
│ ├── UtilityException.php
│ └── UtilityManager.php
├── StaticContent
│ ├── Build
│ │ └── Option.php
│ ├── CommandFactory.php
│ ├── Deploy
│ │ └── Option.php
│ ├── OptionInterface.php
│ ├── ThemeResolver.php
│ └── ThreadCountOptimizer.php
├── Step
│ ├── Build
│ │ ├── ApplyPatches.php
│ │ ├── BackupData.php
│ │ ├── BackupData
│ │ │ ├── StaticContent.php
│ │ │ └── WritableDirectories.php
│ │ ├── ClearInitDirectory.php
│ │ ├── ClearMountedDirectories.php
│ │ ├── CompileDi.php
│ │ ├── ComposerDumpAutoload.php
│ │ ├── CompressStaticContent.php
│ │ ├── CopyPubStatic.php
│ │ ├── CopySampleData.php
│ │ ├── DeployStaticContent.php
│ │ ├── DeployStaticContent
│ │ │ └── Generate.php
│ │ ├── EnableEventing.php
│ │ ├── EnableWebhooks.php
│ │ ├── MarshallFiles.php
│ │ ├── PreBuild.php
│ │ ├── RefreshModules.php
│ │ ├── RunBaler.php
│ │ └── SetReportDirNestingLevel.php
│ ├── Deploy
│ │ ├── BackgroundProcessKill.php
│ │ ├── CompressStaticContent.php
│ │ ├── DeployCompletion.php
│ │ ├── DeployStaticContent.php
│ │ ├── DeployStaticContent
│ │ │ └── Generate.php
│ │ ├── DisableCron.php
│ │ ├── DisableGoogleAnalytics.php
│ │ ├── InstallUpdate.php
│ │ ├── InstallUpdate
│ │ │ ├── ConfigUpdate.php
│ │ │ ├── ConfigUpdate
│ │ │ │ ├── Amqp.php
│ │ │ │ ├── CacheType.php
│ │ │ │ ├── CronConsumersRunner.php
│ │ │ │ ├── DbConnection.php
│ │ │ │ ├── DocumentRoot.php
│ │ │ │ ├── Lock.php
│ │ │ │ ├── Lock
│ │ │ │ │ └── Config.php
│ │ │ │ ├── PrepareConfig.php
│ │ │ │ ├── SearchEngine.php
│ │ │ │ ├── Session.php
│ │ │ │ ├── Session
│ │ │ │ │ └── Config.php
│ │ │ │ ├── Urls.php
│ │ │ │ └── Urls
│ │ │ │ │ ├── Database.php
│ │ │ │ │ └── Environment.php
│ │ │ ├── Install
│ │ │ │ ├── CleanupDbConfig.php
│ │ │ │ ├── ConfigImport.php
│ │ │ │ ├── ResetPassword.php
│ │ │ │ ├── Setup.php
│ │ │ │ └── Setup
│ │ │ │ │ └── InstallCommandFactory.php
│ │ │ └── Update
│ │ │ │ ├── SetAdminUrl.php
│ │ │ │ └── Setup.php
│ │ ├── PhpOpcacheReset.php
│ │ ├── PreDeploy.php
│ │ ├── PreDeploy
│ │ │ ├── CheckState.php
│ │ │ ├── CleanFileCache.php
│ │ │ ├── CleanRedisCache.php
│ │ │ ├── CleanStaticContent.php
│ │ │ ├── CleanValkeyCache.php
│ │ │ ├── CleanViewPreprocessed.php
│ │ │ ├── ConfigUpdate
│ │ │ │ └── Cache.php
│ │ │ ├── RestorePatchLog.php
│ │ │ └── RestoreWritableDirectories.php
│ │ ├── RemoteStorage.php
│ │ ├── RemoveDeployFailedFlag.php
│ │ ├── SetCryptKey.php
│ │ ├── SplitDbConnection.php
│ │ ├── SplitDbConnection
│ │ │ └── SlaveConnection.php
│ │ └── UnlockCronJobs.php
│ ├── DisableMaintenanceMode.php
│ ├── EnableMaintenanceMode.php
│ ├── PostDeploy
│ │ ├── Backup.php
│ │ ├── CleanCache.php
│ │ ├── DeployFailed.php
│ │ ├── EnableCron.php
│ │ ├── TimeToFirstByte.php
│ │ └── WarmUp.php
│ ├── SetProductionMode.php
│ ├── SkipStep.php
│ ├── StepException.php
│ ├── StepInterface.php
│ └── ValidateConfiguration.php
├── Test
│ ├── Functional
│ │ ├── Acceptance.suite.dist.yml
│ │ └── Acceptance
│ │ │ ├── AbstractCest.php
│ │ │ ├── Acceptance81Cest.php
│ │ │ ├── Acceptance82Cest.php
│ │ │ ├── Acceptance83Cest.php
│ │ │ ├── Acceptance84Cest.php
│ │ │ ├── AcceptanceCe81Cest.php
│ │ │ ├── AcceptanceCeCest.php
│ │ │ ├── AcceptanceCest.php
│ │ │ ├── AdminCredential23Cest.php
│ │ │ ├── AdminCredential81Cest.php
│ │ │ ├── AdminCredential82Cest.php
│ │ │ ├── AdminCredential83Cest.php
│ │ │ ├── AdminCredential84Cest.php
│ │ │ ├── AdminCredentialCest.php
│ │ │ ├── BackupDb23Cest.php
│ │ │ ├── BackupDb24Cest.php
│ │ │ ├── BackupDb81Cest.php
│ │ │ ├── BackupDb82Cest.php
│ │ │ ├── BackupDb83Cest.php
│ │ │ ├── BackupDb84Cest.php
│ │ │ ├── BackupDbCest.php
│ │ │ ├── Cron244Cest.php
│ │ │ ├── Cron24Cest.php
│ │ │ ├── Cron81Cest.php
│ │ │ ├── Cron82Cest.php
│ │ │ ├── Cron83Cest.php
│ │ │ ├── Cron84Cest.php
│ │ │ ├── CronCest.php
│ │ │ ├── CronUnlock82Cest.php
│ │ │ ├── CronUnlock83Cest.php
│ │ │ ├── CronUnlock84Cest.php
│ │ │ ├── CronUnlockCest.php
│ │ │ ├── DataTypesOptionValidation81Cest.php
│ │ │ ├── DataTypesOptionValidation82Cest.php
│ │ │ ├── DataTypesOptionValidation83Cest.php
│ │ │ ├── DataTypesOptionValidation84Cest.php
│ │ │ ├── DataTypesOptionValidationCest.php
│ │ │ ├── DatabaseConfiguration82Cest.php
│ │ │ ├── DatabaseConfiguration83Cest.php
│ │ │ ├── DatabaseConfiguration84Cest.php
│ │ │ ├── DatabaseConfigurationCest.php
│ │ │ ├── ElasticSearchCest.php
│ │ │ ├── ErrorCodes81Cest.php
│ │ │ ├── ErrorCodes82Cest.php
│ │ │ ├── ErrorCodes83Cest.php
│ │ │ ├── ErrorCodes84Cest.php
│ │ │ ├── ErrorCodesCest.php
│ │ │ ├── ErrorMessage82Cest.php
│ │ │ ├── ErrorMessage83Cest.php
│ │ │ ├── ErrorMessage84Cest.php
│ │ │ ├── ErrorMessageCest.php
│ │ │ ├── PostDeploy82Cest.php
│ │ │ ├── PostDeploy83Cest.php
│ │ │ ├── PostDeploy84Cest.php
│ │ │ ├── PostDeployCest.php
│ │ │ ├── Redis81Cest.php
│ │ │ ├── Redis82Cest.php
│ │ │ ├── Redis83Cest.php
│ │ │ ├── Redis84Cest.php
│ │ │ ├── RedisCest.php
│ │ │ ├── ReportDirNestingLevel82Cest.php
│ │ │ ├── ReportDirNestingLevel83Cest.php
│ │ │ ├── ReportDirNestingLevel84Cest.php
│ │ │ ├── ReportDirNestingLevelCest.php
│ │ │ ├── ScdMatrix82Cest.php
│ │ │ ├── ScdMatrix83Cest.php
│ │ │ ├── ScdMatrix84Cest.php
│ │ │ ├── ScdMatrixCest.php
│ │ │ ├── ScdStrategy82Cest.php
│ │ │ ├── ScdStrategy83Cest.php
│ │ │ ├── ScdStrategy84Cest.php
│ │ │ ├── ScdStrategyCest.php
│ │ │ ├── ScenarioExtensibility82Cest.php
│ │ │ ├── ScenarioExtensibility83Cest.php
│ │ │ ├── ScenarioExtensibility84Cest.php
│ │ │ ├── ScenarioExtensibilityCest.php
│ │ │ ├── SessionConfiguration82Cest.php
│ │ │ ├── SessionConfiguration83Cest.php
│ │ │ ├── SessionConfiguration84Cest.php
│ │ │ ├── SessionConfigurationCest.php
│ │ │ ├── SplitDbWizardCest.php
│ │ │ ├── Upgrade23Cest.php
│ │ │ ├── UpgradeCest.php
│ │ │ ├── Valkey82Cest.php
│ │ │ ├── Valkey83Cest.php
│ │ │ ├── Valkey84Cest.php
│ │ │ ├── ValkeyCest.php
│ │ │ ├── WizardScd81Cest.php
│ │ │ ├── WizardScd82Cest.php
│ │ │ ├── WizardScd83Cest.php
│ │ │ ├── WizardScd84Cest.php
│ │ │ └── WizardScdCest.php
│ ├── Integration
│ │ ├── Command
│ │ │ ├── ConfigCreateTest.php
│ │ │ ├── ConfigUpdateTest.php
│ │ │ └── _files
│ │ │ │ ├── ConfigCreate
│ │ │ │ ├── .magento.env.dbconfiguration.yaml
│ │ │ │ ├── .magento.env.scd.yaml
│ │ │ │ └── .magento.env.yaml
│ │ │ │ └── ConfigUpdate
│ │ │ │ ├── dbconfiguration
│ │ │ │ ├── .magento.env.yaml
│ │ │ │ └── .magento.env_exp.yaml
│ │ │ │ └── scdupdate
│ │ │ │ ├── .magento.env.yaml
│ │ │ │ └── .magento.env_exp.yaml
│ │ └── Schema
│ │ │ ├── ValidatorTest.php
│ │ │ └── _files
│ │ │ └── .gitignore
│ └── Unit
│ │ ├── App
│ │ ├── ErrorHandlerTest.php
│ │ ├── ErrorInfoTest.php
│ │ ├── Logger
│ │ │ ├── Error
│ │ │ │ ├── ReaderTest.php
│ │ │ │ └── _file
│ │ │ │ │ └── cloud.error.log
│ │ │ ├── Formatter
│ │ │ │ ├── ErrorFormatterFactoryTest.php
│ │ │ │ ├── JsonErrorFormatterTest.php
│ │ │ │ └── LineFormatterTest.php
│ │ │ ├── Gelf
│ │ │ │ ├── HandlerFactoryTest.php
│ │ │ │ ├── MessageFormatterTest.php
│ │ │ │ └── TransportFactoryTest.php
│ │ │ ├── HandlerFactoryTest.php
│ │ │ ├── LineFormatterFactoryTest.php
│ │ │ ├── PoolTest.php
│ │ │ ├── Prepare
│ │ │ │ └── ErrorLogFileTest.php
│ │ │ ├── Processor
│ │ │ │ └── SanitizeProcessorTest.php
│ │ │ └── SanitizerTest.php
│ │ ├── LoggerTest.php
│ │ └── _file
│ │ │ └── schema.error.yaml
│ │ ├── ApplicationTest.php
│ │ ├── Command
│ │ ├── ApplyPatchesTest.php
│ │ ├── Backup
│ │ │ ├── FileListTest.php
│ │ │ └── RestoreTest.php
│ │ ├── BackupListTest.php
│ │ ├── BackupRestoreTest.php
│ │ ├── Build
│ │ │ ├── GenerateTest.php
│ │ │ └── TransferTest.php
│ │ ├── BuildTest.php
│ │ ├── ConfigCreateTest.php
│ │ ├── ConfigDump
│ │ │ ├── GenerateTest.php
│ │ │ └── _files
│ │ │ │ └── app
│ │ │ │ └── etc
│ │ │ │ ├── config.php
│ │ │ │ ├── generated_config.php
│ │ │ │ └── generated_config_2.1.php
│ │ ├── ConfigDumpTest.php
│ │ ├── ConfigShow
│ │ │ └── RendererTest.php
│ │ ├── ConfigShowTest.php
│ │ ├── ConfigUpdateTest.php
│ │ ├── ConfigValidateTest.php
│ │ ├── CronDisableTest.php
│ │ ├── CronEnableTest.php
│ │ ├── CronKillTest.php
│ │ ├── CronUnlockTest.php
│ │ ├── DbDumpTest.php
│ │ ├── DeployTest.php
│ │ ├── Dev
│ │ │ ├── UpdateComposer
│ │ │ │ ├── ClearModuleRequirementsTest.php
│ │ │ │ ├── ComposerGeneratorTest.php
│ │ │ │ └── _files
│ │ │ │ │ ├── app
│ │ │ │ │ ├── composer.json
│ │ │ │ │ ├── repo1
│ │ │ │ │ │ ├── composer.json
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── internal
│ │ │ │ │ │ │ │ ├── Magento
│ │ │ │ │ │ │ │ └── Framework
│ │ │ │ │ │ │ │ │ └── Lib1
│ │ │ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ │ │ │ └── Vendor
│ │ │ │ │ │ │ │ └── Library1
│ │ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ │ └── package
│ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ ├── repo2
│ │ │ │ │ │ ├── app
│ │ │ │ │ │ │ └── code
│ │ │ │ │ │ │ │ └── Vendor
│ │ │ │ │ │ │ │ └── Module1
│ │ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ │ ├── composer.json
│ │ │ │ │ │ └── exclude
│ │ │ │ │ │ │ └── package
│ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ ├── repo3
│ │ │ │ │ │ ├── app
│ │ │ │ │ │ │ └── design
│ │ │ │ │ │ │ │ └── Vendor
│ │ │ │ │ │ │ │ └── Theme1
│ │ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ │ ├── composer.json
│ │ │ │ │ │ └── package
│ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ ├── repo4
│ │ │ │ │ │ ├── composer.json
│ │ │ │ │ │ └── package
│ │ │ │ │ │ │ └── composer.json
│ │ │ │ │ └── repo5
│ │ │ │ │ │ └── composer.json
│ │ │ │ │ ├── clear_module_requirements.php
│ │ │ │ │ └── expected_composer.php
│ │ │ └── UpdateComposerTest.php
│ │ ├── ErrorShowTest.php
│ │ ├── GenerateSchemaTest.php
│ │ ├── ModuleRefreshTest.php
│ │ ├── PostDeployTest.php
│ │ ├── RunCommandTest.php
│ │ ├── Wizard
│ │ │ ├── IdealStateTest.php
│ │ │ ├── MasterSlaveTest.php
│ │ │ ├── ScdOnBuildTest.php
│ │ │ ├── ScdOnDemandTest.php
│ │ │ ├── ScdOnDeployTest.php
│ │ │ ├── SplitDbStateTest.php
│ │ │ └── Util
│ │ │ │ └── OutputFormatterTest.php
│ │ └── _files
│ │ │ └── m2-hotfixes
│ │ │ ├── patch1.patch
│ │ │ ├── patch2.patch
│ │ │ └── readme.md
│ │ ├── Config
│ │ ├── AdminDataTest.php
│ │ ├── AmqpTest.php
│ │ ├── Application
│ │ │ └── HookCheckerTest.php
│ │ ├── ConfigMergerTest.php
│ │ ├── Database
│ │ │ ├── DbConfigTest.php
│ │ │ └── ResourceConfigTest.php
│ │ ├── Environment
│ │ │ ├── ReaderTest.php
│ │ │ └── _file
│ │ │ │ ├── .magento-with-constants.env.yaml
│ │ │ │ ├── .magento-with-empty-sections.env.yaml
│ │ │ │ └── .magento.env.yaml
│ │ ├── EnvironmentDataTest.php
│ │ ├── EnvironmentTest.php
│ │ ├── Factory
│ │ │ └── CacheTest.php
│ │ ├── GlobalSectionTest.php
│ │ ├── LogTest.php
│ │ ├── Magento
│ │ │ ├── Env
│ │ │ │ ├── ReaderTest.php
│ │ │ │ └── WriterTest.php
│ │ │ ├── Shared
│ │ │ │ ├── ReaderTest.php
│ │ │ │ ├── ResolverTest.php
│ │ │ │ └── WriterTest.php
│ │ │ └── SystemTest.php
│ │ ├── ModuleTest.php
│ │ ├── RemoteStorageTest.php
│ │ ├── RepositoryFactoryTest.php
│ │ ├── Schema
│ │ │ ├── FormatterTest.php
│ │ │ ├── Validator
│ │ │ │ ├── RangeTest.php
│ │ │ │ ├── SplitDbTest.php
│ │ │ │ └── ValidatorFactoryTest.php
│ │ │ ├── ValidatorTest.php
│ │ │ └── _files
│ │ │ │ └── .magento.env.md
│ │ ├── SchemaTest.php
│ │ ├── SearchEngine
│ │ │ └── ElasticSuiteTest.php
│ │ ├── SearchEngineTest.php
│ │ ├── Stage
│ │ │ ├── BuildTest.php
│ │ │ ├── Deploy
│ │ │ │ ├── EnvironmentConfigTest.php
│ │ │ │ └── MergedConfigTest.php
│ │ │ ├── DeployTest.php
│ │ │ └── PostDeployTest.php
│ │ ├── StateTest.php
│ │ ├── System
│ │ │ └── VariablesTest.php
│ │ ├── Validator
│ │ │ ├── Build
│ │ │ │ ├── AppropriateVersionTest.php
│ │ │ │ ├── BalerSupportTest.php
│ │ │ │ ├── ComposerFileTest.php
│ │ │ │ ├── ConfigFileExistsTest.php
│ │ │ │ ├── ConfigFileStructureTest.php
│ │ │ │ ├── MagentoAppYamlTest.php
│ │ │ │ ├── ModulesExistsTest.php
│ │ │ │ ├── OpcacheExcludePathsTest.php
│ │ │ │ ├── ScdOptionsIgnoranceTest.php
│ │ │ │ ├── StageConfigTest.php
│ │ │ │ ├── UnsupportedBuildOptionsIniTest.php
│ │ │ │ └── _files
│ │ │ │ │ ├── correct_composer_2.3.json
│ │ │ │ │ ├── correct_composer_2.3_2.json
│ │ │ │ │ └── wrong_composer_2.3.json
│ │ │ ├── Deploy
│ │ │ │ ├── AdminDataTest.php
│ │ │ │ ├── AppropriateVersionTest.php
│ │ │ │ ├── DatabaseConfigurationTest.php
│ │ │ │ ├── DatabaseSplitConnectionTest.php
│ │ │ │ ├── DebugLoggingTest.php
│ │ │ │ ├── DeprecatedSearchEngineTest.php
│ │ │ │ ├── DeprecatedSplitDbTest.php
│ │ │ │ ├── DeprecatedVariablesTest.php
│ │ │ │ ├── ElasticSearchUsageTest.php
│ │ │ │ ├── ElasticSearchVersionTest.php
│ │ │ │ ├── ElasticSuiteIntegrityTest.php
│ │ │ │ ├── ElasticsearchIntegrityTest.php
│ │ │ │ ├── EnvironmentVariablesTest.php
│ │ │ │ ├── JsonFormatVariableTest.php
│ │ │ │ ├── MageModeVariableTest.php
│ │ │ │ ├── MagentoCloudVariablesTest.php
│ │ │ │ ├── PhpVersionTest.php
│ │ │ │ ├── PostDeployTest.php
│ │ │ │ ├── RemovedSplitDbTest.php
│ │ │ │ ├── ReportDirNestingLevelTest.php
│ │ │ │ ├── ResourceConfigurationTest.php
│ │ │ │ ├── ScdOptionsIgnoranceTest.php
│ │ │ │ ├── SearchConfigurationTest.php
│ │ │ │ ├── ServiceEolTest.php
│ │ │ │ ├── ServiceVersionTest.php
│ │ │ │ ├── SessionConfigurationTest.php
│ │ │ │ ├── SessionCredentialsTest.php
│ │ │ │ ├── SolrIntegrityTest.php
│ │ │ │ ├── SplitDbTest.php
│ │ │ │ └── Variable
│ │ │ │ │ └── ConfigurationCheckerTest.php
│ │ │ ├── GlobalStage
│ │ │ │ ├── ScdOnBuildTest.php
│ │ │ │ ├── ScdOnDeployTest.php
│ │ │ │ └── SkipHtmlMinificationTest.php
│ │ │ ├── IdealStateTest.php
│ │ │ └── ResultFactoryTest.php
│ │ ├── ValidatorFactoryTest.php
│ │ └── _file
│ │ │ └── Deploy
│ │ │ └── app
│ │ │ └── etc
│ │ │ └── env.php
│ │ ├── Cron
│ │ ├── JobUnlockerTest.php
│ │ └── SwitcherTest.php
│ │ ├── DB
│ │ ├── ConnectionTest.php
│ │ ├── Data
│ │ │ ├── ConnectionFactoryTest.php
│ │ │ ├── ConnectionTest.php
│ │ │ ├── ConnectionTypesTest.php
│ │ │ ├── RelationshipConnectionFactoryTest.php
│ │ │ └── RelationshipConnectionTest.php
│ │ ├── DumpGeneratorTest.php
│ │ ├── DumpProcessorTest.php
│ │ └── DumpTest.php
│ │ ├── Filesystem
│ │ ├── BackupListTest.php
│ │ ├── ConfigFileListTest.php
│ │ ├── DirectoryCopier
│ │ │ ├── CopyStrategyTest.php
│ │ │ ├── CopySubFolderStrategyTest.php
│ │ │ ├── StrategyFactoryTest.php
│ │ │ ├── SubSymlinkStrategyTest.php
│ │ │ └── SymlinkStrategyTest.php
│ │ ├── DirectoryListTest.php
│ │ ├── Driver
│ │ │ └── FileTest.php
│ │ ├── FileListTest.php
│ │ ├── Flag
│ │ │ ├── ManagerTest.php
│ │ │ └── PoolTest.php
│ │ ├── RecoverableDirectoryListTest.php
│ │ └── SystemListTest.php
│ │ ├── Http
│ │ ├── ClientFactoryTest.php
│ │ ├── PoolFactoryTest.php
│ │ ├── RequestFactoryTest.php
│ │ └── TransferStatsHandlerTest.php
│ │ ├── OnFail
│ │ └── Action
│ │ │ ├── CreateDeployFailedFlagTest.php
│ │ │ └── SkipActionTest.php
│ │ ├── Package
│ │ ├── MagentoVersionTest.php
│ │ └── ManagerTest.php
│ │ ├── Patch
│ │ └── ManagerTest.php
│ │ ├── PlatformVariable
│ │ └── DecoderTest.php
│ │ ├── Scenario
│ │ ├── Collector
│ │ │ ├── ScenarioTest.php
│ │ │ └── StepTest.php
│ │ ├── MergerTest.php
│ │ ├── PathResolverTest.php
│ │ ├── ProcessorTest.php
│ │ ├── ResolverTest.php
│ │ └── SorterTest.php
│ │ ├── Service
│ │ ├── AuroraTest.php
│ │ ├── DatabaseTest.php
│ │ ├── Detector
│ │ │ └── DatabaseTypeTest.php
│ │ ├── ElasticSearchTest.php
│ │ ├── EolValidatorTest.php
│ │ ├── OpenSearchTest.php
│ │ ├── PhpTest.php
│ │ ├── RabbitMqTest.php
│ │ ├── Redis
│ │ │ └── VersionTest.php
│ │ ├── RedisSessionTest.php
│ │ ├── RedisTest.php
│ │ ├── ServiceFactoryTest.php
│ │ ├── ValidatorTest.php
│ │ ├── Valkey
│ │ │ └── VersionTest.php
│ │ ├── ValkeySessionTest.php
│ │ ├── ValkeyTest.php
│ │ └── _file
│ │ │ ├── eol.yaml
│ │ │ └── eol_2.yaml
│ │ ├── Shell
│ │ ├── MagentoShellTest.php
│ │ ├── ProcessFactoryTest.php
│ │ ├── ShellFactoryTest.php
│ │ ├── ShellTest.php
│ │ └── UtilityManagerTest.php
│ │ ├── StaticContent
│ │ ├── Build
│ │ │ └── OptionTest.php
│ │ ├── CommandFactoryTest.php
│ │ ├── Deploy
│ │ │ └── OptionTest.php
│ │ ├── ThemeResolverTest.php
│ │ └── ThreadCountOptimizerTest.php
│ │ ├── Step
│ │ ├── Build
│ │ │ ├── ApplyPatchesTest.php
│ │ │ ├── BackupData
│ │ │ │ ├── StaticContentTest.php
│ │ │ │ └── WritableDirectoriesTest.php
│ │ │ ├── BackupDataTest.php
│ │ │ ├── ClearInitDirectoryTest.php
│ │ │ ├── CompileDiTest.php
│ │ │ ├── ComposerDumpAutoloadTest.php
│ │ │ ├── CompressStaticContentTest.php
│ │ │ ├── CopyPubStaticTest.php
│ │ │ ├── CopySampleDataTest.php
│ │ │ ├── DeployStaticContent
│ │ │ │ └── GenerateTest.php
│ │ │ ├── DeployStaticContentTest.php
│ │ │ ├── EnableEventingTest.php
│ │ │ ├── EnableWebhooksTest.php
│ │ │ ├── MarshallFilesTest.php
│ │ │ ├── PreBuildTest.php
│ │ │ ├── RefreshModulesTest.php
│ │ │ ├── RunBalerTest.php
│ │ │ ├── SetErrorReportDirNestingLevelTest.php
│ │ │ └── _files
│ │ │ │ └── app
│ │ │ │ └── etc
│ │ │ │ └── config.php
│ │ ├── Deploy
│ │ │ ├── BackgroundProcessKillTest.php
│ │ │ ├── CompressStaticContentTest.php
│ │ │ ├── DeployCompletionTest.php
│ │ │ ├── DeployStaticContent
│ │ │ │ └── GenerateTest.php
│ │ │ ├── DeployStaticContentTest.php
│ │ │ ├── DisableCronTest.php
│ │ │ ├── DisableGoogleAnalyticsTest.php
│ │ │ ├── InstallUpdate
│ │ │ │ ├── ConfigUpdate
│ │ │ │ │ ├── AmqpTest.php
│ │ │ │ │ ├── CacheTypeTest.php
│ │ │ │ │ ├── CronConsumersRunnerTest.php
│ │ │ │ │ ├── DbConnectionTest.php
│ │ │ │ │ ├── DocumentRootTest.php
│ │ │ │ │ ├── Lock
│ │ │ │ │ │ └── ConfigTest.php
│ │ │ │ │ ├── LockTest.php
│ │ │ │ │ ├── PrepareConfigTest.php
│ │ │ │ │ ├── SearchEngineTest.php
│ │ │ │ │ ├── Session
│ │ │ │ │ │ └── ConfigTest.php
│ │ │ │ │ ├── SessionTest.php
│ │ │ │ │ ├── Urls
│ │ │ │ │ │ ├── DatabaseTest.php
│ │ │ │ │ │ └── EnvironmentTest.php
│ │ │ │ │ └── UrlsTest.php
│ │ │ │ ├── ConfigUpdateTest.php
│ │ │ │ ├── Install
│ │ │ │ │ ├── CleanupDbConfigTest.php
│ │ │ │ │ ├── ConfigImportTest.php
│ │ │ │ │ ├── ResetPasswordTest.php
│ │ │ │ │ ├── Setup
│ │ │ │ │ │ └── InstallCommandFactoryTest.php
│ │ │ │ │ └── SetupTest.php
│ │ │ │ └── Update
│ │ │ │ │ ├── SetAdminUrlTest.php
│ │ │ │ │ └── SetupTest.php
│ │ │ ├── InstallUpdateTest.php
│ │ │ ├── PhpOpcacheResetTest.php
│ │ │ ├── PreDeploy
│ │ │ │ ├── CheckStateTest.php
│ │ │ │ ├── CleanFileCacheTest.php
│ │ │ │ ├── CleanRedisCacheTest.php
│ │ │ │ ├── CleanStaticContentTest.php
│ │ │ │ ├── CleanViewPreprocessedTest.php
│ │ │ │ ├── ConfigUpdate
│ │ │ │ │ └── CacheTest.php
│ │ │ │ ├── RestorePatchLogTest.php
│ │ │ │ └── RestoreWritableDirectoriesTest.php
│ │ │ ├── PreDeployTest.php
│ │ │ ├── RemoteStorageTest.php
│ │ │ ├── RemoveDeployFailedFlagTest.php
│ │ │ ├── SetCryptKeyTest.php
│ │ │ ├── SplitDbConnection
│ │ │ │ └── SlaveConnectionTest.php
│ │ │ ├── SplitDbConnectionTest.php
│ │ │ ├── UnlockCronJobsTest.php
│ │ │ └── _files
│ │ │ │ └── config.php
│ │ ├── DisableMaintenanceModeTest.php
│ │ ├── EnableMaintenanceModeTest.php
│ │ ├── PostDeploy
│ │ │ ├── BackupTest.php
│ │ │ ├── CleanCacheTest.php
│ │ │ ├── DeployFailedTest.php
│ │ │ ├── EnableCronTest.php
│ │ │ ├── TimeToFirstByteTest.php
│ │ │ └── WarmUpTest.php
│ │ ├── SetProductionModeTest.php
│ │ ├── SkipStepTest.php
│ │ └── ValidateConfigurationTest.php
│ │ ├── Util
│ │ ├── ArrayManagerTest.php
│ │ ├── BackgroundProcessTest.php
│ │ ├── BuildDirCopierTest.php
│ │ ├── CpuTest.php
│ │ ├── MaintenanceModeSwitcherTest.php
│ │ ├── PasswordGeneratorTest.php
│ │ ├── PhpFormatterTest.php
│ │ ├── StaticContentCleanerTest.php
│ │ ├── StaticContentCompressorTest.php
│ │ ├── UpgradeProcessTest.php
│ │ ├── UrlManagerTest.php
│ │ └── _files
│ │ │ ├── app
│ │ │ └── etc
│ │ │ │ ├── config.php
│ │ │ │ └── env.php
│ │ │ ├── init
│ │ │ └── pub
│ │ │ │ └── static
│ │ │ │ ├── config.php
│ │ │ │ └── frontend
│ │ │ │ └── test.php
│ │ │ └── vendor
│ │ │ └── acme
│ │ │ └── exploditron
│ │ │ └── etc
│ │ │ └── module.xml
│ │ └── WarmUp
│ │ ├── UrlsPattern
│ │ ├── CategoryCmsPageTest.php
│ │ ├── CommandArgumentBuilderTest.php
│ │ ├── ConfigShowUrlCommandTest.php
│ │ ├── PatternFactoryTest.php
│ │ ├── ProductTest.php
│ │ └── StorePageTest.php
│ │ ├── UrlsPatternTest.php
│ │ └── UrlsTest.php
├── Util
│ ├── ArrayManager.php
│ ├── BackgroundProcess.php
│ ├── BuildDirCopier.php
│ ├── Cpu.php
│ ├── MaintenanceModeSwitcher.php
│ ├── PasswordGenerator.php
│ ├── PhpFormatter.php
│ ├── StaticContentCleaner.php
│ ├── StaticContentCompressor.php
│ ├── UpgradeProcess.php
│ └── UrlManager.php
└── WarmUp
│ ├── Urls.php
│ ├── UrlsPattern.php
│ └── UrlsPattern
│ ├── CategoryCmsPage.php
│ ├── CommandArgumentBuilder.php
│ ├── ConfigShowUrlCommand.php
│ ├── PatternFactory.php
│ ├── PatternInterface.php
│ ├── Product.php
│ └── StorePage.php
├── tests
├── README.md
├── functional
│ ├── _data
│ │ ├── .gitkeep
│ │ ├── files
│ │ │ ├── custom_db_configuration
│ │ │ │ └── .magento.env.yaml
│ │ │ ├── debug_logging
│ │ │ │ └── .magento.env.yaml
│ │ │ ├── error_codes
│ │ │ │ ├── .magento.env.fail.yaml
│ │ │ │ └── .magento.env.success.yaml
│ │ │ ├── patches
│ │ │ │ ├── patch.patch
│ │ │ │ ├── target_file.md
│ │ │ │ └── target_file_applied_patch.md
│ │ │ ├── report_dir_nesting_level
│ │ │ │ ├── .magento.env.yaml
│ │ │ │ ├── invalid_local.xml
│ │ │ │ ├── local_with_property.xml
│ │ │ │ └── local_without_property.xml
│ │ │ ├── scd
│ │ │ │ ├── env_matrix_1.yaml
│ │ │ │ ├── env_matrix_2.yaml
│ │ │ │ ├── env_matrix_3.yaml
│ │ │ │ ├── scd-strategy-compact.yaml
│ │ │ │ ├── scd-strategy-quick.yaml
│ │ │ │ └── scd-strategy-standard.yaml
│ │ │ ├── scdinbuild
│ │ │ │ └── config.php
│ │ │ ├── scdondemand
│ │ │ │ └── .magento.env.yaml
│ │ │ └── wrong_db_configuration
│ │ │ │ └── .magento.env.yaml
│ │ ├── modules
│ │ │ └── Magento
│ │ │ │ └── CronTest
│ │ │ │ ├── Model
│ │ │ │ └── TestJob.php
│ │ │ │ ├── composer.json
│ │ │ │ ├── etc
│ │ │ │ ├── crontab.xml
│ │ │ │ └── module.xml
│ │ │ │ └── registration.php
│ │ └── packages
│ │ │ └── ece-tools-extend
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── composer.json
│ │ │ ├── config
│ │ │ └── services.xml
│ │ │ ├── registration.php
│ │ │ ├── scenario
│ │ │ ├── extend-build-generate-skip-di.xml
│ │ │ ├── extend-build-generate.xml
│ │ │ ├── extend-build-transfer.xml
│ │ │ ├── extend-deploy.xml
│ │ │ └── extend-post-deploy-skip-steps.xml
│ │ │ └── src
│ │ │ └── Step
│ │ │ ├── Build
│ │ │ ├── SetProductionMode.php
│ │ │ └── StaticContentUpdate.php
│ │ │ └── Deploy
│ │ │ ├── PreDeploy.php
│ │ │ └── RemoveDeployFailedFlag.php
│ └── _output
│ │ └── .gitignore
├── integration
│ ├── Container.php
│ └── phpunit.xml.dist
├── static
│ ├── Sniffs
│ │ ├── Directives
│ │ │ └── StrictTypesSniff.php
│ │ └── Whitespace
│ │ │ └── MultipleEmptyLinesSniff.php
│ ├── phpcs-ruleset.xml
│ ├── phpmd-ruleset.xml
│ └── phpstan.neon
└── unit
│ ├── .gitignore
│ ├── code-coverage.php
│ └── phpunit.xml.dist
└── views
└── reset_password.html
/.docker/.gitignore:
--------------------------------------------------------------------------------
1 | composer.env
2 |
--------------------------------------------------------------------------------
/.docker/global.env:
--------------------------------------------------------------------------------
1 | MAGENTO_RUN_MODE=production
2 | PHP_MEMORY_LIMIT=2048M
3 | DEBUG=false
4 | ENABLE_SENDMAIL=false
5 | UPLOAD_MAX_FILESIZE=64M
6 |
--------------------------------------------------------------------------------
/.github/.metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "templateVersion": "0.2",
3 | "product": {
4 | "name": "Magento Commerce Cloud Deployment Tools",
5 | "description": "ECE-Tools is a set of scripts and tools designed to manage and deploy Cloud projects"
6 | },
7 | "contacts": {
8 | "team": {
9 | "name": "Mystic Mountain",
10 | "DL": "Grp-Mystic-Mountain",
11 | "slackChannel": "#mystic-mountain-team"
12 | }
13 | },
14 | "ticketTracker": {
15 | "functionalJiraQueue": {
16 | "projectKey": "MCLOUD"
17 | },
18 | "securityJiraQueue": {
19 | "projectKey": "MAGREQ",
20 | "component": "MAGREQ/Magento Cloud Engineering"
21 | }
22 | },
23 | "productionCodeBranches": ["2002.0", "2002.1"]
24 | }
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Technical issue with the Magento ECE-Tools
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 | ---
8 |
9 |
19 |
20 | ### Preconditions
21 |
25 | 1.
26 | 2.
27 |
28 | ### Steps to reproduce
29 |
33 | 1.
34 | 2.
35 | 3.
36 |
37 | ### Expected result
38 |
39 | 1. [Screenshots, logs or description]
40 |
41 | ### Actual result
42 |
43 | 1. [Screenshots, logs or description]
44 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 | ---
8 |
9 | **Is your feature request related to a problem? Please describe.**
10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11 |
12 | **Describe the solution you'd like**
13 | A clear and concise description of what you want to happen.
14 |
15 | **Describe alternatives you've considered**
16 | A clear and concise description of any alternative solutions or features you've considered.
17 |
18 | **Additional context**
19 | Add any other context or screenshots about the feature request here.
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.idea
3 | /vendor
4 | /composer.phar
5 | /composer.lock
6 | /sandbox
7 | /docker-compose.yml
8 | /auth.json
9 | /codeception.yml
10 | /_workdir
11 | /_workdir_cache
12 | /*.code-workspace
13 | **/.phpunit.result.cache
14 |
--------------------------------------------------------------------------------
/COPYING.txt:
--------------------------------------------------------------------------------
1 | Copyright © 2013-present Magento, Inc.
2 |
3 | Each Magento source file included in this distribution is licensed under OSL-3.0 license
4 | Please see LICENSE.txt for the full text of the OSL-3.0 license or visit http://opensource.org/licenses/osl-3.0.php
5 |
--------------------------------------------------------------------------------
/SplitDb82Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.6'],
24 | ];
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/autoload.php:
--------------------------------------------------------------------------------
1 | run();
11 |
--------------------------------------------------------------------------------
/bootstrap.php:
--------------------------------------------------------------------------------
1 | Languages & Frameworks -> Schemas and DTDs`
4 | 2. Add new item pointing `urn:magento:ece-tools:config/scenario.xsd` to the correct file in ECE-Tools codebase
5 |
--------------------------------------------------------------------------------
/dist/front-static.php.dist:
--------------------------------------------------------------------------------
1 | createApplication(\Magento\Framework\App\StaticResource::class);
14 | $bootstrap->run($app);
15 |
--------------------------------------------------------------------------------
/scenario/build/transfer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Psr\Log\LoggerInterface
8 |
9 | - Magento\MagentoCloud\Step\Build\BackupData\StaticContent
10 | - Magento\MagentoCloud\Step\Build\BackupData\WritableDirectories
11 | - Magento\MagentoCloud\Step\Build\ClearMountedDirectories
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/scenario/post-deploy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Psr\Log\LoggerInterface
7 |
8 | -
9 |
- Magento\MagentoCloud\Config\Validator\Deploy\DebugLogging
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/App/ContainerException.php:
--------------------------------------------------------------------------------
1 | fileList = $fileList;
29 | }
30 |
31 | /**
32 | * @inheritDoc
33 | */
34 | public function read(): array
35 | {
36 | try {
37 | $handle = @fopen($this->fileList->getCloudErrorLog(), 'r');
38 | if (!$handle) {
39 | return [];
40 | }
41 | $logs = [];
42 | while (($line = fgets($handle)) !== false) {
43 | $error = json_decode($line, true);
44 | $logs[$error['errorCode']] = $error;
45 | }
46 | fclose($handle);
47 |
48 | return $logs;
49 | } catch (UndefinedPackageException $e) {
50 | return [];
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/App/Logger/Error/ReaderInterface.php:
--------------------------------------------------------------------------------
1 | container = $container;
31 | }
32 |
33 | /**
34 | * @return JsonErrorFormatter
35 | */
36 | public function create(): JsonErrorFormatter
37 | {
38 | return new JsonErrorFormatter(
39 | $this->container->get(ErrorInfo::class),
40 | $this->container->get(ReaderInterface::class),
41 | JsonFormatter::BATCH_MODE_JSON,
42 | true
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/App/Logger/Gelf/Handler.php:
--------------------------------------------------------------------------------
1 | getMessage());
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/App/Logger/Gelf/MessageFormatter.php:
--------------------------------------------------------------------------------
1 | additional = $additional;
33 | }
34 |
35 | /**
36 | * @inheritdoc
37 | */
38 | public function format(\Monolog\LogRecord|array $record): Message
39 | {
40 | $message = parent::format($record);
41 |
42 | foreach ($this->additional as $key => $value) {
43 | $message->setAdditional($key, $value);
44 | }
45 |
46 | return $message;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/App/Logger/LineFormatterFactory.php:
--------------------------------------------------------------------------------
1 | container = $container;
29 | }
30 |
31 | /**
32 | * @return LineFormatter
33 | */
34 | public function create(): LineFormatter
35 | {
36 | return new LineFormatter(LineFormatter::FORMAT_BASE, null, true, true);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/App/Logger/Sanitizer.php:
--------------------------------------------------------------------------------
1 | '-password=\'******\'$1',
22 | '/mysqldump (.* )-p\'[^\']+\'/i' => 'mysqldump $1-p\'******\'',
23 | ];
24 |
25 | /**
26 | * Finds and replace sensitive data in record message.
27 | *
28 | * @param string $message
29 | * @return string
30 | */
31 | public function sanitize(string $message): string
32 | {
33 | foreach ($this->replacements as $pattern => $replacement) {
34 | $message = preg_replace($pattern, $replacement, $message);
35 | }
36 |
37 | return $message;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/App/LoggerException.php:
--------------------------------------------------------------------------------
1 | manager = $manager;
38 |
39 | parent::__construct();
40 | }
41 |
42 | /**
43 | * @inheritdoc
44 | */
45 | protected function configure(): void
46 | {
47 | $this->setName(self::NAME)
48 | ->setDescription('Applies custom patches.');
49 |
50 | parent::configure();
51 | }
52 |
53 | /**
54 | * {@inheritDoc}
55 | *
56 | * @throws ShellException
57 | * @throws ConfigException
58 | */
59 | public function execute(InputInterface $input, OutputInterface $output): int
60 | {
61 | $this->manager->apply();
62 |
63 | return Cli::SUCCESS;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/Command/Backup/FileList.php:
--------------------------------------------------------------------------------
1 | backupList = $backupList;
37 | $this->file = $file;
38 | }
39 |
40 | /**
41 | * Returns the list of alias path of existed backup files
42 | *
43 | * @return array
44 | */
45 | public function get(): array
46 | {
47 | $resultList = [];
48 | foreach ($this->backupList->getList() as $aliasPath => $filePath) {
49 | $backupPath = $filePath . BackupList::BACKUP_SUFFIX;
50 | if ($this->file->isExists($backupPath)) {
51 | $resultList[] = $aliasPath;
52 | }
53 | }
54 |
55 | return $resultList;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Command/Dev/UpdateComposer/clear_module_requirements.php.tpl:
--------------------------------------------------------------------------------
1 | $requireVersion) {
22 | if (in_array($requireName, $packages)) {
23 | $composerJson['require'][$requireName] = '*@dev';
24 | }
25 | }
26 |
27 | file_put_contents(
28 | $dir . '/composer.json',
29 | json_encode($composerJson, JSON_PRETTY_PRINT)
30 | );
31 | }
32 |
33 | foreach ($repos as $repoName => $repoOptions) {
34 | $repoDir = __DIR__ .'/' . $repoOptions['url'];
35 | clearRequirements($repoDir, $packages);
36 | }
37 |
--------------------------------------------------------------------------------
/src/Command/Wizard/Util/OutputFormatter.php:
--------------------------------------------------------------------------------
1 | writeln(' - ' . $message);
24 | }
25 |
26 | /**
27 | * @param OutputInterface $output
28 | * @param bool $status
29 | * @param string $message
30 | */
31 | public function writeResult(OutputInterface $output, bool $status, string $message)
32 | {
33 | $message = $status
34 | ? '' . $message . ''
35 | : '' . $message . '';
36 |
37 | $output->writeln($message);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Config/Application/HookChecker.php:
--------------------------------------------------------------------------------
1 | environment = $environment;
30 | }
31 |
32 | /**
33 | * Checks that post_deploy hook is configured and `ece-tool post-deploy` is added to post_deploy hook.
34 | *
35 | * @return bool
36 | */
37 | public function isPostDeployHookEnabled(): bool
38 | {
39 | $appConfig = $this->environment->getApplication();
40 |
41 | $postDeployHooks = $appConfig['hooks'][self::HOOK_POST_DEPLOY] ?? '';
42 |
43 | return false !== strpos($postDeployHooks, '/ece-tools');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Config/ConfigException.php:
--------------------------------------------------------------------------------
1 | file = $file;
37 | $this->fileList = $fileList;
38 | }
39 |
40 | /**
41 | * @return array
42 | */
43 | public function read(): array
44 | {
45 | $configPath = $this->fileList->getEnv();
46 | if (!$this->file->isExists($configPath)) {
47 | return [];
48 | }
49 |
50 | return require $configPath;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Config/Magento/Env/ReaderInterface.php:
--------------------------------------------------------------------------------
1 | file = $file;
35 | $this->fileList = $fileList;
36 | }
37 |
38 | /**
39 | * @return array
40 | */
41 | public function read(): array
42 | {
43 | $configPath = $this->fileList->getConfig();
44 |
45 | if (!$this->file->isExists($configPath)) {
46 | return [];
47 | }
48 |
49 | $content = $this->file->requireFile($configPath);
50 |
51 | return is_array($content) ? $content : [];
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Config/Magento/Shared/ReaderInterface.php:
--------------------------------------------------------------------------------
1 | deployConfig = $deployConfig;
28 | }
29 |
30 | /**
31 | * @return string
32 | */
33 | public function getDriver(): string
34 | {
35 | return (string)($this->deployConfig->get(DeployInterface::VAR_REMOTE_STORAGE)['driver'] ?? '');
36 | }
37 |
38 | /**
39 | * @return string
40 | */
41 | public function getPrefix(): string
42 | {
43 | return (string)($this->deployConfig->get(DeployInterface::VAR_REMOTE_STORAGE)['prefix'] ?? '');
44 | }
45 |
46 | /**
47 | * @return string[]
48 | */
49 | public function getConfig(): array
50 | {
51 | return (array)($this->deployConfig->get(DeployInterface::VAR_REMOTE_STORAGE)['config'] ?? []);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Config/RepositoryFactory.php:
--------------------------------------------------------------------------------
1 | resultFactory = $resultFactory;
30 | }
31 |
32 | /**
33 | * @inheritDoc
34 | */
35 | public function validate(string $key, $value): ResultInterface
36 | {
37 | if (array_diff($value, DeployInterface::SPLIT_DB_VALUES)) {
38 | return $this->resultFactory->error(sprintf(
39 | 'The %s variable contains the invalid value. '
40 | . 'It should be an array with following values: [%s].',
41 | $key,
42 | implode(', ', DeployInterface::SPLIT_DB_VALUES)
43 | ));
44 | }
45 | return $this->resultFactory->success();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Config/Schema/Validator/ValidatorFactory.php:
--------------------------------------------------------------------------------
1 | container = $container;
29 | }
30 |
31 | /**
32 | * @param string $class
33 | * @param array $arguments
34 | * @return ValidatorInterface
35 | */
36 | public function create(string $class, array $arguments = []): ValidatorInterface
37 | {
38 | if (count($arguments)) {
39 | array_unshift($arguments, $this->container->create(ResultFactory::class));
40 | }
41 |
42 | return $this->container->create($class, $arguments);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Config/Schema/Validator/ValidatorInterface.php:
--------------------------------------------------------------------------------
1 | reader = $reader;
37 | $this->resultFactory = $resultFactory;
38 | }
39 |
40 | /**
41 | * @inheritdoc
42 | */
43 | public function validate(): Validator\ResultInterface
44 | {
45 | return isset($this->reader->read()['modules'])
46 | ? $this->resultFactory->success()
47 | : $this->resultFactory->error(
48 | 'The modules section is missing from the shared config file.',
49 | '',
50 | Error::WARN_MISSED_MODULE_SECTION
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Config/Validator/CompositeValidator.php:
--------------------------------------------------------------------------------
1 | stageConfig = $stageConfig;
29 | }
30 |
31 | /**
32 | * Checks if split db is configured in SPLIT_DB or DATABASE_CONFIGURATION options
33 | *
34 | * @return bool
35 | * @throws ConfigException
36 | */
37 | public function isConfigured(): bool
38 | {
39 | if (!empty($this->stageConfig->get(DeployInterface::VAR_SPLIT_DB))) {
40 | return true;
41 | }
42 |
43 | if (!empty($dbConfig = $this->stageConfig->get(DeployInterface::VAR_DATABASE_CONFIGURATION))) {
44 | if (isset($dbConfig['connection'][DeployInterface::SPLIT_DB_VALUE_QUOTE]) ||
45 | isset($dbConfig['connection'][DeployInterface::SPLIT_DB_VALUE_SALES])
46 | ) {
47 | return true;
48 | }
49 | }
50 |
51 | return false;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Config/Validator/Result/Success.php:
--------------------------------------------------------------------------------
1 | container = $container;
29 | }
30 |
31 | /**
32 | * @param string $validator
33 | * @return ValidatorInterface
34 | */
35 | public function create(string $validator): ValidatorInterface
36 | {
37 | return $this->container->create($validator);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Config/ValidatorInterface.php:
--------------------------------------------------------------------------------
1 | getHost())
25 | . ' -u ' . escapeshellarg($connectionData->getUser());
26 |
27 | $port = $connectionData->getPort();
28 | if (!empty($port)) {
29 | $command .= ' -P ' . escapeshellarg($port);
30 | }
31 |
32 | $password = $connectionData->getPassword();
33 | if ($password) {
34 | $command .= ' -p' . escapeshellarg($password);
35 | }
36 | $command .= ' ' . escapeshellarg($connectionData->getDbName())
37 | . ' --single-transaction --no-autocommit --quick';
38 |
39 | return $command;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/DB/DumpInterface.php:
--------------------------------------------------------------------------------
1 | fileList = $fileList;
39 | $this->magentoVersion = $magentoVersion;
40 | }
41 |
42 | /**
43 | * Returns a list of files for backup
44 | *
45 | * @return array
46 | */
47 | public function getList(): array
48 | {
49 | $fileList = [
50 | 'app/etc/env.php' => $this->fileList->getEnv(),
51 | 'app/etc/config.php' => $this->fileList->getConfig(),
52 | ];
53 |
54 | if (!$this->magentoVersion->isGreaterOrEqual('2.2')) {
55 | $fileList['app/etc/config.local.php'] = $this->fileList->getConfigLocal();
56 | }
57 |
58 | return $fileList;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/src/Filesystem/DirectoryCopier/StrategyInterface.php:
--------------------------------------------------------------------------------
1 | 'var/.regenerate',
20 | Manager::FLAG_STATIC_CONTENT_DEPLOY_IN_BUILD => '.static_content_deploy',
21 | Manager::FLAG_DEPLOY_HOOK_IS_FAILED => 'var/.deploy_is_failed',
22 | Manager::FLAG_IGNORE_SPLIT_DB => 'var/.ignore_split_db',
23 | Manager::FLAG_ENV_FILE_ABSENCE => 'var/.env_file_absence',
24 | ];
25 |
26 | /**
27 | * Gets flag path by key, returns null if flag not exists.
28 | *
29 | * @param string $key
30 | * @return string|null
31 | */
32 | public function get(string $key): ?string
33 | {
34 | return self::$flags[$key] ?? null;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Filesystem/Reader/ReaderInterface.php:
--------------------------------------------------------------------------------
1 | root = $root;
32 | $this->magentoRoot = $magentoRoot;
33 | }
34 |
35 | /**
36 | * @return string
37 | */
38 | public function getRoot(): string
39 | {
40 | return $this->root;
41 | }
42 |
43 | /**
44 | * @return string
45 | */
46 | public function getMagentoRoot(): string
47 | {
48 | return $this->magentoRoot;
49 | }
50 |
51 | /**
52 | * @return string
53 | */
54 | public function getConfig(): string
55 | {
56 | return $this->getRoot() . '/config';
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/Filesystem/Writer/WriterInterface.php:
--------------------------------------------------------------------------------
1 | container = $container;
31 | }
32 |
33 | /**
34 | * Creates a Client instance.
35 | *
36 | * @param array $config
37 | * @return Client
38 | */
39 | public function create(array $config = []): Client
40 | {
41 | return $this->container->create(Client::class, ['config' => $config]);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Http/RequestFactory.php:
--------------------------------------------------------------------------------
1 | container = $container;
32 | }
33 |
34 | /**
35 | * @param string $method
36 | * @param string $uri
37 | * @return RequestInterface
38 | */
39 | public function create(string $method, string $uri): RequestInterface
40 | {
41 | return $this->container->create(Request::class, ['method' => $method, 'uri' => $uri]);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/OnFail/Action/ActionException.php:
--------------------------------------------------------------------------------
1 | flagManager = $flagManager;
26 | }
27 |
28 | /**
29 | * Creates .deploy_is_failed flag.
30 | *
31 | * {@inheritDoc}
32 | */
33 | public function execute(): void
34 | {
35 | try {
36 | $this->flagManager->set(FlagManager::FLAG_DEPLOY_HOOK_IS_FAILED);
37 | } catch (Throwable $exception) {
38 | throw new ActionException(
39 | $exception->getMessage(),
40 | $exception->getCode(),
41 | $exception
42 | );
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/OnFail/Action/SkipAction.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
35 | $this->actionName = $actionName;
36 | }
37 |
38 | /**
39 | * Logs the information about action skipping
40 | *
41 | * {@inheritDoc}
42 | */
43 | public function execute(): void
44 | {
45 | $this->logger->info(sprintf('Action "%s" was skipped', $this->actionName));
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Package/UndefinedPackageException.php:
--------------------------------------------------------------------------------
1 | $action['@name'],
25 | 'type' => $action['@type'] ?? '',
26 | 'skip' => isset($action['@skip']) && $action['@skip'] === 'true',
27 | ];
28 |
29 | if (isset($action['@priority'])) {
30 | $actionData['priority'] = (int)$action['@priority'];
31 | }
32 |
33 | return $actionData;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Scenario/Exception/ProcessorException.php:
--------------------------------------------------------------------------------
1 | $b['priority'];
24 | };
25 |
26 | foreach ($scenarios as &$scenario) {
27 | if (isset($scenario['arguments'])) {
28 | foreach ($scenario['arguments'] as &$argument) {
29 | if ($argument['name'] === 'steps') {
30 | uasort($argument['items'], $sort);
31 | }
32 | if ($argument['name'] === 'validators') {
33 | foreach ($argument['items'] as &$validatorLevel) {
34 | uasort($validatorLevel['items'], $sort);
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
41 | uasort($scenarios, $sort);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Service/Adapter/CredisFactory.php:
--------------------------------------------------------------------------------
1 | getVersion();
31 |
32 | if (Semver::satisfies($version, '>= 5')) {
33 | return static::ENGINE_NAME . (int)$version;
34 | }
35 |
36 | return static::ENGINE_NAME;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Service/Php.php:
--------------------------------------------------------------------------------
1 | PHP_VERSION];
23 | }
24 |
25 | /**
26 | * Get the PHP version.
27 | *
28 | * @return string
29 | */
30 | public function getVersion(): string
31 | {
32 | return $this->getConfiguration()['version'];
33 | }
34 |
35 | /**
36 | * Checks if opcache is enabled for PHP CLI
37 | *
38 | * @return bool
39 | */
40 | public function isOpcacheCliEnabled(): bool
41 | {
42 | return (bool)ini_get('opcache.enable_cli');
43 | }
44 |
45 | /**
46 | * Resets the contents of the opcache
47 | *
48 | * @return bool
49 | */
50 | public function resetOpcache(): bool
51 | {
52 | return opcache_reset();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/Service/ServiceException.php:
--------------------------------------------------------------------------------
1 | shell = $shell;
26 | }
27 |
28 | /**
29 | * @inheritDoc
30 | */
31 | public function execute(string $command, array $args = []): ProcessInterface
32 | {
33 | return $this->shell->execute('php ./bin/magento ' . $command . ' --ansi --no-interaction', array_filter($args));
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Shell/Process.php:
--------------------------------------------------------------------------------
1 | mustRun();
36 | } catch (ProcessFailedException $e) {
37 | $process = $e->getProcess();
38 |
39 | $error = sprintf(
40 | 'The command "%s" failed. %s',
41 | $process->getCommandLine(),
42 | trim($process->getErrorOutput() ?: $process->getOutput(), "\n")
43 | );
44 |
45 | throw new ProcessException($error, $process->getExitCode());
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Shell/ProcessException.php:
--------------------------------------------------------------------------------
1 | container = $container;
31 | }
32 |
33 | /**
34 | * @param string $strategy
35 | * @return ShellInterface
36 | */
37 | public function create(string $strategy): ShellInterface
38 | {
39 | if ($strategy === self::STRATEGY_MAGENTO_SHELL) {
40 | return $this->createMagento();
41 | }
42 |
43 | return $this->container->create(Shell::class);
44 | }
45 |
46 | /**
47 | * @return MagentoShell
48 | */
49 | public function createMagento(): MagentoShell
50 | {
51 | return $this->container->create(MagentoShell::class);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Shell/ShellInterface.php:
--------------------------------------------------------------------------------
1 | manager = $manager;
33 | }
34 |
35 | /**
36 | * @inheritdoc
37 | */
38 | public function execute(): void
39 | {
40 | try {
41 | $this->manager->apply();
42 | } catch (ConfigException $e) {
43 | throw new StepException($e->getMessage(), $e->getCode(), $e);
44 | } catch (ShellException $e) {
45 | throw new StepException($e->getMessage(), Error::BUILD_PATCH_APPLYING_FAILED, $e);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Step/Build/BackupData.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
37 | $this->steps = $steps;
38 | }
39 |
40 | /**
41 | * @inheritdoc
42 | */
43 | public function execute()
44 | {
45 | $this->logger->notice('Copying data to the ./init directory');
46 |
47 | foreach ($this->steps as $step) {
48 | $step->execute();
49 | }
50 |
51 | $this->logger->notice('End of copying data to the ./init directory');
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/Step/Deploy/BackgroundProcessKill.php:
--------------------------------------------------------------------------------
1 | backgroundProcess = $backgroundProcess;
29 | }
30 |
31 | /**
32 | * Kills all running Magento cron jobs and consumers processes.
33 | *
34 | * @return void
35 | */
36 | public function execute()
37 | {
38 | $this->backgroundProcess->kill();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Step/Deploy/InstallUpdate/ConfigUpdate.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
37 | $this->steps = $steps;
38 | }
39 |
40 | /**
41 | * @inheritdoc
42 | */
43 | public function execute()
44 | {
45 | $this->logger->info('Updating configuration from environment variables.');
46 | $this->steps->execute();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Step/Deploy/PhpOpcacheReset.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
38 | $this->php = $php;
39 | }
40 |
41 | /**
42 | * @inheritDoc
43 | */
44 | public function execute()
45 | {
46 | if ($this->php->isOpcacheCliEnabled()) {
47 | $this->logger->notice('Reset the contents of the opcache');
48 | $this->php->resetOpcache();
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Step/Deploy/PreDeploy.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
37 | $this->steps = $steps;
38 | }
39 |
40 | /**
41 | * Runs all processes that have to be run before deploy starting.
42 | * Enabling maintenance mode afterward.
43 | *
44 | * It's impossible to enable maintenance mode before pre-deploy processes as bin/magento command
45 | * can't be run without some files that are copying during files restoring from build phase.
46 | *
47 | * {@inheritdoc}
48 | */
49 | public function execute()
50 | {
51 | $this->logger->notice('Starting pre-deploy.');
52 |
53 | foreach ($this->steps as $step) {
54 | $step->execute();
55 | }
56 |
57 | $this->logger->notice('End of pre-deploy.');
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/Step/DisableMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | switcher = $switcher;
30 | }
31 |
32 | /**
33 | * @inheritDoc
34 | */
35 | public function execute()
36 | {
37 | try {
38 | $this->switcher->disable();
39 | } catch (GenericException $e) {
40 | throw new StepException($e->getMessage(), Error::DEPLOY_MAINTENANCE_MODE_DISABLING_FAILED, $e);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Step/EnableMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | switcher = $switcher;
30 | }
31 |
32 | /**
33 | * @inheritDoc
34 | */
35 | public function execute()
36 | {
37 | try {
38 | $this->switcher->enable();
39 | } catch (GenericException $e) {
40 | throw new StepException($e->getMessage(), Error::DEPLOY_MAINTENANCE_MODE_ENABLING_FAILED, $e);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Step/PostDeploy/DeployFailed.php:
--------------------------------------------------------------------------------
1 | flagManager = $flagManager;
31 | }
32 |
33 | /**
34 | * @inheritDoc
35 | */
36 | public function execute()
37 | {
38 | if ($this->flagManager->exists(Manager::FLAG_DEPLOY_HOOK_IS_FAILED)) {
39 | throw new StepException('Post-deploy is skipped because deploy was failed.', Error::PD_DEPLOY_IS_FAILED);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/Step/PostDeploy/EnableCron.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
41 | $this->cronSwitcher = $cronSwitcher;
42 | }
43 |
44 | /**
45 | * Enables Magento cron
46 | *
47 | * {@inheritdoc}
48 | */
49 | public function execute()
50 | {
51 | try {
52 | $this->logger->info('Enable cron');
53 | $this->cronSwitcher->enable();
54 | } catch (FileSystemException $e) {
55 | throw new StepException($e->getMessage(), Error::PD_ENV_PHP_IS_NOT_WRITABLE, $e);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/Step/SkipStep.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
35 | $this->stepName = $stepName;
36 | }
37 |
38 | /**
39 | * Logs the information about step skipping.
40 | *
41 | * {@inheritDoc}
42 | */
43 | public function execute()
44 | {
45 | $this->logger->info(sprintf('Step "%s" was skipped', $this->stepName));
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Step/StepException.php:
--------------------------------------------------------------------------------
1 | '2.3.4'],
28 | ];
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/BackupDb81Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.4'],
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/BackupDb83Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.7'],
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/BackupDb84Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.8'],
23 | ];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron244Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.4',
23 | 'variables' => [
24 | 'MAGENTO_CLOUD_VARIABLES' => [
25 | 'ADMIN_EMAIL' => 'admin@example.com',
26 | 'ADMIN_LOCALE' => 'fr_FR'
27 | ],
28 | ],
29 | ],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron24Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.0',
23 | 'variables' => [
24 | 'MAGENTO_CLOUD_VARIABLES' => [
25 | 'ADMIN_EMAIL' => 'admin@example.com',
26 | 'ADMIN_LOCALE' => 'fr_FR'
27 | ],
28 | ],
29 | ],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron81Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.4',
23 | 'variables' => [
24 | 'MAGENTO_CLOUD_VARIABLES' => [
25 | 'ADMIN_EMAIL' => 'admin@example.com',
26 | 'ADMIN_LOCALE' => 'fr_FR'
27 | ],
28 | ],
29 | ],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron82Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.6',
25 | 'variables' => [
26 | 'MAGENTO_CLOUD_VARIABLES' => [
27 | 'ADMIN_EMAIL' => 'admin@example.com',
28 | 'ADMIN_LOCALE' => 'fr_FR'
29 | ],
30 | ],
31 | ],
32 | ];
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron83Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.7',
23 | 'variables' => [
24 | 'MAGENTO_CLOUD_VARIABLES' => [
25 | 'ADMIN_EMAIL' => 'admin@example.com',
26 | 'ADMIN_LOCALE' => 'fr_FR'
27 | ],
28 | ],
29 | ],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/Cron84Cest.php:
--------------------------------------------------------------------------------
1 | '2.4.8',
23 | 'variables' => [
24 | 'MAGENTO_CLOUD_VARIABLES' => [
25 | 'ADMIN_EMAIL' => 'admin@example.com',
26 | 'ADMIN_LOCALE' => 'fr_FR'
27 | ],
28 | ],
29 | ],
30 | ];
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/CronUnlock82Cest.php:
--------------------------------------------------------------------------------
1 | generateDockerCompose('--mode=production');
30 | $I->runDockerComposeCommand('run build cloud-build');
31 | $I->cleanDirectories(['/bin/*']);
32 | $I->assertFalse($I->runDockerComposeCommand('run build ece-command build'));
33 | $I->seeInOutput('Could not open input file: ./bin/magento');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/PostDeploy82Cest.php:
--------------------------------------------------------------------------------
1 | '2.3.5', 'to' => '>=2.4.0 <2.4.1'],
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Test/Functional/Acceptance/WizardScd81Cest.php:
--------------------------------------------------------------------------------
1 | getMockForAbstractClass(ContainerInterface::class);
25 |
26 | $this->assertInstanceOf(
27 | LineFormatter::class,
28 | (new LineFormatterFactory($containerMock))->create()
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Test/Unit/App/_file/schema.error.yaml:
--------------------------------------------------------------------------------
1 | 2:
2 | title: 'Critical error'
3 | suggestion: 'Critical error suggestion'
4 | stage: build
5 | type: critical
6 | 1001:
7 | title: 'Warning error'
8 | suggestion: 'Warning error suggestion'
9 | stage: build
10 | type: warning
11 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Build/GenerateTest.php:
--------------------------------------------------------------------------------
1 | processorMock = $this->createMock(Processor::class);
37 |
38 | $this->command = new Generate(
39 | $this->processorMock
40 | );
41 | }
42 |
43 | public function testExecute()
44 | {
45 | $this->processorMock->expects($this->once())
46 | ->method('execute')
47 | ->with([
48 | 'scenario/build/generate.xml'
49 | ]);
50 |
51 | $tester = new CommandTester(
52 | $this->command
53 | );
54 | $tester->execute([]);
55 |
56 | $this->assertSame(0, $tester->getStatusCode());
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Build/TransferTest.php:
--------------------------------------------------------------------------------
1 | processorMock = $this->createMock(Processor::class);
37 |
38 | $this->command = new Transfer(
39 | $this->processorMock
40 | );
41 | }
42 |
43 | public function testExecute()
44 | {
45 | $this->processorMock->expects($this->once())
46 | ->method('execute')
47 | ->with(['scenario/build/transfer.xml']);
48 |
49 | $tester = new CommandTester(
50 | $this->command
51 | );
52 | $tester->execute([]);
53 |
54 | $this->assertSame(0, $tester->getStatusCode());
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "package": "*"
4 | },
5 | "repositories": {
6 | "repo": {
7 | "type": "git",
8 | "url": "url"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "repo1",
3 | "require": {
4 | "package/require1": "*"
5 | },
6 | "repositories": {
7 | "repo1": {
8 | "type": "git",
9 | "url": "url"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo1/lib/internal/Magento/Framework/Lib1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "magento/lib1",
3 | "type": "magento2-library"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo1/lib/internal/Vendor/Library1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/library1",
3 | "type": "magento2-library"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo1/package/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/project",
3 | "type": "project"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo2/app/code/Vendor/Module1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/module-module1",
3 | "type": "magento2-module"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo2/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "repo2",
3 | "require": {
4 | "package/require2": "*",
5 | "magento/module-test": ">102.0.0"
6 | },
7 | "repositories": {
8 | "repo2": {
9 | "type": "git",
10 | "url": "url"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo2/exclude/package/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "exclude/package",
3 | "type": "magento2-module"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo3/app/design/Vendor/Theme1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/theme1",
3 | "type": "magento2-theme"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo3/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "repo3",
3 | "require": {
4 | "package/require3": "*",
5 | "magento/framework": ">100.1.1"
6 | },
7 | "repositories": {
8 | "repo3": {
9 | "type": "git",
10 | "url": "url"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo3/package/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/metapackage",
3 | "type": "metapackage"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo4/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "repo4",
3 | "require": {
4 | "package/require4": "*",
5 | "magento/framework": ">100.1.1"
6 | },
7 | "repositories": {
8 | "repo4": {
9 | "type": "git",
10 | "url": "url"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo4/package/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/library",
3 | "type": "library",
4 | "description": "Library"
5 | }
6 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/app/repo5/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vendor/module-module5",
3 | "type": "magento2-module"
4 | }
5 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/Dev/UpdateComposer/_files/clear_module_requirements.php:
--------------------------------------------------------------------------------
1 |
10 | array (
11 | 'type' => 'path',
12 | 'url' => 'repo1/app/code/package1',
13 | ),
14 | 'package2' =>
15 | array (
16 | 'type' => 'path',
17 | 'url' => 'repo1/app/code/package2',
18 | ),
19 | 'package6' =>
20 | array (
21 | 'type' => 'path',
22 | 'url' => 'repo2/app/code/package6',
23 | ),
24 | );
25 | $packages = var_export(array_keys($repos), true);
26 |
27 | function clearRequirements($dir, $packages) {
28 | if (!file_exists($dir . '/composer.json')) {
29 | return;
30 | }
31 |
32 | $composerJson = json_decode(file_get_contents($dir . '/composer.json'), true);
33 |
34 | foreach ($composerJson['require'] as $requireName => $requireVersion) {
35 | if (in_array($requireName, $packages)) {
36 | $composerJson['require'][$requireName] = '*@dev';
37 | }
38 | }
39 |
40 | file_put_contents(
41 | $dir . '/composer.json',
42 | json_encode($composerJson, JSON_PRETTY_PRINT)
43 | );
44 | }
45 |
46 | foreach ($repos as $repoName => $repoOptions) {
47 | $repoDir = __DIR__ .'/' . $repoOptions['url'];
48 | clearRequirements($repoDir, $packages);
49 | }
50 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/PostDeployTest.php:
--------------------------------------------------------------------------------
1 | processorMock = $this->createMock(Processor::class);
37 |
38 | $this->command = new PostDeploy(
39 | $this->processorMock
40 | );
41 | }
42 |
43 | public function testExecute()
44 | {
45 | $this->processorMock->expects($this->once())
46 | ->method('execute');
47 |
48 | $tester = new CommandTester(
49 | $this->command
50 | );
51 | $tester->execute([]);
52 |
53 | $this->assertSame(0, $tester->getStatusCode());
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Test/Unit/Command/_files/m2-hotfixes/patch1.patch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/magento/ece-tools/ebaff5fa88844c6ec1ab7d26f6b38ea24c1ce32d/src/Test/Unit/Command/_files/m2-hotfixes/patch1.patch
--------------------------------------------------------------------------------
/src/Test/Unit/Command/_files/m2-hotfixes/patch2.patch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/magento/ece-tools/ebaff5fa88844c6ec1ab7d26f6b38ea24c1ce32d/src/Test/Unit/Command/_files/m2-hotfixes/patch2.patch
--------------------------------------------------------------------------------
/src/Test/Unit/Command/_files/m2-hotfixes/readme.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/magento/ece-tools/ebaff5fa88844c6ec1ab7d26f6b38ea24c1ce32d/src/Test/Unit/Command/_files/m2-hotfixes/readme.md
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Environment/_file/.magento-with-constants.env.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | deploy:
3 | DATABASE_CONFIGURATION:
4 | connection:
5 | default:
6 | driver_options:
7 | !php/const:\PDO::MYSQL_ATTR_LOCAL_INFILE : 1
8 | indexer:
9 | driver_options:
10 | !php/const:\PDO::MYSQL_ATTR_INIT_COMMAND : 1
11 | _merge: true
12 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Environment/_file/.magento-with-empty-sections.env.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_ON_DEMAND: true
4 | build:
5 | deploy:
6 |
7 | log:
8 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Environment/_file/.magento.env.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_ON_DEMAND: true
4 | UPDATE_URLS: false
5 | deploy:
6 | DATABASE_CONFIGURATION:
7 | host: 127.0.0.1
8 | port: 3306
9 | schema: test_schema
10 | SCD_THREADS: 5
11 |
12 | log:
13 | gelf:
14 | min_level: "info"
15 | use_default_formatter: true
16 | additional:
17 | project: "project"
18 | app_id: "app"
19 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/RepositoryFactoryTest.php:
--------------------------------------------------------------------------------
1 | 123,
25 | 'some_item2' => 456,
26 | ];
27 |
28 | $repository = $factory->create($items);
29 |
30 | $this->assertInstanceOf(Repository::class, $repository);
31 | $this->assertEquals($repository->get('some_item'), 123);
32 | $this->assertEquals($repository->get('some_item2'), 456);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Schema/Validator/ValidatorFactoryTest.php:
--------------------------------------------------------------------------------
1 | containerMock = $this->getMockForAbstractClass(ContainerInterface::class);
37 |
38 | $this->validatorFactory = new ValidatorFactory(
39 | $this->containerMock
40 | );
41 | }
42 |
43 | public function testCreate(): void
44 | {
45 | $this->containerMock->expects($this->once())
46 | ->method('create')
47 | ->with('some_class')
48 | ->willReturn($this->getMockForAbstractClass(ValidatorInterface::class));
49 |
50 | $this->validatorFactory->create('some_class');
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Schema/_files/.magento.env.md:
--------------------------------------------------------------------------------
1 | ### ENV_VARIABLE
2 |
3 | Some description
4 |
5 | |Attribute|Values|
6 | |---|---|
7 | |Type|string|
8 | |Magento version|\>=2.1.24|
9 | |Stages|global|
10 |
11 | Examples
12 |
13 | ```yaml
14 | 'Some example 1'
15 | ```
16 |
17 | ```yaml
18 | 'Some example 2'
19 | ```
20 |
21 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Validator/Build/_files/correct_composer_2.3.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "magento/product-enterprise-edition": "2.3"
4 | },
5 | "autoload": {
6 | "psr-4": {
7 | "Magento\\Framework\\": "lib/internal/Magento/Framework/",
8 | "Magento\\Setup\\": "setup/src/Magento/Setup/",
9 | "Magento\\": "app/code/Magento/",
10 | "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
11 | },
12 | "psr-0": {
13 | "": [
14 | "app/code/",
15 | "generated/code/"
16 | ]
17 | },
18 | "files": [
19 | "app/etc/NonComposerComponentRegistration.php"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Validator/Build/_files/correct_composer_2.3_2.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "magento/product-enterprise-edition": "2.3"
4 | },
5 | "autoload": {
6 | "psr-4": {
7 | "Magento\\Framework\\": "lib/internal/Magento/Framework/",
8 | "Magento\\Setup\\": "setup/src/Magento/Setup/",
9 | "Magento\\": "app/code/Magento/",
10 | "Laminas\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
11 | },
12 | "psr-0": {
13 | "": [
14 | "app/code/",
15 | "generated/code/"
16 | ]
17 | },
18 | "files": [
19 | "app/etc/NonComposerComponentRegistration.php"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/Validator/Build/_files/wrong_composer_2.3.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "magento/product-enterprise-edition": "2.3"
4 | },
5 | "autoload": {
6 | "psr-4": {
7 | "Magento\\Framework\\": "lib/internal/Magento/Framework/",
8 | "Magento\\Setup\\": "setup/src/Magento/Setup/",
9 | "Magento\\": "app/code/Magento/"
10 | },
11 | "psr-0": {
12 | "": [
13 | "app/code/",
14 | "generated/code/"
15 | ]
16 | },
17 | "files": [
18 | "app/etc/NonComposerComponentRegistration.php"
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/ValidatorFactoryTest.php:
--------------------------------------------------------------------------------
1 | containerMock = $this->createMock(Container::class);
38 |
39 | $this->validatorFactory = new ValidatorFactory(
40 | $this->containerMock
41 | );
42 | }
43 |
44 | public function testCreate()
45 | {
46 | $validatorMock = $this->getMockForAbstractClass(ValidatorInterface::class);
47 |
48 | $this->containerMock->expects($this->once())
49 | ->method('create')
50 | ->with('some_class')
51 | ->willReturn($validatorMock);
52 |
53 | $this->validatorFactory->create('some_class');
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Test/Unit/Config/_file/Deploy/app/etc/env.php:
--------------------------------------------------------------------------------
1 |
4 | array (
5 | 'date' => 'Wed, 12 Sep 2017 10:40:30 +0000',
6 | ),
7 | );
8 |
--------------------------------------------------------------------------------
/src/Test/Unit/Filesystem/Flag/PoolTest.php:
--------------------------------------------------------------------------------
1 | pool = new Pool();
30 | }
31 |
32 | public function testGetFlagOne(): void
33 | {
34 | $this->assertEquals('var/.regenerate', $this->pool->get(Manager::FLAG_REGENERATE));
35 | }
36 |
37 | public function testGetFlagNotExists(): void
38 | {
39 | $flagPath = $this->pool->get('key3');
40 |
41 | $this->assertNull($flagPath);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Test/Unit/Filesystem/SystemListTest.php:
--------------------------------------------------------------------------------
1 | systemList = new SystemList(
29 | 'tools_root',
30 | 'magento_root'
31 | );
32 | }
33 |
34 | public function testGetRoot(): void
35 | {
36 | $this->assertSame(
37 | 'tools_root',
38 | $this->systemList->getRoot()
39 | );
40 | }
41 |
42 | public function testGetMagentoRoot(): void
43 | {
44 | $this->assertSame(
45 | 'magento_root',
46 | $this->systemList->getMagentoRoot()
47 | );
48 | }
49 |
50 | public function testGetConfig(): void
51 | {
52 | $this->assertSame(
53 | 'tools_root/config',
54 | $this->systemList->getConfig()
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Test/Unit/Http/ClientFactoryTest.php:
--------------------------------------------------------------------------------
1 | containerMock = $this->getMockForAbstractClass(ContainerInterface::class);
42 | $this->clientMock = $this->createMock(Client::class);
43 |
44 | $this->clientFactory = new ClientFactory(
45 | $this->containerMock
46 | );
47 | }
48 |
49 | public function testCreate(): void
50 | {
51 | $this->containerMock->expects($this->once())
52 | ->method('create')
53 | ->willReturn($this->clientMock);
54 |
55 | $this->clientFactory->create(['some' => 'value']);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Test/Unit/Http/RequestFactoryTest.php:
--------------------------------------------------------------------------------
1 | containerMock = $this->getMockForAbstractClass(ContainerInterface::class);
42 | $this->requestMock = $this->getMockForAbstractClass(RequestInterface::class);
43 |
44 | $this->requestFactory = new RequestFactory(
45 | $this->containerMock
46 | );
47 | }
48 |
49 | public function testCreate(): void
50 | {
51 | $this->containerMock->expects($this->once())
52 | ->method('create')
53 | ->willReturn($this->requestMock);
54 |
55 | $this->requestFactory->create('GET', 'some_uri');
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Test/Unit/OnFail/Action/SkipActionTest.php:
--------------------------------------------------------------------------------
1 | loggerMock = $this->getMockForAbstractClass(LoggerInterface::class);
36 | $this->action = new SkipAction($this->loggerMock, 'test-action');
37 | }
38 |
39 | /**
40 | * Tests the method execute of SkipAction class.
41 | *
42 | * @throws \Magento\MagentoCloud\OnFail\Action\ActionException
43 | */
44 | public function testExecute(): void
45 | {
46 | $this->loggerMock->expects($this->once())
47 | ->method('info')
48 | ->with('Action "test-action" was skipped');
49 | $this->action->execute();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/Test/Unit/PlatformVariable/DecoderTest.php:
--------------------------------------------------------------------------------
1 | decoder = new Decoder();
29 | }
30 |
31 | public function testDecode()
32 | {
33 | $this->assertSame(
34 | [
35 | 'someKey' => 'someValue'
36 | ],
37 | $this->decoder->decode('eyJzb21lS2V5Ijoic29tZVZhbHVlIn0')
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Test/Unit/Service/PhpTest.php:
--------------------------------------------------------------------------------
1 | phpService = new Php();
29 | }
30 |
31 | /**
32 | * Test service version.
33 | */
34 | public function testGetVersion()
35 | {
36 | $this->assertTrue($this->phpService->getVersion() !== '0');
37 | }
38 |
39 | /**
40 | * Test service configuration.
41 | */
42 | public function testGetConfiguration()
43 | {
44 | $this->assertTrue(
45 | is_array($this->phpService->getConfiguration()) &&
46 | array_key_exists('version', $this->phpService->getConfiguration())
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Test/Unit/Service/_file/eol.yaml:
--------------------------------------------------------------------------------
1 | # Service EOLs (YYYY-MM-DD).
2 | php:
3 | - version: '7.0'
4 | eol:
5 | - version: '7.1'
6 | eol:
7 | - version: '7.2'
8 | eol:
9 | mariadb:
10 | - version: '10.0'
11 | eol:
12 | - version: '10.1'
13 | eol:
14 | - version: '10.2'
15 | eol:
16 | elasticsearch:
17 | - version: '1.7'
18 | eol:
19 | - version: '2.4'
20 | eol:
21 | - version: '5.2'
22 | eol:
23 | - version: '6.5'
24 | eol:
25 | rabbitmq:
26 | - version: '3.5'
27 | eol:
28 | - version: '3.7'
29 | eol:
30 | redis:
31 | - version: '3.2'
32 | eol:
33 | - version: '4.0'
34 | eol:
35 | - version: '5.0'
36 | eol:
37 | - version: '5.2'
38 | eol:
39 |
--------------------------------------------------------------------------------
/src/Test/Unit/Service/_file/eol_2.yaml:
--------------------------------------------------------------------------------
1 | php:
2 | - version: '7.0'
3 | eol: 2018-12-01
4 | - version: '7.1'
5 | eol: 2019-12-01
6 | elasticsearch:
7 | - version: '6.5'
8 | eol: 2020-05-14
9 |
--------------------------------------------------------------------------------
/src/Test/Unit/Step/Build/_files/app/etc/config.php:
--------------------------------------------------------------------------------
1 | backgroundProcessMock = $this->createMock(BackgroundProcess::class);
36 |
37 | $this->process = new BackgroundProcessKill(
38 | $this->backgroundProcessMock
39 | );
40 | }
41 |
42 | public function testExecute()
43 | {
44 | $this->backgroundProcessMock->expects($this->once())
45 | ->method('kill');
46 |
47 | $this->process->execute();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Test/Unit/Step/Deploy/_files/config.php:
--------------------------------------------------------------------------------
1 | [
8 | ]
9 | ];
10 |
--------------------------------------------------------------------------------
/src/Test/Unit/Step/SkipStepTest.php:
--------------------------------------------------------------------------------
1 | loggerMock = $this->getMockForAbstractClass(LoggerInterface::class);
32 | }
33 |
34 | /**
35 | * Test execution.
36 | */
37 | public function testExecute()
38 | {
39 | $stepName = 'stepname';
40 |
41 | $skipStep = new SkipStep(
42 | $this->loggerMock,
43 | $stepName
44 | );
45 |
46 | $message = sprintf('Step "%s" was skipped', $stepName);
47 |
48 | $this->loggerMock->expects($this->once())
49 | ->method('info')
50 | ->with($message);
51 |
52 | $this->loggerMock->expects($this->never())
53 | ->method('log');
54 |
55 | $skipStep->execute();
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Test/Unit/Util/PasswordGeneratorTest.php:
--------------------------------------------------------------------------------
1 | generator = new PasswordGenerator();
29 | }
30 |
31 | public function testGenerateSaltAndHash()
32 | {
33 | $this->generator->generateSaltAndHash('some password');
34 | }
35 |
36 | public function testGenerateRandomPassword()
37 | {
38 | $this->generator->generateRandomPassword();
39 | }
40 |
41 | public function testGenerateRandomString()
42 | {
43 | $this->generator->generateRandomString(5);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Test/Unit/Util/_files/app/etc/config.php:
--------------------------------------------------------------------------------
1 | 'value1',
8 | );
9 |
--------------------------------------------------------------------------------
/src/Test/Unit/Util/_files/app/etc/env.php:
--------------------------------------------------------------------------------
1 | 'value1',
8 | 'key2' => 'value2'
9 | );
10 |
--------------------------------------------------------------------------------
/src/Test/Unit/Util/_files/init/pub/static/config.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/WarmUp/UrlsPattern/PatternInterface.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 5
5 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/report_dir_nesting_level/local_with_property.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 5
5 |
6 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/report_dir_nesting_level/local_without_property.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/env_matrix_1.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_COMPRESSION_LEVEL: 0
4 | SCD_MATRIX:
5 | "Magento/backend":
6 | language:
7 | - en_US
8 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/env_matrix_2.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_COMPRESSION_LEVEL: 0
4 | SCD_MATRIX:
5 | "Magento/backend":
6 | language:
7 | - en_US
8 | - fr_FR
9 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/env_matrix_3.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_COMPRESSION_LEVEL: 0
4 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/scd-strategy-compact.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_STRATEGY: 'compact'
4 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/scd-strategy-quick.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_STRATEGY: 'quick'
4 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scd/scd-strategy-standard.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_STRATEGY: 'standard'
4 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/scdondemand/.magento.env.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_ON_DEMAND: true
4 |
--------------------------------------------------------------------------------
/tests/functional/_data/files/wrong_db_configuration/.magento.env.yaml:
--------------------------------------------------------------------------------
1 | stage:
2 | global:
3 | SCD_ON_DEMAND: true
4 | deploy:
5 | DATABASE_CONFIGURATION:
6 | host:
7 |
--------------------------------------------------------------------------------
/tests/functional/_data/modules/Magento/CronTest/Model/TestJob.php:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 | * * * * *
12 |
13 |
14 | 0,5,10,15,20,25,30,35,40,45,50,55 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * *
15 |
16 |
17 | */6 * * * *
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/tests/functional/_data/modules/Magento/CronTest/etc/module.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/functional/_data/modules/Magento/CronTest/registration.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/registration.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/scenario/extend-build-generate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/scenario/extend-build-transfer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/scenario/extend-post-deploy-skip-steps.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/src/Step/Build/StaticContentUpdate.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
26 | }
27 |
28 | /**
29 | * Executes the step.
30 | *
31 | * @return void
32 | */
33 | public function execute()
34 | {
35 | $this->logger->info('Doing some actions after static content generation');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/src/Step/Deploy/PreDeploy.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
26 | }
27 |
28 | /**
29 | * Executes the step.
30 | *
31 | * @return void
32 | */
33 | public function execute()
34 | {
35 | $this->logger->info('Running demo pre deploy step');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/functional/_data/packages/ece-tools-extend/src/Step/Deploy/RemoveDeployFailedFlag.php:
--------------------------------------------------------------------------------
1 | removeDeployFailedFlagOrigin = $removeDeployFailedFlagOrigin;
36 | $this->logger = $logger;
37 | }
38 |
39 | /**
40 | * @inheritDoc
41 | */
42 | public function execute()
43 | {
44 | $this->logger->info('Start of EXTENDED RemoveDeployFailedFlag step');
45 |
46 | $this->removeDeployFailedFlagOrigin->execute();
47 |
48 | $this->logger->info('Finish of EXTENDED RemoveDeployFailedFlag step');
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/tests/functional/_output/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/integration/Container.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 | ../../src/Test/Integration
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/tests/static/phpcs-ruleset.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | Custom Magento ECE Tools coding standard.
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Test
28 |
29 |
30 | _files
31 | _file
32 |
33 |
--------------------------------------------------------------------------------
/tests/unit/.gitignore:
--------------------------------------------------------------------------------
1 | tmp
2 | phpunit.xml
3 |
--------------------------------------------------------------------------------
/tests/unit/code-coverage.php:
--------------------------------------------------------------------------------
1 | xpath('//metrics');
21 | $totalElements = 0;
22 | $checkedElements = 0;
23 |
24 | foreach ($metrics as $metric) {
25 | $totalElements += (int)$metric['elements'];
26 | $checkedElements += (int)$metric['coveredelements'];
27 | }
28 |
29 | $coverage = round(($checkedElements / $totalElements) * 100, 2);
30 |
31 | if ($coverage < $percentage) {
32 | echo 'Code coverage is ' . $coverage . '%, which is below the accepted ' . $percentage . '%' . PHP_EOL;
33 | exit(1);
34 | }
35 |
36 | echo 'Code coverage is ' . $coverage . '% of ' . $percentage . '% - OK!' . PHP_EOL;
37 |
--------------------------------------------------------------------------------
/tests/unit/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 | ../../src/Test/Unit
13 |
14 |
15 |
16 |
17 | ../../src
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------