@@ -74,7 +74,7 @@ public static function checkSymlink($symlinkTarget, $symlinkName, $forceSymlink
74
74
if (!$ forceSymlink ) {
75
75
throw new \Exception (\sprintf ('Symlink "%s" points to "%s" instead of "%s" ' , $ symlinkName , $ linkTarget , $ symlinkTarget ));
76
76
}
77
- if (\strtoupper (\substr (PHP_OS , 0 , 3 )) === 'WIN ' && \is_dir ($ linkTarget )) {
77
+ if (\strtoupper (\substr (\ PHP_OS , 0 , 3 )) === 'WIN ' && \is_dir ($ linkTarget )) {
78
78
\rmdir ($ symlinkName );
79
79
} else {
80
80
\unlink ($ symlinkName );
@@ -126,7 +126,7 @@ public static function createMirror($symlinkTarget, $symlinkName)
126
126
$ filesystem = new Filesystem ();
127
127
$ filesystem ->mkdir ($ symlinkName );
128
128
$ filesystem ->mirror (
129
- $ symlinkName .DIRECTORY_SEPARATOR .'.. ' .DIRECTORY_SEPARATOR .$ symlinkTarget ,
129
+ $ symlinkName .\ DIRECTORY_SEPARATOR .'.. ' .\ DIRECTORY_SEPARATOR .$ symlinkTarget ,
130
130
$ symlinkName ,
131
131
null ,
132
132
['copy_on_windows ' => true , 'delete ' => true , 'override ' => true ]
@@ -169,8 +169,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
169
169
} elseif (false !== $ composer = ComposerAdapter::getComposer ($ input , $ output )) {
170
170
$ cmanager = new ComposerPathFinder ($ composer );
171
171
$ options = [
172
- 'targetSuffix ' => DIRECTORY_SEPARATOR .$ this ->bootstrapInstallPath .static ::$ targetSuffix ,
173
- 'sourcePrefix ' => '.. ' .DIRECTORY_SEPARATOR .'.. ' .DIRECTORY_SEPARATOR ,
172
+ 'targetSuffix ' => \ DIRECTORY_SEPARATOR .$ this ->bootstrapInstallPath .static ::$ targetSuffix ,
173
+ 'sourcePrefix ' => '.. ' .\ DIRECTORY_SEPARATOR .'.. ' .\ DIRECTORY_SEPARATOR ,
174
174
];
175
175
list ($ symlinkTarget , $ symlinkName ) = $ cmanager ->getSymlinkFromComposer (
176
176
self ::$ mopaBootstrapBundleName ,
@@ -184,15 +184,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
184
184
}
185
185
186
186
// Automatically detect if on Win XP where symlink will allways fail
187
- if ($ input ->getOption ('no-symlink ' ) || PHP_OS == 'WINNT ' ) {
187
+ if ($ input ->getOption ('no-symlink ' ) || \ PHP_OS == 'WINNT ' ) {
188
188
$ this ->output ->write ('Checking destination ' );
189
189
190
190
if (true === self ::checkSymlink ($ symlinkTarget , $ symlinkName )) {
191
191
$ this ->output ->writeln (' ... <comment>symlink already exists</comment> ' );
192
192
} else {
193
193
$ this ->output ->writeln (' ... <comment>not existing</comment> ' );
194
194
$ this ->output ->writeln (\sprintf ('Mirroring to: %s ' , $ symlinkName ));
195
- $ this ->output ->write (\sprintf ('from target: %s ' , \realpath ($ symlinkName .DIRECTORY_SEPARATOR .'.. ' .DIRECTORY_SEPARATOR .$ symlinkTarget )));
195
+ $ this ->output ->write (\sprintf ('from target: %s ' , \realpath ($ symlinkName .\ DIRECTORY_SEPARATOR .'.. ' .\ DIRECTORY_SEPARATOR .$ symlinkTarget )));
196
196
self ::createMirror ($ symlinkTarget , $ symlinkName );
197
197
}
198
198
} else {
@@ -231,7 +231,7 @@ protected function getBootstrapPathsFromUser()
231
231
throw new \Exception ('Target path ' .$ symlinkTarget .'is not a directory! ' );
232
232
}
233
233
} else {
234
- $ symlinkTarget = $ symlinkName .DIRECTORY_SEPARATOR .'.. ' .DIRECTORY_SEPARATOR .$ symlinkTarget ;
234
+ $ symlinkTarget = $ symlinkName .\ DIRECTORY_SEPARATOR .'.. ' .\ DIRECTORY_SEPARATOR .$ symlinkTarget ;
235
235
}
236
236
237
237
if (!\is_dir ($ symlinkTarget )) {
0 commit comments