UltimateModuleCreator / Umc_Base

MIT License
78 stars 40 forks source link

PHP Fatal error: Cannot use 'Int' as class name as it is reserved in /app/code/Umc/Base/Model/Core/Attribute/Type/Int.php on line 20 #26

Closed mozgbrasil closed 7 years ago

mozgbrasil commented 8 years ago

Hello good afternoon

See image as the error being displayed in the module installation process after the command

php bin/magento setup:upgrade

http://pasteboard.co/1f6ZrtSZ.png

mozgbrasil commented 8 years ago

Hello Good afternoon my friend

I believe that by applying the following change should work because it worked for me here

1)

Rename the file

/app/code/Umc/Base/Model/Core/Attribute/Type/Int.php

To

/app/code/Umc/Base/Model/Core/Attribute/Type/Integer.php

and edit

From

class Int

To

class Integer

2)

Edit content of file

/app/code/Umc/Base/Model/Core/Attribute/Type/Decimal.php

From

class Decimal extends Int

To

class Decimal extends Integer

I hope to have contributed to the improvement of module

maderlock commented 7 years ago

Thanks! I'm going to give that a try. If you really want to contribute, consider forking the repo, applying your change and submitting a pull request. Then everyone can benefit from this :)

maderlock commented 7 years ago

I had to change a couple of extra references, but @mozgbrasil had the right approach. I'll make a pull request.

UltimateModuleCreator commented 7 years ago

@mozgbrasil Thanks for this. The extension is under heavy refactoring right now. This was the first thing I changed to make it compatible with PHP7.

UltimateModuleCreator commented 7 years ago

@This should be fixed in the new version. (2.0.0-beta1)