oroinc / crm

Main OroCRM package with core functionality.
Other
649 stars 212 forks source link

Incorrect Platform dependency #350

Open jimohalloran opened 4 years ago

jimohalloran commented 4 years ago

Summary
The oro/crm package declares a dependency on oro/platform that is incorrect. Requires "4.1.*" actually "^4.1.1".

Steps to reproduce

Start with a blank "crm-application" at 4.1.0. Run composer install to install all dependencies and create the lock file. Add a dependency on oro/platform to the composer.json that forces platform 4.1.0 to be installed. Then run composer update to upgrade to upgrade to 4.1.2.

All dependencies will resolve correctly, and oro/crm 4.1.2 will be installed with oro/platform 4.1.0.

Actual Result All attempts at accessing a page will result in the error:

Attempted to load class "BasicPermission" from namespace "Oro\Bundle\SecurityBundle\Acl".
Did you forget a "use" statement for another namespace?

Because BasicPermission is not present in Platfrom 4.1.0, and wasn't introduced until 4.1.1.

Expected Result
oro/crm 4.1.1 and later actually requires oro/platform 4.1.1 and later. Expected that the dependencies defined in composer.json should reflect this fact, and the composer update should fail with an error because dependencies could not be resolved.

Details about your environment

Not platform specific, other details (PHP version, etc) not applicable.

Additional information
Steps to reproduce describe a simple way to reproduce this problem, and obviously pinning the oro/platform version in your application's composer.json isn't wise. However, this is the simplest way to reproduce the problem. My own situation was a 3rd party package that both my application and oro/platform both depend upon which have conflicting version requirements. The conflict exists in 4.1.2, but not in 4.1.0, and this prevented composer upgrading oro/platform. Ideally I'd have liked to see this as a dependency resolution failure which prevented the upgrade, not as a totally broken application post upgrade that I needed to spend hours investigating.

anyt commented 4 years ago

Thank you for the report! Internal ticket id #BAP-17319