hello !
Just tried to install webprofile and got...

Fatal error: Cannot use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcherInterface because the name is already in use in /Users/farmazon/Sites/devdesktop/artodev/modules/currency/src/ConfigImporter.php on line 16

Tried also the alpha1. The same.

Regardless the error, the module appears to be activated but with no output.
So i have uninstalled it.
Any idea how to solve this?

Thanks!

Comments

Mircea Shanti created an issue. See original summary.

lussoluca’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,
I've just installed currency and then webprofiler and all works correctly. Symfony\Component\EventDispatcher\EventDispatcherInterface isn't used anywhere in webprofiler so I don't understand where this error comes from.

Could you detail more your environment: php version, how do you install modules (drush, composer, ...), core version?

Mircea Shanti’s picture

Hello !

ON LOCAL
Latest version of Devel.
PHP 5.6.19
Webserver: Apache/2.4.17 (Unix) OpenSSL/1.0.1h mod_fcgid/2.3.9
Drupal 8.2.0-beta1 (but was 8.1.7 when i have reported the error)
Fails with the error mentioned above.
Devel + Devel generate works just fine. The error occurs only on Webprofile

ON LIVE
Latest version of Devel.
PHP 5.6.22
Webserver: LiteSpeed
Drupal 8.2.0-beta1 (but was 8.1.7 when i have reported the error)
Fails with "The website encountered an unexpected error. Please try again later."
Devel + Devel generate works just fine. The error occurs only on Webprofile

Used Composer for both Currency and Devel. Also Composer for Currency and regular install for Devel.

Thanks !

willzyx’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing for lack of activity. Feel free to reopen if the issue still exists

drugan’s picture

I had this issue when trying to enable payment module and submodules and dependencies one of which is currency module.

Fatal error: Cannot use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcherInterface because the name is already in use in /home/uladmin/public_html/amonoset/web/modules/contrib/currency/src/ConfigImporter.php on line 16

Despite the error the currency module was enabled but no one of payment modules. After disabling webprofiler I've successfully installed those modules.
Only local images are allowed.

There is some related issue that might give you some hint, in particular this link. Note that I didn't apply the patch posted on the issue though was able to install and use all payment modules without any errors just after uninstalling webprofiler.

So the culprit is webprofiler which is cool and useful module but cannot be used in some environments.

lussoluca’s picture

Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)

I don't think that the cause is Webprofiler, it seems a PHP OPCache bug.
Please could you apply the patch in #2670238: Fatal: Cannot use Symfony\Component\EventDispatcher\EventDispatcherInterface and then enable webprofiler?

drugan’s picture

StatusFileSize
new179.17 KB
new186.09 KB

After applying the #2670238: Fatal: Cannot use Symfony\Component\EventDispatcher\EventDispatcherInterface patch the webprofiler is installed and works almost flawlessly. The exception is one minor issue which is quite annoying and could be found here too: #2770741: Enabling of webprofiler destroys website

shortcut error

It happens on every page you are visiting first time and thrown according my settings by devel module. If you look at the arguments you'll see that I have 5 shortcuts passed to uasort(). Shortcuts are sorted as expected but return value of the function is FALSE.

false

It is a bit strange because the process of sorting in sort() does not return FALSE on any cycle, only 1 or -1. Obviously it is not the webprofiler issue but why it reacts on the uasort() return value even if it does not involved anywhere in the getShortcuts() method?

UPD: the answer is might be there: http://stackoverflow.com/a/10985500/3944647

I believe the webprofiler somehow interferes into the PHP run dumping the data or similar and may be that is the cause of this issue too. It would be interesting to know the maintainer mind on the latter.

lussoluca’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I believe the webprofiler somehow interferes into the PHP run dumping the data or similar and may be that is the cause of this issue too. It would be interesting to know the maintainer mind on the latter.

More details here #2567035: Database::startLog() cause a notice in Shortcut::sort(). Unfortunately we cannot do anything at Webprofiler level if we want to log the database queries.