Deprecated debug package: - symfony

I have found a PHP Notice in the logs:
[info] User Deprecated: The "Symfony\Component\Debug\ErrorHandler" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\ErrorHandler" instead.
This code is invoked from Vendor folder, so I have been checking what package is using this package. I have found that the package symfony/monolog-bundle is the problem.
I am using:
https://packagist.org/packages/symfony/monolog-bundle#v3.6.0
It requires: https://packagist.org/packages/symfony/http-kernel#v4.3.11
It requires the problematic package: https://packagist.org/packages/symfony/debug
I have been trying to upgrade the package http-kernel to a newest version which not using symfony debug, it means from http-kernel>v5.0
I am executing this code and receiving this error:
MacBook-Pro-de-Pablo-Garces:cp-igw pgarces$ composer require "symfony/error-handler:5.0.*"
./composer.json has been updated
Running composer update symfony/error-handler
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/http-kernel[v4.4.0, ..., v4.4.18] require symfony/error-handler ^4.4 -> found symfony/error-handler[v4.4.0, ..., v4.4.18] but it conflicts with your root composer.json require (5.0.*).
- Root composer.json requires symfony/http-kernel ^4.4 -> satisfiable by symfony/http-kernel[v4.4.0, ..., v4.4.18].
How can I solve it?

Related

Cant install sonata admin with symfony 5

$ composer require sonata-project/admin-bundle
Using version ^3.87 for sonata-project/admin-bundle
./composer.json has been updated
Running composer update sonata-project/admin-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sonata-project/admin-bundle[3.87.0, ..., 3.x-dev] require symfony/console ^4.4 -> found symfony/console[v4.4.0-BETA1, ..., 4.4.x-dev] but it conflicts with your root composer.json require (5.2.*).
- Root composer.json requires sonata-project/admin-bundle ^3.87 -> satisfiable by sonata-project/admin-bundle[3.87.0, 3.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
My suggestion is to use EasyAdmin bundle which is compatible with Symfony 5.3. It has only one bug which is related to viewing images thumbnail in easyadmin panel. For now the only solution is to use TextareaField instead of ImageField in DasboardCrudController.
According to an issue from their tracker and packagist.org, the most recent version of that package (which is 3.87.0) is not fully compatible with Symfony 5. You either need to wait until this is resolved, or downgrade Symfony in your application to v4.4

Problem with #template annotation after composer update

I updated Doctrine to newest version in my Sylius project. After update i am receiving following error.
[Semantical Error] The annotation "#template" in class Doctrine\Common\Collections\ArrayCollection was never imported. Did you maybe forget to add a "use" statement for this annotation?
Can anybody help me?
Update Log:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 5 updates, 0 removals
- Updating doctrine/collections (v1.3.0 => v1.6.0): Loading from cache
- Installing doctrine/reflection (v1.0.0): Loading from cache
- Installing doctrine/event-manager (v1.0.0): Loading from cache
- Installing doctrine/persistence (v1.1.0): Loading from cache
- Updating doctrine/common (v2.8.1 => v2.10.0): Loading from cache
- Updating doctrine/dbal (v2.6.3 => v2.9.2): Loading from cache
- Updating doctrine/orm (v2.5.14 => v2.6.3): Loading from cache
- Updating symfony/doctrine-bridge (v4.1.11 => v4.2.4): Loading from cache
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Package symplify/token-runner is abandoned, you should avoid using it. Use https://github.com/symplify/codingstandard instead.
Writing lock file
Generating autoload files
muglug/package-versions-56: Generating version class...
muglug/package-versions-56: ...done generating version class
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
What about running composer thanks now?
This will spread some 💖 by sending a ★ to 271 GitHub repositories of your fellow package maintainers.
Executing script cache:clear [OK]
Executing script assets:install public [OK]
I has the same error when auto updating doctrine/collections (v1.5.0 => v1.6.0).
Try to use v1.5.0 version.
Same problem, this seem like one of your dependency in require or require-dev have a broken dependency. Try upgrading only the dependency you need. If you upgrade one and that it fail with this error, report the bug to the maintainer.
so yes - if you will perform a downgrade of package doctrine/collection, to version 1.5, everything works well.
Here is some info:
https://github.com/doctrine/collections/issues/180
This issue was fixed in 1.6.1 release. Just run a composer update and it should be solved. See the release details here for more info.

The package is not available in a stable-enough version

Following situation:
app requires andig/dbcopy in dev version:
composer require andig/dbcopy:dev-master
andig/dbcopy requires symfony/consolein dev version (due to a bug in 2.5):
"require": {
"doctrine/dbal": "2.4.*",
"symfony/console": "2.6.*#dev"
},
Now, when adding andig/dbcopy to the app using composer require, composer complains about stability:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for andig/dbcopy dev-master -> satisfiable by andig/dbcopy[dev-master].
- andig/dbcopy dev-master requires symfony/console 2.6.*#dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
No minimum-stability settings have been defined, the app already has a dependency on a dev-master package.
I've read https://groups.google.com/forum/#!topic/composer-dev/_g3ASeIFlrc/discussion but I'm still confused as to why composer fails to install even though
all stability settings are explicitly defined and
the app itself already has another dependency on "dev-master" which works?
Just put:
"symfony/console": "2.6.*#dev"
in your main composer.json. You must override stability requirement directly.

Sonata Easy-Extends bundle won't install

I am trying to set up the Sonata User Bundle. As per the instructions I am also trying to install Sonata Easy-Extends (according to these instructions).
Unfortunately, I can't get Easy-Extends installed via composer (on Win7):
>composer require sonata-project/easy-extends-bundle
Please provide a version constraint for the sonata-project/easy-extends-bundle requirement: dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package sonata-project/easy-extends-bundle could not be found in any version, there may be a typo in the package name.
Problem 2
- Installation request for symfony/framework-standard-edition 2.5.x-dev -> satisfiable by symfony/framework-standard-edition[2.5.x-dev].
- symfony/framework-standard-edition 2.5.x-dev requires sonata-project/easy-extends-bundle 2.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
I have tried various version constraints, including 2.0 as suggested in the instructions.
What am I missing?
TIA
Matt
Based on a discussion in the sonata-users Google group, I managed to install the bundle by manually adding the following to my composer.json:
...
"sonata-project/easy-extends-bundle": "dev-master",
...
Related thread in GG can be found here.

Resource Bundle 0.2* installation failed in sylius?

I want to install resource bundle in sylius i used below command using cmd
composer require sylius/resource-bundle:0.2.*
when i ran above command i get below error
composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sylius/taxation-bundle 0.1.x-dev requires sylius/resource-bundle 0.1.* -> satisfiable by sylius/resour
ce-bundle[v0.1.0].
- sylius/taxation-bundle 0.1.x-dev requires sylius/resource-bundle 0.1.* -> satisfiable by sylius/resour
ce-bundle[v0.1.0].
- Can only install one of: sylius/resource-bundle[v0.2.0, v0.1.0].
- Can only install one of: sylius/resource-bundle[v0.2.0, v0.1.0].
- Installation request for sylius/resource-bundle 0.2.* -> satisfiable by sylius/resource-bundle[v0.2.0]
.
- Installation request for sylius/taxation-bundle == 0.1.9999999.9999999-dev -> satisfiable by sylius/ta
xation-bundle[0.1.x-dev].
Installation failed, reverting composer.json to its original content.
Please share some knowledge..Thanks in advance.
Why you want to install this bundle? I is already there as it is dependency of all other bundles. You do not need to install it separately. And these bundles use 0.1.* version currently.

Resources