Skip to content
Snippets Groups Projects

Issue #3363938: Package Manager should ignore default.settings.php and default.services.yml

Merged Issue #3363938: Package Manager should ignore default.settings.php and default.services.yml
1 unresolved thread
1 unresolved thread
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -74,6 +74,10 @@ class SiteConfigurationExcluder implements EventSubscriberInterface {
*/
public function makeDefaultSiteDirectoryWritable(PostCreateEvent $event): void {
$dir = $this->getDefaultSiteDirectoryPath($event->stage->getStageDirectory());
// If the directory doesn't even exist, there's nothing to do here.
if (!is_dir($dir)) {
return;
}
if (!$this->fileSystem->chmod($dir, 0777)) {
throw new FileException("Could not change permissions on '$dir'.");
}
@@ -90,8 +94,12 @@ class SiteConfigurationExcluder implements EventSubscriberInterface {
* cannot be determined, or cannot be changed on the staged `sites/default`.
*/
public function syncDefaultSiteDirectoryPermissions(PreApplyEvent $event): void {
$live_dir = $this->getDefaultSiteDirectoryPath($this->pathLocator->getProjectRoot());
$staged_dir = $this->getDefaultSiteDirectoryPath($event->stage->getStageDirectory());
// If the directory doesn't even exist, there's nothing to do here.
if (!is_dir($staged_dir)) {
return;
}
$live_dir = $this->getDefaultSiteDirectoryPath($this->pathLocator->getProjectRoot());
// This is borrowed from \Symfony\Component\Filesystem\Filesystem::copy(),
// to ensure the correct permissions are preserved (chmod() requires
Loading