@@ -126,7 +126,6 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)
126126 $ rfs = Factory::createHttpDownloader ($ this ->io , $ this ->config );
127127
128128 $ this ->downloader = $ downloader = new Downloader ($ composer , $ io , $ rfs );
129- $ this ->downloader ->setFlexId ($ this ->getFlexId ());
130129
131130 if ($ symfonyRequire ) {
132131 $ this ->filter = new PackageFilter ($ io , $ symfonyRequire , $ this ->downloader );
@@ -138,7 +137,6 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)
138137 $ this ->rfs = $ rfs = new ParallelDownloader ($ this ->io , $ this ->config , $ rfs ->getOptions (), $ rfs ->isTlsDisabled ());
139138
140139 $ this ->downloader = $ downloader = new Downloader ($ composer , $ io , $ this ->rfs );
141- $ this ->downloader ->setFlexId ($ this ->getFlexId ());
142140
143141 $ rootPackage = $ composer ->getPackage ();
144142 $ manager = RepositoryFactory::manager ($ this ->io , $ this ->config , $ composer ->getEventDispatcher (), $ this ->rfs );
@@ -741,24 +739,6 @@ public function onFileDownload(PreFileDownloadEvent $event)
741739 }
742740 }
743741
744- public function generateFlexId ()
745- {
746- if ($ this ->getFlexId ()) {
747- return ;
748- }
749-
750- if (!$ this ->downloader ->isEnabled ()) {
751- throw new \LogicException ('Cannot generate project id when "symfony/flex" is not found in the root composer.json. ' );
752- }
753-
754- $ json = new JsonFile (Factory::getComposerFile ());
755- $ manipulator = new JsonManipulator (file_get_contents ($ json ->getPath ()));
756- $ manipulator ->addSubNode ('extra ' , 'symfony.id ' , $ this ->downloader ->get ('/ulid ' )->getBody ()['ulid ' ]);
757- file_put_contents ($ json ->getPath (), $ manipulator ->getContents ());
758-
759- $ this ->updateComposerLock ();
760- }
761-
762742 public function updateAutoloadFile ()
763743 {
764744 if (!$ platform = $ this ->lock ->get ('php ' )['version ' ] ?? null ) {
@@ -904,13 +884,6 @@ private function initOptions(): Options
904884 return new Options ($ options , $ this ->io );
905885 }
906886
907- private function getFlexId ()
908- {
909- $ extra = $ this ->composer ->getPackage ()->getExtra ();
910-
911- return $ extra ['symfony ' ]['id ' ] ?? null ;
912- }
913-
914887 private function formatOrigin (string $ origin ): string
915888 {
916889 // symfony/translation:3.3@github.com/symfony/recipes:branch
0 commit comments