@@ -63,6 +63,7 @@ var localNewCmd = &console.Command{
6363},
6464& console.BoolFlag {Name :"full" ,Usage :"Use github.com/symfony/website-skeleton (deprecated, use --webapp instead)" },
6565& console.BoolFlag {Name :"demo" ,Usage :"Use github.com/symfony/demo" },
66+ & console.StringFlag {Name :"skeleton" ,Usage :"Skeleton to use (symfony, sulu, or a custom package name)" ,DefaultValue :"symfony" },
6667& console.BoolFlag {Name :"webapp" ,Usage :"Add the webapp pack to get a fully configured web project" },
6768& console.BoolFlag {Name :"api" ,Usage :"Add the api pack to get a fully configured api project" },
6869& console.BoolFlag {Name :"book" ,Usage :"Clone the Symfony: The Fast Track book project" },
@@ -137,6 +138,9 @@ var localNewCmd = &console.Command{
137138if symfonyVersion != "" && c .Bool ("demo" ) {
138139return console .Exit ("The --version flag is not supported for the Symfony Demo" ,1 )
139140}
141+ if c .Bool ("demo" )&& c .String ("skeleton" )!= "symfony" {
142+ return console .Exit ("The --demo flag cannot be used with --skeleton" ,1 )
143+ }
140144if c .Bool ("webapp" )&& c .Bool ("api" ) {
141145return console .Exit ("The --api flag cannot be used with --webapp" ,1 )
142146}
@@ -362,30 +366,60 @@ func initProjectGit(c *console.Context, dir string) error {
362366}
363367
364368func createProjectWithComposer (c * console.Context ,dir ,version string )error {
369+ // Determine the repository and project type
370+ repo := "symfony/skeleton"
371+ projectType := "Symfony"
372+
373+ if r := os .Getenv ("SYMFONY_REPO" );r != "" {
374+ repo = r
375+ }else if c .Bool ("full" ) {
376+ terminal .SymfonyStyle (terminal .Stdout ,terminal .Stdin ).Warning ("The --full flag is deprecated, use --webapp instead." )
377+ repo = "symfony/website-skeleton"
378+ }else if c .Bool ("demo" ) {
379+ repo = "symfony/symfony-demo"
380+ }else {
381+ // Handle skeleton flag
382+ skeleton := c .String ("skeleton" )
383+ switch skeleton {
384+ case "symfony" :
385+ repo = "symfony/skeleton"
386+ projectType = "Symfony"
387+ case "sulu" :
388+ repo = "sulu/skeleton"
389+ projectType = "Sulu"
390+ case "demo" :
391+ repo = "symfony/symfony-demo"
392+ projectType = "Symfony Demo"
393+ default :
394+ // Use custom Composer package directly
395+ repo = skeleton
396+
397+ // Use the package name as the project type
398+ parts := strings .Split (skeleton ,"/" )
399+ if len (parts )> 1 {
400+ projectType = parts [1 ]
401+ }else {
402+ projectType = skeleton
403+ }
404+ }
405+ }
406+
407+ // Display appropriate message based on project type
365408if c .Bool ("demo" ) {
366409terminal .Println ("* Creating a new Symfony Demo project with Composer" )
367410}else if version != "" {
368- if version == "lts" || version == "previous" || version == "stable" || version == "next" || version == "dev" {
411+ // Only handle special versions for Symfony projects
412+ if projectType == "Symfony" && (version == "lts" || version == "previous" || version == "stable" || version == "next" || version == "dev" ) {
369413var err error
370414version ,err = getSpecialVersion (version )
371415if err != nil {
372416return err
373417}
374418}
375419
376- terminal .Printfln ("* Creating a newSymfony %s project with Composer" ,version )
420+ terminal .Printfln ("* Creating a new%s %s project with Composer" , projectType ,version )
377421}else {
378- terminal .Println ("* Creating a new Symfony project with Composer" )
379- }
380-
381- repo := "symfony/skeleton"
382- if r := os .Getenv ("SYMFONY_REPO" );r != "" {
383- repo = r
384- }else if c .Bool ("full" ) {
385- terminal .SymfonyStyle (terminal .Stdout ,terminal .Stdin ).Warning ("The --full flag is deprecated, use --webapp instead." )
386- repo = "symfony/website-skeleton"
387- }else if c .Bool ("demo" ) {
388- repo = "symfony/symfony-demo"
422+ terminal .Printfln ("* Creating a new %s project with Composer" ,projectType )
389423}
390424
391425if ok ,_ := regexp .MatchString ("^\\ d+\\ .\\ d+$" ,version );ok {