UltimateModuleCreator / Umc_Base

MIT License
78 stars 40 forks source link

setup:di:compile breaks on 0 indexed object arrays #36

Open ddoddsr opened 7 years ago

ddoddsr commented 7 years ago

Built a new and untouched 2.1.7 Loaded Umc_Base on it Ran module:enable setup:upgrade

and ran setup:di:compile and received this message

[Exception] Warning: ltrim() expects parameter 1 to be string, array given in /Users/dandodd/Projects/tpmco.dev/setup/src/Magento/Setup/Module/Di/Compiler/Config/Chain/BackslashTrim.php on line 61

This looks like a Magento issue with 0 indexed objects. https://github.com/magento/magento2/issues/8803

I thought about changing the index 0 to 1 and 1 to 2 & etc but that would likely break something else. What do you think about trying that?

The Umc_Base does run so I build a test Module and enabled upgraded and received this error while compiling Compilation was started. Interceptors generation... 4/7 [================>-----------] 57% 3 mins 334.2 MiBMiBB08.2 MiB [RuntimeException]
Class Tpmco\Test\Model\UploaderPool does not exist

UltimateModuleCreator commented 7 years ago

Hello Dan. First of all, thanks for reporting this. getting help with the testing from the community helps me a lot. I developed the latest version of the UMC on Magento 2.2-dev, the version available on github and I didn't get the compilation error. I will try on 2.1.7. But I need your help even more. What version of the Umc_Base module are you using? I just released yesteday 2.0.0-beta2. I don't know if you got the latest version or the beta1 version. As for the generated module, please send me the file var/umc/modules/Tpmco_Test.xml. This way I can reproduce the module on my side and investigate the issue further. Thank you again for all your help. Marius.

On Thu, Jul 6, 2017 at 7:44 PM, Dan Dodd notifications@github.com wrote:

Built a new and untouched 2.1.7 Loaded Umc_Base on it Ran module:enable setup:upgrade

and ran setup:di:compile and received this message

[Exception] Warning: ltrim() expects parameter 1 to be string, array given in /Users/dandodd/Projects/tpmco.dev/setup/src/Magento/Setup/ Module/Di/Compiler/Config/Chain/BackslashTrim.php on line 61

This looks like a Magento issue with 0 indexed objects. https://github.com/magento/magento2/issues/8803 http://url

I thought about changing the index 0 to 1 and 1 to 2 & etc but that would likely break something else. What do you think about trying that?

The Umc_Base does run so I build a test Module and enabled upgraded and received this error while compiling Compilation was started. Interceptors generation... 4/7 [================>-----------] 57% 3 mins 334.2 MiBMiBB08.2 MiB [RuntimeException] Class Tpmco\Test\Model\UploaderPool does not exist

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/UltimateModuleCreator/Umc_Base/issues/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AK3PT1es6i8pQf6nc04IlilbE47Ub6Ajks5sLQ8GgaJpZM4OP5jH .

ddoddsr commented 7 years ago

2.0.0-beta2 I was using the Umc_Base with the latest commit "Pull Merge Request #35 ... from parent/relation" I added the Tpmco_Test to app/code/Tpmco/Test ...

Tpmco_Test.xml.zip

ddoddsr commented 7 years ago

I think my issues began at compile of Umc_Base.


bin/magento  module:enable Umc_Base
bin/magento setup:upgrade 
bin/magento setup:di:compile

And it had an exception:

Compilation was started.
Area configuration aggregation... 5/7 [====================>-------]  71% 3 mins 172.0 MiB0 MiB

  [Exception]                                                                                                                                                                  
  Warning: ltrim() expects parameter 1 to be string, array given in /Users/dandodd/Projects/umc.dev/setup/src/Magento/Setup/Module/Di/Compiler/Config/Chain/BackslashTrim.php  
   on line 61          

SO I don't get a clean install of Umc_Base.

lanrosta commented 6 years ago

Any word on this one Dev's? Same issue here on Magento ce 217.

lanrosta commented 6 years ago

Fix: I had to start a new project using the magento 2.2.1-dev (from magento 2 github), then redownloaded this repo (as .zip on 11-02-2017) to get this issue resolved. Magento 217 just doesn't want to work with this UMC 2 so well when it comes to setup:di:compile. Kept getting this same ltrim() error using that one.

UltimateModuleCreator commented 6 years ago

@lanrosta Sorry, but I didn't have too much spare time to maintain this repo for now. I'm one-man-show on this. The issue will remain open until I get some spare time to work on it. Thanks for reporting this.