Skip to content

Commit 7df8901

Browse files
committed
Merge branch 3.3
2 parents b7af516 + 3af3dd1 commit 7df8901

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ return PhpCsFixer\Config::create()
1616
'header_comment' => ['header' => $header],
1717
'full_opening_tag' => false,
1818
'list_syntax' => ['syntax' => 'short'],
19+
'native_constant_invocation' => true,
1920
'native_function_invocation' => true,
2021
'yoda_style' => false,
2122
])

Command/BaseBootstrapSymlinkCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function checkSymlink($symlinkTarget, $symlinkName, $forceSymlink
7474
if (!$forceSymlink) {
7575
throw new \Exception(\sprintf('Symlink "%s" points to "%s" instead of "%s"', $symlinkName, $linkTarget, $symlinkTarget));
7676
}
77-
if (\strtoupper(\substr(PHP_OS, 0, 3)) === 'WIN' && \is_dir($linkTarget)) {
77+
if (\strtoupper(\substr(\PHP_OS, 0, 3)) === 'WIN' && \is_dir($linkTarget)) {
7878
\rmdir($symlinkName);
7979
} else {
8080
\unlink($symlinkName);
@@ -126,7 +126,7 @@ public static function createMirror($symlinkTarget, $symlinkName)
126126
$filesystem = new Filesystem();
127127
$filesystem->mkdir($symlinkName);
128128
$filesystem->mirror(
129-
$symlinkName.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$symlinkTarget,
129+
$symlinkName.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.$symlinkTarget,
130130
$symlinkName,
131131
null,
132132
['copy_on_windows' => true, 'delete' => true, 'override' => true]
@@ -168,8 +168,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
168168
} elseif (false !== $composer = ComposerAdapter::getComposer($input, $output)) {
169169
$cmanager = new ComposerPathFinder($composer);
170170
$options = [
171-
'targetSuffix' => DIRECTORY_SEPARATOR.$this->bootstrapInstallPath.static::$targetSuffix,
172-
'sourcePrefix' => '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR,
171+
'targetSuffix' => \DIRECTORY_SEPARATOR.$this->bootstrapInstallPath.static::$targetSuffix,
172+
'sourcePrefix' => '..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR,
173173
];
174174
[$symlinkTarget, $symlinkName] = $cmanager->getSymlinkFromComposer(
175175
self::$mopaBootstrapBundleName,
@@ -183,15 +183,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
183183
}
184184

185185
// Automatically detect if on Win XP where symlink will allways fail
186-
if ($input->getOption('no-symlink') || PHP_OS == 'WINNT') {
186+
if ($input->getOption('no-symlink') || \PHP_OS == 'WINNT') {
187187
$this->output->write('Checking destination');
188188

189189
if (true === self::checkSymlink($symlinkTarget, $symlinkName)) {
190190
$this->output->writeln(' ... <comment>symlink already exists</comment>');
191191
} else {
192192
$this->output->writeln(' ... <comment>not existing</comment>');
193193
$this->output->writeln(\sprintf('Mirroring to: %s', $symlinkName));
194-
$this->output->write(\sprintf('from target: %s', \realpath($symlinkName.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$symlinkTarget)));
194+
$this->output->write(\sprintf('from target: %s', \realpath($symlinkName.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.$symlinkTarget)));
195195
self::createMirror($symlinkTarget, $symlinkName);
196196
}
197197
} else {
@@ -230,7 +230,7 @@ protected function getBootstrapPathsFromUser()
230230
throw new \Exception('Target path '.$symlinkTarget.'is not a directory!');
231231
}
232232
} else {
233-
$symlinkTarget = $symlinkName.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$symlinkTarget;
233+
$symlinkTarget = $symlinkName.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.$symlinkTarget;
234234
}
235235

236236
if (!\is_dir($symlinkTarget)) {

Command/InstallFontCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function configure()
7373
protected function execute(InputInterface $input, OutputInterface $output)
7474
{
7575
$finder = new Finder();
76-
$iconWebPath = $this->kernel->getProjectDir().DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'fonts';
76+
$iconWebPath = $this->kernel->getProjectDir().\DIRECTORY_SEPARATOR.'web'.\DIRECTORY_SEPARATOR.'fonts';
7777

7878
$fs = new Filesystem();
7979

@@ -89,12 +89,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
8989

9090
$bsbPath = $composer->getInstallationManager()->getInstallPath($sourcePackage);
9191

92-
$iconSetPath = $bsbPath.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.self::$iconSetsPaths[$this->iconSet];
92+
$iconSetPath = $bsbPath.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'public'.\DIRECTORY_SEPARATOR.self::$iconSetsPaths[$this->iconSet];
9393

9494
$finder->files()->in($iconSetPath);
9595

9696
foreach ($finder as $file) {
97-
$fs->copy($file->getRealpath(), $iconWebPath.DIRECTORY_SEPARATOR.$file->getRelativePathname());
97+
$fs->copy($file->getRealpath(), $iconWebPath.\DIRECTORY_SEPARATOR.$file->getRelativePathname());
9898
}
9999

100100
$output->writeln('Font: '.$this->iconSet.' Installed... <info>OK</info>');

Composer/ScriptHandler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function postInstallSymlinkTwitterBootstrap(Event $event)
2828
$cmanager = new ComposerPathFinder($composer);
2929
$options = [
3030
'targetSuffix' => self::getTargetSuffix(),
31-
'sourcePrefix' => '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR,
31+
'sourcePrefix' => '..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR,
3232
];
3333
[$symlinkTarget, $symlinkName] = $cmanager->getSymlinkFromComposer(
3434
BootstrapSymlinkLessCommand::$mopaBootstrapBundleName,
@@ -51,7 +51,7 @@ public static function postInstallMirrorTwitterBootstrap(Event $event)
5151
$cmanager = new ComposerPathFinder($composer);
5252
$options = [
5353
'targetSuffix' => self::getTargetSuffix(),
54-
'sourcePrefix' => '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR,
54+
'sourcePrefix' => '..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR,
5555
];
5656
[$symlinkTarget, $symlinkName] = $cmanager->getSymlinkFromComposer(
5757
BootstrapSymlinkLessCommand::$mopaBootstrapBundleName,
@@ -74,7 +74,7 @@ public static function postInstallSymlinkTwitterBootstrapSass(Event $event)
7474
$cmanager = new ComposerPathFinder($composer);
7575
$options = [
7676
'targetSuffix' => self::getTargetSuffix('-sass'),
77-
'sourcePrefix' => '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR,
77+
'sourcePrefix' => '..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR,
7878
];
7979
[$symlinkTarget, $symlinkName] = $cmanager->getSymlinkFromComposer(
8080
BootstrapSymlinkSassCommand::$mopaBootstrapBundleName,
@@ -97,7 +97,7 @@ public static function postInstallMirrorTwitterBootstrapSass(Event $event)
9797
$cmanager = new ComposerPathFinder($composer);
9898
$options = [
9999
'targetSuffix' => self::getTargetSuffix('-sass'),
100-
'sourcePrefix' => '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR,
100+
'sourcePrefix' => '..'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR,
101101
];
102102
[$symlinkTarget, $symlinkName] = $cmanager->getSymlinkFromComposer(
103103
BootstrapSymlinkSassCommand::$mopaBootstrapBundleName,
@@ -115,6 +115,6 @@ public static function postInstallMirrorTwitterBootstrapSass(Event $event)
115115

116116
protected static function getTargetSuffix($end = '')
117117
{
118-
return DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'bootstrap'.$end;
118+
return \DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'public'.\DIRECTORY_SEPARATOR.'bootstrap'.$end;
119119
}
120120
}

DependencyInjection/MopaBootstrapExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function load(array $configs, ContainerBuilder $container)
6262
if ($this->isConfigEnabled($container, $config['menu']) || $this->isConfigEnabled($container, $config['navbar'])) {
6363
// @deprecated: remove this BC layer
6464
if ($this->isConfigEnabled($container, $config['navbar'])) {
65-
\trigger_error(\sprintf('mopa_bootstrap.navbar is deprecated. Use mopa_bootstrap.menu.'), E_USER_DEPRECATED);
65+
\trigger_error(\sprintf('mopa_bootstrap.navbar is deprecated. Use mopa_bootstrap.menu.'), \E_USER_DEPRECATED);
6666
}
6767
$loader->load('menu.xml');
6868
$this->remapParameters($container, 'mopa_bootstrap.menu', $config['menu']);

0 commit comments

Comments
 (0)