Closed lukepass closed 2 years ago
You need to use : https://github.com/sonata-project/SonataMediaBundle/releases/tag/4.0.0-RC2
Or downgrade the whole sonata to 3. (Sonata 3 works with php 8)
Closing this as there is no bug to be solved.
Thanks @jordisala1991 for the quick answer, so the problem is that I installed SonataAdminBundle v4.4 before installing SonataMediaBundle? I tried in an empty project but unfortunately the error is the same.
The problem is that you need to allow non stable dependencies to make use of media bundle 4.0 rc2
Ok but if SonataMediaBundle v3 allows PHP 8, why is it showing an error? It's because I already installed SonataAdminBundle v4.4?
Yes. Composer cant find a stable version of media bundle that matches your previous requirements
Environment
Sonata packages
show
``` $ composer show --latest 'sonata-project/*' sonata-project/admin-bundle 4.4.0 4.4.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.8.0 4.8.0 Symfony SonataBlockBundle sonata-project/cache 2.2.0 2.2.0 Cache library sonata-project/doctrine-extensions 1.15.0 1.15.0 Doctrine2 behavioral extensions sonata-project/exporter 2.9.1 2.9.1 Lightweight Exporter library sonata-project/form-extensions 1.12.3 1.12.3 Symfony form extensions sonata-project/twig-extensions 1.9.0 1.9.0 Sonata twig extensions ```
Symfony packages
show
``` $ composer show --latest 'symfony/*' Color legend: - patch or minor release available - update recommended - major release available - update possible - up to date version symfony/amqp-messenger v5.4.0 v5.4.0 Symfony AMQP extension Messenger Bridge symfony/asset v5.4.0 v6.0.0 Manages URL generation and versioning of web... symfony/cache v5.4.0 v6.0.0 Provides an extended PSR-6, PSR-16 (and tags... symfony/cache-contracts v2.5.0 v3.0.0 Generic abstractions related to caching symfony/config v5.4.0 v6.0.0 Helps you find, load, combine, autofill and ... symfony/console v5.4.0 v6.0.0 Eases the creation of beautiful and testable... symfony/debug-bundle v5.4.0 v6.0.0 Provides a tight integration of the Symfony ... symfony/dependency-injection v5.4.0 v6.0.0 Allows you to standardize and centralize the... symfony/deprecation-contracts v3.0.0 v3.0.0 A generic function and convention to trigger... symfony/doctrine-bridge v5.4.0 v6.0.0 Provides integration for Doctrine with vario... symfony/doctrine-messenger v5.4.0 v6.0.0 Symfony Doctrine Messenger Bridge symfony/dotenv v5.4.0 v6.0.0 Registers environment variables from a .env ... symfony/error-handler v5.4.0 v6.0.0 Provides tools to manage errors and ease deb... symfony/event-dispatcher v5.4.0 v6.0.0 Provides tools that allow your application c... symfony/event-dispatcher-contracts v2.5.0 v3.0.0 Generic abstractions related to dispatching ... symfony/expression-language v5.4.0 v6.0.0 Provides an engine that can compile and eval... symfony/filesystem v5.4.0 v6.0.0 Provides basic utilities for the filesystem symfony/finder v5.4.0 v6.0.0 Finds files and directories via an intuitive... symfony/flex v2.0.1 v2.0.1 Composer plugin for Symfony symfony/form v5.4.0 v6.0.0 Allows to easily create, process and reuse H... symfony/framework-bundle v5.4.0 v6.0.0 Provides a tight integration between Symfony... symfony/http-client v5.4.0 v6.0.0 Provides powerful methods to fetch HTTP reso... symfony/http-client-contracts v2.5.0 v3.0.0 Generic abstractions related to HTTP clients symfony/http-foundation v5.4.0 v6.0.0 Defines an object-oriented layer for the HTT... symfony/http-kernel v5.4.0 v6.0.0 Provides a structured process for converting... symfony/intl v5.4.0 v6.0.0 Provides a PHP replacement layer for the C i... symfony/mailer v5.4.0 v6.0.0 Helps sending emails symfony/maker-bundle v1.36.4 v1.36.4 Symfony Maker helps you create empty command... symfony/messenger v5.4.0 v6.0.0 Helps applications send and receive messages... symfony/mime v5.4.0 v6.0.0 Allows manipulating MIME messages symfony/monolog-bridge v5.4.0 v6.0.0 Provides integration for Monolog with variou... symfony/monolog-bundle v3.7.1 v3.7.1 Symfony MonologBundle symfony/notifier v5.4.0 v6.0.0 Sends notifications via one or more channels... symfony/options-resolver v5.4.0 v6.0.0 Provides an improved replacement for the arr... symfony/password-hasher v5.4.0 v6.0.0 Provides password hashing utilities symfony/polyfill-intl-grapheme v1.23.1 v1.23.1 Symfony polyfill for intl's grapheme_* funct... symfony/polyfill-intl-icu v1.23.0 v1.23.0 Symfony polyfill for intl's ICU-related data... symfony/polyfill-intl-idn v1.23.0 v1.23.0 Symfony polyfill for intl's idn_to_ascii and... symfony/polyfill-intl-normalizer v1.23.0 v1.23.0 Symfony polyfill for intl's Normalizer class... symfony/polyfill-mbstring v1.23.1 v1.23.1 Symfony polyfill for the Mbstring extension symfony/polyfill-php73 v1.23.0 v1.23.0 Symfony polyfill backporting some PHP 7.3+ f... symfony/polyfill-php80 v1.23.1 v1.23.1 Symfony polyfill backporting some PHP 8.0+ f... symfony/polyfill-php81 v1.23.0 v1.23.0 Symfony polyfill backporting some PHP 8.1+ f... symfony/process v5.4.0 v6.0.0 Executes commands in sub-processes symfony/property-access v5.4.0 v6.0.0 Provides functions to read and write from/to... symfony/property-info v5.4.0 v6.0.0 Extracts information about PHP class' proper... symfony/proxy-manager-bridge v5.4.0 v6.0.0 Provides integration for ProxyManager with v... symfony/redis-messenger v5.4.0 v5.4.0 Symfony Redis extension Messenger Bridge symfony/routing v5.4.0 v6.0.0 Maps an HTTP request to a set of configurati... symfony/runtime v5.4.0 v6.0.0 Enables decoupling PHP applications from glo... symfony/security-acl v3.2.0 v3.2.0 Symfony Security Component - ACL (Access Con... symfony/security-bundle v5.4.0 v6.0.0 Provides a tight integration of the Security... symfony/security-core v5.4.0 v6.0.0 Symfony Security Component - Core Library symfony/security-csrf v5.4.0 v6.0.0 Symfony Security Component - CSRF Library symfony/security-guard v5.4.0 v5.4.0 Symfony Security Component - Guard symfony/security-http v5.4.0 v6.0.0 Symfony Security Component - HTTP Integration symfony/serializer v5.4.0 v6.0.0 Handles serializing and deserializing data s... symfony/service-contracts v2.4.1 v3.0.0 Generic abstractions related to writing serv... symfony/stopwatch v5.4.0 v6.0.0 Provides a way to profile code symfony/string v5.4.0 v6.0.0 Provides an object-oriented API to strings a... symfony/translation v5.4.0 v6.0.0 Provides tools to internationalize your appl... symfony/translation-contracts v2.5.0 v3.0.0 Generic abstractions related to translation symfony/twig-bridge v5.4.0 v6.0.0 Provides integration for Twig with various S... symfony/twig-bundle v5.4.0 v6.0.0 Provides a tight integration of Twig into th... symfony/validator v5.4.0 v6.0.0 Provides tools to validate values symfony/var-dumper v5.4.0 v6.0.0 Provides mechanisms for walking through any ... symfony/var-exporter v5.4.0 v6.0.0 Allows exporting any serializable PHP data s... symfony/web-link v5.4.0 v6.0.0 Manages links between resources symfony/web-profiler-bundle v5.4.0 v6.0.0 Provides a development tool that gives detai... symfony/webapp-meta v1.0.0 v1.0.0 A meta package for the web app pack symfony/webpack-encore-bundle v1.13.1 v1.13.1 Integration with your Symfony app & Webpack ... symfony/yaml v5.4.0 v6.0.0 Loads and dumps YAML files ```
PHP version
Subject
Hello, I am trying to install SonataMediaBundle with Symfony 5.4 and PHP 8 but unfortunately it gives an error. I tried many different things:
Experiment 1
Experiment 2 (without media-orm-pack)
Experiment 3 (with
-W
)Thanks!
Minimal repository with the bug
n/a
Steps to reproduce
Install the package as written above.
Expected results
The package installs correctly.
Actual results
The package gives the above errors.