Working with multiple version of openzeppelin

Hi all, I am trying to work with multiple versions of @openzeppelin, this is because I am using the @openzeppelin2.x crowdsales using sol 0.5 and I had some contracts using sol 0.8. Please How do I manage both?

And I observed that I could not use solc 0.8 in the contract inheriting from the @openzeppelin2.x crowdsales since it is built with solc 0.5 hence I'm forced to use solc 0.5 in my contract. See the error below:

> ParserError: Source file requires different compiler version (current compiler is 0.8.16+commit.07a7930e.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version
> --> @openzeppelin/contracts/crowdsale/Crowdsale.sol:1:1:
> |
> 1 | pragma solidity ^0.5.0;
> | ^^^^^^^^^^^^^^^^^^^^^^^

Hey @dtobi59
You could upgrade the crowdsale contract and use a newer version

@FreezyEx thanks for your response. I will really appreciate it if you point me to resources to help me to upgrade the crowdsales contract. Thanks

Would this be a good approach to follow?

@dtobi59 It should be fine but depends on what you want to do

Or do you think rewriting my code to use solc 0.5 will be best? Really confused. Please help , Thanks

Wow! it's been a journey. I have successfully upgraded the crowd sales smart contract to solc 0.8.9 with all test passing. My question now is should make this a new package on npm or can I submit a PR to the Openzepplin repo?

@dtobi59 We are not at the moment interested in adding back the Crowdsale contracts in the repo.

Thanks @frangio for your response. So I created the crowdsale contracts from the openzeppellin repo using solc 0.8.9. see repo here -> https://github.com/dtobi59/crowdsale