This repository was archived by the owner on Mar 1, 2023. It is now read-only.
File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,6 @@ class Plugin implements EventSubscriberInterface, PluginInterface
75
75
*/
76
76
public function activate (Composer $ composer , IOInterface $ io ): void
77
77
{
78
- if (($ errorMessage = $ this ->getErrorMessage ()) !== null ) {
79
- self ::$ activated = false ;
80
-
81
- $ io ->writeError ('<warning>Narrowspark Automatic Prefetcher has been disabled. ' . $ errorMessage . '</warning> ' );
82
-
83
- return ;
84
- }
85
-
86
- if (! \class_exists (AbstractContainer::class)) {
87
- require __DIR__ . \DIRECTORY_SEPARATOR . 'alias.php ' ;
88
- }
89
-
90
78
// to avoid issues when Automatic Prefetcher is upgraded, we load all PHP classes now
91
79
// that way, we are sure to use all classes from the same version.
92
80
foreach (new RecursiveIteratorIterator (new RecursiveDirectoryIterator (\dirname (__DIR__ , 1 ), FilesystemIterator::SKIP_DOTS )) as $ file ) {
@@ -96,6 +84,18 @@ public function activate(Composer $composer, IOInterface $io): void
96
84
}
97
85
}
98
86
87
+ if (! \class_exists (AbstractContainer::class)) {
88
+ require __DIR__ . \DIRECTORY_SEPARATOR . 'alias.php ' ;
89
+ }
90
+
91
+ if (($ errorMessage = $ this ->getErrorMessage ()) !== null ) {
92
+ self ::$ activated = false ;
93
+
94
+ $ io ->writeError ('<warning>Narrowspark Automatic Prefetcher has been disabled. ' . $ errorMessage . '</warning> ' );
95
+
96
+ return ;
97
+ }
98
+
99
99
$ this ->container = new Container ($ composer , $ io );
100
100
101
101
if ($ this ->container ->get (InputInterface::class) === null ) {
You can’t perform that action at this time.
0 commit comments