Skip to content

Commit c497c0c

Browse files
committed
bug #602 Update autoload.php on POST_AUTOLOAD_DUMP (nicolas-grekas)
This PR was merged into the 1.5-dev branch. Discussion ---------- Update autoload.php on POST_AUTOLOAD_DUMP As reported by @stof in #576 (comment) Commits ------- 7a9319a Update autoload.php on POST_AUTOLOAD_DUMP
2 parents b13714e + 7a9319a commit c497c0c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Flex.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,6 @@ public function update(Event $event = null, $operations = [])
395395

396396
public function install(Event $event = null)
397397
{
398-
$this->updateAutoloadFile();
399-
400398
$rootDir = $this->options->get('root-dir');
401399

402400
if (!file_exists("$rootDir/.env") && !file_exists("$rootDir/.env.local") && file_exists("$rootDir/.env.dist") && false === strpos(file_get_contents("$rootDir/.env.dist"), '.env.local')) {
@@ -668,7 +666,7 @@ public function generateFlexId()
668666
$this->updateComposerLock();
669667
}
670668

671-
private function updateAutoloadFile()
669+
public function updateAutoloadFile()
672670
{
673671
if (!$platform = $this->lock->get('php')['version'] ?? null) {
674672
return;
@@ -898,6 +896,7 @@ public static function getSubscribedEvents(): array
898896
ScriptEvents::POST_INSTALL_CMD => 'install',
899897
ScriptEvents::PRE_UPDATE_CMD => 'configureInstaller',
900898
ScriptEvents::POST_UPDATE_CMD => 'update',
899+
ScriptEvents::POST_AUTOLOAD_DUMP => 'updateAutoloadFile',
901900
PluginEvents::PRE_FILE_DOWNLOAD => 'onFileDownload',
902901
'auto-scripts' => 'executeAutoScripts',
903902
];

0 commit comments

Comments
 (0)