Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile #8

Closed
bvboas opened this issue Jul 18, 2017 · 8 comments
Closed

Does not compile #8

bvboas opened this issue Jul 18, 2017 · 8 comments
Assignees
Labels

Comments

@bvboas
Copy link

bvboas commented Jul 18, 2017

Changing from dev to production gives the following error:

PHP Fatal error:  Declaration of Snowdog\Menu\Block\NodeType\AbstractNode::getHtml() must be compatible with Snowdog\Menu\Api\NodeTypeInterface::getHtml(Snowdog\Menu\Api\int $nodeId, Snowdog\Menu\Api\int $level) in /home/user/public_html/app/code/Snowdog/Menu/Block/NodeType/AbstractNode.php on line 20
@dawiddczaja
Copy link
Contributor

Hello, I tried reproduce bug in CE and EE version but without effect. Which magento and magento2-menu version you have ?

@SilvanLaroo
Copy link

Hi,

I'm facing the same issue. I'm using Magento 2.1.7 and the latest version of your extension.

@mcjwsk
Copy link
Contributor

mcjwsk commented Jul 27, 2017

@bvboas @SilvanLaroo fixed on develop branch. Please test.

@mcjwsk mcjwsk added the bug label Jul 27, 2017
@SilvanLaroo
Copy link

I've just installed the version from dev-develop, but got a similar error:
Warning: Uncaught Exception: Warning: Declaration of Snowdog\Menu\Block\NodeType\Category\Interceptor::isCurrentCategory($nodeId) should be compatible with Snowdog\Menu\Block\NodeType\Category::isCurrentCategory(int $nodeId) in

@mcjwsk
Copy link
Contributor

mcjwsk commented Jul 27, 2017

@SilvanLaroo thanks but that's not directly related to this issue. I will open a separate issue for that.
Anyway please confirm the error reported here has been fixed, ok?

@SilvanLaroo
Copy link

It's related right? The problem is that Magento does not include Scalar Type hinting in the var/generation files.

@mcjwsk
Copy link
Contributor

mcjwsk commented Jul 27, 2017

That's right. Magento Team fixed it here magento/magento2#6106 but it hasn't been merged into the master branch yet.
I created a separate task to remove all PHP7 type hints in our module: #10

@mcjwsk
Copy link
Contributor

mcjwsk commented Jul 28, 2017

The fix has been merged into the develop branch (bd50cd2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants