symfony / symfony-docs

The Symfony documentation
https://symfony.com/doc
Other
2.15k stars 5.1k forks source link

Creating Symfony application not working #17417

Closed Jesper15 closed 1 year ago

Jesper15 commented 1 year ago

When I try to create a Symfony application using the following command, it does not create: symfony new my_project_directory --version="6.1.*" --webapp.

It gives the following error:

  [InvalidArgumentException]      
  Could not find package webapp.  

  Did you mean one of these?      
      peej/tonic                  
      leafs/leaf                  
      symfony/webapp-meta         
      symfony/webapp-pack         
      hiqdev/hidev-webapp

This could be possible due to the Symfony Flex package which is not available anymore.

When I run composer require symfony/webapp-pack it works as it should work

OskarStark commented 1 year ago

I cannot confirm the issue:

CleanShot 2022-11-07 at 10 59 48@2x
oskar.stark@MacBook-Pro-von-Oskar  ~/dev/misc/my_project_directory   main  sf composer show 
doctrine/annotations                1.13.3  Docblock Annotations Parser
doctrine/cache                      2.2.0   PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.
doctrine/collections                1.8.0   PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                     3.4.3   PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.
doctrine/dbal                       3.5.1   Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/deprecations               v1.0.0  A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
doctrine/doctrine-bundle            2.7.1   Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 3.2.2   Symfony DoctrineMigrationsBundle
doctrine/event-manager              1.2.0   The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                  2.0.6   PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator               1.4.1   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      1.2.3   PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                 3.5.2   PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.
doctrine/orm                        2.13.3  Object-Relational-Mapper for PHP
doctrine/persistence                3.0.4   The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/sql-formatter              1.1.3   a PHP SQL highlighting library
egulias/email-validator             3.2.1   A library for validating emails against several RFCs
friendsofphp/proxy-manager-lts      v1.0.13 Adding support for a wider range of PHP versions to ocramius/proxy-manager
laminas/laminas-code                4.7.0   Extensions to the PHP Reflection API, static code scanning, and code generation
masterminds/html5                   2.7.6   An HTML5 parser and serializer.
monolog/monolog                     3.2.0   Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy                   1.11.0  Create deep copies (clones) of your objects
nikic/php-parser                    v4.15.1 A PHP parser written in PHP
phar-io/manifest                    2.0.3   Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                     3.2.1   Library for handling version information and constraints
phpdocumentor/reflection-common     2.2.0   Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock   5.3.0   With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver         1.6.2   A PSR-5 based resolver of Class names, Types and Structural Element Names
phpstan/phpdoc-parser               1.13.0  PHPDoc parser with support for nullable, intersection and generic types
phpunit/php-code-coverage           9.2.18  Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator           3.0.6   FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker                 3.1.1   Invoke callables with a timeout
phpunit/php-text-template           2.0.4   Simple template engine.
phpunit/php-timer                   5.0.3   Utility class for timing
phpunit/phpunit                     9.5.26  The PHP Unit Testing framework.
psr/cache                           3.0.0   Common interface for caching libraries
psr/container                       2.0.2   Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher                1.0.0   Standard interfaces for event handling.
psr/link                            2.0.1   Common interfaces for HTTP links
psr/log                             3.0.0   Common interface for logging libraries
sebastian/cli-parser                1.0.1   Library for parsing CLI options
sebastian/code-unit                 1.0.8   Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup  2.0.3   Looks up which function or method a line of code belongs to
sebastian/comparator                4.0.8   Provides the functionality to compare PHP values for equality
sebastian/complexity                2.0.2   Library for calculating the complexity of PHP code units
sebastian/diff                      4.0.4   Diff implementation
sebastian/environment               5.1.4   Provides functionality to handle HHVM/PHP environments
sebastian/exporter                  4.0.5   Provides the functionality to export PHP variables for visualization
sebastian/global-state              5.0.5   Snapshotting of global state
sebastian/lines-of-code             1.0.3   Library for counting the lines of code in PHP source code
sebastian/object-enumerator         4.0.4   Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector          2.0.4   Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context         4.0.4   Provides functionality to recursively process PHP variables
sebastian/resource-operations       3.0.3   Provides a list of PHP built-in functions that operate on resources
sebastian/type                      3.2.0   Collection of value objects that represent the types of the PHP type system
sebastian/version                   3.0.2   Library that helps with managing the version number of Git-hosted PHP projects
sensio/framework-extra-bundle       v6.2.9  This bundle provides a way to configure your controllers with annotations
symfony/asset                       v6.1.5  Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files
symfony/browser-kit                 v6.1.3  Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically
symfony/cache                       v6.1.7  Provides extended PSR-6, PSR-16 (and tags) implementations
symfony/cache-contracts             v3.1.1  Generic abstractions related to caching
symfony/config                      v6.1.3  Helps you find, load, combine, autofill and validate configuration values of any kind
symfony/console                     v6.1.7  Eases the creation of beautiful and testable command line interfaces
symfony/css-selector                v6.1.3  Converts CSS selectors to XPath expressions
symfony/debug-bundle                v6.1.3  Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-stack framework
symfony/dependency-injection        v6.1.5  Allows you to standardize and centralize the way objects are constructed in your application
symfony/deprecation-contracts       v3.1.1  A generic function and convention to trigger deprecation notices
symfony/doctrine-bridge             v6.1.7  Provides integration for Doctrine with various Symfony components
symfony/doctrine-messenger          v6.1.4  Symfony Doctrine Messenger Bridge
symfony/dom-crawler                 v6.1.7  Eases DOM navigation for HTML and XML documents
symfony/dotenv                      v6.1.0  Registers environment variables from a .env file
symfony/error-handler               v6.1.7  Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher            v6.1.0  Provides tools that allow your application components to communicate with each other by dispatching events and listening to them
symfony/event-dispatcher-contracts  v3.1.1  Generic abstractions related to dispatching event
symfony/expression-language         v6.1.6  Provides an engine that can compile and evaluate expressions
symfony/filesystem                  v6.1.5  Provides basic utilities for the filesystem
symfony/finder                      v6.1.3  Finds files and directories via an intuitive fluent interface
symfony/flex                        v2.2.3  Composer plugin for Symfony
symfony/form                        v6.1.7  Allows to easily create, process and reuse HTML forms
symfony/framework-bundle            v6.1.7  Provides a tight integration between Symfony components and the Symfony full-stack framework
symfony/http-client                 v6.1.7  Provides powerful methods to fetch HTTP resources synchronously or asynchronously
symfony/http-client-contracts       v3.1.1  Generic abstractions related to HTTP clients
symfony/http-foundation             v6.1.7  Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                 v6.1.7  Provides a structured process for converting a Request into a Response
symfony/intl                        v6.1.7  Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library
symfony/mailer                      v6.1.7  Helps sending emails
symfony/maker-bundle                v1.47.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/messenger                   v6.1.6  Helps applications send and receive messages to/from other applications or via message queues
symfony/mime                        v6.1.7  Allows manipulating MIME messages
symfony/monolog-bridge              v6.1.2  Provides integration for Monolog with various Symfony components
symfony/monolog-bundle              v3.8.0  Symfony MonologBundle
symfony/notifier                    v6.1.0  Sends notifications via one or more channels (email, SMS, ...)
symfony/options-resolver            v6.1.0  Provides an improved replacement for the array_replace PHP function
symfony/password-hasher             v6.1.3  Provides password hashing utilities
symfony/phpunit-bridge              v6.1.6  Provides utilities for PHPUnit, especially user deprecation notices management
symfony/polyfill-intl-grapheme      v1.26.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu           v1.26.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn           v1.26.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer    v1.26.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring           v1.26.0 Symfony polyfill for the Mbstring extension
symfony/process                     v6.1.3  Executes commands in sub-processes
symfony/property-access             v6.1.7  Provides functions to read and write from/to an object or array using a simple string notation
symfony/property-info               v6.1.7  Extracts information about PHP class' properties using metadata of popular sources
symfony/proxy-manager-bridge        v6.1.0  Provides integration for ProxyManager with various Symfony components
symfony/routing                     v6.1.7  Maps an HTTP request to a set of configuration variables
symfony/runtime                     v6.1.3  Enables decoupling PHP applications from global state
symfony/security-bundle             v6.1.3  Provides a tight integration of the Security component into the Symfony full-stack framework
symfony/security-core               v6.1.7  Symfony Security Component - Core Library
symfony/security-csrf               v6.1.0  Symfony Security Component - CSRF Library
symfony/security-http               v6.1.7  Symfony Security Component - HTTP Integration
symfony/serializer                  v6.1.6  Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.
symfony/service-contracts           v3.1.1  Generic abstractions related to writing services
symfony/stopwatch                   v6.1.5  Provides a way to profile code
symfony/string                      v6.1.7  Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way
symfony/translation                 v6.1.6  Provides tools to internationalize your application
symfony/translation-contracts       v3.1.1  Generic abstractions related to translation
symfony/twig-bridge                 v6.1.7  Provides integration for Twig with various Symfony components
symfony/twig-bundle                 v6.1.1  Provides a tight integration of Twig into the Symfony full-stack framework
symfony/validator                   v6.1.7  Provides tools to validate values
symfony/var-dumper                  v6.1.6  Provides mechanisms for walking through any arbitrary PHP variable
symfony/var-exporter                v6.1.3  Allows exporting any serializable PHP data structure to plain PHP code
symfony/web-link                    v6.1.0  Manages links between resources
symfony/web-profiler-bundle         v6.1.6  Provides a development tool that gives detailed information about the execution of any request
symfony/yaml                        v6.1.6  Loads and dumps YAML files
theseer/tokenizer                   1.2.1   A small library for converting tokenized PHP source code into XML and potentially other formats
twig/extra-bundle                   v3.4.0  A Symfony bundle for extra Twig extensions
twig/twig                           v3.4.3  Twig, the flexible, fast, and secure template language for PHP
webmozart/assert                    1.11.0  Assertions to validate method input/output with nice error messages.
maxhelias commented 1 year ago

Wouldn't be a problem with the Symfony CLI version?

Jesper15 commented 1 year ago

I am using Symfony CLI version 5.4.17. I installed it using brew

OskarStark commented 1 year ago

I am using the following version:

CleanShot 2022-11-07 at 11 04 46@2x
klopschlike commented 1 year ago

I ran into the exact same issue as described by @Jesper15.

There was an existing old version of composer.phar in the folder where I executed symfony new my_project_directory2 --version="6.1.*" --webapp.

The symfony command ran fine after deleting the existing composer.phar.