Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigChangeDetector.php
Go to the documentation of this file.
1 <?php
8 
13 
22 {
28  private $changeDetector;
29 
33  public function __construct(ChangeDetector $changeDetector)
34  {
35  $this->changeDetector = $changeDetector;
36  }
37 
48  {
49  if ($this->changeDetector->hasChanges()) {
50  throw new LocalizedException(
51  __(
52  'The configuration file has changed.'
53  . ' Run the "app:config:import" or the "setup:upgrade" command to synchronize the configuration.'
54  )
55  );
56  }
57  }
58 }
__()
Definition: __.php:13
beforeDispatch(FrontControllerInterface $subject, RequestInterface $request)