oveleon / contao-component-style-manager

This extension is for the Contao CMS and allows you to easily manage and provide custom categories and groups for CSS classes.
MIT License
23 stars 6 forks source link

Controller / Route Problem #95

Closed rorych closed 1 year ago

rorych commented 1 year ago

Prerequisites

Please select the topic(s) that most closely match your concern

Backend (PHP/CSS)

Description

Contao: 5.2.7 PHP 8.1.25 oveleon/contao-component-style-manager: 3.4.2

--

After composer update from Contao 5.2.6 to 5.2.7 (and all the symfony upgrades to v6.4.0) your bundle is throwing following error on cache clear. Can you help me with this?

Relevant log output

In FileLoader.php line 182:
  Route alias "Oveleon\ContaoComponentStyleManager\Controller\BackendModule\I  
  mportController" can not reference itself in vendor/oveleon/contao-component-style-manager/src/Controller (which is be  
  ing imported from "/vendor/oveleon/contao-co  
  mponent-style-manager/src/ContaoManager/../Resources/config/routes.yaml").   
  Make sure there is a loader supporting the "annotation" type.  
In RouteCollection.php line 375:
  Route alias "Oveleon\ContaoComponentStyleManager\Controller\BackendModule\I  
  mportController" can not reference itself.     
fritzmg commented 1 year ago

It appears you are missing contao/conflicts in your composer.json. You need to add that and then run a composer update.

rorych commented 1 year ago

Thanks for the fast reply, i have following in my composer.json: "contao/conflicts": "@dev"

Would you recommend to have a version set?

fritzmg commented 1 year ago

No, @dev is correct. Anyway, this error is unrelated to this extension. The error is caused by symfony/routing: 6.4.0, see https://github.com/symfony/symfony/issues/52801. This is why a conflict was added in contao/conflicts: https://github.com/contao/conflicts/pull/55. Run a full composer update, then symfony/routing should automatically be downgraded.

rorych commented 1 year ago

Ah i am getting "v6.4.0-RC1" for symfony/routing. Probably my problem, because i have "minimum-stability" set to dev (and prefer-stable = true). I will wait it out in that case ;)

fritzmg commented 1 year ago

Why did you set the minimum stability lower?

rorych commented 1 year ago

Because of custom bundles, that are still in development.

fritzmg commented 1 year ago

I would recommend to not lower the minimum stability. Instead you should require any non stable dependencies directly.