app/Services/ValidateService.php
public function validate(Blueprint $blueprint, Configuration $configuration, string $environment) {

		$projectConfigurable = new PrefixConfigurationDecorator($configuration, "project.default.");
		$environmentConfigurable = new PrefixConfigurationDecorator($configuration, "project.environments.$environment.");
		$fallbackConfiguration = new ConfigurationFallback($environmentConfigurable, $projectConfigurable);

		$event = ValidatingEvent::make()
			->setBlueprint($blueprint)
			->setConfiguration($fallbackConfiguration)
			->setEnvironment($environment)
			;

		$this->eventDispatcher->dispatch($event::NAME, $event);

		$blueprint->validate($configuration, $environment);
	}
public function validate(Blueprint $blueprint, Configuration $configuration, string $environment) {

		$projectConfigurable = new PrefixConfigurationDecorator($configuration, "project.default.");
		$environmentConfigurable = new PrefixConfigurationDecorator($configuration, "project.environments.$environment.");
		$fallbackConfiguration = new ConfigurationFallback($environmentConfigurable, $projectConfigurable);

		$event = ValidatingEvent::make()
			->setBlueprint($blueprint)
			->setConfiguration($fallbackConfiguration)
			->setEnvironment($environment)
			;

		$this->eventDispatcher->dispatch($event::NAME, $event);

		$blueprint->validate($configuration, $environment);
	}
public function validate ( Blueprint $ blueprint , Configuration $ configuration , string $ environment ) { $ projectConfigurable = new PrefixConfigurationDecorator ( $ configuration , "project.default." ) ; $ environmentConfigurable = new PrefixConfigurationDecorator ( $ configuration , "project.environments.$environment." ) ; $ fallbackConfiguration = new ConfigurationFallback ( $ environmentConfigurable , $ projectConfigurable ) ; $ event = ValidatingEvent :: make ( ) -> setBlueprint ( $ blueprint ) -> setConfiguration ( $ fallbackConfiguration ) -> setEnvironment ( $ environment ) ; $ this -> eventDispatcher -> dispatch ( $ event :: NAME , $ event ) ; $ blueprint -> validate ( $ configuration , $ environment ) ; }
validate the configuration for the given environment

@param Blueprint $blueprint
@param string $environment
@param Configuration $configuration
validate the configuration for the given environment